diff --git a/constants.js b/constants.js index ba523361..93c2ff4c 100644 --- a/constants.js +++ b/constants.js @@ -211,6 +211,7 @@ const DEFAULT_PARAMETERS = { SIMULATE_TXS: false, FORCE_REPLACE_TXS: false, GAS_LIMIT_MULTIPLIER: 1, + GAS_PRICE_MULTIPLIER: 1, }; const DEFAULT_GAS_PRICE = { diff --git a/dist/dkg.min.js b/dist/dkg.min.js index 671cae3b..d8c098b4 100644 --- a/dist/dkg.min.js +++ b/dist/dkg.min.js @@ -1,2 +1,2 @@ /*! For license information please see dkg.min.js.LICENSE.txt */ -var DKG;(()=>{var e={9660:e=>{const t={PUBLIC:"public",PRIVATE:"private",ALL:"all"},r={N_QUADS:"n-quads",JSON_LD:"json-ld"},n={LATEST:"LATEST",FINALIZED:"LATEST_FINALIZED"},i={PUBLIC_KG:"PUBLIC_KG",LOCAL_KG:"LOCAL_KG"},o={CURRENT:"CURRENT",HISTORICAL:"HISTORICAL"},a={ENVIRONMENT:"mainnet",PORT:8900,FREQUENCY:5,MAX_NUMBER_OF_RETRIES:5,HASH_FUNCTION_ID:1,IMMUTABLE:!1,VALIDATE:!0,OUTPUT_FORMAT:r.JSON_LD,STATE:n.LATEST,CONTENT_TYPE:t.PUBLIC,GRAPH_LOCATION:i.LOCAL_KG,GRAPH_STATE:o.CURRENT,HANDLE_NOT_MINED_ERROR:!1,SIMULATE_TXS:!1,FORCE_REPLACE_TXS:!1,GAS_LIMIT_MULTIPLIER:1},s="high",u=["low","med",s,"all"];e.exports={MAX_FILE_SIZE:2621440,DID_PREFIX:"did:dkg",PRIVATE_ASSERTION_PREDICATE:"https://ontology.origintrail.io/dkg/1.0#privateAssertionID",ZERO_ADDRESS:"0x0000000000000000000000000000000000000000",BLOCKCHAINS:{development:{"hardhat1:31337":{rpc:"http://localhost:8545",hubContract:"0x5FbDB2315678afecb367f032d93F642f64180aa3"},"hardhat2:31337":{rpc:"http://localhost:9545",hubContract:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}},devnet:{},stabledevnet_staging:{"base:84532":{hubContract:"0xAB4A4794Fc1F415C24807B947280aCa8dC492238",rpc:"https://sepolia.base.org"}},stabledevnet_prod:{"base:84532":{hubContract:"0xaA849CAC4FA86f6b7484503f3c7a314772AED6d4",rpc:"https://sepolia.base.org"}},testnet:{"base:84532":{hubContract:"0xCca0eA14540588A09c85cD6A6Fc53eA3A7010692",rpc:"https://sepolia.base.org"}},mainnet:{}},BLOCKCHAINS_RENAME_PAIRS:{hardhat1:"hardhat1:31337",hardhat2:"hardhat2:31337","otp::devnet":"otp:2160","otp::testnet":"otp:20430","otp::mainnet":"otp:2043"},MAX_BLOCKCHAIN_CALL_RETRIES:3,TRANSACTION_RETRY_ERRORS:["transaction was not mined","already known","replacement transaction underpriced"],WEBSOCKET_PROVIDER_OPTIONS:{reconnect:{auto:!0,delay:1e3,maxAttempts:3},clientConfig:{keepalive:!0,keepaliveInterval:3e4}},OPERATIONS:{PUBLISH:"publish",GET:"get",LOCAL_STORE:"local-store",QUERY:"query",PUBLISH_PARANET:"publishParanet"},OPERATION_STATUSES:{PENDING:"PENDING",COMPLETED:"COMPLETED",FAILED:"FAILED"},ASSERTION_STATES:{LATEST:"latest",LATEST_FINALIZED:"latest_finalized"},CONTENT_TYPES:t,GET_OUTPUT_FORMATS:r,INCENTIVE_TYPE:{NEUROWEB:"Neuroweb"},ASSET_STATES:n,STORE_TYPES:{TRIPLE:"TRIPLE",TRIPLE_PARANET:"TRIPLE_PARANET",PENDING:"PENDING"},GRAPH_LOCATIONS:i,GRAPH_STATES:o,OT_NODE_TRIPLE_STORE_REPOSITORIES:{PUBLIC_CURRENT:"publicCurrent",PUBLIC_HISTORY:"publicHistory",PRIVATE_CURRENT:"privateCurrent",PRIVATE_HISTORY:"privateHistory"},QUERY_TYPES:{CONSTRUCT:"CONSTRUCT",SELECT:"SELECT"},OPERATIONS_STEP_STATUS:{INCREASE_ALLOWANCE_COMPLETED:"INCREASE_ALLOWANCE_COMPLETED",CREATE_ASSET_COMPLETED:"CREATE_ASSET_COMPLETED",NETWORK_PUBLISH_COMPLETED:"NETWORK_PUBLISH_COMPLETED"},DEFAULT_GET_LOCAL_STORE_RESULT_FREQUENCY:.5,DEFAULT_PROXIMITY_SCORE_FUNCTIONS_PAIR_IDS:{development:{"hardhat1:31337":2,"hardhat2:31337":2,"otp:2043":2},devnet:{"otp:2160":2,"gnosis:10200":2,"base:84532":2},stabledevnet_staging:{"base:84532":2},stabledevnet_prod:{"base:84532":2},testnet:{"otp:20430":2,"gnosis:10200":2,"base:84532":2},mainnet:{"otp:2043":2,"gnosis:100":2,"base:8453":2}},DEFAULT_NEUROWEB_FINALITY_PARAMETERS:{WAIT_NEUROWEB_TX_FINALIZATION:!1,TX_FINALITY_POLLING_INTERVAL:6e3,TX_FINALITY_MAX_WAIT_TIME:6e4,TX_REMINING_POLLING_INTERVAL:6e3,TX_REMINING_MAX_WAIT_TIME:6e4},DEFAULT_PARAMETERS:a,DEFAULT_GAS_PRICE:{GNOSIS:"20",OTP:"1"},LOW_BID_SUGGESTION:"low",MED_BID_SUGGESTION:"med",HIGH_BID_SUGGESTION:s,ALL_BID_SUGGESTION:"all",BID_SUGGESTION_RANGE_ENUM:u,PARANET_NODES_ACCESS_POLICY:{OPEN:0,CURATED:1},PARANET_MINERS_ACCESS_POLICY:{OPEN:0,CURATED:1},PARANET_KNOWLEDGE_ASSET_ACCESS_POLICY:{OPEN:0}}},5237:(e,t,r)=>{const n=r(4171),i=r(4131),o=r(2675),a=r(5495),s=r(9993),u=r(6286),c=r(1112),l=r(7109);e.exports=class{constructor(e){const t=new l(e).getServices();this.assertion=new n(t),this.asset=new i(t),this.blockchain=new o(t),this.node=new u(t),this.graph=new a(t),this.network=new s(t),this.paranet=new c(t)}}},4171:(e,t,r)=>{const{assertionMetadata:n,calculateRoot:i,formatGraph:o}=r(8121);e.exports=class{constructor(e){this.nodeApiService=e.nodeApiService,this.inputService=e.inputService}async formatGraph(e){return o(e)}async getPublicAssertionId(e){const t=await o(e);return i(t.public)}async getSizeInBytes(e){const t=await o(e);return n.getAssertionSizeInBytes(t.public)}async getTriplesNumber(e){const t=await o(e);return n.getAssertionTriplesNumber(t.public)}async getChunksNumber(e){const t=await o(e);return n.getAssertionChunksNumber(t.public)}}},4131:(e,t,r)=>{const{assertionMetadata:n,calculateRoot:i,formatGraph:o}=r(8121),{ethers:a,ZeroHash:s}=r(4193),{deriveUAL:u,getOperationStatusObject:c,resolveUAL:l,toNQuads:f,toJSONLD:d}=r(6458),{ASSET_STATES:h,CONTENT_TYPES:p,OPERATIONS:y,OPERATIONS_STEP_STATUS:m,GET_OUTPUT_FORMATS:g,OPERATION_STATUSES:b,DEFAULT_GET_LOCAL_STORE_RESULT_FREQUENCY:v,PRIVATE_ASSERTION_PREDICATE:w,STORE_TYPES:A,QUERY_TYPES:k,OT_NODE_TRIPLE_STORE_REPOSITORIES:E,ZERO_ADDRESS:S}=r(9660),x=r(2974);e.exports=class{constructor(e){this.nodeApiService=e.nodeApiService,this.validationService=e.validationService,this.blockchainService=e.blockchainService,this.inputService=e.inputService}async isValidUAL(e,t={}){if("string"!=typeof e||""===e.trim())throw new Error("UAL must be a non-empty string.");const r=this.inputService.getBlockchain(t);this.validationService.validateIsValidUAL(r);const n=e.split("/");if(3!==n.length)throw new Error("UAL format is incorrect.");const i=n[0].split(":");if(3!==i.length&&4!==i.length)throw new Error("Prefix format in UAL is incorrect.");if("did"!==i[0])throw new Error(`Invalid DID prefix. Expected: 'did'. Received: '${i[0]}'.`);if("dkg"!==i[1])throw new Error(`Invalid DKG prefix. Expected: 'dkg'. Received: '${i[1]}'.`);if(i[2]!==r.name.split(":")[0])throw new Error(`Invalid blockchain name in the UAL prefix. Expected: '${r.name.split(":")[0]}'. Received: '${i[2]}'.`);if(4===i.length){const e=await this.blockchainService.getChainId(r);if(Number(i[3])!==e)throw new Error(`Chain ID in UAL does not match the blockchain. Expected: '${e}'. Received: '${i[3]}'.`)}const o=await this.blockchainService.getContractAddress("ContentAssetStorage",r);if(n[1].toLowerCase()!==o.toLowerCase())throw new Error(`Contract address in UAL does not match. Expected: '${o}'. Received: '${n[1]}'.`);try{const e=await this.blockchainService.getAssetOwner(n[2],r);if(!e||e===S)throw new Error("Token does not exist or has no owner.");return!0}catch(e){throw new Error(`Error fetching asset owner: ${e.message}`)}}async setAllowance(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateSetAllowance(r);const n=await this.blockchainService.getContractAddress("ServiceAgreementV1",r),i=e-BigInt(await this.blockchainService.callContractFunction("Token","allowance",[r.publicKey,n],r));let o;return i>0?o=await this.blockchainService.executeContractFunction("Token","increaseAllowance",[n,i],r):i<0&&(o=await this.blockchainService.executeContractFunction("Token","decreaseAllowance",[n,-i],r)),o?{operation:o,transactionHash:o.transactionHash,status:o.status}:{status:"Skipped: Allowance is already equal to the requested amount."}}async increaseAllowance(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateIncreaseAllowance(r);const n=await this.blockchainService.getContractAddress("ServiceAgreementV1",r),i=await this.blockchainService.executeContractFunction("Token","increaseAllowance",[n,e],r);return{operation:i,transactionHash:i.transactionHash,status:i.status}}async decreaseAllowance(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateDecreaseAllowance(r);const n=await this.blockchainService.getContractAddress("ServiceAgreementV1",r),i=await this.blockchainService.callContractFunction("Token","allowance",[r.publicKey,n],r),o=await this.blockchainService.executeContractFunction("Token","decreaseAllowance",[n,BigInt(e)>BigInt(i)?i:e],r);return{operation:o,transactionHash:o.transactionHash,status:o.status}}async getCurrentAllowance(e={}){const t=this.inputService.getBlockchain(e),r=await this.blockchainService.getContractAddress("ServiceAgreementV1",t),n=await this.blockchainService.callContractFunction("Token","allowance",[t.publicKey,r],t);return BigInt(n)}async create(e,t={},r=x){this.validationService.validateObjectType(e);let a={};e.public||e.private?a=e:a.public=e;const{blockchain:s,endpoint:f,port:d,maxNumberOfRetries:h,frequency:p,epochsNum:g,hashFunctionId:w,scoreFunctionId:k,immutable:E,tokenAmount:S,authToken:_,paranetUAL:P}=this.inputService.getAssetCreateArguments(t);this.validationService.validateAssetCreate(a,s,f,d,h,p,g,w,k,E,S,_,P);const{public:T,private:I}=await o(a),O=n.getAssertionSizeInBytes(T);this.validationService.validateAssertionSizeInBytes(O+(void 0===I?0:n.getAssertionSizeInBytes(I)));const B=i(T),C=await this.blockchainService.getContractAddress("ContentAssetStorage",s),N=S??await this.nodeApiService.getBidSuggestion(f,d,_,s.name,g,O,C,B,w);let R,M;if(null==P)({tokenId:R,receipt:M}=await this.blockchainService.createAsset({publicAssertionId:B,assertionSize:O,triplesNumber:n.getAssertionTriplesNumber(T),chunksNumber:n.getAssertionChunksNumber(T),epochsNum:g,tokenAmount:N,scoreFunctionId:k??1,immutable_:E},null,null,s,r));else{const{contract:e,tokenId:t}=l(P);({tokenId:R,receipt:M}=await this.blockchainService.createAsset({publicAssertionId:B,assertionSize:O,triplesNumber:n.getAssertionTriplesNumber(T),chunksNumber:n.getAssertionChunksNumber(T),epochsNum:g,tokenAmount:N,scoreFunctionId:k??1,immutable_:E},e,t,s,r))}const U={blockchain:s.name,contract:C,tokenId:R},L=[{...U,assertionId:B,assertion:T,storeType:A.TRIPLE}];I?.length&&L.push({...U,assertionId:i(I),assertion:I,storeType:A.TRIPLE});const j=u(s.name,C,R),F=await this.nodeApiService.publish(f,d,_,B,T,s.name,C,R,w),D=await this.nodeApiService.getOperationResult(f,d,_,y.PUBLISH,h,p,F);if(D.status===b.FAILED)return{UAL:j,assertionId:B,operation:{mintKnowledgeAsset:M,publish:c(D,F)}};const H=await this.nodeApiService.localStore(f,d,_,L),z=await this.nodeApiService.getOperationResult(f,d,_,y.LOCAL_STORE,h,v,H);return r.afterHook({status:m.CREATE_ASSET_COMPLETED,data:{localStoreOperationId:H,localStoreOperationResult:z}}),{UAL:j,publicAssertionId:B,operation:{mintKnowledgeAsset:M,publish:c(D,F),localStore:c(z,H)}}}async get(e,t={}){const{blockchain:r,endpoint:n,port:o,maxNumberOfRetries:a,frequency:u,state:m,contentType:b,validate:v,outputFormat:A,authToken:S,hashFunctionId:x,paranetUAL:_}=this.inputService.getAssetGetArguments(t);this.validationService.validateAssetGet(e,r,n,o,a,u,m,b,x,v,A,S);const{tokenId:P}=l(e);let T,I=!1;if(m===h.LATEST){const e=await this.blockchainService.getUnfinalizedState(P,r);null!=e&&e!==s&&(T=e,I=!1)}let O=[];const B=Object.values(h).includes(m);if(!T)if(O=await this.blockchainService.getAssertionIds(P,r),B)T=O[O.length-1],I=!0;else if("number"==typeof m){if(m>=O.length)throw new Error("State index is out of range.");T=O[m],m===O.length-1&&(I=!0)}else{if(!O.includes(m))throw new Error("Incorrect state option.");T=m,m===O[O.length-1]&&(I=!0)}const C=await this.nodeApiService.get(n,o,S,e,B?m:T,x,_),N=await this.nodeApiService.getOperationResult(n,o,S,y.GET,a,u,C);if(!N.data.assertion)return"FAILED"!==N.status&&(N.data={errorType:"DKG_CLIENT_ERROR",errorMessage:"Unable to find assertion on the network!"},N.status="FAILED"),{operation:{publicGet:c(N,C)}};const{assertion:R}=N.data;let{privateAssertion:M}=N.data;!0===v&&i(R)!==T&&(N.data={errorType:"DKG_CLIENT_ERROR",errorMessage:"Calculated root hashes don't match!"});let U={operation:{}};if(_){U.operation.publicGet=c(N,C);const e=await d(R.join("\n"));if(U.public={assertion:e,assertionId:T},M){const e=await d(M.join("\n"));U.private={assertion:e,assertionId:N.data.privateAssertionId}}return U}if(b!==p.PRIVATE){let e=R;try{e=A!==g.N_QUADS?await d(R.join("\n")):R.join("\n")}catch(e){N.data={errorType:"DKG_CLIENT_ERROR",errorMessage:e.message}}b===p.PUBLIC?U={...U,assertion:e,assertionId:T}:U.public={assertion:e,assertionId:T},U.operation.publicGet=c(N,C)}if(b!==p.PUBLIC){const e=R.filter((e=>e.includes(w))),t=e.length>0?e[0]:null;let r,s={};if(t){const e=t.match(/"(.*?)"/)[1];if(N?.data?.privateAssertion?.length)M=N.data.privateAssertion;else{const t=`\n CONSTRUCT { ?s ?p ?o }\n WHERE {\n {\n GRAPH \n {\n ?s ?p ?o .\n }\n }\n }`;r=await this.nodeApiService.query(n,o,S,t,k.CONSTRUCT,I?E.PRIVATE_CURRENT:E.PRIVATE_HISTORY),s=await this.nodeApiService.getOperationResult(n,o,S,y.QUERY,a,u,r);const i=s.data;M=await f(i,"application/n-quads")}let l;M.length&&!0===v&&i(M)!==e&&(s.data={errorType:"DKG_CLIENT_ERROR",errorMessage:"Calculated root hashes don't match!"});try{l=A!==g.N_QUADS?await d(M.join("\n")):M.join("\n")}catch(e){s.data={errorType:"DKG_CLIENT_ERROR",errorMessage:e.message}}b===p.PRIVATE?U={...U,assertion:l,assertionId:e}:U.private={assertion:l,assertionId:e},r&&(U.operation.queryPrivate=c(s,r))}}return U}async transfer(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateAssetTransfer(e,t,n);const{tokenId:i}=l(e),o=await this.blockchainService.transferAsset(i,t,n);return{UAL:e,owner:await this.blockchainService.getAssetOwner(i,n),operation:o}}async getOwner(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateAssetGetOwner(e,r);const{tokenId:n}=l(e);return{UAL:e,owner:await this.blockchainService.getAssetOwner(n,r),operation:c({data:{},status:"COMPLETED"},null)}}async getStateIssuer(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateAssetGetStateIssuer(e,t,n);const{tokenId:i}=l(e),o=await this.blockchainService.getAssertionIdByIndex(i,t,n);return{UAL:e,issuer:await this.blockchainService.getAssertionIssuer(i,o,t,n),state:o,operation:c({data:{},status:"COMPLETED"},null)}}async getLatestStateIssuer(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateAssetGetLatestStateIssuer(e,r);const{tokenId:n}=l(e),i=await this.blockchainService.getAssertionIds(n,r),o=i.length-1,a=i[o];return{UAL:e,issuer:await this.blockchainService.getAssertionIssuer(n,a,o,r),latestState:a,operation:c({data:{},status:"COMPLETED"},null)}}async getStates(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateAssetGetStates(e,r);const{tokenId:n}=l(e);return{UAL:e,states:await this.blockchainService.getAssertionIds(n,r),operation:c({data:{},status:"COMPLETED"},null)}}async burn(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateAssetBurn(e,r);const{tokenId:n}=l(e);return{UAL:e,operation:await this.blockchainService.burnAsset(n,r)}}async extendStoringPeriod(e,t,r={}){const n=this.inputService.getBlockchain(r),i=this.inputService.getTokenAmount(r);this.validationService.validateExtendAssetStoringPeriod(e,t,i,n);const{tokenId:o,contract:a}=l(e);let s;if(null!=i)s=i;else{const e=this.inputService.getEndpoint(r),i=this.inputService.getPort(r),u=this.inputService.getAuthToken(r),c=this.inputService.getHashFunctionId(r),l=await this.blockchainService.getLatestAssertionId(o,n),f=await this.blockchainService.getAssertionSize(l,n);s=await this.nodeApiService.getBidSuggestion(e,i,u,n.name,t,f,a,l,c)}return{UAL:e,operation:await this.blockchainService.extendAssetStoringPeriod(o,t,s,n)}}async addTokens(e,t={}){const r=this.inputService.getBlockchain(t),n=this.inputService.getTokenAmount(t);this.validationService.validateAddTokens(e,n,r);const{tokenId:i}=l(e);let o;if(null!=n)o=n;else{const n=this.inputService.getEndpoint(t),a=this.inputService.getPort(t),s=this.inputService.getAuthToken(t),u=this.inputService.getHashFunctionId(t),c=await this.blockchainService.getLatestAssertionId(i,r),l=await this.blockchainService.getAssertionSize(c,r);if(o=await this._getUpdateBidSuggestion(e,r,n,a,s,c,l,u),o<=0)throw new Error("Token amount is bigger than default suggested amount, please specify exact tokenAmount if you still want to add more tokens!")}return{UAL:e,operation:await this.blockchainService.addTokens(i,o,r)}}async _getUpdateBidSuggestion(e,t,r,n,i,o,s,u){const{contract:c,tokenId:f}=l(e),d=await this.blockchainService.getAssertionIdByIndex(f,0,t),h=a.solidityPacked(["address","bytes32"],[c,d]),p=a.sha256(a.solidityPacked(["address","uint256","bytes"],[c,f,h])),y=await this.blockchainService.getAgreementData(p,t),m=await this.blockchainService.getBlockchainTimestamp(t),g=Math.floor((m-y.startTime)/y.epochLength),b=y.epochsNumber-g,v=await this.nodeApiService.getBidSuggestion(r,n,i,t.name,b,s,c,o,u),w=BigInt(v)-(BigInt(y.tokenAmount)+BigInt(y.updateTokenAmount??0));return w>0?w:0}async submitToParanet(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateSubmitToParanet(e,t,n);const{contract:i,tokenId:o}=l(e),{contract:a,tokenId:s}=l(t);return{UAL:e,operation:await this.blockchainService.submitToParanet({paranetContract:a,paranetTokenId:s,contract:i,tokenId:o},n)}}async localStore(e,t={},r=x){this.validationService.validateObjectType(e);const{blockchain:a,endpoint:s,port:f,maxNumberOfRetries:d,frequency:h,epochsNum:p,hashFunctionId:m,scoreFunctionId:g,immutable:w,tokenAmount:k,authToken:E,paranetUAL:S}=this.inputService.getAssetCreateArguments(t);this.validationService.validateAssetCreate(e,a,s,f,d,h,p,m,g,w,k,E,S);const{public:_,private:P}=await o(e),T=n.getAssertionSizeInBytes(_);this.validationService.validateAssertionSizeInBytes(T+(void 0===P?0:n.getAssertionSizeInBytes(P)));const I=i(_),O=await this.blockchainService.getContractAddress("ContentAssetStorage",a),B=k??await this.nodeApiService.getBidSuggestion(s,f,E,a.name,p,T,O,I,m),{tokenId:C,receipt:N}=await this.blockchainService.createAsset({publicAssertionId:I,assertionSize:T,triplesNumber:n.getAssertionTriplesNumber(_),chunksNumber:n.getAssertionChunksNumber(_),epochsNum:p,tokenAmount:B,scoreFunctionId:g??1,immutable_:w},null,null,a,r),R={blockchain:a.name,contract:O,tokenId:C},M=[{...R,assertionId:I,assertion:_,storeType:A.TRIPLE_PARANET,paranetUAL:S}];P?.length&&M.push({...R,assertionId:i(P),assertion:P,storeType:A.TRIPLE_PARANET,paranetUAL:S});const U=u(a.name,O,C),L=await this.nodeApiService.localStore(s,f,E,M),j=await this.nodeApiService.getOperationResult(s,f,E,y.LOCAL_STORE,d,v,L);if(j.status===b.FAILED)return{UAL:U,assertionId:I,operation:{mintKnowledgeAsset:N,localStore:c(j,L)}};const{contract:F,tokenId:D}=l(S),H=await this.blockchainService.submitToParanet({paranetContract:F,paranetTokenId:D,contentAssetStorageAddress:O,tokenId:C},a);return{UAL:U,publicAssertionId:I,operation:{mintKnowledgeAsset:N,localStore:c(j,L),submitToParanet:H}}}}},2675:e=>{e.exports=class{constructor(e){this.blockchainService=e.blockchainService,this.inputService=e.inputService}async getChainId(e={}){const t=this.inputService.getBlockchain(e);return this.blockchainService.getChainId(t)}async getGasPrice(e={}){const t=this.inputService.getBlockchain(e);return this.blockchainService.getGasPrice(t)}async getWalletBalances(e={}){const t=this.inputService.getBlockchain(e);return this.blockchainService.getWalletBalances(t)}}},5495:(e,t,r)=>{const{OPERATIONS:n}=r(9660),{deriveRepository:i}=r(6458);e.exports=class{constructor(e){this.nodeApiService=e.nodeApiService,this.validationService=e.validationService,this.inputService=e.inputService}async query(e,t,r={}){const{graphLocation:o,graphState:a,endpoint:s,port:u,maxNumberOfRetries:c,frequency:l,authToken:f,paranetUAL:d}=this.inputService.getQueryArguments(r);this.validationService.validateGraphQuery(e,t,o,a,s,u,c,l,f);const h=d??i(o,a),p=await this.nodeApiService.query(s,u,f,e,t,h);return this.nodeApiService.getOperationResult(s,u,f,n.QUERY,c,l,p)}}},9993:e=>{e.exports=class{constructor(e){this.inputService=e.inputService,this.blockchainService=e.blockchainService,this.nodeApiService=e.nodeApiService}async getBidSuggestion(e,t,r={}){const{blockchain:n,endpoint:i,port:o,epochsNum:a,hashFunctionId:s,authToken:u,bidSuggestionRange:c}=this.inputService.getBidSuggestionArguments(r),l=await this.blockchainService.getContractAddress("ContentAssetStorage",n),f=await this.nodeApiService.getBidSuggestion(i,o,u,n.name,a,t,l,e,s,c);return"string"==typeof f?BigInt(f):f}}},6286:e=>{e.exports=class{constructor(e){this.nodeApiService=e.nodeApiService,this.inputService=e.inputService,this.validationService=e.validationService,this.blockchainService=e.blockchainService}async info(e={}){const t=this.inputService.getEndpoint(e),r=this.inputService.getPort(e),n=this.inputService.getAuthToken(e);return(await this.nodeApiService.info(t,r,n)).data}async getIdentityId(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateGetIdentityId(e,r);return await this.blockchainService.getIdentityId(e,r)}}},1112:(e,t,r)=>{const{ethers:n}=r(4193),{resolveUAL:i}=r(6458),{INCENTIVE_TYPE:o}=r(9660);e.exports=class{constructor(e){this.blockchainService=e.blockchainService,this.inputService=e.inputService,this.nodeApiService=e.nodeApiService,this.validationService=e.validationService}async create(e,t={}){const{blockchain:r,paranetName:n,paranetDescription:o,paranetNodesAccessPolicy:a,paranetMinersAccessPolicy:s}=this.inputService.getParanetCreateArguments(t);this.validationService.validateParanetCreate(e,r,n,o,a,s);const{contract:u,tokenId:c}=i(e);return{paranetUAL:e,operation:await this.blockchainService.registerParanet({contract:u,tokenId:c,paranetName:n,paranetDescription:o,paranetNodesAccessPolicy:a,paranetMinersAccessPolicy:s},r)}}async addCuratedNodes(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateParanetAddCuratedNodes(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.addParanetCuratedNodes({contract:o,tokenId:a,identityIds:t},n)}async removeCuratedNodes(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateParanetRemoveCuratedNodes(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.removeParanetCuratedNodes({contract:o,tokenId:a,identityIds:t},n)}async requestCuratedNodeAccess(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateRequestParanetCuratedNodeAccess(e,r);const{contract:n,tokenId:o}=i(e);await this.blockchainService.requestParanetCuratedNodeAccess({contract:n,tokenId:o},r)}async approveCuratedNode(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateApproveCuratedNode(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.approveCuratedNode({contract:o,tokenId:a,identityId:t},n)}async rejectCuratedNode(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateRejectCuratedNode(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.rejectCuratedNode({contract:o,tokenId:a,identityId:t},n)}async getCuratedNodes(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateGetCuratedNodes(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getCuratedNodes({paranetId:s},r)}async addCuratedMiners(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateParanetAddCuratedMiners(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.addParanetCuratedMiners({contract:o,tokenId:a,minerAddresses:t},n)}async removeCuratedMiners(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateParanetRemoveCuratedMiners(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.removeParanetCuratedMiners({contract:o,tokenId:a,minerAddresses:t},n)}async requestCuratedMinerAccess(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateRequestParanetCuratedMinerAccess(e,r);const{contract:n,tokenId:o}=i(e);await this.blockchainService.requestParanetCuratedMinerAccess({contract:n,tokenId:o},r)}async approveCuratedMiner(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateApproveCuratedMiner(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.approveCuratedMiner({contract:o,tokenId:a,minerAddress:t},n)}async rejectCuratedMiner(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateRejectCuratedMiner(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.rejectCuratedMiner({contract:o,tokenId:a,minerAddress:t},n)}async getKnowledgeMiners(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateGetParanetKnowledgeMiners(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getKnowledgeMiners({paranetId:s},r)}async deployIncentivesContract(e,t,r={}){const{blockchain:a,tracToNeuroEmissionMultiplier:s,operatorRewardPercentage:u,incentivizationProposalVotersRewardPercentage:c}=this.inputService.getParanetDeployIncentivesContractArguments(r);if(this.validationService.validateDeployIncentivesContract(e,a,s,u,c),t===o.NEUROWEB){const{contract:t,tokenId:r}=i(e),o=await this.blockchainService.deployNeuroIncentivesPool({contract:t,tokenId:r,tracToNeuroEmissionMultiplier:s,operatorRewardPercentage:u,incentivizationProposalVotersRewardPercentage:c},a),l=n.keccak256(n.solidityPacked(["address","uint256"],[t,r]));return{paranetUAL:e,incentivesPoolContractAddress:await this.blockchainService.getNeuroIncentivesPoolAddress(l,a),operation:o}}throw Error(`Unsupported incentive type: ${t}.`)}async createService(e,t={}){const{blockchain:r,paranetServiceName:n,paranetServiceDescription:o,paranetServiceAddresses:a}=this.inputService.getParanetCreateServiceArguments(t);this.validationService.validateParanetCreateServiceArguments(e,n,o,a,r);const{contract:s,tokenId:u}=i(e);return{serviceUAL:e,operation:await this.blockchainService.registerParanetService({contract:s,tokenId:u,paranetServiceName:n,paranetServiceDescription:o,paranetServiceAddresses:a},r)}}async addServices(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateParanetAddServicesArguments(e,t,n);const{contract:o,tokenId:a}=i(e),s=[];for(const e of t){const{contract:t,tokenId:r}=i(e);s.push([t,r])}return{paranetUAL:e,paranetServiceUALs:t,operation:await this.blockchainService.addParanetServices({contract:o,tokenId:a,processedServicesArray:s},n)}}async claimMinerReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a])),u=await this.blockchainService.claimKnowledgeMinerReward(s,r);return{operation:u,transactionHash:u.transactionHash,status:u.status}}async claimVoterReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a])),u=await this.blockchainService.claimVoterReward(s,r);return{operation:u,transactionHash:u.transactionHash,status:u.status}}async claimOperatorReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a])),u=await this.blockchainService.claimOperatorReward(s,r);return{operation:u,transactionHash:u.transactionHash,status:u.status}}async getClaimableMinerReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getClaimableKnowledgeMinerReward(s,r)}async getClaimableAllMinersReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getClaimableAllKnowledgeMinersReward(s,r)}async getClaimableVoterReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getClaimableVoterReward(s,r)}async getClaimableAllVotersReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getClaimableAllVotersReward(s,r)}async getClaimableOperatorReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getClaimableOperatorReward(s,r)}async updateClaimableRewards(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a])),u=await this.blockchainService.getUpdatingKnowledgeAssetStates({miner:r.publicKey,paranetId:s},r);if(u.length>0){const e=await this.blockchainService.updateClaimableRewards({contract:o,tokenId:a,start:0,end:u.length},r);return{operation:e,transactionHash:e.transactionHash,status:e.status}}return{status:"No updated knowledge assets."}}async isKnowledgeMiner(e,t={}){let{blockchain:r,roleAddress:o}=this.inputService.getParanetRoleCheckArguments(t);null==o&&(o=r.publicKey),this.validationService.validateParanetRoleCheckArguments(o,e,r);const{contract:a,tokenId:s}=i(e),u=n.keccak256(n.solidityPacked(["address","uint256"],[a,s]));return await this.blockchainService.isParanetKnowledgeMiner(o,u,r)}async isParanetOperator(e,t={}){let{blockchain:r,roleAddress:o}=this.inputService.getParanetRoleCheckArguments(t);null==o&&(o=r.publicKey),this.validationService.validateParanetRoleCheckArguments(o,e,r);const{contract:a,tokenId:s}=i(e),u=n.keccak256(n.solidityPacked(["address","uint256"],[a,s]));return await this.blockchainService.isParanetOperator(o,u,r)}async isProposalVoter(e,t={}){let{blockchain:r,roleAddress:o}=this.inputService.getParanetRoleCheckArguments(t);null==o&&(o=r.publicKey),this.validationService.validateParanetRoleCheckArguments(o,e,r);const{contract:a,tokenId:s}=i(e),u=n.keccak256(n.solidityPacked(["address","uint256"],[a,s]));return await this.blockchainService.isParanetProposalVoter(o,u,r)}}},2872:function(e){"use strict";!function(){function t(e){return parseInt(e)===e}function r(e){if(!t(e.length))return!1;for(var r=0;r255)return!1;return!0}function n(e,n){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return n&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(t(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function i(e){return new Uint8Array(e)}function o(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var a,s={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},u=(a="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+a[15&n])}return t.join("")}}),c={16:10,24:12,32:14},l=[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],f=[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],d=[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],h=[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],p=[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],y=[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],m=[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],g=[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],b=[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],v=[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],w=[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],A=[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],k=[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],E=[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],S=[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 x(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t];for(var a,s=0,u=i;u>16&255]<<24^f[a>>8&255]<<16^f[255&a]<<8^f[a>>24&255]^l[s]<<24,s+=1,8!=i)for(t=1;t>8&255]<<8^f[a>>16&255]<<16^f[a>>24&255]<<24;for(t=i/2+1;t>2,h=u%4,this._Ke[d][h]=o[t],this._Kd[e-d][h]=o[t++],u++}for(var d=1;d>24&255]^k[a>>16&255]^E[a>>8&255]^S[255&a]},_.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=x(e),o=0;o<4;o++)n[o]^=this._Ke[0][o];for(var a=1;a>24&255]^p[n[(o+1)%4]>>16&255]^y[n[(o+2)%4]>>8&255]^m[255&n[(o+3)%4]]^this._Ke[a][o];n=r.slice()}var s,u=i(16);for(o=0;o<4;o++)s=this._Ke[t][o],u[4*o]=255&(f[n[o]>>24&255]^s>>24),u[4*o+1]=255&(f[n[(o+1)%4]>>16&255]^s>>16),u[4*o+2]=255&(f[n[(o+2)%4]>>8&255]^s>>8),u[4*o+3]=255&(f[255&n[(o+3)%4]]^s);return u},_.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=x(e),o=0;o<4;o++)n[o]^=this._Kd[0][o];for(var a=1;a>24&255]^b[n[(o+3)%4]>>16&255]^v[n[(o+2)%4]>>8&255]^w[255&n[(o+1)%4]]^this._Kd[a][o];n=r.slice()}var s,u=i(16);for(o=0;o<4;o++)s=this._Kd[t][o],u[4*o]=255&(d[n[o]>>24&255]^s>>24),u[4*o+1]=255&(d[n[(o+3)%4]>>16&255]^s>>16),u[4*o+2]=255&(d[n[(o+2)%4]>>8&255]^s>>8),u[4*o+3]=255&(d[255&n[(o+1)%4]]^s);return u};var P=function(e){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new _(e)};P.prototype.encrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=i(e.length),r=i(16),a=0;a=0;--t)this._counter[t]=e%256,e>>=8},B.prototype.setBytes=function(e){if(16!=(e=n(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},B.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var C=function(e,t){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof B||(t=new B(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new _(e)};C.prototype.encrypt=function(e){for(var t=n(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,a=0;a{const n=r(4841);e.exports=async function(e,t){const r={algorithm:"URDNA2015",format:"application/n-quads"};t&&(r.inputFormat=t);const i=(await n.canonize(e,r)).split("\n").filter((e=>""!==e));if(i&&0===i.length)throw Error("File format is corrupted, no n-quads are extracted.");return i}},9803:e=>{e.exports={getAssertionSizeInBytes:function(e){const t=JSON.stringify(e);return(new TextEncoder).encode(t).length},getAssertionTriplesNumber:function(e){return e.length},getAssertionChunksNumber:function(e){return e.length}}},4598:(e,t,r)=>{const n=r(9283),{MerkleTree:i}=r(737),o=r(4102);e.exports=function(e){e.sort();const t=e.map(((e,t)=>o(n.utils.solidityPack(["bytes32","uint256"],[o(e),t]))));return`0x${new i(t,o,{sortPairs:!0}).getRoot().toString("hex")}`}},1456:e=>{e.exports="https://ontology.origintrail.io/dkg/1.0#privateAssertionID"},1907:(e,t,r)=>{const n=r(9283),{MerkleTree:i}=r(737),o=r(4102);e.exports=function(e,t){e.sort();const r=e.map(((e,t)=>o(n.utils.solidityPack(["bytes32","uint256"],[o(e),t])))),a=new i(r,o,{sortPairs:!0});return{leaf:o(e[t]),proof:a.getHexProof(r[t])}}},7065:(e,t,r)=>{const n=r(8325),i=r(4598),o=r(1456);function a(e){return 0===Object.keys(e).length&&e.constructor===Object}e.exports=async function(e){let t;e.private&&!a(e.private)&&(t=await n(e.private));const r={"@graph":[e.public&&!a(e.public)?e.public:null,e.private&&!a(e.private)?{[o]:t?i(t):null}:null]},s={public:await n(r)};return t&&(s.private=t),s}},8121:(e,t,r)=>{const n=r(9803),i=r(4598),o=r(8325),a=r(7065),s=r(1907),u=r(4205),c=r(4102);e.exports={calculateRoot:i,formatAssertion:o,formatGraph:a,getMerkleProof:s,peerId2Hash:u,keccak256:c,assertionMetadata:n}},4102:(e,t,r)=>{const n=r(9283);e.exports=function(e){let t=e;return n.utils.isBytesLike(e)||(t=n.utils.toUtf8Bytes(e)),n.utils.keccak256(t)}},9283:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseContract:()=>Rn,BigNumber:()=>W,Contract:()=>Mn,ContractFactory:()=>Un,FixedNumber:()=>Jn,Signer:()=>lr,VoidSigner:()=>fr,Wallet:()=>xo,Wordlist:()=>xi,constants:()=>i,errors:()=>m,ethers:()=>u,getDefaultProvider:()=>ku,logger:()=>$u,providers:()=>o,utils:()=>s,version:()=>Xu,wordlists:()=>Ii});var n={};r.r(n),r.d(n,{decode:()=>Pe,encode:()=>Se});var i={};r.r(i),r.d(i,{AddressZero:()=>To,EtherSymbol:()=>Oo,HashZero:()=>Io,MaxInt256:()=>mt,MaxUint256:()=>pt,MinInt256:()=>yt,NegativeOne:()=>ct,One:()=>ft,Two:()=>dt,WeiPerEther:()=>ht,Zero:()=>lt});var o={};r.r(o),r.d(o,{AlchemyProvider:()=>Ts,AlchemyWebSocketProvider:()=>Ps,AnkrProvider:()=>Cs,BaseProvider:()=>rs,CloudflareProvider:()=>Ms,EtherscanProvider:()=>qs,FallbackProvider:()=>ou,Formatter:()=>Ta,InfuraProvider:()=>lu,InfuraWebSocketProvider:()=>cu,IpcProvider:()=>au,JsonRpcBatchProvider:()=>fu,JsonRpcProvider:()=>ys,JsonRpcSigner:()=>ds,NodesmithProvider:()=>hu,PocketProvider:()=>mu,Provider:()=>or,Resolver:()=>$a,StaticJsonRpcProvider:()=>Es,UrlJsonRpcProvider:()=>Ss,Web3Provider:()=>wu,WebSocketProvider:()=>ws,getDefaultProvider:()=>ku,getNetwork:()=>jo,isCommunityResourcable:()=>Ia,isCommunityResource:()=>Oa,showThrottleMessage:()=>Ca});var a={};r.r(a),r.d(a,{decode:()=>Fo,encode:()=>Do});var s={};r.r(s),r.d(s,{AbiCoder:()=>Vt,ConstructorFragment:()=>Mt,ErrorFragment:()=>jt,EventFragment:()=>Bt,FormatTypes:()=>_t,Fragment:()=>Ot,FunctionFragment:()=>Ut,HDNode:()=>Di,Indexed:()=>Xt,Interface:()=>tr,LogDescription:()=>Qt,Logger:()=>b,ParamType:()=>Tt,RLP:()=>n,SigningKey:()=>$r,SupportedAlgorithm:()=>gi,TransactionDescription:()=>Zt,TransactionTypes:()=>nn,UnicodeNormalizationForm:()=>De,Utf8ErrorFuncs:()=>qe,Utf8ErrorReason:()=>He,_TypedDataEncoder:()=>pi,_fetchData:()=>Aa,_toEscapedUtf8String:()=>Je,accessListify:()=>hn,arrayify:()=>x,base58:()=>mi,base64:()=>a,checkProperties:()=>ie,checkResultErrors:()=>he,commify:()=>Ju,computeAddress:()=>cn,computeHmac:()=>ki,computePublicKey:()=>tn,concat:()=>_,deepCopy:()=>ce,defaultAbiCoder:()=>Jt,defaultPath:()=>Fi,defineReadOnly:()=>te,dnsEncode:()=>pa,entropyToMnemonic:()=>qi,fetchJson:()=>ka,formatBytes32String:()=>qu,formatEther:()=>Zu,formatUnits:()=>Wu,getAccountPath:()=>Ki,getAddress:()=>Re,getContractAddress:()=>Le,getCreate2Address:()=>je,getIcapAddress:()=>Ue,getJsonWalletAddress:()=>wo,getStatic:()=>re,hashMessage:()=>Yn,hexConcat:()=>R,hexDataLength:()=>C,hexDataSlice:()=>N,hexStripZeros:()=>U,hexValue:()=>M,hexZeroPad:()=>L,hexlify:()=>B,id:()=>Ye,isAddress:()=>Me,isBytes:()=>S,isBytesLike:()=>k,isHexString:()=>I,isValidMnemonic:()=>Gi,isValidName:()=>da,joinSignature:()=>F,keccak256:()=>ve,mnemonicToEntropy:()=>zi,mnemonicToSeed:()=>Hi,namehash:()=>ha,nameprep:()=>zu,parseBytes32String:()=>Gu,parseEther:()=>Yu,parseTransaction:()=>vn,parseUnits:()=>Qu,poll:()=>Ea,randomBytes:()=>Qi,recoverAddress:()=>ln,recoverPublicKey:()=>en,resolveProperties:()=>ne,ripemd160:()=>vi,serializeTransaction:()=>gn,sha256:()=>wi,sha512:()=>Ai,shallowCopy:()=>oe,shuffled:()=>Gs,solidityKeccak256:()=>Ou,solidityPack:()=>Iu,soliditySha256:()=>Bu,splitSignature:()=>j,stripZeros:()=>P,toUtf8Bytes:()=>Ke,toUtf8CodePoints:()=>Ze,toUtf8String:()=>Qe,verifyMessage:()=>_o,verifyTypedData:()=>Po,zeroPad:()=>T});var u={};r.r(u),r.d(u,{BaseContract:()=>Rn,BigNumber:()=>W,Contract:()=>Mn,ContractFactory:()=>Un,FixedNumber:()=>Jn,Signer:()=>lr,VoidSigner:()=>fr,Wallet:()=>xo,Wordlist:()=>xi,constants:()=>i,errors:()=>m,getDefaultProvider:()=>ku,logger:()=>$u,providers:()=>o,utils:()=>s,version:()=>Xu,wordlists:()=>Ii});let c=!1,l=!1;const f={debug:1,default:2,info:2,warning:3,error:4,off:5};let d=f.default,h=null;const p=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var y,m;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(y||(y={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(m||(m={}));const g="0123456789abcdef";class b{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==f[r]&&this.throwArgumentError("invalid log level name","logLevel",e),d>f[r]||console.log.apply(console,t)}debug(...e){this._log(b.levels.DEBUG,e)}info(...e){this._log(b.levels.INFO,e)}warn(...e){this._log(b.levels.WARNING,e)}makeError(e,t,r){if(l)return this.makeError("censored error",t,{});t||(t=b.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=g[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const i=e;let o="";switch(t){case m.NUMERIC_FAULT:{o="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":o+="-"+t;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case m.CALL_EXCEPTION:case m.INSUFFICIENT_FUNDS:case m.MISSING_NEW:case m.NONCE_EXPIRED:case m.REPLACEMENT_UNDERPRICED:case m.TRANSACTION_REPLACED:case m.UNPREDICTABLE_GAS_LIMIT:o=t}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const a=new Error(e);return a.reason=i,a.code=t,Object.keys(r).forEach((function(e){a[e]=r[e]})),a}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,b.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",b.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,b.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,b.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,b.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",b.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",b.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",b.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return h||(h=new b("logger/5.7.0")),h}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",b.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),c){if(!e)return;this.globalLogger().throwError("error censorship permanent",b.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}l=!!e,c=!!t}static setLogLevel(e){const t=f[e.toLowerCase()];null!=t?d=t:b.globalLogger().warn("invalid log level - "+e)}static from(e){return new b(e)}}b.errors=m,b.levels=y;const v=new b("bytes/5.7.0");function w(e){return!!e.toHexString}function A(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return A(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function k(e){return I(e)&&!(e.length%2)||S(e)}function E(e){return"number"==typeof e&&e==e&&e%1==0}function S(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!E(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function x(e,t){if(t||(t={}),"number"==typeof e){v.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),A(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),w(e)&&(e=e.toHexString()),I(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":v.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;ex(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),A(n)}function P(e){let t=x(e);if(0===t.length)return t;let r=0;for(;rt&&v.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),A(r)}function I(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}const O="0123456789abcdef";function B(e,t){if(t||(t={}),"number"==typeof e){v.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=O[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),w(e))return e.toHexString();if(I(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":v.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(S(e)){let t="0x";for(let r=0;r>4]+O[15&n]}return t}return v.throwArgumentError("invalid hexlify value","value",e)}function C(e){if("string"!=typeof e)e=B(e);else if(!I(e)||e.length%2)return null;return(e.length-2)/2}function N(e,t,r){return"string"!=typeof e?e=B(e):(!I(e)||e.length%2)&&v.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function R(e){let t="0x";return e.forEach((e=>{t+=B(e).substring(2)})),t}function M(e){const t=U(B(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function U(e){"string"!=typeof e&&(e=B(e)),I(e)||v.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t2*t+2&&v.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function j(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(k(e)){let r=x(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=B(r.slice(0,32)),t.s=B(r.slice(32,64))):65===r.length?(t.r=B(r.slice(0,32)),t.s=B(r.slice(32,64)),t.v=r[64]):v.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:v.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=B(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=T(x(t._vs),32);t._vs=B(r);const n=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=n:t.recoveryParam!==n&&v.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const i=B(r);null==t.s?t.s=i:t.s!==i&&v.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?v.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&v.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&I(t.r)?t.r=L(t.r,32):v.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&I(t.s)?t.s=L(t.s,32):v.throwArgumentError("signature missing or invalid s","signature",e);const r=x(t.s);r[0]>=128&&v.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const n=B(r);t._vs&&(I(t._vs)||v.throwArgumentError("signature invalid _vs","signature",e),t._vs=L(t._vs,32)),null==t._vs?t._vs=n:t._vs!==n&&v.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function F(e){return B(_([(e=j(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}var D=r(9404),H=r.n(D);const z="bignumber/5.7.0";var q=H().BN;const G=new b(z),K={},V=9007199254740991;let J=!1;class W{constructor(e,t){e!==K&&G.throwError("cannot call constructor directly; use BigNumber.from",b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Z(Y(this).fromTwos(e))}toTwos(e){return Z(Y(this).toTwos(e))}abs(){return"-"===this._hex[0]?W.from(this._hex.substring(1)):this}add(e){return Z(Y(this).add(Y(e)))}sub(e){return Z(Y(this).sub(Y(e)))}div(e){return W.from(e).isZero()&&X("division-by-zero","div"),Z(Y(this).div(Y(e)))}mul(e){return Z(Y(this).mul(Y(e)))}mod(e){const t=Y(e);return t.isNeg()&&X("division-by-zero","mod"),Z(Y(this).umod(t))}pow(e){const t=Y(e);return t.isNeg()&&X("negative-power","pow"),Z(Y(this).pow(t))}and(e){const t=Y(e);return(this.isNegative()||t.isNeg())&&X("unbound-bitwise-result","and"),Z(Y(this).and(t))}or(e){const t=Y(e);return(this.isNegative()||t.isNeg())&&X("unbound-bitwise-result","or"),Z(Y(this).or(t))}xor(e){const t=Y(e);return(this.isNegative()||t.isNeg())&&X("unbound-bitwise-result","xor"),Z(Y(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&X("negative-width","mask"),Z(Y(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&X("negative-width","shl"),Z(Y(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&X("negative-width","shr"),Z(Y(this).shrn(e))}eq(e){return Y(this).eq(Y(e))}lt(e){return Y(this).lt(Y(e))}lte(e){return Y(this).lte(Y(e))}gt(e){return Y(this).gt(Y(e))}gte(e){return Y(this).gte(Y(e))}isNegative(){return"-"===this._hex[0]}isZero(){return Y(this).isZero()}toNumber(){try{return Y(this).toNumber()}catch(e){X("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return G.throwError("this platform does not support BigInt",b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?J||(J=!0,G.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?G.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",b.errors.UNEXPECTED_ARGUMENT,{}):G.throwError("BigNumber.toString does not accept parameters",b.errors.UNEXPECTED_ARGUMENT,{})),Y(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof W)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new W(K,Q(e)):e.match(/^-?[0-9]+$/)?new W(K,Q(new q(e))):G.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&X("underflow","BigNumber.from",e),(e>=V||e<=-V)&&X("overflow","BigNumber.from",e),W.from(String(e));const t=e;if("bigint"==typeof t)return W.from(t.toString());if(S(t))return W.from(B(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return W.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(I(e)||"-"===e[0]&&I(e.substring(1))))return W.from(e)}return G.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function Q(e){if("string"!=typeof e)return Q(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&G.throwArgumentError("invalid hex","value",e),"0x00"===(e=Q(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function Z(e){return W.from(Q(e))}function Y(e){const t=W.from(e).toHexString();return"-"===t[0]?new q("-"+t.substring(3),16):new q(t.substring(2),16)}function X(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),G.throwError(e,b.errors.NUMERIC_FAULT,n)}var $=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const ee=new b("properties/5.7.0");function te(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function re(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function ne(e){return $(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function ie(e,t){e&&"object"==typeof e||ee.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||ee.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function oe(e){const t={};for(const r in e)t[r]=e[r];return t}const ae={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function se(e){if(null==e||ae[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;rce(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&te(t,r,ce(n))}return t}return ee.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function ce(e){return ue(e)}class le{constructor(e){for(const t in e)this[t]=ce(e[t])}}const fe="abi/5.7.0",de=new b(fe);function he(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t}class pe{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){de.throwArgumentError(e,this.localName,t)}}class ye{constructor(e){te(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return R(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(_(e._data))}writeBytes(e){let t=x(e);const r=t.length%this.wordSize;return r&&(t=_([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=x(W.from(e));return t.length>this.wordSize&&de.throwError("value out-of-bounds",b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=_([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class me{constructor(e,t,r,n){te(this,"_data",x(e)),te(this,"wordSize",t||32),te(this,"_coerceFunc",r),te(this,"allowLoose",n),this._offset=0}get data(){return B(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):me.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:de.throwError("data out-of-bounds",b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new me(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return W.from(this.readBytes(this.wordSize))}}var ge=r(1176),be=r.n(ge);function ve(e){return"0x"+be().keccak_256(x(e))}const we=new b("rlp/5.7.0");function Ae(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function ke(e,t,r){let n=0;for(let i=0;it+1+n&&we.throwError("child data too short",b.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function _e(e,t){if(0===e.length&&we.throwError("data too short",b.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&we.throwError("data short segment too short",b.errors.BUFFER_OVERRUN,{});const n=ke(e,t+1,r);return t+1+r+n>e.length&&we.throwError("data long segment too short",b.errors.BUFFER_OVERRUN,{}),xe(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&we.throwError("data array too short",b.errors.BUFFER_OVERRUN,{}),xe(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&we.throwError("data array too short",b.errors.BUFFER_OVERRUN,{});const n=ke(e,t+1,r);t+1+r+n>e.length&&we.throwError("data array too short",b.errors.BUFFER_OVERRUN,{});return{consumed:1+r+n,result:B(e.slice(t+1+r,t+1+r+n))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&we.throwError("data too short",b.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:B(e.slice(t+1,t+1+r))}}return{consumed:1,result:B(e[t])}}function Pe(e){const t=x(e),r=_e(t,0);return r.consumed!==t.length&&we.throwArgumentError("invalid rlp data","data",e),r.result}const Te=new b("address/5.7.0");function Ie(e){I(e,20)||Te.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=x(ve(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const Oe={};for(let e=0;e<10;e++)Oe[String(e)]=String(e);for(let e=0;e<26;e++)Oe[String.fromCharCode(65+e)]=String(10+e);const Be=Math.floor((Ce=9007199254740991,Math.log10?Math.log10(Ce):Math.log(Ce)/Math.LN10));var Ce;function Ne(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>Oe[e])).join("");for(;t.length>=Be;){let e=t.substring(0,Be);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function Re(e){let t=null;if("string"!=typeof e&&Te.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=Ie(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&Te.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==Ne(e)&&Te.throwArgumentError("bad icap checksum","address",e),r=e.substring(4),t=new q(r,36).toString(16);t.length<40;)t="0"+t;t=Ie("0x"+t)}else Te.throwArgumentError("invalid address","address",e);var r;return t}function Me(e){try{return Re(e),!0}catch(e){}return!1}function Ue(e){let t=(r=Re(e).substring(2),new q(r,16).toString(36)).toUpperCase();for(var r;t.length<30;)t="0"+t;return"XE"+Ne("XE00"+t)+t}function Le(e){let t=null;try{t=Re(e.from)}catch(t){Te.throwArgumentError("missing from address","transaction",e)}return Re(N(ve(Se([t,P(x(W.from(e.nonce).toHexString()))])),12))}function je(e,t,r){return 32!==C(t)&&Te.throwArgumentError("salt must be 32 bytes","salt",t),32!==C(r)&&Te.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Re(N(ve(_(["0xff",Re(e),t,r])),12))}const Fe=new b("strings/5.7.0");var De,He;function ze(e,t,r,n,i){if(e===He.BAD_PREFIX||e===He.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return e===He.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(De||(De={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(He||(He={}));const qe=Object.freeze({error:function(e,t,r,n,i){return Fe.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:ze,replace:function(e,t,r,n,i){return e===He.OVERLONG?(n.push(i),0):(n.push(65533),ze(e,t,r))}});function Ge(e,t){null==t&&(t=qe.error),e=x(e);const r=[];let n=0;for(;n>7)){r.push(i);continue}let o=null,a=null;if(192==(224&i))o=1,a=127;else if(224==(240&i))o=2,a=2047;else{if(240!=(248&i)){n+=t(128==(192&i)?He.UNEXPECTED_CONTINUE:He.BAD_PREFIX,n-1,e,r);continue}o=3,a=65535}if(n-1+o>=e.length){n+=t(He.OVERRUN,n-1,e,r);continue}let s=i&(1<<8-o-1)-1;for(let i=0;i1114111?n+=t(He.OUT_OF_RANGE,n-1-o,e,r,s):s>=55296&&s<=57343?n+=t(He.UTF16_SURROGATE,n-1-o,e,r,s):s<=a?n+=t(He.OVERLONG,n-1-o,e,r,s):r.push(s))}return r}function Ke(e,t=De.current){t!=De.current&&(Fe.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return x(r)}function Ve(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function Je(e,t){return'"'+Ge(e,t).map((e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?Ve(e):Ve(55296+((e-=65536)>>10&1023))+Ve(56320+(1023&e))})).join("")+'"'}function We(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function Qe(e,t){return We(Ge(e,t))}function Ze(e,t=De.current){return Ge(Ke(e,t))}function Ye(e){return ve(Ke(e))}class Xe extends pe{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=Re(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return Re(L(e.readValue().toHexString(),20))}}class $e extends pe{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const et=new b(fe);function tt(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||et.throwError("cannot encode object for signature with missing names",b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&et.throwError("cannot encode object for signature with duplicate names",b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else et.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&et.throwArgumentError("types/value length mismatch","tuple",r);let i=new ye(e.wordSize),o=new ye(e.wordSize),a=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=o.length;e.encode(o,r);let n=i.writeUpdatableValue();a.push((e=>{n(e+t)}))}else e.encode(i,r)})),a.forEach((e=>{e(i.length)}));let s=e.appendWriter(i);return s+=e.appendWriter(o),s}function rt(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),o=n.subReader(r.toNumber());try{i=t.decode(o)}catch(e){if(e.code===b.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===b.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));const i=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let e=0;e{throw t}})}return Object.freeze(r)}class nt extends pe{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;re._data.length&&et.throwError("insufficient data length",b.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){return tt(e,this.coders,t)}decode(e){return e.coerce(this.name,rt(e,this.coders))}}const wt=new b(fe),At={};let kt={calldata:!0,memory:!0,storage:!0},Et={calldata:!0,memory:!0};function St(e,t){if("bytes"===e||"string"===e){if(kt[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&Et[t])return!0;return(kt[t]||"payable"===t)&&wt.throwArgumentError("invalid modifier","name",t),!1}function xt(e,t){for(let r in t)te(e,r,t[r])}const _t=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),Pt=new RegExp(/^(.*)\[([0-9]*)\]$/);class Tt{constructor(e,t){e!==At&&wt.throwError("use fromString",b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),xt(this,t);let r=this.type.match(Pt);xt(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:Tt.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=_t.sighash),_t[e]||wt.throwArgumentError("invalid format type","format",e),e===_t.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==_t.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===_t.full?", ":",")+")"):t+=this.type,e!==_t.sighash&&(!0===this.indexed&&(t+=" indexed"),e===_t.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?Tt.fromString(e,t):Tt.fromObject(e)}static fromObject(e){return Tt.isParamType(e)?e:new Tt(At,{name:e.name||null,type:Ft(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(Tt.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){wt.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},a=o;for(let r=0;rTt.fromString(e,t)))}class Ot{constructor(e,t){e!==At&&wt.throwError("use a static from method",b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),xt(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Ot.isFragment(e)?e:"string"==typeof e?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFragment(e))return e;switch(e.type){case"function":return Ut.fromObject(e);case"event":return Bt.fromObject(e);case"constructor":return Mt.fromObject(e);case"error":return jt.fromObject(e);case"fallback":case"receive":return null}return wt.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Bt.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?Ut.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?Mt.fromString(e.trim()):"error"===e.split(" ")[0]?jt.fromString(e.substring(5).trim()):wt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class Bt extends Ot{format(e){if(e||(e=_t.sighash),_t[e]||wt.throwArgumentError("invalid format type","format",e),e===_t.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==_t.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===_t.full?", ":",")+") ",e!==_t.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?Bt.fromString(e):Bt.fromObject(e)}static fromObject(e){if(Bt.isEventFragment(e))return e;"event"!==e.type&&wt.throwArgumentError("invalid event object","value",e);const t={name:Ht(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Tt.fromObject):[],type:"event"};return new Bt(At,t)}static fromString(e){let t=e.match(zt);t||wt.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:wt.warn("unknown modifier: "+e)}})),Bt.fromObject({name:t[1].trim(),anonymous:r,inputs:It(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function Ct(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&wt.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||wt.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=W.from(r[1]),r[0]):e}function Nt(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function Rt(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&wt.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&wt.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||wt.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&wt.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&wt.throwArgumentError("unable to determine stateMutability","value",e),t}class Mt extends Ot{format(e){if(e||(e=_t.sighash),_t[e]||wt.throwArgumentError("invalid format type","format",e),e===_t.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===_t.sighash&&wt.throwError("cannot format a constructor for sighash",b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===_t.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?Mt.fromString(e):Mt.fromObject(e)}static fromObject(e){if(Mt.isConstructorFragment(e))return e;"constructor"!==e.type&&wt.throwArgumentError("invalid constructor object","value",e);let t=Rt(e);t.constant&&wt.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Tt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?W.from(e.gas):null};return new Mt(At,r)}static fromString(e){let t={type:"constructor"},r=(e=Ct(e,t)).match(zt);return r&&"constructor"===r[1].trim()||wt.throwArgumentError("invalid constructor string","value",e),t.inputs=It(r[2].trim(),!1),Nt(r[3].trim(),t),Mt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class Ut extends Mt{format(e){if(e||(e=_t.sighash),_t[e]||wt.throwArgumentError("invalid format type","format",e),e===_t.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==_t.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===_t.full?", ":",")+") ",e!==_t.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?Ut.fromString(e):Ut.fromObject(e)}static fromObject(e){if(Ut.isFunctionFragment(e))return e;"function"!==e.type&&wt.throwArgumentError("invalid function object","value",e);let t=Rt(e);const r={type:e.type,name:Ht(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(Tt.fromObject):[],outputs:e.outputs?e.outputs.map(Tt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?W.from(e.gas):null};return new Ut(At,r)}static fromString(e){let t={type:"function"},r=(e=Ct(e,t)).split(" returns ");r.length>2&&wt.throwArgumentError("invalid function string","value",e);let n=r[0].match(zt);if(n||wt.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&Ht(t.name),t.inputs=It(n[2],!1),Nt(n[3].trim(),t),r.length>1){let n=r[1].match(zt);""==n[1].trim()&&""==n[3].trim()||wt.throwArgumentError("unexpected tokens","value",e),t.outputs=It(n[2],!1)}else t.outputs=[];return Ut.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function Lt(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||wt.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class jt extends Ot{format(e){if(e||(e=_t.sighash),_t[e]||wt.throwArgumentError("invalid format type","format",e),e===_t.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==_t.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===_t.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?jt.fromString(e):jt.fromObject(e)}static fromObject(e){if(jt.isErrorFragment(e))return e;"error"!==e.type&&wt.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:Ht(e.name),inputs:e.inputs?e.inputs.map(Tt.fromObject):[]};return Lt(new jt(At,t))}static fromString(e){let t={type:"error"},r=e.match(zt);return r||wt.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&Ht(t.name),t.inputs=It(r[2],!1),Lt(jt.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function Ft(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const Dt=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ht(e){return e&&e.match(Dt)||wt.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const zt=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const qt=new b(fe),Gt=new RegExp(/^bytes([0-9]*)$/),Kt=new RegExp(/^(u?int)([0-9]*)$/);class Vt{constructor(e){te(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Xe(e.name);case"bool":return new it(e.name);case"string":return new bt(e.name);case"bytes":return new at(e.name);case"array":return new nt(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new vt((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new ut(e.name)}let t=e.type.match(Kt);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&qt.throwArgumentError("invalid "+t[1]+" bit length","param",e),new gt(r/8,"int"===t[1],e.name)}if(t=e.type.match(Gt),t){let r=parseInt(t[1]);return(0===r||r>32)&&qt.throwArgumentError("invalid bytes length","param",e),new st(r,e.name)}return qt.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new me(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new ye(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(Tt.from(e))));return new vt(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&qt.throwError("types/values length mismatch",b.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(Tt.from(e)))),n=new vt(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const n=e.map((e=>this._getCoder(Tt.from(e))));return new vt(n,"_").decode(this._getReader(x(t),r))}}const Jt=new Vt,Wt=new b(fe);class Qt extends le{}class Zt extends le{}class Yt extends le{}class Xt extends le{static isIndexed(e){return!(!e||!e._isIndexed)}}const $t={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function er(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class tr{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,te(this,"fragments",t.map((e=>Ot.from(e))).filter((e=>null!=e))),te(this,"_abiCoder",re(new.target,"getAbiCoder")()),te(this,"functions",{}),te(this,"errors",{}),te(this,"events",{}),te(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void Wt.warn("duplicate definition - constructor"):void te(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?Wt.warn("duplicate definition - "+r):t[r]=e})),this.deploy||te(this,"deploy",Mt.from({payable:!1,type:"constructor"})),te(this,"_isInterface",!0)}format(e){e||(e=_t.full),e===_t.sighash&&Wt.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===_t.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return Jt}static getAddress(e){return Re(e)}static getSighash(e){return N(Ye(e.format()),0,4)}static getEventTopic(e){return Ye(e.format())}getFunction(e){if(I(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];Wt.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?Wt.throwArgumentError("no matching function","name",t):r.length>1&&Wt.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[Ut.fromString(e).format()];return t||Wt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(I(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];Wt.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?Wt.throwArgumentError("no matching event","name",t):r.length>1&&Wt.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[Bt.fromString(e).format()];return t||Wt.throwArgumentError("no matching event","signature",e),t}getError(e){if(I(e)){const t=re(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}Wt.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?Wt.throwArgumentError("no matching error","name",t):r.length>1&&Wt.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[Ut.fromString(e).format()];return t||Wt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return re(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),re(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=x(t);return B(r.slice(0,4))!==this.getSighash(e)&&Wt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",B(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),B(_([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=x(t);return B(r.slice(0,4))!==this.getSighash(e)&&Wt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",B(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),B(_([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=x(t),n=null,i="",o=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=B(r.slice(0,4)),t=$t[e];if(t)o=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,s=t.signature,t.reason&&(n=o[0]),"Error"===a?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:"Panic"===a&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const t=this.getError(e);o=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,s=t.format()}catch(e){}break}}return Wt.throwError("call revert exception"+i,b.errors.CALL_EXCEPTION,{method:e.format(),data:B(t),errorArgs:o,errorName:a,errorSignature:s,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),B(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&Wt.throwError("too many arguments for "+e.format(),b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?Ye(t):"bytes"===e.type?ve(B(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=W.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),L(B(t),32));for(t.forEach(((t,i)=>{let o=e.inputs[i];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?Wt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((e=>n(o,e)))):r.push(n(o,t)):null!=t&&Wt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Wt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const a=t[o];if(e.indexed)if("string"===e.type)r.push(Ye(a));else if("bytes"===e.type)r.push(ve(a));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[a]))}else n.push(e),i.push(a)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);I(r[0],32)&&r[0].toLowerCase()===t||Wt.throwError("fragment/topic mismatch",b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],i=[],o=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(Tt.fromObject({type:"bytes32",name:e.name})),o.push(!0)):(n.push(e),o.push(!1)):(i.push(e),o.push(!1))}));let a=null!=r?this._abiCoder.decode(n,_(r)):null,s=this._abiCoder.decode(i,t,!0),u=[],c=0,l=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==a)u[t]=new Xt({_isIndexed:!0,hash:null});else if(o[t])u[t]=new Xt({_isIndexed:!0,hash:a[l++]});else try{u[t]=a[l++]}catch(e){u[t]=e}else try{u[t]=s[c++]}catch(e){u[t]=e}if(e.name&&null==u[e.name]){const r=u[t];r instanceof Error?Object.defineProperty(u,e.name,{enumerable:!0,get:()=>{throw er(`property ${JSON.stringify(e.name)}`,r)}}):u[e.name]=r}}));for(let e=0;e{throw er(`index ${e}`,t)}})}return Object.freeze(u)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new Zt({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:W.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Qt({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=B(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new Yt({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}var rr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const nr=new b("abstract-provider/5.7.0");class ir extends le{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class or{constructor(){nr.checkAbstract(new.target,or),te(this,"_isProvider",!0)}getFeeData(){return rr(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield ne({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,n=null,i=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,i=W.from("1500000000"),n=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:r,maxFeePerGas:n,maxPriorityFeePerGas:i,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}var ar=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const sr=new b("abstract-signer/5.7.0"),ur=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],cr=[b.errors.INSUFFICIENT_FUNDS,b.errors.NONCE_EXPIRED,b.errors.REPLACEMENT_UNDERPRICED];class lr{constructor(){sr.checkAbstract(new.target,lr),te(this,"_isSigner",!0)}getBalance(e){return ar(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return ar(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return ar(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield ne(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return ar(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield ne(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return ar(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return ar(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return ar(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return ar(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return ar(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===ur.indexOf(t)&&sr.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=oe(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&sr.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return ar(this,void 0,void 0,(function*(){const t=yield ne(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>ar(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&sr.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||sr.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):sr.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&sr.throwError("network does not support EIP-1559",b.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):sr.throwError("failed to get consistent fee data",b.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(cr.indexOf(e.code)>=0)throw e;return sr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&sr.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield ne(t)}))}_checkProvider(e){this.provider||sr.throwError("missing provider",b.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class fr extends lr{constructor(e,t){super(),te(this,"address",e),te(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{sr.throwError(e,b.errors.UNSUPPORTED_OPERATION,{operation:t})}))}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new fr(this.address,e)}}var dr=r(7952),hr=r.n(dr);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;function pr(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}var yr=mr;function mr(e,t){if(!e)throw new Error(t||"Assertion failed")}mr.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var gr=pr((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),br=pr((function(e,t){var r=t;r.assert=yr,r.toArray=gr.toArray,r.zero2=gr.zero2,r.toHex=gr.toHex,r.encode=gr.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=1&u?3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u:0,r[0].push(a),s=1&c?3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c:0,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new(H())(e,"hex","le")}})),vr=br.getNAF,wr=br.getJSF,Ar=br.assert;function kr(e,t){this.type=e,this.p=new(H())(t.p,16),this.red=t.prime?H().red(t.prime):H().mont(this.p),this.zero=new(H())(0).toRed(this.red),this.one=new(H())(1).toRed(this.red),this.two=new(H())(2).toRed(this.red),this.n=t.n&&new(H())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Er=kr;function Sr(e,t){this.curve=e,this.type=t,this.precomputed=null}kr.prototype.point=function(){throw new Error("Not implemented")},kr.prototype.validate=function(){throw new Error("Not implemented")},kr.prototype._fixedNafMul=function(e,t){Ar(e.precomputed);var r=e._getDoubles(),n=vr(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=i;f>0;f--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];Ar(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},kr.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,f=0;for(o=0;o=1;o-=2){var h=o-1,p=o;if(1===u[h]&&1===u[p]){var y=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(y[1]=t[h].add(t[p]),y[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(y[1]=t[h].toJ().mixedAdd(t[p]),y[2]=t[h].add(t[p].neg())):(y[1]=t[h].toJ().mixedAdd(t[p]),y[2]=t[h].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],g=wr(r[h],r[p]);for(f=Math.max(g[0].length,f),l[h]=new Array(f),l[p]=new Array(f),a=0;a=0;o--){for(var k=0;o>=0;){var E=!0;for(a=0;a=0&&k++,w=w.dblp(k),o<0)break;for(a=0;a0?s=c[a][S-1>>1]:S<0&&(s=c[a][-S-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},Sr.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(o=t,a=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:i},{a:o,b:a}]},Pr.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},Pr.prototype.pointFromX=function(e,t){(e=new(H())(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},Pr.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},Pr.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},Ir.prototype.isInfinity=function(){return this.inf},Ir.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},Ir.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},Ir.prototype.getX=function(){return this.x.fromRed()},Ir.prototype.getY=function(){return this.y.fromRed()},Ir.prototype.mul=function(e){return e=new(H())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Ir.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},Ir.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},Ir.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Ir.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},Ir.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},xr(Or,Er.BasePoint),Pr.prototype.jpoint=function(e,t,r){return new Or(this,e,t,r)},Or.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},Or.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Or.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),f=n.redMul(c),d=u.redSqr().redIAdd(l).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},Or.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),d=s.redMul(l.redISub(f)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},Or.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},Or.prototype.inspect=function(){return this.isInfinity()?"":""},Or.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Br=pr((function(e,t){var r=t;r.base=Er,r.short=Tr,r.mont=null,r.edwards=null})),Cr=pr((function(e,t){var r,n=t,i=br.assert;function o(e){"short"===e.type?this.curve=new Br.short(e):"edwards"===e.type?this.curve=new Br.edwards(e):this.curve=new Br.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,a("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:hr().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:hr().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:hr().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:hr().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"]}),a("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:hr().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hr().sha256,gRed:!1,g:["9"]}),a("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:hr().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}a("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:hr().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function Nr(e){if(!(this instanceof Nr))return new Nr(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=gr.toArray(e.entropy,e.entropyEnc||"hex"),r=gr.toArray(e.nonce,e.nonceEnc||"hex"),n=gr.toArray(e.pers,e.persEnc||"hex");yr(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var Rr=Nr;Nr.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},Nr.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=gr.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var jr=br.assert;function Fr(e,t){if(e instanceof Fr)return e;this._importDER(e,t)||(jr(e.r&&e.s,"Signature without r or s"),this.r=new(H())(e.r,16),this.s=new(H())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var Dr=Fr;function Hr(){this.place=0}function zr(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function qr(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}Fr.prototype._importDER=function(e,t){e=br.toArray(e,t);var r=new Hr;if(48!==e[r.place++])return!1;var n=zr(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=zr(e,r);if(!1===i)return!1;var o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=zr(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var s=e.slice(r.place,a+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new(H())(o),this.s=new(H())(s),this.recoveryParam=null,!0},Fr.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=qr(t),r=qr(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Gr(n,t.length),(n=n.concat(t)).push(2),Gr(n,r.length);var i=n.concat(r),o=[48];return Gr(o,i.length),o=o.concat(i),br.encode(o,e)};var Kr=function(){throw new Error("unsupported")},Vr=br.assert;function Jr(e){if(!(this instanceof Jr))return new Jr(e);"string"==typeof e&&(Vr(Object.prototype.hasOwnProperty.call(Cr,e),"Unknown curve "+e),e=Cr[e]),e instanceof Cr.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Wr=Jr;Jr.prototype.keyPair=function(e){return new Lr(this,e)},Jr.prototype.keyFromPrivate=function(e,t){return Lr.fromPrivate(this,e,t)},Jr.prototype.keyFromPublic=function(e,t){return Lr.fromPublic(this,e,t)},Jr.prototype.genKeyPair=function(e){e||(e={});for(var t=new Rr({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Kr(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(H())(2));;){var i=new(H())(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Jr.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Jr.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(H())(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),a=e.toArray("be",i),s=new Rr({hash:this.hash,entropy:o,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),u=this.n.sub(new(H())(1)),c=0;;c++){var l=n.k?n.k(c):new(H())(s.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(u)>=0)){var f=this.g.mul(l);if(!f.isInfinity()){var d=f.getX(),h=d.umod(this.n);if(0!==h.cmpn(0)){var p=l.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var y=(f.getY().isOdd()?1:0)|(0!==d.cmp(h)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),y^=1),new Dr({r:h,s:p,recoveryParam:y})}}}}}},Jr.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(H())(e,16)),r=this.keyFromPublic(r,n);var i=(t=new Dr(t,"hex")).r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,s=o.invm(this.n),u=s.mul(e).umod(this.n),c=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},Jr.prototype.recoverPubKey=function(e,t,r,n){Vr((3&r)===r,"The recovery param is more than two bits"),t=new Dr(t,n);var i=this.n,o=new(H())(e),a=t.r,s=t.s,u=1&r,c=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");a=c?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var l=t.r.invm(i),f=i.sub(o).mul(l).umod(i),d=s.mul(l).umod(i);return this.g.mulAdd(f,a,d)},Jr.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new Dr(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var Qr=pr((function(e,t){var r=t;r.version="6.5.4",r.utils=br,r.rand=function(){throw new Error("unsupported")},r.curve=Br,r.curves=Cr,r.ec=Wr,r.eddsa=null})).ec;const Zr=new b("signing-key/5.7.0");let Yr=null;function Xr(){return Yr||(Yr=new Qr("secp256k1")),Yr}class $r{constructor(e){te(this,"curve","secp256k1"),te(this,"privateKey",B(e)),32!==C(this.privateKey)&&Zr.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=Xr().keyFromPrivate(x(this.privateKey));te(this,"publicKey","0x"+t.getPublic(!1,"hex")),te(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),te(this,"_isSigningKey",!0)}_addPoint(e){const t=Xr().keyFromPublic(x(this.publicKey)),r=Xr().keyFromPublic(x(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=Xr().keyFromPrivate(x(this.privateKey)),r=x(e);32!==r.length&&Zr.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return j({recoveryParam:n.recoveryParam,r:L("0x"+n.r.toString(16),32),s:L("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=Xr().keyFromPrivate(x(this.privateKey)),r=Xr().keyFromPublic(x(tn(e)));return L("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function en(e,t){const r=j(t),n={r:x(r.r),s:x(r.s)};return"0x"+Xr().recoverPubKey(x(e),n,r.recoveryParam).encode("hex",!1)}function tn(e,t){const r=x(e);if(32===r.length){const e=new $r(r);return t?"0x"+Xr().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?B(r):"0x"+Xr().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+Xr().keyFromPublic(r).getPublic(!0,"hex"):B(r):Zr.throwArgumentError("invalid public or private key","key","[REDACTED]")}const rn=new b("transactions/5.7.0");var nn;function on(e){return"0x"===e?null:Re(e)}function an(e){return"0x"===e?lt:W.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(nn||(nn={}));const sn=[{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"}],un={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function cn(e){return Re(N(ve(N(tn(e),1)),12))}function ln(e,t){return cn(en(x(e),t))}function fn(e,t){const r=P(W.from(e).toHexString());return r.length>32&&rn.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function dn(e,t){return{address:Re(e),storageKeys:(t||[]).map(((t,r)=>(32!==C(t)&&rn.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function hn(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&rn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),dn(e[0],e[1])):dn(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return dn(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function pn(e){return hn(e).map((e=>[e.address,e.storageKeys]))}function yn(e,t){if(null!=e.gasPrice){const t=W.from(e.gasPrice),r=W.from(e.maxFeePerGas||0);t.eq(r)||rn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[fn(e.chainId||0,"chainId"),fn(e.nonce||0,"nonce"),fn(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),fn(e.maxFeePerGas||0,"maxFeePerGas"),fn(e.gasLimit||0,"gasLimit"),null!=e.to?Re(e.to):"0x",fn(e.value||0,"value"),e.data||"0x",pn(e.accessList||[])];if(t){const e=j(t);r.push(fn(e.recoveryParam,"recoveryParam")),r.push(P(e.r)),r.push(P(e.s))}return R(["0x02",Se(r)])}function mn(e,t){const r=[fn(e.chainId||0,"chainId"),fn(e.nonce||0,"nonce"),fn(e.gasPrice||0,"gasPrice"),fn(e.gasLimit||0,"gasLimit"),null!=e.to?Re(e.to):"0x",fn(e.value||0,"value"),e.data||"0x",pn(e.accessList||[])];if(t){const e=j(t);r.push(fn(e.recoveryParam,"recoveryParam")),r.push(P(e.r)),r.push(P(e.s))}return R(["0x01",Se(r)])}function gn(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&rn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){ie(e,un);const r=[];sn.forEach((function(t){let n=e[t.name]||[];const i={};t.numeric&&(i.hexPad="left"),n=x(B(n,i)),t.length&&n.length!==t.length&&n.length>0&&rn.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=P(n),n.length>t.maxLength&&rn.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push(B(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!=typeof n&&rn.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!k(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push(B(n)),r.push("0x"),r.push("0x")),!t)return Se(r);const i=j(t);let o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&rn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&rn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push(B(o)),r.push(P(x(i.r))),r.push(P(x(i.s))),Se(r)}(e,t);switch(e.type){case 1:return mn(e,t);case 2:return yn(e,t)}return rn.throwError(`unsupported transaction type: ${e.type}`,b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function bn(e,t,r){try{const r=an(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){rn.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=L(t[1],32),e.s=L(t[2],32);try{const t=ve(r(e));e.from=ln(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function vn(e){const t=x(e);if(t[0]>127)return function(e){const t=Pe(e);9!==t.length&&6!==t.length&&rn.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:an(t[0]).toNumber(),gasPrice:an(t[1]),gasLimit:an(t[2]),to:on(t[3]),value:an(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=W.from(t[6]).toNumber()}catch(e){return r}if(r.r=L(t[7],32),r.s=L(t[8],32),W.from(r.r).isZero()&&W.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=t.slice(0,6);0!==r.chainId&&(i.push(B(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);const o=ve(Se(i));try{r.from=ln(o,{r:B(r.r),s:B(r.s),recoveryParam:n})}catch(e){}r.hash=ve(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=Pe(e.slice(1));8!==t.length&&11!==t.length&&rn.throwArgumentError("invalid component count for transaction type: 1","payload",B(e));const r={type:1,chainId:an(t[0]).toNumber(),nonce:an(t[1]).toNumber(),gasPrice:an(t[2]),gasLimit:an(t[3]),to:on(t[4]),value:an(t[5]),data:t[6],accessList:hn(t[7])};return 8===t.length||(r.hash=ve(e),bn(r,t.slice(8),mn)),r}(t);case 2:return function(e){const t=Pe(e.slice(1));9!==t.length&&12!==t.length&&rn.throwArgumentError("invalid component count for transaction type: 2","payload",B(e));const r=an(t[2]),n=an(t[3]),i={type:2,chainId:an(t[0]).toNumber(),nonce:an(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:an(t[4]),to:on(t[5]),value:an(t[6]),data:t[7],accessList:hn(t[8])};return 9===t.length||(i.hash=ve(e),bn(i,t.slice(9),yn)),i}(t)}return rn.throwError(`unsupported transaction type: ${t[0]}`,b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}var wn=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const An=new b("contracts/5.7.0"),kn={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function En(e,t){return wn(this,void 0,void 0,(function*(){const r=yield t;"string"!=typeof r&&An.throwArgumentError("invalid address or ENS name","name",r);try{return Re(r)}catch(e){}e||An.throwError("a provider or signer is needed to resolve ENS names",b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield e.resolveName(r);return null==n&&An.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function Sn(e,t,r){return wn(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>Sn(e,Array.isArray(t)?t[n]:t[r.name],r)))):"address"===r.type?yield En(e,t):"tuple"===r.type?yield Sn(e,t,r.components):"array"===r.baseType?Array.isArray(t)?yield Promise.all(t.map((t=>Sn(e,t,r.arrayChildren)))):Promise.reject(An.makeError("invalid value for array",b.errors.INVALID_ARGUMENT,{argument:"value",value:t})):t}))}function xn(e,t,r){return wn(this,void 0,void 0,(function*(){let n={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(n=oe(r.pop())),An.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?n.from?n.from=ne({override:En(e.signer,n.from),signer:e.signer.getAddress()}).then((e=>wn(this,void 0,void 0,(function*(){return Re(e.signer)!==e.override&&An.throwError("Contract with a Signer cannot override from",b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})))):n.from=e.signer.getAddress():n.from&&(n.from=En(e.provider,n.from));const i=yield ne({args:Sn(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:ne(n)||{}}),o=e.interface.encodeFunctionData(t,i.args),a={data:o,to:i.address},s=i.overrides;if(null!=s.nonce&&(a.nonce=W.from(s.nonce).toNumber()),null!=s.gasLimit&&(a.gasLimit=W.from(s.gasLimit)),null!=s.gasPrice&&(a.gasPrice=W.from(s.gasPrice)),null!=s.maxFeePerGas&&(a.maxFeePerGas=W.from(s.maxFeePerGas)),null!=s.maxPriorityFeePerGas&&(a.maxPriorityFeePerGas=W.from(s.maxPriorityFeePerGas)),null!=s.from&&(a.from=s.from),null!=s.type&&(a.type=s.type),null!=s.accessList&&(a.accessList=hn(s.accessList)),null==a.gasLimit&&null!=t.gas){let e=21e3;const r=x(o);for(let t=0;tnull!=n[e]));return u.length&&An.throwError(`cannot override ${u.map((e=>JSON.stringify(e))).join(",")}`,b.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:u}),a}))}function _n(e,t){const r=t.wait.bind(t);t.wait=t=>r(t).then((t=>(t.events=t.logs.map((r=>{let n=ce(r),i=null;try{i=e.interface.parseLog(r)}catch(e){}return i&&(n.args=i.args,n.decode=(t,r)=>e.interface.decodeEventLog(i.eventFragment,t,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>e.provider,n.getBlock=()=>e.provider.getBlock(t.blockHash),n.getTransaction=()=>e.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(t),n})),t)))}function Pn(e,t,r){const n=e.signer||e.provider;return function(...i){return wn(this,void 0,void 0,(function*(){let o;if(i.length===t.inputs.length+1&&"object"==typeof i[i.length-1]){const e=oe(i.pop());null!=e.blockTag&&(o=yield e.blockTag),delete e.blockTag,i.push(e)}null!=e.deployTransaction&&(yield e._deployed(o));const a=yield xn(e,t,i),s=yield n.call(a,o);try{let n=e.interface.decodeFunctionResult(t,s);return r&&1===t.outputs.length&&(n=n[0]),n}catch(t){throw t.code===b.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=i,t.transaction=a),t}}))}}function Tn(e,t,r){return t.constant?Pn(e,t,r):function(e,t){return function(...r){return wn(this,void 0,void 0,(function*(){e.signer||An.throwError("sending a transaction requires a signer",b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());const n=yield xn(e,t,r),i=yield e.signer.sendTransaction(n);return _n(e,i),i}))}}(e,t)}function In(e){return!e.address||null!=e.topics&&0!==e.topics.length?(e.address||"*")+"@"+(e.topics?e.topics.map((e=>Array.isArray(e)?e.join("|"):e)).join(":"):""):"*"}class On{constructor(e,t){te(this,"tag",e),te(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter((r=>!(!t&&r.listener===e)||(t=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((e=>e.listener))}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter((t=>{const r=e.slice();return setTimeout((()=>{t.listener.apply(this,r)}),0),!t.once})),t}prepareEvent(e){}getEmit(e){return[e]}}class Bn extends On{constructor(){super("error",null)}}class Cn extends On{constructor(e,t,r,n){const i={address:e};let o=t.getEventTopic(r);n?(o!==n[0]&&An.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(In(i),i),te(this,"address",e),te(this,"interface",t),te(this,"fragment",r)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(e,t)=>this.interface.decodeEventLog(this.fragment,e,t);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=he(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r}}class Nn extends On{constructor(e,t){super("*",{address:e}),te(this,"address",e),te(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(e,r)=>this.interface.decodeEventLog(t.eventFragment,e,r),e.args=t.args}catch(e){}}}class Rn{constructor(e,t,r){te(this,"interface",re(new.target,"getInterface")(t)),null==r?(te(this,"provider",null),te(this,"signer",null)):lr.isSigner(r)?(te(this,"provider",r.provider||null),te(this,"signer",r)):or.isProvider(r)?(te(this,"provider",r),te(this,"signer",null)):An.throwArgumentError("invalid signer or provider","signerOrProvider",r),te(this,"callStatic",{}),te(this,"estimateGas",{}),te(this,"functions",{}),te(this,"populateTransaction",{}),te(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach((t=>{const r=this.interface.events[t];te(this.filters,t,((...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,e)}))),e[r.name]||(e[r.name]=[]),e[r.name].push(t)})),Object.keys(e).forEach((t=>{const r=e[t];1===r.length?te(this.filters,t,this.filters[r[0]]):An.warn(`Duplicate definition of ${t} (${r.join(", ")})`)}))}if(te(this,"_runningEvents",{}),te(this,"_wrappedEmits",{}),null==e&&An.throwArgumentError("invalid contract address or ENS name","addressOrName",e),te(this,"address",e),this.provider)te(this,"resolvedAddress",En(this.provider,e));else try{te(this,"resolvedAddress",Promise.resolve(Re(e)))}catch(e){An.throwError("provider is required to use ENS name as contract address",b.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((e=>{}));const n={},i={};Object.keys(this.interface.functions).forEach((e=>{const t=this.interface.functions[e];if(i[e])An.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{i[e]=!0;{const r=t.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(e)}null==this[e]&&te(this,e,Tn(this,t,!0)),null==this.functions[e]&&te(this.functions,e,Tn(this,t,!1)),null==this.callStatic[e]&&te(this.callStatic,e,Pn(this,t,!0)),null==this.populateTransaction[e]&&te(this.populateTransaction,e,function(e,t){return function(...r){return xn(e,t,r)}}(this,t)),null==this.estimateGas[e]&&te(this.estimateGas,e,function(e,t){const r=e.signer||e.provider;return function(...n){return wn(this,void 0,void 0,(function*(){r||An.throwError("estimate require a provider or signer",b.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield xn(e,t,n);return yield r.estimateGas(i)}))}}(this,t))}})),Object.keys(n).forEach((e=>{const t=n[e];if(t.length>1)return;e=e.substring(1);const r=t[0];try{null==this[e]&&te(this,e,this[r])}catch(e){}null==this.functions[e]&&te(this.functions,e,this.functions[r]),null==this.callStatic[e]&&te(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&te(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&te(this.estimateGas,e,this.estimateGas[r])}))}static getContractAddress(e){return Le(e)}static getInterface(e){return tr.isInterface(e)?e:new tr(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,e).then((e=>("0x"===e&&An.throwError("contract not deployed",b.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(e){this.signer||An.throwError("sending a transactions require a signer",b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=oe(e||{});return["from","to"].forEach((function(e){null!=t[e]&&An.throwError("cannot override "+e,b.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(t)))}connect(e){"string"==typeof e&&(e=new fr(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&te(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return Xt.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new Bn);if("event"===e)return this._normalizeRunningEvent(new On("event",null));if("*"===e)return this._normalizeRunningEvent(new Nn(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Cn(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const t=e.topics[0];if("string"!=typeof t)throw new Error("invalid topic");const r=this.interface.getEvent(t);return this._normalizeRunningEvent(new Cn(this.address,this.interface,r,e.topics))}catch(e){}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new On(In(t),t))}return this._normalizeRunningEvent(new Nn(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){const n=ce(t);return n.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e))},n.getBlock=()=>this.provider.getBlock(t.blockHash),n.getTransaction=()=>this.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(n),n}_addEventListener(e,t,r){if(this.provider||An.throwError("events require a provider or a signer with a provider",b.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{const t=e.getEmit(n);this.emit(e.filter,...t)}catch(e){n.decodeError=e.error}null!=e.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r)}}queryFilter(e,t,r){const n=this._getRunningEvent(e),i=oe(n.filter);return"string"==typeof t&&I(t,32)?(null!=r&&An.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=t):(i.fromBlock=null!=t?t:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((e=>e.map((e=>this._wrapEvent(n,e,null)))))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),n=r.run(t)>0;return this._checkRunningEvents(r),n}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce(((e,t)=>e+this._runningEvents[t].listenerCount()),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(null==e){const e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach((t=>{e.push(t)}));return e}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const e in this._runningEvents){const t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}removeListener(e,t){return this.off(e,t)}}class Mn extends Rn{}class Un{constructor(e,t,r){let n=null;n="string"==typeof t?t:S(t)?B(t):t&&"string"==typeof t.object?t.object:"!","0x"!==n.substring(0,2)&&(n="0x"+n),(!I(n)||n.length%2)&&An.throwArgumentError("invalid bytecode","bytecode",t),r&&!lr.isSigner(r)&&An.throwArgumentError("invalid signer","signer",r),te(this,"bytecode",n),te(this,"interface",re(new.target,"getInterface")(e)),te(this,"signer",r||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){t=oe(e.pop());for(const e in t)if(!kn[e])throw new Error("unknown transaction override "+e)}if(["data","from","to"].forEach((e=>{null!=t[e]&&An.throwError("cannot override "+e,b.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value){W.from(t.value).isZero()||this.interface.deploy.payable||An.throwError("non-payable constructor cannot override value",b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}return An.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=B(_([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return wn(this,void 0,void 0,(function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),An.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const r=yield Sn(this.signer,e,this.interface.deploy.inputs);r.push(t);const n=this.getDeployTransaction(...r),i=yield this.signer.sendTransaction(n),o=re(this.constructor,"getContractAddress")(i),a=re(this.constructor,"getContract")(o,this.interface,this.signer);return _n(a,i),te(a,"deployTransaction",i),a}))}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){null==e&&An.throwError("missing compiler output",b.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}static getInterface(e){return Mn.getInterface(e)}static getContractAddress(e){return Le(e)}static getContract(e,t,r){return new Mn(e,t,r)}}const Ln=new b(z),jn={},Fn=W.from(0),Dn=W.from(-1);function Hn(e,t,r,n){const i={fault:t,operation:r};return void 0!==n&&(i.value=n),Ln.throwError(e,b.errors.NUMERIC_FAULT,i)}let zn="0";for(;zn.length<256;)zn+=zn;function qn(e){if("number"!=typeof e)try{e=W.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+zn.substring(0,e):Ln.throwArgumentError("invalid decimal size","decimals",e)}function Gn(e,t){null==t&&(t=0);const r=qn(t),n=(e=W.from(e)).lt(Fn);n&&(e=e.mul(Dn));let i=e.mod(r).toString();for(;i.length2&&Ln.throwArgumentError("too many decimal points","value",e);let o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&Hn("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.lengthnull==e[t]?n:(typeof e[t]!==r&&Ln.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&Ln.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&Ln.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new Vn(jn,t,r,n)}}class Jn{constructor(e,t,r,n){e!==jn&&Ln.throwError("cannot use FixedNumber constructor; use FixedNumber.from",b.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Ln.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=Kn(this._value,this.format.decimals),r=Kn(e._value,e.format.decimals);return Jn.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=Kn(this._value,this.format.decimals),r=Kn(e._value,e.format.decimals);return Jn.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=Kn(this._value,this.format.decimals),r=Kn(e._value,e.format.decimals);return Jn.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=Kn(this._value,this.format.decimals),r=Kn(e._value,e.format.decimals);return Jn.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=Jn.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(Wn.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=Jn.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(Wn.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&Ln.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=Jn.from("1"+zn.substring(0,e),this.format),n=Qn.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&Ln.throwArgumentError("invalid byte width","width",e);return L(W.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString(),e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Jn.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||function(e){return null!=e&&(W.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||I(e)||"bigint"==typeof e||S(e))}(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),Jn.fromString(Gn(e,t),Vn.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=Vn.from(t),n=Kn(e,r.decimals);!r.signed&&n.lt(Fn)&&Hn("unsigned value cannot be negative","overflow","value",e);let i=null;r.signed?i=n.toTwos(r.width).toHexString():(i=n.toHexString(),i=L(i,r.width/8));const o=Gn(n,r.decimals);return new Jn(jn,i,o,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=Vn.from(t);if(x(e).length>r.width/8)throw new Error("overflow");let n=W.from(e);r.signed&&(n=n.fromTwos(r.width));const i=n.toTwos((r.signed?0:1)+r.width).toHexString(),o=Gn(n,r.decimals);return new Jn(jn,i,o,r)}static from(e,t){if("string"==typeof e)return Jn.fromString(e,t);if(S(e))return Jn.fromBytes(e,t);try{return Jn.fromValue(e,0,t)}catch(e){if(e.code!==b.errors.INVALID_ARGUMENT)throw e}return Ln.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const Wn=Jn.from(1),Qn=Jn.from("0.5"),Zn="Ethereum Signed Message:\n";function Yn(e){return"string"==typeof e&&(e=Ke(e)),ve(_([Ke(Zn),Ke(String(e.length)),e]))}const Xn="hash/5.7.0";var $n=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const ei=new b(Xn),ti=new Uint8Array(32);ti.fill(0);const ri=W.from(-1),ni=W.from(0),ii=W.from(1),oi=W.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const ai=L(ii.toHexString(),32),si=L(ni.toHexString(),32),ui={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},ci=["name","version","chainId","verifyingContract","salt"];function li(e){return function(t){return"string"!=typeof t&&ei.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const fi={name:li("name"),version:li("version"),chainId:function(e){try{return W.from(e).toString()}catch(e){}return ei.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return Re(e).toLowerCase()}catch(e){}return ei.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=x(e);if(32!==t.length)throw new Error("bad length");return B(t)}catch(e){}return ei.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function di(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&ei.throwArgumentError("invalid numeric width","type",e);const i=oi.mask(r?n-1:n),o=r?i.add(ii).mul(ri):ni;return function(t){const r=W.from(t);return(r.lt(o)||r.gt(i))&&ei.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),L(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&ei.throwArgumentError("invalid bytes width","type",e),function(t){return x(t).length!==r&&ei.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=x(e),r=t.length%32;return r?R([t,ti.slice(r)]):B(t)}(t)}}}switch(e){case"address":return function(e){return L(Re(e),32)};case"bool":return function(e){return e?ai:si};case"bytes":return function(e){return ve(e)};case"string":return function(e){return Ye(e)}}return null}function hi(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class pi{constructor(e){te(this,"types",Object.freeze(ce(e))),te(this,"_encoderCache",{}),te(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const i={};e[n].forEach((o=>{i[o.name]&&ei.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(n)}`,"types",e),i[o.name]=!0;const a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===n&&ei.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e);di(a)||(r[a]||ei.throwArgumentError(`unknown type ${JSON.stringify(a)}`,"types",e),r[a].push(n),t[n][a]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?ei.throwArgumentError("missing primary type","types",e):i.length>1&&ei.throwArgumentError(`ambiguous primary types or unused types: ${i.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),te(this,"primaryType",i[0]),function i(o,a){a[o]&&ei.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),a[o]=!0,Object.keys(t[o]).forEach((e=>{r[e]&&(i(e,a),Object.keys(a).forEach((t=>{n[t][e]=!0})))})),delete a[o]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=hi(t,e[t])+r.map((t=>hi(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=di(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&ei.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(ve)),ve(R(i))}}const r=this.types[e];if(r){const t=Ye(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?ve(n):n}));return n.unshift(t),R(n)}}return ei.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||ei.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return ve(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(di(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&ei.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const i=this.types[e];return i?i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{}):ei.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new pi(e)}static getPrimaryType(e){return pi.from(e).primaryType}static hashStruct(e,t,r){return pi.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=ui[r];n||ei.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>ci.indexOf(e.name)-ci.indexOf(t.name))),pi.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return R(["0x1901",pi.hashDomain(e),pi.from(t).hash(r)])}static hash(e,t,r){return ve(pi.encode(e,t,r))}static resolveNames(e,t,r,n){return $n(this,void 0,void 0,(function*(){e=oe(e);const i={};e.verifyingContract&&!I(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=pi.from(t);o.visit(r,((e,t)=>("address"!==e||I(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=o.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){pi.hashDomain(e);const n={},i=[];ci.forEach((t=>{const r=e[t];null!=r&&(n[t]=fi[t](r),i.push({name:t,type:ui[t]}))}));const o=pi.from(t),a=oe(t);return a.EIP712Domain?ei.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):a.EIP712Domain=i,o.encode(r),{types:a,domain:n,primaryType:o.primaryType,message:o.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return B(x(t));if(e.match(/^u?int/))return W.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&ei.throwArgumentError("invalid string","value",t),t}return ei.throwArgumentError("unsupported type","type",e)}))}}}class yi{constructor(e){te(this,"alphabet",e),te(this,"base",e.length),te(this,"_alphabetMap",{}),te(this,"_leader",e.charAt(0));for(let t=0;t0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r>24&255,u[t.length+1]=f>>16&255,u[t.length+2]=f>>8&255,u[t.length+3]=255&f;let d=x(ki(i,e,u));o||(o=d.length,l=new Uint8Array(o),a=Math.ceil(n/o),c=n-(a-1)*o),l.set(d);for(let t=1;t=256)throw new Error("Depth too large!");return Ui(_([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",B(this.depth),this.parentFingerprint,L(B(this.index),4),this.chainCode,null!=this.privateKey?_(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Di(ji,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~Ni));const r=new Uint8Array(37);if(e&Ni){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(x(this.privateKey),1),t&&(t+="'")}else r.set(x(this.publicKey));for(let t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;const n=x(ki(gi.sha512,this.chainCode,r)),i=n.slice(0,32),o=n.slice(32);let a=null,s=null;if(this.privateKey)a=Mi(W.from(i).add(this.privateKey).mod(Bi));else{s=new $r(B(i))._addPoint(this.publicKey)}let u=t;const c=this.mnemonic;return c&&(u=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new Di(ji,a,s,this.fingerprint,Mi(o),e,this.depth+1,u)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let e=0;e=Ni)throw new Error("invalid path index - "+n);r=r._derive(Ni+e)}else{if(!n.match(/^[0-9]+$/))throw new Error("invalid path component - "+n);{const e=parseInt(n);if(e>=Ni)throw new Error("invalid path index - "+n);r=r._derive(e)}}}return r}static _fromSeed(e,t){const r=x(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=x(ki(gi.sha512,Ci,r));return new Di(ji,Mi(n.slice(0,32)),null,"0x00000000",Mi(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=qi(zi(e,r=Li(r)),r),Di._fromSeed(Hi(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return Di._fromSeed(e,null)}static fromExtendedKey(e){const t=mi.decode(e);82===t.length&&Ui(t.slice(0,78))===e||Oi.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],n=B(t.slice(5,9)),i=parseInt(B(t.slice(9,13)).substring(2),16),o=B(t.slice(13,45)),a=t.slice(45,78);switch(B(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Di(ji,null,B(a),n,o,i,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==a[0])break;return new Di(ji,B(a.slice(1)),null,n,o,i,r,null)}return Oi.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function Hi(e,t){t||(t="");const r=Ke("mnemonic"+t,De.NFKD);return Ei(Ke(e,De.NFKD),r,2048,64,"sha512")}function zi(e,t){t=Li(t),Oi.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=x(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let e=0;e>3]|=1<<7-i%8),i++}const o=32*r.length/3,a=Ri(r.length/3);if((x(wi(n.slice(0,o/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return B(n.slice(0,o/8))}function qi(e,t){if(t=Li(t),(e=x(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let t=0;t8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&(1<<8-n)-1),n+=3);const i=e.length/4,o=x(wi(e))[0]&Ri(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,t.join(r.map((e=>t.getWord(e))))}function Gi(e,t){try{return zi(e,t),!0}catch(e){}return!1}function Ki(e){return("number"!=typeof e||e<0||e>=Ni||e%1)&&Oi.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}const Vi=new b("random/5.7.0");const Ji=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();let Wi=Ji.crypto||Ji.msCrypto;function Qi(e){(e<=0||e>1024||e%1||e!=e)&&Vi.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return Wi.getRandomValues(t),x(t)}Wi&&Wi.getRandomValues||(Vi.warn("WARNING: Missing strong random number source"),Wi={getRandomValues:function(e){return Vi.throwError("no secure random source avaialble",b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var Zi=r(2872),Yi=r.n(Zi),Xi=r(9983),$i=r.n(Xi);function eo(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),x(e)}function to(e,t){for(e=String(e);e.lengtht)),te(this,"address",cn(this.publicKey)),this.address!==Re(e.address)&&So.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;te(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||Fi,locale:t.locale||"en"})));const r=this.mnemonic;cn(Di.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path).privateKey)!==this.address&&So.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else te(this,"_mnemonic",(()=>null))}else{if($r.isSigningKey(e))"secp256k1"!==e.curve&&So.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),te(this,"_signingKey",(()=>e));else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new $r(e);te(this,"_signingKey",(()=>t))}te(this,"_mnemonic",(()=>null)),te(this,"address",cn(this.publicKey))}var r;t&&!or.isProvider(t)&&So.throwArgumentError("invalid provider","provider",t),te(this,"provider",t||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(e){return new xo(this,e)}signTransaction(e){return ne(e).then((t=>{null!=t.from&&(Re(t.from)!==this.address&&So.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest(ve(gn(t)));return gn(t,r)}))}signMessage(e){return Eo(this,void 0,void 0,(function*(){return F(this._signingKey().signDigest(Yn(e)))}))}_signTypedData(e,t,r){return Eo(this,void 0,void 0,(function*(){const n=yield pi.resolveNames(e,t,r,(e=>(null==this.provider&&So.throwError("cannot resolve ENS names without a provider",b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return F(this._signingKey().signDigest(pi.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback");return t||(t={}),function(e,t,r,n){try{if(Re(e.address)!==cn(e.privateKey))throw new Error("address/privateKey mismatch");if(uo(e)){const t=e.mnemonic;if(Di.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||Fi).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(e){return Promise.reject(e)}"function"!=typeof r||n||(n=r,r={}),r||(r={});const i=x(e.privateKey),o=ro(t);let a=null,s=null,u=null;if(uo(e)){const t=e.mnemonic;a=x(zi(t.phrase,t.locale||"en")),s=t.path||Fi,u=t.locale||"en"}let c=r.client;c||(c="ethers.js");let l=null;l=r.salt?x(r.salt):Qi(32);let f=null;if(r.iv){if(f=x(r.iv),16!==f.length)throw new Error("invalid iv")}else f=Qi(16);let d=null;if(r.uuid){if(d=x(r.uuid),16!==d.length)throw new Error("invalid uuid")}else d=Qi(16);let h=1<<17,p=8,y=1;return r.scrypt&&(r.scrypt.N&&(h=r.scrypt.N),r.scrypt.r&&(p=r.scrypt.r),r.scrypt.p&&(y=r.scrypt.p)),$i().scrypt(o,l,h,p,y,64,n).then((t=>{const r=(t=x(t)).slice(0,16),n=t.slice(16,32),o=t.slice(32,64),m=new(Yi().Counter)(f),g=x(new(Yi().ModeOfOperation.ctr)(r,m).encrypt(i)),b=ve(_([n,g])),v={address:e.address.substring(2).toLowerCase(),id:io(d),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:B(f).substring(2)},ciphertext:B(g).substring(2),kdf:"scrypt",kdfparams:{salt:B(l).substring(2),n:h,dklen:32,p:y,r:p},mac:b.substring(2)}};if(a){const e=Qi(16),t=new(Yi().Counter)(e),r=x(new(Yi().ModeOfOperation.ctr)(o,t).encrypt(a)),n=new Date,i=n.getUTCFullYear()+"-"+to(n.getUTCMonth()+1,2)+"-"+to(n.getUTCDate(),2)+"T"+to(n.getUTCHours(),2)+"-"+to(n.getUTCMinutes(),2)+"-"+to(n.getUTCSeconds(),2)+".0Z";v["x-ethers"]={client:c,gethFilename:"UTC--"+i+"--"+v.address,mnemonicCounter:B(e).substring(2),mnemonicCiphertext:B(r).substring(2),path:s,locale:u,version:"0.1"}}return JSON.stringify(v)}))}(this,e,t,r)}static createRandom(e){let t=Qi(16);e||(e={}),e.extraEntropy&&(t=x(N(ve(_([t,e.extraEntropy])),0,16)));const r=qi(t,e.locale);return xo.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return Ao(e,t,r).then((e=>new xo(e)))}static fromEncryptedJsonSync(e,t){return new xo(ko(e,t))}static fromMnemonic(e,t,r){return t||(t=Fi),new xo(Di.fromMnemonic(e,null,r).derivePath(t))}}function _o(e,t){return ln(Yn(e),t)}function Po(e,t,r,n){return ln(pi.hash(e,t,r),n)}const To="0x0000000000000000000000000000000000000000",Io="0x0000000000000000000000000000000000000000000000000000000000000000",Oo="Ξ",Bo=new b("networks/5.7.1");function Co(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new t.PocketProvider(e,r.pocket);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new t.AnkrProvider(e,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return Co(e)},t}function No(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return No(e,t)},r}const Ro={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Co("homestead")},Mo={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Co("ropsten")},Uo={chainId:63,name:"classicMordor",_defaultProvider:No("https://www.ethercluster.com/mordor","classicMordor")},Lo={unspecified:{chainId:0,name:"unspecified"},homestead:Ro,mainnet:Ro,morden:{chainId:2,name:"morden"},ropsten:Mo,testnet:Mo,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Co("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Co("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Co("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Co("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:No("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Uo,classicTestnet:Uo,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:No("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Co("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Co("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function jo(e){if(null==e)return null;if("number"==typeof e){for(const t in Lo){const r=Lo[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=Lo[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=Lo[e.name];if(!t)return"number"!=typeof e.chainId&&Bo.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&Bo.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var n;return null==r&&t._defaultProvider&&(r=(n=t._defaultProvider)&&"function"==typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}function Fo(e){e=atob(e);const t=[];for(let r=0;r0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function zo(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e>--u&1}const f=Math.pow(2,31),d=f>>>1,h=d>>1,p=f-1;let y=0;for(let e=0;e<31;e++)y=y<<1|l();let m=[],g=0,b=f;for(;;){let e=Math.floor(((y-g+1)*i-1)/b),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|l(),a=a<<1^d,s=(s^d)<<1|d|1;g=a,b=1+s-a}let v=n-4;return m.map((t=>{switch(t-v){case 3:return v+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return v+256+(e[s++]<<8|e[s++]);case 1:return v+e[s++];default:return t-1}}))}(e))}function qo(e){return 1&e?~e>>1:e>>1}function Go(e,t){let r=Array(e);for(let n=0,i=-1;nt[e])):r}function Jo(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;in[t].push(e)));return n}function Wo(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return Ho(Jo(i.length,1+e,t).map(((e,t)=>{const o=e[0],a=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[o+t*r,a.map((e=>e+i))]}))})))}function Qo(e,t){return Jo(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const Zo=zo(Fo("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),Yo=new Set(Vo(Zo)),Xo=new Set(Vo(Zo)),$o=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(Wo(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(Qo(r,e))}return function(e){const t={};for(let r=0;re-t));return function r(){let n=[];for(;;){let i=Vo(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let a=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:a,save:1==i,check:2==i}}()}(Zo),ta=45,ra=95;function na(e){return Ze(e)}function ia(e){return e.filter((e=>65039!=e))}function oa(e){for(let t of e.split(".")){let e=na(t);try{for(let t=e.lastIndexOf(ra)-1;t>=0;t--)if(e[t]!==ra)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===ta&&e[3]===ta)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function aa(e){return oa(function(e,t){let r=na(e).reverse(),n=[];for(;r.length;){let e=sa(r);if(e){n.push(...t(e));continue}let i=r.pop();if(Yo.has(i)){n.push(i);continue}if(Xo.has(i))continue;let o=$o[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...o)}return oa((i=String.fromCodePoint(...n),i.normalize("NFC")));var i}(e,ia))}function sa(e,t){var r;let n,i,o=ea,a=[],s=e.length;for(t&&(t.length=0);s;){let u=e[--s];if(o=null===(r=o.branches.find((e=>e.set.has(u))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=u;else if(o.check&&u===i)break;a.push(u),o.fe0f&&(a.push(65039),s>0&&65039==e[s-1]&&s--),o.valid&&(n=a.slice(),2==o.valid&&n.splice(1,1),t&&t.push(...e.slice(s).reverse()),e.length=s)}return n}const ua=new b(Xn),ca=new Uint8Array(32);function la(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function fa(e){const t=Ke(aa(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e=t.length)throw new Error("invalid ENS name; empty component");return r.push(la(t.slice(n))),r}function da(e){try{return 0!==fa(e).length}catch(e){}return!1}function ha(e){"string"!=typeof e&&ua.throwArgumentError("invalid ENS name; not a string","name",e);let t=ca;const r=fa(e);for(;r.length;)t=ve(_([t,ve(r.pop())]));return B(t)}function pa(e){return B(_(fa(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}ca.fill(0);var ya=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};function ma(e,t){return ya(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach(((e,t)=>{o[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{o[e.toLowerCase()]=n.headers.get(e)})),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:x(new Uint8Array(i))}}))}var ga=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const ba=new b("web/5.7.1");function va(e){return new Promise((t=>{setTimeout(t,e)}))}function wa(e,t){if(null==e)return null;if("string"==typeof e)return e;if(k(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return Qe(e)}catch(e){}return B(e)}return e}function Aa(e,t,r){const n="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;ba.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);const i="object"==typeof e?e.throttleCallback:null,o="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;ba.assertArgument(o>0&&o%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const a="object"==typeof e&&!!e.errorPassThrough,s={};let u=null;const c={method:"GET"};let l=!1,f=12e4;if("string"==typeof e)u=e;else if("object"==typeof e){if(null!=e&&null!=e.url||ba.throwArgumentError("missing URL","connection.url",e),u=e.url,"number"==typeof e.timeout&&e.timeout>0&&(f=e.timeout),e.headers)for(const t in e.headers)s[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(l=!0);if(c.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==u.substring(0,6)&&!0!==e.allowInsecureAuthentication&&ba.throwError("basic authentication requires a secure https url",b.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;s.authorization={key:"Authorization",value:"Basic "+Do(Ke(t))}}null!=e.skipFetchSetup&&(c.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(c.fetchOptions=oe(e.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=u?u.match(d):null;if(h)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?Fo(h[3]):(p=h[3],Ke(p.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){ba.throwError("processing response error",b.errors.SERVER_ERROR,{body:wa(h[1],h[2]),error:e,requestBody:null,requestMethod:"GET",url:u})}var p;t&&(c.method="POST",c.body=t,null==s["content-type"]&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==s["content-length"]&&(s["content-length"]={key:"Content-Length",value:String(t.length)}));const y={};Object.keys(s).forEach((e=>{const t=s[e];y[t.key]=t.value})),c.headers=y;const m=function(){let e=null;return{promise:new Promise((function(t,r){f&&(e=setTimeout((()=>{null!=e&&(e=null,r(ba.makeError("timeout",b.errors.TIMEOUT,{requestBody:wa(c.body,y["content-type"]),requestMethod:c.method,timeout:f,url:u})))}),f))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),g=function(){return ga(this,void 0,void 0,(function*(){for(let e=0;e=300)&&(m.cancel(),ba.throwError("bad response",b.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:wa(s,t.headers?t.headers["content-type"]:null),requestBody:wa(c.body,y["content-type"]),requestMethod:c.method,url:u})),r)try{const e=yield r(s,t);return m.cancel(),e}catch(r){if(r.throttleRetry&&e"content-type"===e.toLowerCase())).length||(r.headers=oe(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return Aa(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse(Qe(e))}catch(t){ba.throwError("invalid JSON",b.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function Ea(e,t){return t||(t={}),null==(t=oe(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let i=null,o=!1;const a=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout((()=>{a()&&n(new Error("timeout"))}),t.timeout));const s=t.retryLimit;let u=0;!function i(){return e().then((function(e){if(void 0!==e)a()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(u++,u>s)return void(a()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));et.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){a()&&n(e)}))}()}))}var Sa=r(9674),xa=r.n(Sa);const _a="providers/5.7.2",Pa=new b(_a);class Ta{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),a=this.hex.bind(this),s=this.number.bind(this),u=this.type.bind(this);return e.transaction={hash:o,type:u,accessList:Ta.allowNull(this.accessList.bind(this),null),blockHash:Ta.allowNull(o,null),blockNumber:Ta.allowNull(s,null),transactionIndex:Ta.allowNull(s,null),confirmations:Ta.allowNull(s,null),from:t,gasPrice:Ta.allowNull(r),maxPriorityFeePerGas:Ta.allowNull(r),maxFeePerGas:Ta.allowNull(r),gasLimit:r,to:Ta.allowNull(t,null),value:r,nonce:s,data:i,r:Ta.allowNull(this.uint256),s:Ta.allowNull(this.uint256),v:Ta.allowNull(s),creates:Ta.allowNull(t,null),raw:Ta.allowNull(i)},e.transactionRequest={from:Ta.allowNull(t),nonce:Ta.allowNull(s),gasLimit:Ta.allowNull(r),gasPrice:Ta.allowNull(r),maxPriorityFeePerGas:Ta.allowNull(r),maxFeePerGas:Ta.allowNull(r),to:Ta.allowNull(t),value:Ta.allowNull(r),data:Ta.allowNull((e=>this.data(e,!0))),type:Ta.allowNull(s),accessList:Ta.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:s,blockNumber:s,transactionHash:o,address:t,topics:Ta.arrayOf(o),data:i,logIndex:s,blockHash:o},e.receipt={to:Ta.allowNull(this.address,null),from:Ta.allowNull(this.address,null),contractAddress:Ta.allowNull(t,null),transactionIndex:s,root:Ta.allowNull(a),gasUsed:r,logsBloom:Ta.allowNull(i),blockHash:o,transactionHash:o,logs:Ta.arrayOf(this.receiptLog.bind(this)),blockNumber:s,confirmations:Ta.allowNull(s,null),cumulativeGasUsed:r,effectiveGasPrice:Ta.allowNull(r),status:Ta.allowNull(s),type:u},e.block={hash:Ta.allowNull(o),parentHash:o,number:s,timestamp:s,nonce:Ta.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:Ta.allowNull(t),extraData:i,transactions:Ta.allowNull(Ta.arrayOf(o)),baseFeePerGas:Ta.allowNull(r)},e.blockWithTransactions=oe(e.block),e.blockWithTransactions.transactions=Ta.allowNull(Ta.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Ta.allowNull(n,void 0),toBlock:Ta.allowNull(n,void 0),blockHash:Ta.allowNull(o,void 0),address:Ta.allowNull(t,void 0),topics:Ta.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Ta.allowNull(s),blockHash:Ta.allowNull(o),transactionIndex:s,removed:Ta.allowNull(this.boolean.bind(this)),address:t,data:Ta.allowFalsish(i,"0x"),topics:Ta.arrayOf(o),transactionHash:o,logIndex:s},e}accessList(e){return hn(e||[])}number(e){return"0x"===e?0:W.from(e).toNumber()}type(e){return"0x"===e||null==e?0:W.from(e).toNumber()}bigNumber(e){return W.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),I(e))?e.toLowerCase():Pa.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return Re(e)}callAddress(e){if(!I(e,32))return null;const t=Re(N(e,12));return t===To?null:t}contractAddress(e){return Le(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||I(e))return M(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==C(r)?Pa.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=W.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!I(e))throw new Error("invalid uint256");return L(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=Ta.check(t,e);return n._difficulty=null==r?null:W.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Ta.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&W.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=Ta.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;I(r)&&(r=W.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),I(r)&&(r=W.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return vn(e)}receiptLog(e){return Ta.check(this.formats.receiptLog,e)}receipt(e){const t=Ta.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=W.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&Pa.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):Pa.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&Pa.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return Ta.check(this.formats.filter,e)}filterLog(e){return Ta.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const i=e[n](t[n]);void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}function Ia(e){return e&&"function"==typeof e.isCommunityResource}function Oa(e){return Ia(e)&&e.isCommunityResource()}let Ba=!1;function Ca(){Ba||(Ba=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var Na=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Ra=new b(_a);function Ma(e){return null==e?"null":(32!==C(e)&&Ra.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function Ua(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[Ma(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return Ma(e)})).join("&")}function La(e){if("string"==typeof e){if(32===C(e=e.toLowerCase()))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+Ua(e);if(ir.isForkEvent(e))throw Ra.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+Ua(e.topics||[])}throw new Error("invalid event - "+e)}function ja(){return(new Date).getTime()}function Fa(e){return new Promise((t=>{setTimeout(t,e)}))}const Da=["block","network","pending","poll"];class Ha{constructor(e,t,r){te(this,"tag",e),te(this,"listener",t),te(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const i={};return r.length>0&&(i.topics=r),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Da.indexOf(this.tag)>=0}}const za={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function qa(e){return L(W.from(e).toHexString(),32)}function Ga(e){return mi.encode(_([e,N(wi(wi(e)),0,4)]))}const Ka=new RegExp("^(ipfs)://(.*)$","i"),Va=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Ka,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ja(e,t){try{return Qe(Wa(e,t))}catch(e){}return null}function Wa(e,t){if("0x"===e)return null;const r=W.from(N(e,t,t+32)).toNumber(),n=W.from(N(e,r,r+32)).toNumber();return N(e,r+32,r+32+n)}function Qa(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):Ra.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function Za(e){const t=x(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function Ya(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function Xa(e){const t=[];let r=0;for(let n=0;nW.from(e).eq(1))).catch((e=>{if(e.code===b.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return Na(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:R([e,ha(this.name),t||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=R(["0x9061b923",Xa([pa(this.name),r.data])]));try{let e=yield this.provider.call(r);return x(e).length%32==4&&Ra.throwError("resolver threw error",b.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=Wa(e,0)),e}catch(e){if(e.code===b.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return Na(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?Wa(r,0):null}))}_getAddress(e,t){const r=za[String(e)];if(null==r&&Ra.throwError(`unsupported coin type: ${e}`,b.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=x(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Ga(_([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Ga(_([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=xa().toWords(n.slice(2));return e.unshift(t),xa().encode(r.prefix,e)}}return null}getAddress(e){return Na(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===Io?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===b.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",qa(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&Ra.throwError("invalid or unsupported coin data",b.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return Na(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;re[t]))}return Ra.throwError("invalid or unsupported content hash data",b.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return Na(this,void 0,void 0,(function*(){let t=Ke(e);t=_([qa(64),qa(t.length),t]),t.length%32!=0&&(t=_([t,L("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",B(t));return null==r||"0x"===r?null:Qe(r)}))}}let es=null,ts=1;class rs extends or{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),te(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=re(new.target,"getNetwork")(e);t?(te(this,"_network",t),this.emit("network",t,null)):Ra.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Na(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||Ra.throwError("no network detected",b.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:te(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return Ea((()=>this._ready().then((e=>e),(e=>{if(e.code!==b.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==es&&(es=new Ta),es}static getNetwork(e){return jo(null==e?"homestead":e)}ccipReadFetch(e,t,r){return Na(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e=0?null:JSON.stringify({data:i,sender:n}),u=yield ka({url:a,errorPassThrough:!0},s,((e,t)=>(e.status=t.statusCode,e)));if(u.data)return u.data;const c=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ra.throwError(`response not found during CCIP fetch: ${c}`,b.errors.SERVER_ERROR,{url:t,errorMessage:c});o.push(c)}return Ra.throwError(`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,b.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(e){return Na(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(ja()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=ja(),r=ne({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const i=ja();return(e=W.from(e).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return Na(this,void 0,void 0,(function*(){const e=ts++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)Ra.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",Ra.makeError("network block skew detected",b.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(o)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Na(this,void 0,void 0,(function*(){return Ra.throwError("provider does not support network detection",b.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return Na(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Fa(0),this._network;const r=Ra.makeError("underlying network changed",b.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=ja();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return Na(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return Na(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise(((i,o)=>{const a=[];let s=!1;const u=function(){return!!s||(s=!0,a.forEach((e=>{e()})),!1)},c=e=>{e.confirmations{this.removeListener(e,c)})),n){let r=n.startBlock,i=null;const c=a=>Na(this,void 0,void 0,(function*(){s||(yield Fa(1e3),this.getTransactionCount(n.from).then((l=>Na(this,void 0,void 0,(function*(){if(!s){if(l<=n.nonce)r=a;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3,i{s||this.once("block",c)})))}));if(s)return;this.once("block",c),a.push((()=>{this.removeListener("block",c)}))}if("number"==typeof r&&r>0){const e=setTimeout((()=>{u()||o(Ra.makeError("timeout exceeded",b.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),a.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return Na(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return W.from(e)}catch(t){return Ra.throwError("bad result from backend",b.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield ne({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return W.from(n)}catch(e){return Ra.throwError("bad result from backend",b.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield ne({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return W.from(n).toNumber()}catch(e){return Ra.throwError("bad result from backend",b.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield ne({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return B(n)}catch(e){return Ra.throwError("bad result from backend",b.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield ne({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>M(e)))}),i=yield this.perform("getStorageAt",n);try{return B(i)}catch(e){return Ra.throwError("bad result from backend",b.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==C(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&Ra.throwError("Transaction hash mismatch from Provider.sendTransaction.",b.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>Na(this,void 0,void 0,(function*(){let i;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const o=yield this._waitForTransaction(e.hash,t,n,i);return null==o&&0===t?null:(this._emitted["t:"+e.hash]=o.blockNumber,0===o.status&&Ra.throwError("transaction failed",b.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),n}sendTransaction(e){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>B(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return Na(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?W.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?B(e):null)))})),this.formatter.transactionRequest(yield ne(r))}))}_getFilter(e){return Na(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield ne(t))}))}_call(e,t,r){return Na(this,void 0,void 0,(function*(){r>=10&&Ra.throwError("CCIP read exceeded maximum redirections",b.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===i.substring(0,10)&&C(i)%32==4)try{const o=N(i,4),a=N(o,0,32);W.from(a).eq(n)||Ra.throwError("CCIP Read sender did not match",b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const s=[],u=W.from(N(o,32,64)).toNumber(),c=W.from(N(o,u,u+32)).toNumber(),l=N(o,u+32);for(let t=0;tNa(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;rthis._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Na(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Ea((()=>Na(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return Na(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Ea((()=>Na(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield ne({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),Ta.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return Na(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return Na(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&Ra.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return Na(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new $a(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return Na(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||Ra.throwError("network does not support ENS",b.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+ha(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return Na(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if(I(e))throw t}"string"!=typeof e&&Ra.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return Na(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=Ja(yield this.call({to:r,data:"0x691f3431"+ha(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return Na(this,void 0,void 0,(function*(){let t=null;if(I(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new $a(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==b.errors.CALL_EXCEPTION)throw e}try{const e=Ja(yield this.call({to:n,data:"0x691f3431"+ha(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==b.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return Ra.throwError(e+" not implemented",b.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new Ha(La(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],i=La(e);return this._events=this._events.filter((e=>e.tag!==i||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=La(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=La(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,i=La(e);return this._events=this._events.filter((e=>e.tag!==i||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=La(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var ns=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const is=new b(_a),os=["call","estimateGas"];function as(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=I(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(const r in e){const n=as(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return as(JSON.parse(e),t)}catch(e){}return null}function ss(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=as(t,!0);if(e)return e.data;is.throwError("missing revert data in call exception; Transaction reverted without a reason string",b.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=as(t.body,!1);null==r&&(r=as(t,!1)),r&&is.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===b.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?i=t.error.message:"string"==typeof t.body?i=t.body:"string"==typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&is.throwError("insufficient funds for intrinsic transaction cost",b.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&is.throwError("nonce has already been used",b.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&is.throwError("replacement fee too low",b.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&is.throwError("legacy pre-eip-155 transactions not supported",b.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),os.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&is.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function us(e){return new Promise((function(t){setTimeout(t,e)}))}function cs(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function ls(e){return e?e.toLowerCase():e}const fs={};class ds extends lr{constructor(e,t,r){if(super(),e!==fs)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");te(this,"provider",t),null==r&&(r=0),"string"==typeof r?(te(this,"_address",this.provider.formatter.address(r)),te(this,"_index",null)):"number"==typeof r?(te(this,"_index",r),te(this,"_address",null)):is.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return is.throwError("cannot alter JSON-RPC Signer connection",b.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new hs(fs,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&is.throwError("unknown account #"+this._index,b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=oe(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=oe(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>ns(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&is.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),ne({tx:ne(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&is.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&is.throwError("user rejected transaction",b.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),ss("sendTransaction",e,n))))}))}signTransaction(e){return is.throwError("signing transactions is unsupported",b.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ns(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield Ea((()=>ns(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}}))}signMessage(e){return ns(this,void 0,void 0,(function*(){const t="string"==typeof e?Ke(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[B(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&is.throwError("user rejected signing",b.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return ns(this,void 0,void 0,(function*(){const t="string"==typeof e?Ke(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),B(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&is.throwError("user rejected signing",b.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return ns(this,void 0,void 0,(function*(){const n=yield pi.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(pi.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&is.throwError("user rejected signing",b.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return ns(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class hs extends ds{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const ps={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class ys extends rs{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=re(this.constructor,"defaultUrl")()),te(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(oe(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ns(this,void 0,void 0,(function*(){yield us(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=re(this.constructor,"getNetwork");try{return t(W.from(e).toNumber())}catch(t){return is.throwError("could not detect network",b.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return is.throwError("could not detect network",b.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new ds(fs,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ce(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const i=ka(this.connection,JSON.stringify(r),cs).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=i,setTimeout((()=>{this._cache[e]=null}),0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ls(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ls(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ls(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ls(t.address),L(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[re(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[re(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=ls(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return ns(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&W.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=oe(t)).transaction=oe(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&is.throwError(e+" not implemented",b.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return ss(e,r,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return us(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=oe(ps);if(t)for(const e in t)t[e]&&(r[e]=!0);ie(e,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=M(W.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(n[t]=B(e[t]))})),e.accessList&&(n.accessList=hn(e.accessList)),n}}let ms=null;try{if(ms=WebSocket,null==ms)throw new Error("inject please")}catch(e){const t=new b(_a);ms=function(){t.throwError("WebSockets not supported in this environment",b.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var gs=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const bs=new b(_a);let vs=1;class ws extends ys{constructor(e,t){"any"===t&&bs.throwError("WebSocketProvider does not support 'any' network yet",b.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof e?e:"_websocket",t),this._pollingInterval=-1,this._wsReady=!1,te(this,"_websocket","string"==typeof e?new ms(this.connection.url):e),te(this,"_requests",{}),te(this,"_subs",{}),te(this,"_subIds",{}),te(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((e=>{this.websocket.send(this._requests[e].payload)}))},this.websocket.onmessage=e=>{const t=e.data,r=JSON.parse(t);if(null!=r.id){const e=String(r.id),n=this._requests[e];if(delete this._requests[e],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let e=null;r.error?(e=new Error(r.error.message||"unknown error"),te(e,"code",r.error.code||null),te(e,"response",t)):e=new Error("unknown error"),n.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const e=this._subs[r.params.subscription];e&&e.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){bs.throwError("cannot reset events block on WebSocketProvider",b.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){bs.throwError("cannot set polling interval on WebSocketProvider",b.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return gs(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&bs.throwError("cannot set polling on WebSocketProvider",b.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){const r=vs++;return new Promise(((n,i)=>{const o=JSON.stringify({method:e,params:t,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(e,t){return e?i(e):n(t)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,r){return gs(this,void 0,void 0,(function*(){let n=this._subIds[e];null==n&&(n=Promise.all(t).then((e=>this.send("eth_subscribe",e))),this._subIds[e]=n);const i=yield n;this._subs[i]={tag:e,processFunc:r}}))}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],(e=>{const t=W.from(e.number).toNumber();this._emitted.block=t,this.emit("block",t)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(e=>{this.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(t=>{null==t.removed&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))}));break;case"tx":{const t=e=>{const t=e.hash;this.getTransactionReceipt(t).then((e=>{e&&this.emit(t,e)}))};t(e),this._subscribe("tx",["newHeads"],(e=>{this._events.filter((e=>"tx"===e.type)).forEach(t)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}_stopEvent(e){let t=e.tag;if("tx"===e.type){if(this._events.filter((e=>"tx"===e.type)).length)return;t="tx"}else if(this.listenerCount(e.event))return;const r=this._subIds[t];r&&(delete this._subIds[t],r.then((e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]))})))}destroy(){return gs(this,void 0,void 0,(function*(){this.websocket.readyState===ms.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}var As=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const ks=new b(_a);class Es extends ys{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return As(this,void 0,void 0,(function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||ks.throwError("no network detected",b.errors.UNKNOWN_ERROR,{}),null==this._network&&(te(this,"_network",t),this.emit("network",t,null))),t}))}}class Ss extends Es{constructor(e,t){ks.checkAbstract(new.target,Ss),e=re(new.target,"getNetwork")(e),t=re(new.target,"getApiKey")(t);super(re(new.target,"getUrl")(e,t),e),"string"==typeof t?te(this,"apiKey",t):null!=t&&Object.keys(t).forEach((e=>{te(this,e,t[e])}))}_startPending(){ks.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ks.throwError("API provider does not support signing",b.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return ks.throwError("not implemented; sub-classes must override getUrl",b.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const xs=new b(_a),_s="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class Ps extends ws{constructor(e,t){const r=new Ts(e,t);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),te(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===_s}}class Ts extends Ss{static getWebSocketProvider(e,t){return new Ps(e,t)}static getApiKey(e){return null==e?_s:(e&&"string"!=typeof e&&xs.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:xs.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===_s&&Ca(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===_s}}const Is=new b(_a),Os="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Bs(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return Is.throwArgumentError("unsupported network","name",e)}class Cs extends Ss{isCommunityResource(){return this.apiKey===Os}static getApiKey(e){return null==e?Os:e}static getUrl(e,t){null==t&&(t=Os);const r={allowGzip:!0,url:"https://"+Bs(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===Os&&Ca(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}var Ns=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Rs=new b(_a);class Ms extends Ss{static getApiKey(e){return null!=e&&Rs.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let r=null;if("homestead"===e.name)r="https://cloudflare-eth.com/";else Rs.throwArgumentError("unsupported network","network",arguments[0]);return r}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return Ns(this,void 0,void 0,(function*(){if("getBlockNumber"===e){return(yield r.perform.call(this,"getBlock",{blockTag:"latest"})).number}return r.perform.call(this,e,t)}))}}var Us=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Ls=new b(_a);function js(e){const t={};for(let r in e){if(null==e[r])continue;let n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?M(B(n)):"accessList"===r?"["+hn(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]":B(n),t[r]=n)}return t}function Fs(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!=typeof e.message||!e.message.match(/^OK/)){const t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function Ds(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){const t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){const t=new Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){const t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function Hs(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function zs(e,t,r){if("call"===e&&t.code===b.errors.SERVER_ERROR){const e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let r=e.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),I(r))return r;Ls.throwError("missing revert data in call exception",b.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let n=t.message;throw t.code===b.errors.SERVER_ERROR&&(t.error&&"string"==typeof t.error.message?n=t.error.message:"string"==typeof t.body?n=t.body:"string"==typeof t.responseText&&(n=t.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Ls.throwError("insufficient funds for intrinsic transaction cost",b.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Ls.throwError("nonce has already been used",b.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&Ls.throwError("replacement fee too low",b.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&Ls.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class qs extends rs{constructor(e,t){super(e),te(this,"baseUrl",this.getBaseUrl()),te(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return Ls.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){const r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${r}${n}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,r){return Us(this,void 0,void 0,(function*(){const n=r?this.getPostUrl():this.getUrl(e,t),i=r?this.getPostData(e,t):null,o="proxy"===e?Ds:Fs;this.emit("debug",{action:"request",request:n,provider:this});const a={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&Ca(),Promise.resolve(!0))};let s=null;i&&(a.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},s=Object.keys(i).map((e=>`${e}=${i[e]}`)).join("&"));const u=yield ka(a,s,o||Ds);return this.emit("debug",{action:"response",request:n,response:ce(u),provider:this}),u}))}detectNetwork(){return Us(this,void 0,void 0,(function*(){return this.network}))}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return Us(this,void 0,void 0,(function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((e=>zs("sendTransaction",e,t.signedTransaction)));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const e=js(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(e){return zs("call",e,t.transaction)}}case"estimateGas":{const e=js(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(e){return zs("estimateGas",e,t.transaction)}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=Hs(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=Hs(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Ls.throwError("unsupported topic count",b.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){const r=t.filter.topics[0];"string"==typeof r&&66===r.length||Ls.throwError("unsupported topic format",b.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}const r=yield this.fetch("logs",e);let n={};for(let e=0;e{["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);const t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t}))}))}isCommunityResource(){return null==this.apiKey}}function Gs(e){for(let t=(e=e.slice()).length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}var Ks=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Vs=new b(_a);function Js(){return(new Date).getTime()}function Ws(e){let t=null;for(let r=0;rt?null:(n+i)/2}function Zs(e){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("string"==typeof e)return e;if(W.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((e=>Zs(e))));if("object"==typeof e){const t=Object.keys(e);return t.sort(),"{"+t.map((t=>{let r=e[t];return r="function"==typeof r?"[function]":Zs(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}let Ys=1;function Xs(e){let t=null,r=null,n=new Promise((n=>{t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:e=>(n=n.then(e),n)}}const $s=[b.errors.CALL_EXCEPTION,b.errors.INSUFFICIENT_FUNDS,b.errors.NONCE_EXPIRED,b.errors.REPLACEMENT_UNDERPRICED,b.errors.UNPREDICTABLE_GAS_LIMIT],eu=["address","args","errorArgs","errorSignature","method","transaction"];function tu(e,t){const r={weight:e.weight};return Object.defineProperty(r,"provider",{get:()=>e.provider}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function ru(e,t,r){let n=Zs;switch(t){case"getBlockNumber":return function(t){const r=t.map((e=>e.result));let n=Qs(t.map((e=>e.result)),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){const t=e.map((e=>e.result));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Qs(e.map((e=>e.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=oe(e)).confirmations=-1,Zs(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=oe(e)).transactions=e.transactions.map((e=>((e=oe(e)).confirmations=-1,e))),Zs(e))}:function(e){return null==e?null:Zs(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){const n={};r.forEach((t=>{const r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));const i=Object.keys(n);for(let e=0;e=t)return r.result}}}(n,e.quorum)}function nu(e,t){return Ks(this,void 0,void 0,(function*(){const r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:Ea((()=>new Promise(((n,i)=>{setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))),{oncePoll:r})}))}function iu(e,t,r,n){return Ks(this,void 0,void 0,(function*(){let i=e.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&I(n.blockTag)&&(i=yield nu(e,t)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&I(n.blockTag)&&(i=yield nu(e,t)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&I(n.blockTag)&&(i=yield nu(e,t)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&I(n.blockTag)&&(i=yield nu(e,t)),"call"===r&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&I(r.fromBlock)||r.toBlock&&I(r.toBlock))&&(i=yield nu(e,t)),i.getLogs(r)}}return Vs.throwError("unknown method error",b.errors.UNKNOWN_ERROR,{method:r,params:n})}))}class ou extends rs{constructor(e,t){0===e.length&&Vs.throwArgumentError("missing providers","providers",e);const r=e.map(((e,t)=>{if(or.isProvider(e)){const t=Oa(e)?2e3:750,r=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:r})}const r=oe(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=Oa(e)?2e3:750),null==r.weight&&(r.weight=1);const n=r.weight;return(n%1||n>512||n<1)&&Vs.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,n),Object.freeze(r)})),n=r.reduce(((e,t)=>e+t.weight),0);null==t?t=n/2:t>n&&Vs.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let i=Ws(r.map((e=>e.provider.network)));null==i&&(i=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then(e,t)}),0)}))),super(i),te(this,"providerConfigs",Object.freeze(r)),te(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Ks(this,void 0,void 0,(function*(){return Ws(yield Promise.all(this.providerConfigs.map((e=>e.provider.getNetwork()))))}))}perform(e,t){return Ks(this,void 0,void 0,(function*(){if("sendTransaction"===e){const e=yield Promise.all(this.providerConfigs.map((e=>e.provider.sendTransaction(t.signedTransaction).then((e=>e.hash),(e=>e)))));for(let t=0;te.priority-t.priority));const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const s=Js();let u=n.filter((e=>e.runner&&s-e.starte+t.weight),0);for(;u{r.staller=null})),r.runner=iu(r,i,e,t).then((n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:tu(r,Js()),request:{method:e,params:ce(t)},provider:this})}),(n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:tu(r,Js()),request:{method:e,params:ce(t)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:tu(r,null),request:{method:e,params:ce(t)},provider:this}),u+=r.weight}const c=[];n.forEach((e=>{!e.done&&e.runner&&(c.push(e.runner),e.staller&&c.push(e.staller.getPromise()))})),c.length&&(yield Promise.race(c));const l=n.filter((e=>e.done&&null==e.error));if(l.length>=this.quorum){const e=r(l);if(void 0!==e)return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),e;a||(yield Xs(100).getPromise()),a=!1}const f=n.reduce(((e,t)=>{if(!t.done||null==t.error)return e;const r=t.error.code;return $s.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{});if(Object.keys(f).forEach((e=>{const t=f[e];if(t.weight{e.staller&&e.staller.cancel(),e.cancelled=!0}));const r=t.error,i={};eu.forEach((e=>{null!=r[e]&&(i[e]=r[e])})),Vs.throwError(r.reason||r.message,e,i)})),0===n.filter((e=>!e.done)).length)break}return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),Vs.throwError("failed to meet quorum",b.errors.SERVER_ERROR,{method:e,params:t,results:n.map((e=>tu(e))),provider:this})}))}}const au=null,su=new b(_a),uu="84842078b09946638c03157f83405213";class cu extends ws{constructor(e,t){const r=new lu(e,t),n=r.connection;n.password&&su.throwError("INFURA WebSocket project secrets unsupported",b.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),te(this,"apiKey",r.projectId),te(this,"projectId",r.projectId),te(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===uu}}class lu extends Ss{static getWebSocketProvider(e,t){return new cu(e,t)}static getApiKey(e){const t={apiKey:uu,projectId:uu,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(su.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),su.assertArgument("string"==typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:su.throwError("unsupported network",b.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===uu&&Ca(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}isCommunityResource(){return this.projectId===uu}}class fu extends ys{send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const n={request:r,resolve:null,reject:null},i=new Promise(((e,t)=>{n.resolve=e,n.reject=t}));return this._pendingBatch.push(n),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const t=e.map((e=>e.request));return this.emit("debug",{action:"requestBatch",request:ce(t),provider:this}),ka(this.connection,JSON.stringify(t)).then((r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach(((e,t)=>{const n=r[t];if(n.error){const t=new Error(n.error.message);t.code=n.error.code,t.data=n.error.data,e.reject(t)}else e.resolve(n.result)}))}),(r=>{this.emit("debug",{action:"response",error:r,request:t,provider:this}),e.forEach((e=>{e.reject(r)}))}))}),10)),i}}const du=new b(_a);class hu extends Ss{static getApiKey(e){return e&&"string"!=typeof e&&du.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){du.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:du.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}const pu=new b(_a),yu="62e1ad51b37b8e00394bda3b";class mu extends Ss{static getApiKey(e){const t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=yu:"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:pu.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:pu.throwError("unsupported network",b.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={headers:{},url:`https://${r}/v1/lb/${t.applicationId}`};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}isCommunityResource(){return this.applicationId===yu}}const gu=new b(_a);let bu=1;function vu(e,t){const r="Web3LegacyFetcher";return function(e,n){const i={method:e,params:n,id:bu++,jsonrpc:"2.0"};return new Promise(((e,n)=>{this.emit("debug",{action:"request",fetcher:r,request:ce(i),provider:this}),t(i,((t,o)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:i,provider:this}),n(t);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:o,provider:this}),o.error){const e=new Error(o.error.message);return e.code=o.error.code,e.data=o.error.data,n(e)}e(o.result)}))}))}}class wu extends ys{constructor(e,t){null==e&&gu.throwArgumentError("missing provider","provider",e);let r=null,n=null,i=null;"function"==typeof e?(r="unknown:",n=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),i=e,e.request?(""===r&&(r="eip-1193:"),n=function(e){return function(t,r){null==r&&(r=[]);const n={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ce(n),provider:this}),e.request(n).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:e,provider:this}),e}))}}(e)):e.sendAsync?n=vu(0,e.sendAsync.bind(e)):e.send?n=vu(0,e.send.bind(e)):gu.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),te(this,"jsonRpcFetchFunc",n),te(this,"provider",i)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}const Au=new b(_a);function ku(e,t){if(null==e&&(e="homestead"),"string"==typeof e){const t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new ys(e);case"ws":case"wss":return new ws(e);default:Au.throwArgumentError("unsupported URL scheme","network",e)}}const r=jo(e);return r&&r._defaultProvider||Au.throwError("unsupported getDefaultProvider network",b.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:ou,AlchemyProvider:Ts,AnkrProvider:Cs,CloudflareProvider:Ms,EtherscanProvider:qs,InfuraProvider:lu,JsonRpcProvider:ys,NodesmithProvider:hu,PocketProvider:mu,Web3Provider:wu,IpcProvider:au},t)}const Eu=new RegExp("^bytes([0-9]+)$"),Su=new RegExp("^(u?int)([0-9]*)$"),xu=new RegExp("^(.*)\\[([0-9]*)\\]$"),_u="0000000000000000000000000000000000000000000000000000000000000000",Pu=new b("solidity/5.7.0");function Tu(e,t,r){switch(e){case"address":return r?T(t,32):x(t);case"string":return Ke(t);case"bytes":return x(t);case"bool":return t=t?"0x01":"0x00",r?T(t,32):x(t)}let n=e.match(Su);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!=0||0===i||i>256)&&Pu.throwArgumentError("invalid number type","type",e),r&&(i=256),T(t=W.from(t).toTwos(i),i/8)}if(n=e.match(Eu),n){const i=parseInt(n[1]);return(String(i)!==n[1]||0===i||i>32)&&Pu.throwArgumentError("invalid bytes type","type",e),x(t).byteLength!==i&&Pu.throwArgumentError(`invalid value for ${e}`,"value",t),r?x((t+_u).substring(0,66)):t}if(n=e.match(xu),n&&Array.isArray(t)){const r=n[1];parseInt(n[2]||String(t.length))!=t.length&&Pu.throwArgumentError(`invalid array length for ${e}`,"value",t);const i=[];return t.forEach((function(e){i.push(Tu(r,e,!0))})),_(i)}return Pu.throwArgumentError("invalid type","type",e)}function Iu(e,t){e.length!=t.length&&Pu.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(Tu(e,t[n]))})),B(_(r))}function Ou(e,t){return ve(Iu(e,t))}function Bu(e,t){return wi(Iu(e,t))}function Cu(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function Nu(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}function Ru(e,t){let r=0;for(let n=0;n=r&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}const Mu=Nu("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Uu="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),Lu=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],ju=Cu("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Fu=Cu("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),Du=Cu("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");let t=[];for(let r=0;r{if(Uu.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=Ru(e,Lu);if(t)return[e+t.s];let r=ju[e];if(r)return r;let n=Fu[e];return n?[e+n[0]]:Du[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=Ze(We(t),De.NFKC),t.forEach((e=>{if(Ru(e,Hu))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(Ru(e,Mu))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=We(t);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}function qu(e){const t=Ke(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return B(_([t,Io]).slice(0,32))}function Gu(e){const t=x(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return Qe(t.slice(0,r))}const Ku=new b("units/5.7.0"),Vu=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Ju(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&Ku.throwArgumentError("invalid value","value",e);let r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);const o=[];for(;r.length;){if(r.length<=3){o.unshift(r);break}{const e=r.length-3;o.unshift(r.substring(e)),r=r.substring(0,e)}}return n+o.join(",")+i}function Wu(e,t){if("string"==typeof t){const e=Vu.indexOf(t);-1!==e&&(t=3*e)}return Gn(e,null!=t?t:18)}function Qu(e,t){if("string"!=typeof e&&Ku.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=Vu.indexOf(t);-1!==e&&(t=3*e)}return Kn(e,null!=t?t:18)}function Zu(e){return Wu(e,18)}function Yu(e){return Qu(e,18)}const Xu="ethers/5.7.2",$u=new b(Xu);try{const e=window;null==e._ethers&&(e._ethers=u)}catch(e){}},4205:(e,t,r)=>{const n=r(9283);e.exports=async function(e){return n.utils.sha256(n.utils.toUtf8Bytes(e))}},2505:(e,t,r)=>{e.exports=r(8015)},5592:(e,t,r)=>{"use strict";var n=r(9516),i=r(7522),o=r(1567),a=r(9106),s=r(9615),u=r(2012),c=r(4202),l=r(4896),f=r(5845),d=r(8563),h=r(5656);e.exports=function(e){return new Promise((function(t,r){var p,y=e.data,m=e.headers,g=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}n.isFormData(y)&&n.isStandardBrowserEnv()&&delete m["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",A=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+A)}var k=s(e.baseURL,e.url);function E(){if(v){var n="getAllResponseHeaders"in v?u(v.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v};i((function(e){t(e),b()}),(function(e){r(e),b()}),o),v=null}}if(v.open(e.method.toUpperCase(),a(k,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=E:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(E)},v.onabort=function(){v&&(r(new f("Request aborted",f.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new f("Network Error",f.ERR_NETWORK,e,v,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||l;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new f(t,n.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,e,v)),v=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||c(k))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in v&&n.forEach(m,(function(e,t){void 0===y&&"content-type"===t.toLowerCase()?delete m[t]:v.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),g&&"json"!==g&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){v&&(r(!e||e&&e.type?new d:e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),y||(y=null);var x=h(k);x&&-1===["http","https","file"].indexOf(x)?r(new f("Unsupported protocol "+x+":",f.ERR_BAD_REQUEST,e)):v.send(y)}))}},8015:(e,t,r)=>{"use strict";var n=r(9516),i=r(9012),o=r(5155),a=r(5343);var s=function e(t){var r=new o(t),s=i(o.prototype.request,r);return n.extend(s,o.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(r(7412));s.Axios=o,s.CanceledError=r(8563),s.CancelToken=r(3191),s.isCancel=r(3864),s.VERSION=r(9641).version,s.toFormData=r(4059),s.AxiosError=r(5845),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=r(7980),s.isAxiosError=r(5019),e.exports=s,e.exports.default=s},3191:(e,t,r)=>{"use strict";var n=r(8563);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t{"use strict";var n=r(5845);function i(e){n.call(this,null==e?"canceled":e,n.ERR_CANCELED),this.name="CanceledError"}r(9516).inherits(i,n,{__CANCEL__:!0}),e.exports=i},3864:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},5155:(e,t,r)=>{"use strict";var n=r(9516),i=r(9106),o=r(3471),a=r(4490),s=r(5343),u=r(9615),c=r(7222),l=c.validators;function f(e){this.defaults=e,this.interceptors={request:new o,response:new o}}f.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&c.assertOptions(r,{silentJSONParsing:l.transitional(l.boolean),forcedJSONParsing:l.transitional(l.boolean),clarifyTimeoutError:l.transitional(l.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var o,u=[];if(this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)})),!i){var f=[a,void 0];for(Array.prototype.unshift.apply(f,n),f=f.concat(u),o=Promise.resolve(t);f.length;)o=o.then(f.shift(),f.shift());return o}for(var d=t;n.length;){var h=n.shift(),p=n.shift();try{d=h(d)}catch(e){p(e);break}}try{o=a(d)}catch(e){return Promise.reject(e)}for(;u.length;)o=o.then(u.shift(),u.shift());return o},f.prototype.getUri=function(e){e=s(this.defaults,e);var t=u(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}f.prototype[e]=t(),f.prototype[e+"Form"]=t(!0)})),e.exports=f},5845:(e,t,r)=>{"use strict";var n=r(9516);function i(e,t,r,n,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}n.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){a[e]={value:e}})),Object.defineProperties(i,a),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,r,a,s,u){var c=Object.create(o);return n.toFlatObject(e,c,(function(e){return e!==Error.prototype})),i.call(c,e.message,t,r,a,s),c.name=e.name,u&&Object.assign(c,u),c},e.exports=i},3471:(e,t,r)=>{"use strict";var n=r(9516);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},9615:(e,t,r)=>{"use strict";var n=r(9137),i=r(4680);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},4490:(e,t,r)=>{"use strict";var n=r(9516),i=r(2881),o=r(3864),a=r(7412),s=r(8563);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},5343:(e,t,r)=>{"use strict";var n=r(9516);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function u(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);n.isUndefined(i)&&t!==u||(r[e]=i)})),r}},7522:(e,t,r)=>{"use strict";var n=r(5845);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}},2881:(e,t,r)=>{"use strict";var n=r(9516),i=r(7412);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},7412:(e,t,r)=>{"use strict";var n=r(5606),i=r(9516),o=r(7018),a=r(5845),s=r(4896),u=r(4059),c={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var f,d={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(f=r(5592)),f),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e))return e;if(i.isArrayBufferView(e))return e.buffer;if(i.isURLSearchParams(e))return l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,n=i.isObject(e),a=t&&t["Content-Type"];if((r=i.isFileList(e))||n&&"multipart/form-data"===a){var s=this.env&&this.env.FormData;return u(r?{"files[]":e}:e,s&&new s)}return n||"application/json"===a?(l(t,"application/json"),function(e,t,r){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&i.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw a.from(e,a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:r(1534)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){d.headers[e]=i.merge(c)})),e.exports=d},4896:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},9641:e=>{e.exports={version:"0.27.2"}},9012:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n{"use strict";var n=r(9516);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},4680:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},1567:(e,t,r)=>{"use strict";var n=r(9516);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},9137:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},5019:(e,t,r)=>{"use strict";var n=r(9516);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},4202:(e,t,r)=>{"use strict";var n=r(9516);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},7018:(e,t,r)=>{"use strict";var n=r(9516);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},1534:e=>{e.exports=null},2012:(e,t,r)=>{"use strict";var n=r(9516),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},5656:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},7980:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4059:(e,t,r)=>{"use strict";var n=r(8287).Buffer,i=r(9516);e.exports=function(e,t){t=t||new FormData;var r=[];function o(e){return null===e?"":i.isDate(e)?e.toISOString():i.isArrayBuffer(e)||i.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):n.from(e):e}return function e(n,a){if(i.isPlainObject(n)||i.isArray(n)){if(-1!==r.indexOf(n))throw Error("Circular reference detected in "+a);r.push(n),i.forEach(n,(function(r,n){if(!i.isUndefined(r)){var s,u=a?a+"."+n:n;if(r&&!a&&"object"==typeof r)if(i.endsWith(n,"{}"))r=JSON.stringify(r);else if(i.endsWith(n,"[]")&&(s=i.toArray(r)))return void s.forEach((function(e){!i.isUndefined(e)&&t.append(u,o(e))}));e(r,u)}})),r.pop()}else t.append(a,o(n))}(e),t}},7222:(e,t,r)=>{"use strict";var n=r(9641).version,i=r(5845),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var a={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new i(o(n," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!a[n]&&(a[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var a=n[o],s=t[a];if(s){var u=e[a],c=void 0===u||s(u,a,e);if(!0!==c)throw new i("option "+a+" must be "+c,i.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new i("Unknown option "+a,i.ERR_BAD_OPTION)}},validators:o}},9516:(e,t,r)=>{"use strict";var n,i=r(9012),o=Object.prototype.toString,a=(n=Object.create(null),function(e){var t=o.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function u(e){return Array.isArray(e)}function c(e){return void 0===e}var l=s("ArrayBuffer");function f(e){return null!==e&&"object"==typeof e}function d(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=s("Date"),p=s("File"),y=s("Blob"),m=s("FileList");function g(e){return"[object Function]"===o.call(e)}var b=s("URLSearchParams");function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),u(e))for(var r=0,n=e.length;r0;)a[o=n[i]]||(t[o]=e[o],a[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:A,isFileList:m}},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},9674:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<32;n++){var i=t.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(e){var t=e>>25;return(33554431&e)<<5^996825010&-(1&t)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(t=o(t),r=0;rt)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var u=e.slice(0,s),c=e.slice(s+1);if(c.length<6)return"Data too short";var l=a(u);if("string"==typeof l)return l;for(var f=[],d=0;d=c.length||f.push(p)}return 1!==l?"Invalid checksum for "+e:{prefix:u,words:f}}function u(e,t,r,n){for(var i=0,o=0,a=(1<=r;)o-=r,s.push(i>>o&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"==typeof i)throw new Error(i);for(var s=e+"1",u=0;u>5)throw new Error("Non 5-bit word");i=o(i)^c,s+=t.charAt(c)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){s+=t.charAt(i>>5*(5-u)&31)}return s},toWordsUnsafe:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},9404:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=u(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?d[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],l=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var y=f.modrn(l).toString(e);r=(f=f.idivn(l)).isZero()?y+r:d[c-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function y(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,y=h>>>13,m=0|a[2],g=8191&m,b=m>>>13,v=0|a[3],w=8191&v,A=v>>>13,k=0|a[4],E=8191&k,S=k>>>13,x=0|a[5],_=8191&x,P=x>>>13,T=0|a[6],I=8191&T,O=T>>>13,B=0|a[7],C=8191&B,N=B>>>13,R=0|a[8],M=8191&R,U=R>>>13,L=0|a[9],j=8191&L,F=L>>>13,D=0|s[0],H=8191&D,z=D>>>13,q=0|s[1],G=8191&q,K=q>>>13,V=0|s[2],J=8191&V,W=V>>>13,Q=0|s[3],Z=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(d,H)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(y,H)|0,o=Math.imul(y,z);var ge=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,H),i=(i=Math.imul(g,z))+Math.imul(b,H)|0,o=Math.imul(b,z),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,K)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,z))+Math.imul(A,H)|0,o=Math.imul(A,z),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,W)|0;var ve=(c+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,z))+Math.imul(S,H)|0,o=Math.imul(S,z),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Y)|0;var we=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(_,H),i=(i=Math.imul(_,z))+Math.imul(P,H)|0,o=Math.imul(P,z),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,K)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0;var Ae=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,z))+Math.imul(O,H)|0,o=Math.imul(O,z),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var ke=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,z))+Math.imul(N,H)|0,o=Math.imul(N,z),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0;var Ee=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,z))+Math.imul(U,H)|0,o=Math.imul(U,z),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,K)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0;var Se=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,z))+Math.imul(F,H)|0,o=Math.imul(F,z),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(U,G)|0,o=o+Math.imul(U,K)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(N,J)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ye)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,K))+Math.imul(F,G)|0,o=Math.imul(F,K),n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(U,J)|0,o=o+Math.imul(U,W)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var _e=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,W))+Math.imul(F,J)|0,o=Math.imul(F,W),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Pe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,Y))+Math.imul(F,Z)|0,o=Math.imul(F,Y),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Te=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Ie=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ye)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(U,ue)|0,o=o+Math.imul(U,ce)|0,n=n+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(N,fe)|0,o=o+Math.imul(N,de)|0;var Be=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(U,fe)|0,o=o+Math.imul(U,de)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ye)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ne=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ye)|0)+Math.imul(U,pe)|0))<<13)|0;c=((o=o+Math.imul(U,ye)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Re=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ye))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,u[0]=me,u[1]=ge,u[2]=be,u[3]=ve,u[4]=we,u[5]=Ae,u[6]=ke,u[7]=Ee,u[8]=Se,u[9]=xe,u[10]=_e,u[11]=Pe,u[12]=Te,u[13]=Ie,u[14]=Oe,u[15]=Be,u[16]=Ce,u[17]=Ne,u[18]=Re,0!==c&&(u[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(m=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?y(this,e,t):r<1024?g(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;!(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,y=1;!(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;!(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;!(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function P(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(k,A),k.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new E;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return w[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var y=h,m=0;0!==y.cmp(s);m++)y=y.redSqr();n(m=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new P(e)},i(P,_),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},P.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},P.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},P.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},8924:(e,t,r)=>{var n=r(8287).Buffer;e.exports=function(e){for(var t=new n(e.length),r=0,i=e.length-1;r<=i;++r,--i)t[r]=e[i],t[i]=e[r];return t}},8287:(e,t,r)=>{"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Q(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Q(e,SharedArrayBuffer)||e&&Q(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Z(e.length)?s(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),s(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return k(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function M(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,i,o)}function q(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw q(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=H(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function J(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},2341:e=>{"use strict";e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce(((t,r,n)=>t+(0===n?"":",")+e(void 0===r||"symbol"==typeof r?null:r)),"")+"]":"{"+Object.keys(t).sort().reduce(((r,n,i)=>{if(void 0===t[n]||"symbol"==typeof t[n])return r;return r+(0===r.length?"":",")+e(n)+":"+e(t[n])}),"")+"}"}},955:function(e,t,r){var n;e.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],a=[],s=[],u=[],c=[],l=[],f=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var y=e[r],m=e[y],g=e[m],b=257*e[p]^16843008*p;a[r]=b<<24|b>>>8,s[r]=b<<16|b>>>16,u[r]=b<<8|b>>>24,c[r]=b,b=16843009*g^65537*m^257*y^16843008*r,l[p]=b<<24|b>>>8,f[p]=b<<16|b>>>16,d[p]=b<<8|b>>>24,h[p]=b,r?(r=y^e[e[e[g^y]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],y=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a6&&a%r==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/r|0]<<24),o[a]=o[a-r]^c);for(var s=this._invKeySchedule=[],u=0;u>>24]]^f[i[c>>>16&255]]^d[i[c>>>8&255]]^h[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,d,h,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var u=this._nRounds,c=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],d=e[t+3]^r[3],h=4,p=1;p>>24]^i[l>>>16&255]^o[f>>>8&255]^a[255&d]^r[h++],m=n[l>>>24]^i[f>>>16&255]^o[d>>>8&255]^a[255&c]^r[h++],g=n[f>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&l]^r[h++],b=n[d>>>24]^i[c>>>16&255]^o[l>>>8&255]^a[255&f]^r[h++];c=y,l=m,f=g,d=b}y=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&d])^r[h++],m=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^r[h++],g=(s[f>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^r[h++],b=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^r[h++],e[t]=y,e[t+1]=m,e[t+2]=g,e[t+3]=b},keySize:8});e.AES=t._createHelper(y)}(),n.AES)},3128:function(e,t,r){var n;e.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var e=n,t=e.lib.BlockCipher,r=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function u(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][r]+e.sbox[1][n];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function c(e,t,r){let n,o=t,a=r;for(let t=0;t1;--t)o^=e.pbox[t],a=u(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[1],o^=e.pbox[0],{left:o,right:a}}function f(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=a[t][r]}let n=0;for(let a=0;a=r&&(n=0);let s=0,u=0,l=0;for(let t=0;t>>2];e.sigBytes-=t}},y=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:h,padding:p}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),m=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(u)},parse:function(e){var t,r=u.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=o.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),y.create({ciphertext:r,salt:t})}},g=r.SerializableCipher=i.extend({cfg:i.extend({format:m}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return y.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(t.kdf={}).OpenSSL={execute:function(e,t,r,n,i){if(n||(n=o.random(8)),i)a=c.create({keySize:t+r,hasher:i}).compute(e,n);else var a=c.create({keySize:t+r}).compute(e,n);var s=o.create(a.words.slice(t),4*r);return a.sigBytes=4*t,y.create({key:a,iv:s,salt:n})}},v=r.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:b}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var o=g.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=i.iv,g.decrypt.call(this,e,t,i.key,n)}})}()))},9021:function(e,t,r){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==r.g&&r.g.crypto&&(n=r.g.crypto),!n)try{n=r(477)}catch(e){}var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),a={},s=a.lib={},u=s.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=u.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=u.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},d=l.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},h=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,o);if(u){for(var f=0;f>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u>>6*(3-u)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var n=e.length,i=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var r=e.length,n=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*r)}}}(),n.enc.Utf16)},9506:function(e,t,r){var n,i,o,a,s,u,c,l;e.exports=(l=r(9021),r(5471),r(1025),i=(n=l).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,i=n.hasher.create(),o=a.create(),s=o.words,u=n.keySize,c=n.iterations;s.lengthn&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,u=o.words,c=0;c>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};r.prototype=e}}(),n.lib.WordArray)},4636:function(e,t,r){var n;e.exports=(n=r(9021),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],u=e[t+1],h=e[t+2],p=e[t+3],y=e[t+4],m=e[t+5],g=e[t+6],b=e[t+7],v=e[t+8],w=e[t+9],A=e[t+10],k=e[t+11],E=e[t+12],S=e[t+13],x=e[t+14],_=e[t+15],P=o[0],T=o[1],I=o[2],O=o[3];P=c(P,T,I,O,a,7,s[0]),O=c(O,P,T,I,u,12,s[1]),I=c(I,O,P,T,h,17,s[2]),T=c(T,I,O,P,p,22,s[3]),P=c(P,T,I,O,y,7,s[4]),O=c(O,P,T,I,m,12,s[5]),I=c(I,O,P,T,g,17,s[6]),T=c(T,I,O,P,b,22,s[7]),P=c(P,T,I,O,v,7,s[8]),O=c(O,P,T,I,w,12,s[9]),I=c(I,O,P,T,A,17,s[10]),T=c(T,I,O,P,k,22,s[11]),P=c(P,T,I,O,E,7,s[12]),O=c(O,P,T,I,S,12,s[13]),I=c(I,O,P,T,x,17,s[14]),P=l(P,T=c(T,I,O,P,_,22,s[15]),I,O,u,5,s[16]),O=l(O,P,T,I,g,9,s[17]),I=l(I,O,P,T,k,14,s[18]),T=l(T,I,O,P,a,20,s[19]),P=l(P,T,I,O,m,5,s[20]),O=l(O,P,T,I,A,9,s[21]),I=l(I,O,P,T,_,14,s[22]),T=l(T,I,O,P,y,20,s[23]),P=l(P,T,I,O,w,5,s[24]),O=l(O,P,T,I,x,9,s[25]),I=l(I,O,P,T,p,14,s[26]),T=l(T,I,O,P,v,20,s[27]),P=l(P,T,I,O,S,5,s[28]),O=l(O,P,T,I,h,9,s[29]),I=l(I,O,P,T,b,14,s[30]),P=f(P,T=l(T,I,O,P,E,20,s[31]),I,O,m,4,s[32]),O=f(O,P,T,I,v,11,s[33]),I=f(I,O,P,T,k,16,s[34]),T=f(T,I,O,P,x,23,s[35]),P=f(P,T,I,O,u,4,s[36]),O=f(O,P,T,I,y,11,s[37]),I=f(I,O,P,T,b,16,s[38]),T=f(T,I,O,P,A,23,s[39]),P=f(P,T,I,O,S,4,s[40]),O=f(O,P,T,I,a,11,s[41]),I=f(I,O,P,T,p,16,s[42]),T=f(T,I,O,P,g,23,s[43]),P=f(P,T,I,O,w,4,s[44]),O=f(O,P,T,I,E,11,s[45]),I=f(I,O,P,T,_,16,s[46]),P=d(P,T=f(T,I,O,P,h,23,s[47]),I,O,a,6,s[48]),O=d(O,P,T,I,b,10,s[49]),I=d(I,O,P,T,x,15,s[50]),T=d(T,I,O,P,m,21,s[51]),P=d(P,T,I,O,E,6,s[52]),O=d(O,P,T,I,p,10,s[53]),I=d(I,O,P,T,A,15,s[54]),T=d(T,I,O,P,u,21,s[55]),P=d(P,T,I,O,v,6,s[56]),O=d(O,P,T,I,_,10,s[57]),I=d(I,O,P,T,g,15,s[58]),T=d(T,I,O,P,S,21,s[59]),P=d(P,T,I,O,y,6,s[60]),O=d(O,P,T,I,k,10,s[61]),I=d(I,O,P,T,h,15,s[62]),T=d(T,I,O,P,w,21,s[63]),o[0]=o[0]+P|0,o[1]=o[1]+T|0,o[2]=o[2]+I|0,o[3]=o[3]+O|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<>>32-o)+t}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(Math),n.MD5)},2169:function(e,t,r){var n;e.exports=(n=r(9021),r(7165),n.mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,r,n){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var a=0;a>24))e+=1<<24;else{var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}return e}function r(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var i=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),r(a);var s=a.slice(0);n.encryptBlock(s,0);for(var u=0;u>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)},4905:function(e,t,r){var n;e.exports=(n=r(9021),r(7165),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)},482:function(e,t,r){var n;e.exports=(n=r(9021),r(7165),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)},8124:function(e,t,r){var n;e.exports=(n=r(9021),r(7165),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},2155:function(e,t,r){var n;e.exports=(n=r(9021),r(7165),n.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},n.pad.ZeroPadding)},19:function(e,t,r){var n,i,o,a,s,u,c,l,f;e.exports=(f=r(9021),r(3009),r(1025),i=(n=f).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.SHA256,c=s.HMAC,l=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=c.create(r.hasher,e),i=a.create(),o=a.create([1]),s=i.words,u=o.words,l=r.keySize,f=r.iterations;s.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&l,d=l<<16|65535&c;for(n[0]^=c,n[1]^=f,n[2]^=l,n[3]^=d,n[4]^=c,n[5]^=f,n[6]^=l,n[7]^=d,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),n.RabbitLegacy)},6298:function(e,t,r){var n;e.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],a=[],s=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)u.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&l,d=l<<16|65535&c;for(i[0]^=c,i[1]^=f,i[2]^=l,i[3]^=d,i[4]^=c,i[5]^=f,i[6]^=l,i[7]^=d,r=0;r<4;r++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),n.Rabbit)},7193:function(e,t,r){var n;e.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var u=n[i];n[i]=n[o],n[o]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var a=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),n.RC4)},8056:function(e,t,r){var n;e.exports=(n=r(9021),function(){var e=n,t=e.lib,r=t.WordArray,i=t.Hasher,o=e.algo,a=r.create([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]),s=r.create([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]),u=r.create([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]),c=r.create([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]),l=r.create([0,1518500249,1859775393,2400959708,2840853838]),f=r.create([1352829926,1548603684,1836072691,2053994217,0]),d=o.RIPEMD160=i.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,d,v,w,A,k,E,S,x,_,P,T=this._hash.words,I=l.words,O=f.words,B=a.words,C=s.words,N=u.words,R=c.words;for(k=o=T[0],E=d=T[1],S=v=T[2],x=w=T[3],_=A=T[4],r=0;r<80;r+=1)P=o+e[t+B[r]]|0,P+=r<16?h(d,v,w)+I[0]:r<32?p(d,v,w)+I[1]:r<48?y(d,v,w)+I[2]:r<64?m(d,v,w)+I[3]:g(d,v,w)+I[4],P=(P=b(P|=0,N[r]))+A|0,o=A,A=w,w=b(v,10),v=d,d=P,P=k+e[t+C[r]]|0,P+=r<16?g(E,S,x)+O[0]:r<32?m(E,S,x)+O[1]:r<48?y(E,S,x)+O[2]:r<64?p(E,S,x)+O[3]:h(E,S,x)+O[4],P=(P=b(P|=0,R[r]))+_|0,k=_,_=x,x=b(S,10),S=E,E=P;P=T[1]+v+x|0,T[1]=T[2]+w+_|0,T[2]=T[3]+A+k|0,T[3]=T[4]+o+E|0,T[4]=T[0]+d+S|0,T[0]=P},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function y(e,t,r){return(e|~t)^r}function m(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}e.RIPEMD160=i._createHelper(d),e.HmacRIPEMD160=i._createHmacHelper(d)}(Math),n.RIPEMD160)},5471:function(e,t,r){var n,i,o,a,s,u,c,l;e.exports=(l=r(9021),i=(n=l).lib,o=i.WordArray,a=i.Hasher,s=n.algo,u=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],c=0;c<80;c++){if(c<16)u[c]=0|e[t+c];else{var l=u[c-3]^u[c-8]^u[c-14]^u[c-16];u[c]=l<<1|l>>>31}var f=(n<<5|n>>>27)+s+u[c];f+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=n,n=f}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=a._createHelper(c),n.HmacSHA1=a._createHmacHelper(c),l.SHA1)},6308:function(e,t,r){var n,i,o,a,s,u;e.exports=(u=r(9021),r(3009),i=(n=u).lib.WordArray,o=n.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),n.SHA224=a._createHelper(s),n.HmacSHA224=a._createHmacHelper(s),u.SHA224)},3009:function(e,t,r){var n;e.exports=(n=r(9021),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],f=r[6],d=r[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],y=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,m=c[h-2],g=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;c[h]=y+c[h-7]+g+c[h-16]}var b=n&i^n&o^i&o,v=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&f)+u[h]+c[h];d=f,f=l,l=s,s=a+w|0,a=o,o=i,i=n,n=w+(v+b)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+d|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),n.SHA256)},5953:function(e,t,r){var n;e.exports=(n=r(9021),r(3240),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.x64.Word,s=t.algo,u=[],c=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,d=0;d<7;d++){if(1&i){var h=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(T=r[i]).high^=a,T.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var h=0,p=0,y=0;y<5;y++)h^=(T=r[d+5*y]).high,p^=T.low;var m=f[d];m.high=h,m.low=p}for(d=0;d<5;d++){var g=f[(d+4)%5],b=f[(d+1)%5],v=b.high,w=b.low;for(h=g.high^(v<<1|w>>>31),p=g.low^(w<<1|v>>>31),y=0;y<5;y++)(T=r[d+5*y]).high^=h,T.low^=p}for(var A=1;A<25;A++){var k=(T=r[A]).high,E=T.low,S=u[A];S<32?(h=k<>>32-S,p=E<>>32-S):(h=E<>>64-S,p=k<>>64-S);var x=f[c[A]];x.high=h,x.low=p}var _=f[0],P=r[0];for(_.high=P.high,_.low=P.low,d=0;d<5;d++)for(y=0;y<5;y++){var T=r[A=d+5*y],I=f[A],O=f[(d+1)%5+5*y],B=f[(d+2)%5+5*y];T.high=I.high^~O.high&B.high,T.low=I.low^~O.low&B.low}T=r[0];var C=l[s];T.high^=C.high,T.low^=C.low}},_doFinalize:function(){var t=this._data,r=t.words,n=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],l=0;l>>24)|4278255360&(d<<24|d>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),c.push(h),c.push(d)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(d),t.HmacSHA3=o._createHmacHelper(d)}(Math),n.SHA3)},9557:function(e,t,r){var n,i,o,a,s,u,c,l;e.exports=(l=r(9021),r(3240),r(1380),i=(n=l).x64,o=i.Word,a=i.WordArray,s=n.algo,u=s.SHA512,c=s.SHA384=u.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=u._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=u._createHelper(c),n.HmacSHA384=u._createHmacHelper(c),l.SHA384)},1380:function(e,t,r){var n;e.exports=(n=r(9021),r(3240),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var l=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],f=r[6],d=r[7],h=n.high,p=n.low,y=i.high,m=i.low,g=o.high,b=o.low,v=a.high,w=a.low,A=s.high,k=s.low,E=l.high,S=l.low,x=f.high,_=f.low,P=d.high,T=d.low,I=h,O=p,B=y,C=m,N=g,R=b,M=v,U=w,L=A,j=k,F=E,D=S,H=x,z=_,q=P,G=T,K=0;K<80;K++){var V,J,W=c[K];if(K<16)J=W.high=0|e[t+2*K],V=W.low=0|e[t+2*K+1];else{var Q=c[K-15],Z=Q.high,Y=Q.low,X=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^Z>>>7,$=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^(Y>>>7|Z<<25),ee=c[K-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=c[K-7],ae=oe.high,se=oe.low,ue=c[K-16],ce=ue.high,le=ue.low;J=(J=(J=X+ae+((V=$+se)>>>0<$>>>0?1:0))+ne+((V+=ie)>>>0>>0?1:0))+ce+((V+=le)>>>0>>0?1:0),W.high=J,W.low=V}var fe,de=L&F^~L&H,he=j&D^~j&z,pe=I&B^I&N^B&N,ye=O&C^O&R^C&R,me=(I>>>28|O<<4)^(I<<30|O>>>2)^(I<<25|O>>>7),ge=(O>>>28|I<<4)^(O<<30|I>>>2)^(O<<25|I>>>7),be=(L>>>14|j<<18)^(L>>>18|j<<14)^(L<<23|j>>>9),ve=(j>>>14|L<<18)^(j>>>18|L<<14)^(j<<23|L>>>9),we=u[K],Ae=we.high,ke=we.low,Ee=q+be+((fe=G+ve)>>>0>>0?1:0),Se=ge+ye;q=H,G=z,H=F,z=D,F=L,D=j,L=M+(Ee=(Ee=(Ee=Ee+de+((fe+=he)>>>0>>0?1:0))+Ae+((fe+=ke)>>>0>>0?1:0))+J+((fe+=V)>>>0>>0?1:0))+((j=U+fe|0)>>>0>>0?1:0)|0,M=N,U=R,N=B,R=C,B=I,C=O,I=Ee+(me+pe+(Se>>>0>>0?1:0))+((O=fe+Se|0)>>>0>>0?1:0)|0}p=n.low=p+O,n.high=h+I+(p>>>0>>0?1:0),m=i.low=m+C,i.high=y+B+(m>>>0>>0?1:0),b=o.low=b+R,o.high=g+N+(b>>>0>>0?1:0),w=a.low=w+U,a.high=v+M+(w>>>0>>0?1:0),k=s.low=k+j,s.high=A+L+(k>>>0>>0?1:0),S=l.low=S+D,l.high=E+F+(S>>>0>>0?1:0),_=f.low=_+z,f.high=x+H+(_>>>0>>0?1:0),T=d.low=T+G,d.high=P+q+(T>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),n.SHA512)},7628:function(e,t,r){var n;e.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var e=n,t=e.lib,r=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],l=u[o];for(r=0;r<24;r++)c[r/6|0]|=t[(s[r]-1+l)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(s[r+24]-1+l)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),d.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,u=0;u<8;u++)s|=c[u][((a^i[u])&l[u])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,d.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(r.create(t)),this._des2=f.createEncryptor(r.create(n)),this._des3=f.createEncryptor(r.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),n.TripleDES)},3240:function(e,t,r){var n;e.exports=(n=r(9021),function(e){var t=n,r=t.lib,i=r.Base,o=r.WordArray,a=t.x64={};a.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(4542),i=r(4224),o=r(7292);function a(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=a,t.createCurve=function(e,t){const r=t=>(0,o.weierstrass)({...e,...a(t)});return Object.freeze({...r(t),create:r})}},6023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(5646),i=r(8421),o=BigInt(0),a=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&a&&(n=n.add(i)),i=i.double(),r>>=a;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let a=e,s=a;for(let e=0;e>=h,n>u&&(n-=d,o+=a);const s=t,p=t+Math.abs(n)-1,y=e%2!=0,m=n<0;0===n?l=l.add(r(y,i[s])):c=c.add(r(m,i[p]))}return{p:c,f:l}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},2124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(5646),i=r(8421);const o=i.bytesToNumberBE;function a(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function s(e,t){const r=new Uint8Array(e.length);for(let n=0;n255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=n,f=Math.ceil(r/o);if(f>255)throw new Error("Invalid xmd length");const d=(0,i.concatBytes)(t,a(t.length,1)),h=a(0,l),p=a(r,2),y=new Array(f),m=n((0,i.concatBytes)(h,e,p,a(0,1),d));y[0]=n((0,i.concatBytes)(m,a(1,1),d));for(let e=1;e<=f;e++){const t=[s(m,y[e-1]),a(e+1,1),d];y[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...y).slice(0,r)}function f(e,t,r,n,o){if(u(e),u(t),c(r),t.length>255){const e=Math.ceil(2*n/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(a(r,2)).update(t).update(a(t.length,1)).digest()}function d(e,t,r){(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:a,k:s,m:d,hash:h,expand:p,DST:y}=r;u(e),c(t);const m=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,i.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(y),g=a.toString(2).length,b=Math.ceil((g+s)/8),v=t*d*b;let w;if("xmd"===p)w=l(e,m,v,h);else if("xof"===p)w=f(e,m,v,s,h);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const A=new Array(t);for(let e=0;eArray.from(e).reverse()));return(t,n)=>{const[i,o,a,s]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(i,o),n=e.mul(n,e.div(a,s)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=d(n,2,{...r,DST:r.DST,...i}),a=e.fromAffine(t(o[0])),s=e.fromAffine(t(o[1])),u=a.add(s).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,i){const o=d(n,1,{...r,DST:r.encodeDST,...i}),a=e.fromAffine(t(o[0])).clearCofactor();return a.assertValidity(),a}}}},5646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(8421),i=BigInt(0),o=BigInt(1),a=BigInt(2),s=BigInt(3),u=BigInt(4),c=BigInt(5),l=BigInt(8);BigInt(9),BigInt(16);function f(e,t){const r=e%t;return r>=i?r:t+r}function d(e,t,r){if(r<=i||t 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function h(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,a=i,s=o,u=o,c=i;for(;r!==i;){const e=n/r,t=n%r,i=a-u*e,o=s-c*e;n=r,r=t,a=u,s=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return f(a,t)}function p(e){const t=(e-o)/a;let r,n,s;for(r=e-o,n=0;r%a===i;r/=a,n++);for(s=a;si;)n*=n,n%=r;return n},t.invert=h,t.tonelliShanks=p,t.FpSqrt=y;t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;const m=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function g(e,t,r){if(r 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,a=t;for(;r>i;)r&o&&(n=e.mul(n,a)),a=e.sqr(a),r>>=o;return n}function b(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}function v(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function w(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function A(e){const t=w(e);return t+Math.ceil(t/2)}t.validateField=function(e){const t=m.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=g,t.FpInvertBatch=b,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?h(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-o)/a;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,a={}){if(e<=i)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:u}=v(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=y(e),l=Object.freeze({ORDER:e,BITS:s,BYTES:u,MASK:(0,n.bitMask)(s),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&te===i,isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>g(l,e,t),div:(t,r)=>f(t*h(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:a.sqrt||(e=>c(l,e)),invertBatch:e=>b(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,u):(0,n.numberToBytesBE)(e,u),fromBytes:e=>{if(e.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,a=v(t).nByteLength+8;if(a<24||i1024)throw new Error(`hashToPrivateScalar: expected ${a}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=w,t.getMinHashLength=A,t.mapHashToField=function(e,t,r=!1){const i=e.length,a=w(t),s=A(t);if(i<16||i1024)throw new Error(`expected ${s}-1024 bytes of input, got ${i}`);const u=f(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(u,a):(0,n.numberToBytesBE)(u,a)}},8421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),i=BigInt(2),o=e=>e instanceof Uint8Array,a=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function s(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;re+t.length),0));let r=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}t.bytesToHex=s,t.numberToHexUnpadded=u,t.hexToNumber=c,t.hexToBytes=l,t.bytesToNumberBE=function(e){return c(s(e))},t.bytesToNumberLE=function(e){if(!o(e))throw new Error("Uint8Array expected");return c(s(Uint8Array.from(e).reverse()))},t.numberToBytesBE=f,t.numberToBytesLE=function(e,t){return f(e,t).reverse()},t.numberToVarBytesBE=function(e){return l(u(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=d,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;rr;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n};t.bitSet=(e,t,i)=>e|(i?n:r)<(i<new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=h(e),i=h(e),o=0;const a=()=>{n.fill(1),i.fill(0),o=0},s=(...e)=>r(i,n,...e),u=(e=h())=>{i=s(p([0]),e),n=s(),0!==e.length&&(i=s(p([1]),e),n=s())},c=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e{let r;for(a(),u(e);!(r=t(c()));)u();return a(),r}};const y={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=y[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},7292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(5646),i=r(8421),o=r(8421),a=r(6023);const{bytesToNumberBE:s,hexToBytes:u}=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:s(i),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?u(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:o,l:a}=t.DER._parseInt(n.subarray(2)),{d:s,l:c}=t.DER._parseInt(a);if(c.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,a=i.length/2,s=r(o),u=r(a);return`30${r(a+o+4)}02${u}${i}02${s}${n}`}};const c=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(3),h=BigInt(4);function p(e){const t=function(e){const t=(0,a.validateBasic)(e);i.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,s=t.toBytes||((e,t,n)=>{const o=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),u=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:i}=t,o=r.sqr(e),a=r.mul(o,e);return r.add(r.add(a,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function h(e){return"bigint"==typeof e&&cr.eql(e,r.ZERO);return i(t)&&i(n)?b.ZERO:new b(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(u((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(y(e))}_setWindowSize(e){this._WINDOW_SIZE=e,m.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),o=f(e);if(!r.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){g(e);const{px:t,py:n,pz:i}=this,{px:o,py:a,pz:s}=e,u=r.eql(r.mul(t,s),r.mul(o,i)),c=r.eql(r.mul(n,s),r.mul(a,i));return u&&c}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,d),{px:o,py:a,pz:s}=this;let u=r.ZERO,c=r.ZERO,l=r.ZERO,f=r.mul(o,o),h=r.mul(a,a),p=r.mul(s,s),y=r.mul(o,a);return y=r.add(y,y),l=r.mul(o,s),l=r.add(l,l),u=r.mul(e,l),c=r.mul(i,p),c=r.add(u,c),u=r.sub(h,c),c=r.add(h,c),c=r.mul(u,c),u=r.mul(y,u),l=r.mul(i,l),p=r.mul(e,p),y=r.sub(f,p),y=r.mul(e,y),y=r.add(y,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,y),c=r.add(c,f),p=r.mul(a,s),p=r.add(p,p),f=r.mul(p,y),u=r.sub(u,f),l=r.mul(p,h),l=r.add(l,l),l=r.add(l,l),new b(u,c,l)}add(e){g(e);const{px:n,py:i,pz:o}=this,{px:a,py:s,pz:u}=e;let c=r.ZERO,l=r.ZERO,f=r.ZERO;const h=t.a,p=r.mul(t.b,d);let y=r.mul(n,a),m=r.mul(i,s),v=r.mul(o,u),w=r.add(n,i),A=r.add(a,s);w=r.mul(w,A),A=r.add(y,m),w=r.sub(w,A),A=r.add(n,o);let k=r.add(a,u);return A=r.mul(A,k),k=r.add(y,v),A=r.sub(A,k),k=r.add(i,o),c=r.add(s,u),k=r.mul(k,c),c=r.add(m,v),k=r.sub(k,c),f=r.mul(h,A),c=r.mul(p,v),f=r.add(c,f),c=r.sub(m,f),f=r.add(m,f),l=r.mul(c,f),m=r.add(y,y),m=r.add(m,y),v=r.mul(h,v),A=r.mul(p,A),m=r.add(m,v),v=r.sub(y,v),v=r.mul(h,v),A=r.add(A,v),y=r.mul(m,A),l=r.add(l,y),y=r.mul(k,A),c=r.mul(w,c),c=r.sub(c,y),y=r.mul(w,m),f=r.mul(k,f),f=r.add(f,y),new b(c,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return w.wNAFCached(this,m,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}))}multiplyUnsafe(e){const n=b.ZERO;if(e===c)return n;if(p(e),e===l)return this;const{endo:i}=t;if(!i)return w.unsafeLadder(this,e);let{k1neg:o,k1:a,k2neg:s,k2:u}=i.splitScalar(e),f=n,d=n,h=this;for(;a>c||u>c;)a&l&&(f=f.add(h)),u&l&&(d=d.add(h)),h=h.double(),a>>=l,u>>=l;return o&&(f=f.negate()),s&&(d=d.negate()),d=new b(r.mul(d.px,i.beta),d.py,d.pz),f.add(d)}multiply(e){p(e);let n,i,o=e;const{endo:a}=t;if(a){const{k1neg:e,k1:t,k2neg:s,k2:u}=a.splitScalar(o);let{p:c,f:l}=this.wNAF(t),{p:f,f:d}=this.wNAF(u);c=w.constTimeNegate(e,c),f=w.constTimeNegate(s,f),f=new b(r.mul(f.px,a.beta),f.py,f.pz),n=c.add(f),i=l.add(d)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return b.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=b.BASE,i=(e,t)=>t!==c&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const a=r.mul(t,e),s=r.mul(n,e),u=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:a,y:s}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),s(b,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);const v=t.nBitLength,w=(0,a.wNAF)(b,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:y,weierstrassEquation:f,isWithinCurveOrder:h}}function y(e,t){const r=e.ORDER;let n=c;for(let e=r-l;e%f===c;e/=f)n+=l;const i=n,o=f<{let n=m,o=e.pow(r,p),a=e.sqr(o);a=e.mul(a,r);let s=e.mul(t,a);s=e.pow(s,u),s=e.mul(s,o),o=e.mul(s,r),a=e.mul(s,t);let c=e.mul(a,o);s=e.pow(c,y);let d=e.eql(s,e.ONE);o=e.mul(a,g),s=e.mul(c,n),a=e.cmov(o,a,d),c=e.cmov(s,c,d);for(let t=i;t>l;t--){let r=t-f;r=f<{let o=e.sqr(i);const a=e.mul(t,i);o=e.mul(o,a);let s=e.pow(o,r);s=e.mul(s,a);const u=e.mul(s,n),c=e.mul(e.sqr(s),i),l=e.eql(c,t);return{isValid:l,value:e.cmov(u,s,l)}}}return b}t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,a.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:s,n:u}=r,f=s.BYTES+1,d=2*s.BYTES+1;function h(e){return n.mod(e,u)}function y(e){return n.invert(e,u)}const{ProjectivePoint:m,normPrivateKeyToScalar:g,weierstrassEquation:b,isWithinCurveOrder:v}=p({...r,toBytes(e,t,r){const n=t.toAffine(),o=s.toBytes(n.x),a=i.concatBytes;return r?a(Uint8Array.from([t.hasEvenY()?2:3]),o):a(Uint8Array.from([4]),o,s.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===d&&4===r){return{x:s.fromBytes(n.subarray(0,s.BYTES)),y:s.fromBytes(n.subarray(s.BYTES,2*s.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${d} uncompressed bytes`)}{const e=i.bytesToNumberBE(n);if(!(c<(o=e)&&oi.bytesToHex(i.numberToBytesBE(e,r.nByteLength));function A(e){return e>u>>l}const k=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class E{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*t),new E(k(e,0,t),k(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,o.ensureBytes)("DER",e));return new E(r,n)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new E(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:i}=this,a=P((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const u=2===i||3===i?t+r.n:t;if(u>=s.ORDER)throw new Error("recovery id 2 or 3 invalid");const c=1&i?"03":"02",l=m.fromHex(c+w(u)),f=y(u),d=h(-a*f),p=h(n*f),g=m.BASE.multiplyAndAddUnsafe(l,d,p);if(!g)throw new Error("point at infinify");return g.assertValidity(),g}hasHighS(){return A(this.s)}normalizeS(){return this.hasHighS()?new E(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const S={isValidPrivateKey(e){try{return g(e),!0}catch(e){return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{const e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute:(e=8,t=m.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function x(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===d:r?n===2*f||n===2*d:e instanceof m}const _=r.bits2int||function(e){const t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},P=r.bits2int_modN||function(e){return h(_(e))},T=i.bitMask(r.nBitLength);function I(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(c<=e&&ee in n)))throw new Error("sign() legacy options not supported");const{hash:a,randomBytes:u}=r;let{lowS:f,prehash:d,extraEntropy:p}=n;null==f&&(f=!0),e=(0,o.ensureBytes)("msgHash",e),d&&(e=(0,o.ensureBytes)("prehashed msgHash",a(e)));const b=P(e),w=g(t),k=[I(w),I(b)];if(null!=p){const e=!0===p?u(s.BYTES):p;k.push((0,o.ensureBytes)("extraEntropy",e))}const S=i.concatBytes(...k),x=b;return{seed:S,k2sig:function(e){const t=_(e);if(!v(t))return;const r=y(t),n=m.BASE.multiply(t).toAffine(),i=h(n.x);if(i===c)return;const o=h(r*h(x+i*w));if(o===c)return;let a=(n.x===i?0:2)|Number(n.y&l),s=o;return f&&A(o)&&(s=function(e){return A(e)?h(-e):e}(o),a^=1),new E(i,s,a)}}}const B={lowS:r.lowS,prehash:!1},C={lowS:r.lowS,prehash:!1};return m.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return m.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(x(e))throw new Error("first arg must be private key");if(!x(t))throw new Error("second arg must be public key");return m.fromHex(t).multiply(g(e)).toRawBytes(r)},sign:function(e,t,n=B){const{seed:o,k2sig:a}=O(e,t,n),s=r;return i.createHmacDrbg(s.hash.outputLen,s.nByteLength,s.hmac)(o,a)},verify:function(e,n,i,a=C){const s=e;if(n=(0,o.ensureBytes)("msgHash",n),i=(0,o.ensureBytes)("publicKey",i),"strict"in a)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:c}=a;let l,f;try{if("string"==typeof s||s instanceof Uint8Array)try{l=E.fromDER(s)}catch(e){if(!(e instanceof t.DER.Err))throw e;l=E.fromCompact(s)}else{if("object"!=typeof s||"bigint"!=typeof s.r||"bigint"!=typeof s.s)throw new Error("PARSE");{const{r:e,s:t}=s;l=new E(e,t)}}f=m.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;c&&(n=r.hash(n));const{r:d,s:p}=l,g=P(n),b=y(p),v=h(g*b),w=h(d*b),A=m.BASE.multiplyAndAddUnsafe(f,v,w)?.toAffine();return!!A&&h(A.x)===d},ProjectivePoint:m,Signature:E,utils:S}},t.SWUFpSqrtRatio=y,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=y(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,a,s,u,c,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),a=e.add(o,e.ONE),a=e.mul(a,t.B),s=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),s=e.mul(s,t.A),o=e.sqr(a),c=e.sqr(s),u=e.mul(c,t.A),o=e.add(o,u),o=e.mul(o,a),c=e.mul(c,s),u=e.mul(c,t.B),o=e.add(o,u),l=e.mul(i,a);const{isValid:d,value:h}=r(o,c);f=e.mul(i,n),f=e.mul(f,h),l=e.cmov(l,a,d),f=e.cmov(f,h,d);const p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),l=e.div(l,s),{x:l,y:f}}}},985:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const n=r(6978),i=r(4224),o=r(5646),a=r(7292),s=r(8421),u=r(2124),c=r(7749),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),d=BigInt(1),h=BigInt(2),p=(e,t)=>(e+t/h)/t;function y(e){const t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),a=BigInt(22),s=BigInt(23),u=BigInt(44),c=BigInt(88),f=e*e*e%t,d=f*f*e%t,p=(0,o.pow2)(d,r,t)*d%t,y=(0,o.pow2)(p,r,t)*d%t,g=(0,o.pow2)(y,h,t)*f%t,b=(0,o.pow2)(g,i,t)*g%t,v=(0,o.pow2)(b,a,t)*b%t,w=(0,o.pow2)(v,u,t)*v%t,A=(0,o.pow2)(w,c,t)*w%t,k=(0,o.pow2)(A,u,t)*v%t,E=(0,o.pow2)(k,r,t)*d%t,S=(0,o.pow2)(E,s,t)*b%t,x=(0,o.pow2)(S,n,t)*f%t,_=(0,o.pow2)(x,h,t);if(!m.eql(m.sqr(_),e))throw new Error("Cannot find square root");return _}const m=(0,o.Field)(l,void 0,void 0,{sqrt:y});t.secp256k1=(0,c.createCurve)({a:BigInt(0),b:BigInt(7),Fp:m,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-d*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=BigInt("0x100000000000000000000000000000000"),u=p(a*e,t),c=p(-n*e,t);let l=(0,o.mod)(e-u*r-c*i,t),h=(0,o.mod)(-u*n-c*a,t);const y=l>s,m=h>s;if(y&&(l=t-l),m&&(h=t-h),l>s||h>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:y,k1:l,k2neg:m,k2:h}}}},n.sha256);const g=BigInt(0),b=e=>"bigint"==typeof e&&ge.charCodeAt(0))));r=(0,s.concatBytes)(t,t),v[e]=r}return(0,n.sha256)((0,s.concatBytes)(r,...t))}const A=e=>e.toRawBytes(!0).slice(1),k=e=>(0,s.numberToBytesBE)(e,32),E=e=>(0,o.mod)(e,l),S=e=>(0,o.mod)(e,f),x=t.secp256k1.ProjectivePoint;function _(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=x.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:S(-r),bytes:A(n)}}function P(e){if(!b(e))throw new Error("bad x: need 0 < x < p");const t=E(e*e);let r=y(E(t*e+BigInt(7)));r%h!==g&&(r=E(-r));const n=new x(e,r,d);return n.assertValidity(),n}function T(...e){return S((0,s.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function I(e){return _(e).bytes}function O(e,t,r=(0,i.randomBytes)(32)){const n=(0,s.ensureBytes)("message",e),{bytes:o,scalar:a}=_(t),u=(0,s.ensureBytes)("auxRand",r,32),c=k(a^(0,s.bytesToNumberBE)(w("BIP0340/aux",u))),l=w("BIP0340/nonce",c,o,n),f=S((0,s.bytesToNumberBE)(l));if(f===g)throw new Error("sign failed: k is zero");const{bytes:d,scalar:h}=_(f),p=T(d,o,n),y=new Uint8Array(64);if(y.set(d,0),y.set(k(S(h+p*a)),32),!B(y,n,o))throw new Error("sign: Invalid signature produced");return y}function B(e,t,r){const n=(0,s.ensureBytes)("signature",e,64),i=(0,s.ensureBytes)("message",t),o=(0,s.ensureBytes)("publicKey",r,32);try{const e=P((0,s.bytesToNumberBE)(o)),t=(0,s.bytesToNumberBE)(n.subarray(0,32));if(!b(t))return!1;const r=(0,s.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&g(0,u.isogenyMap)(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),N=(()=>(0,a.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))}))(),R=(()=>(0,u.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=N(m.create(e[0]));return C(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();t.hashToCurve=R.hashToCurve,t.encodeToCurve=R.encodeToCurve},7302:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){i(e);const r=t.outputLen;if(e.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(7302),i=r(4224);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:o}=this,a=(e=(0,i.toBytes)(e)).length;for(let n=0;no-s&&(this.process(r,0),s=0);for(let e=s;e>i&o),s=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,a,n),e.setUint32(t+c,s,n)}(r,o-8,BigInt(8*this.length),a),this.process(r,0);const u=(0,i.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0);t.toBig=a;const s=(e,t,r)=>e>>>r;t.shrSH=s;const u=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=u;const c=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=c;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const d=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=d;const h=(e,t)=>t;t.rotr32H=h;const p=(e,t)=>e;t.rotr32L=p;const y=(e,t,r)=>e<>>32-r;t.rotlSH=y;const m=(e,t,r)=>t<>>32-r;t.rotlSL=m;const g=(e,t,r)=>t<>>64-r;t.rotlBH=g;const b=(e,t,r)=>e<>>64-r;function v(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=b,t.add=v;const w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;const A=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=A;const k=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=k;const E=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=E;const S=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=S;const x=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=x;const _={fromBig:i,split:o,toBig:a,shrSH:s,shrSL:u,rotrSH:c,rotrSL:l,rotrBH:f,rotrBL:d,rotr32H:h,rotr32L:p,rotlSH:y,rotlSL:m,rotlBH:g,rotlBL:b,add:v,add3L:w,add3H:A,add4L:k,add4H:E,add5H:x,add5L:S};t.default=_},1760:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},4542:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(7302),i=r(4224);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,a=new Uint8Array(o);a.set(r.length>o?e.create().update(r).digest():r);for(let e=0;enew o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},9e3:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Async=t.pbkdf2=void 0;const n=r(7302),i=r(4542),o=r(4224);function a(e,t,r,a){(0,n.hash)(e);const s=(0,o.checkOpts)({dkLen:32,asyncTick:10},a),{c:u,dkLen:c,asyncTick:l}=s;if((0,n.number)(u),(0,n.number)(c),(0,n.number)(l),u<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const f=(0,o.toBytes)(t),d=(0,o.toBytes)(r),h=new Uint8Array(c),p=i.hmac.create(e,f),y=p._cloneInto().update(d);return{c:u,dkLen:c,asyncTick:l,DK:h,PRF:p,PRFSalt:y}}function s(e,t,r,n,i){return e.destroy(),t.destroy(),n&&n.destroy(),i.fill(0),r}t.pbkdf2=function(e,t,r,n){const{c:i,dkLen:u,DK:c,PRF:l,PRFSalt:f}=a(e,t,r,n);let d;const h=new Uint8Array(4),p=(0,o.createView)(h),y=new Uint8Array(l.outputLen);for(let e=1,t=0;t{f._cloneInto(h).update(m).digestInto(m);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const n=r(5184),i=r(4224),o=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),a=Uint8Array.from({length:16},((e,t)=>t));let s=[a],u=[a.map((e=>(9*e+5)%16))];for(let e=0;e<4;e++)for(let t of[s,u])t.push(t[e].map((e=>o[e])));const c=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),l=s.map(((e,t)=>e.map((e=>c[t][e])))),f=u.map(((e,t)=>e.map((e=>c[t][e])))),d=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),h=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),p=(e,t)=>e<>>32-t;function y(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const m=new Uint32Array(16);class g extends n.SHA2{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)m[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,i=0|this.h1,o=i,a=0|this.h2,c=a,g=0|this.h3,b=g,v=0|this.h4,w=v;for(let e=0;e<5;e++){const t=4-e,A=d[e],k=h[e],E=s[e],S=u[e],x=l[e],_=f[e];for(let t=0;t<16;t++){const n=p(r+y(e,i,a,g)+m[E[t]]+A,x[t])+v|0;r=v,v=g,g=0|p(a,10),a=i,i=n}for(let e=0;e<16;e++){const r=p(n+y(t,o,c,b)+m[S[e]]+k,_[e])+w|0;n=w,w=b,b=0|p(c,10),c=o,o=r}}this.set(this.h1+a+b|0,this.h2+g+w|0,this.h3+v+n|0,this.h4+r+o|0,this.h0+i+c|0)}roundClean(){m.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}t.RIPEMD160=g,t.ripemd160=(0,i.wrapConstructor)((()=>new g))},9462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptAsync=t.scrypt=void 0;const n=r(7302),i=r(6978),o=r(9e3),a=r(4224),s=(e,t)=>e<>>32-t;function u(e,t,r,n,i,o){let a=e[t++]^r[n++],u=e[t++]^r[n++],c=e[t++]^r[n++],l=e[t++]^r[n++],f=e[t++]^r[n++],d=e[t++]^r[n++],h=e[t++]^r[n++],p=e[t++]^r[n++],y=e[t++]^r[n++],m=e[t++]^r[n++],g=e[t++]^r[n++],b=e[t++]^r[n++],v=e[t++]^r[n++],w=e[t++]^r[n++],A=e[t++]^r[n++],k=e[t++]^r[n++],E=a,S=u,x=c,_=l,P=f,T=d,I=h,O=p,B=y,C=m,N=g,R=b,M=v,U=w,L=A,j=k;for(let e=0;e<8;e+=2)P^=s(E+M|0,7),B^=s(P+E|0,9),M^=s(B+P|0,13),E^=s(M+B|0,18),C^=s(T+S|0,7),U^=s(C+T|0,9),S^=s(U+C|0,13),T^=s(S+U|0,18),L^=s(N+I|0,7),x^=s(L+N|0,9),I^=s(x+L|0,13),N^=s(I+x|0,18),_^=s(j+R|0,7),O^=s(_+j|0,9),R^=s(O+_|0,13),j^=s(R+O|0,18),S^=s(E+_|0,7),x^=s(S+E|0,9),_^=s(x+S|0,13),E^=s(_+x|0,18),I^=s(T+P|0,7),O^=s(I+T|0,9),P^=s(O+I|0,13),T^=s(P+O|0,18),R^=s(N+C|0,7),B^=s(R+N|0,9),C^=s(B+R|0,13),N^=s(C+B|0,18),M^=s(j+L|0,7),U^=s(M+j|0,9),L^=s(U+M|0,13),j^=s(L+U|0,18);i[o++]=a+E|0,i[o++]=u+S|0,i[o++]=c+x|0,i[o++]=l+_|0,i[o++]=f+P|0,i[o++]=d+T|0,i[o++]=h+I|0,i[o++]=p+O|0,i[o++]=y+B|0,i[o++]=m+C|0,i[o++]=g+N|0,i[o++]=b+R|0,i[o++]=v+M|0,i[o++]=w+U|0,i[o++]=A+L|0,i[o++]=k+j|0}function c(e,t,r,n,i){let o=n+0,a=n+16*i;for(let n=0;n<16;n++)r[a+n]=e[t+16*(2*i-1)+n];for(let n=0;n0&&(a+=16),u(r,o,e,t+=16,r,a)}function l(e,t,r){const s=(0,a.checkOpts)({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:u,r:c,p:l,dkLen:f,asyncTick:d,maxmem:h,onProgress:p}=s;if((0,n.number)(u),(0,n.number)(c),(0,n.number)(l),(0,n.number)(f),(0,n.number)(d),(0,n.number)(h),void 0!==p&&"function"!=typeof p)throw new Error("progressCb should be function");const y=128*c,m=y/4;if(u<=1||u&u-1||u>=2**(y/8)||u>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(l<0||l>137438953440/y)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(f<0||f>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const g=y*(u+l);if(g>h)throw new Error(`Scrypt: parameters too large, ${g} (128 * r * (N + p)) > ${h} (maxmem)`);const b=(0,o.pbkdf2)(i.sha256,e,t,{c:1,dkLen:y*l}),v=(0,a.u32)(b),w=(0,a.u32)(new Uint8Array(y*u)),A=(0,a.u32)(new Uint8Array(y));let k=()=>{};if(p){const e=2*u*l,t=Math.max(Math.floor(e/1e4),1);let r=0;k=()=>{r++,!p||r%t&&r!==e||p(r/e)}}return{N:u,r:c,p:l,dkLen:f,blockSize32:m,V:w,B32:v,B:b,tmp:A,blockMixCb:k,asyncTick:d}}function f(e,t,r,n,a){const s=(0,o.pbkdf2)(i.sha256,e,r,{c:1,dkLen:t});return r.fill(0),n.fill(0),a.fill(0),s}t.scrypt=function(e,t,r){const{N:n,r:i,p:o,dkLen:a,blockSize32:s,V:u,B32:d,B:h,tmp:p,blockMixCb:y}=l(e,t,r);for(let e=0;e{c(d,r,d,r+=u,i),m()})),c(d,(n-1)*u,h,t,i),m(),await(0,a.asyncLoop)(n,g,(()=>{const e=h[t+u-16]%n;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(5184),i=r(4224),o=(e,t,r)=>e&t^e&r^t&r,a=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]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=u[e-15],r=u[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;u[e]=o+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:s,D:c,E:l,F:f,G:d,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&d)+a[e]+u[e]|0,y=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,s)|0;h=d,d=f,f=l,l=c+t|0,c=s,s=n,n=r,r=t+y|0}var p;r=r+this.A|0,n=n+this.B|0,s=s+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,n,s,c,l,f,d,h)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)((()=>new c)),t.sha224=(0,i.wrapConstructor)((()=>new l))},6534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(7302),i=r(9975),o=r(4224),[a,s,u]=[[],[],[]],c=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(7),h=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],a.push(2*(5*n+r)),s.push((e+1)*(e+2)/2%64);let i=c;for(let e=0;e<7;e++)t=(t<>d)*p)%h,t&f&&(i^=l<<(l<r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),b=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function v(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],a=r[i+1],s=g(o,a,1)^r[n],u=b(o,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=u}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=s[r],o=g(t,i,n),u=b(t,i,n),c=a[r];t=e[c],i=e[c+1],e[c]=o,e[c+1]=u}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=y[n],e[1]^=m[n]}r.fill(0)}t.keccakP=v;class w extends o.Hash{constructor(e,t,r,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new w(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=w;const A=(e,t,r)=>(0,o.wrapConstructor)((()=>new w(t,e,r)));t.sha3_224=A(6,144,28),t.sha3_256=A(6,136,32),t.sha3_384=A(6,104,48),t.sha3_512=A(6,72,64),t.keccak_224=A(1,144,28),t.keccak_256=A(1,136,32),t.keccak_384=A(1,104,48),t.keccak_512=A(1,72,64);const k=(e,t,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=k(31,168,16),t.shake256=k(31,136,32)},9483:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA512=void 0;const n=r(5184),i=r(9975),o=r(4224),[a,s]=(()=>i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),u=new Uint32Array(80),c=new Uint32Array(80);class l extends n.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:a,Dl:s,Eh:u,El:c,Fh:l,Fl:f,Gh:d,Gl:h,Hh:p,Hl:y}=this;return[e,t,r,n,i,o,a,s,u,c,l,f,d,h,p,y]}set(e,t,r,n,i,o,a,s,u,c,l,f,d,h,p,y){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|u,this.El=0|c,this.Fh=0|l,this.Fl=0|f,this.Gh=0|d,this.Gl=0|h,this.Hh=0|p,this.Hl=0|y}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t),c[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|u[e-15],r=0|c[e-15],n=i.default.rotrSH(t,r,1)^i.default.rotrSH(t,r,8)^i.default.shrSH(t,r,7),o=i.default.rotrSL(t,r,1)^i.default.rotrSL(t,r,8)^i.default.shrSL(t,r,7),a=0|u[e-2],s=0|c[e-2],l=i.default.rotrSH(a,s,19)^i.default.rotrBH(a,s,61)^i.default.shrSH(a,s,6),f=i.default.rotrSL(a,s,19)^i.default.rotrBL(a,s,61)^i.default.shrSL(a,s,6),d=i.default.add4L(o,f,c[e-7],c[e-16]),h=i.default.add4H(d,n,l,u[e-7],u[e-16]);u[e]=0|h,c[e]=0|d}let{Ah:r,Al:n,Bh:o,Bl:l,Ch:f,Cl:d,Dh:h,Dl:p,Eh:y,El:m,Fh:g,Fl:b,Gh:v,Gl:w,Hh:A,Hl:k}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(y,m,14)^i.default.rotrSH(y,m,18)^i.default.rotrBH(y,m,41),E=i.default.rotrSL(y,m,14)^i.default.rotrSL(y,m,18)^i.default.rotrBL(y,m,41),S=y&g^~y&v,x=m&b^~m&w,_=i.default.add5L(k,E,x,s[e],c[e]),P=i.default.add5H(_,A,t,S,a[e],u[e]),T=0|_,I=i.default.rotrSH(r,n,28)^i.default.rotrBH(r,n,34)^i.default.rotrBH(r,n,39),O=i.default.rotrSL(r,n,28)^i.default.rotrBL(r,n,34)^i.default.rotrBL(r,n,39),B=r&o^r&f^o&f,C=n&l^n&d^l&d;A=0|v,k=0|w,v=0|g,w=0|b,g=0|y,b=0|m,({h:y,l:m}=i.default.add(0|h,0|p,0|P,0|T)),h=0|f,p=0|d,f=0|o,d=0|l,o=0|r,l=0|n;const N=i.default.add3L(T,O,C);r=i.default.add3H(N,P,I,B),n=0|N}({h:r,l:n}=i.default.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l}=i.default.add(0|this.Bh,0|this.Bl,0|o,0|l)),({h:f,l:d}=i.default.add(0|this.Ch,0|this.Cl,0|f,0|d)),({h,l:p}=i.default.add(0|this.Dh,0|this.Dl,0|h,0|p)),({h:y,l:m}=i.default.add(0|this.Eh,0|this.El,0|y,0|m)),({h:g,l:b}=i.default.add(0|this.Fh,0|this.Fl,0|g,0|b)),({h:v,l:w}=i.default.add(0|this.Gh,0|this.Gl,0|v,0|w)),({h:A,l:k}=i.default.add(0|this.Hh,0|this.Hl,0|A,0|k)),this.set(r,n,o,l,f,d,h,p,y,m,g,b,v,w,A,k)}roundClean(){u.fill(0),c.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=l;class f extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class d extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class h extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.sha512=(0,o.wrapConstructor)((()=>new l)),t.sha512_224=(0,o.wrapConstructor)((()=>new f)),t.sha512_256=(0,o.wrapConstructor)((()=>new d)),t.sha384=(0,o.wrapConstructor)((()=>new h))},4224:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(1760),i=e=>e instanceof Uint8Array;t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o=0&&ee+t.length),0));let r=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t};t.Hash=class{clone(){return this._cloneInto()}};const u={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==u.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(s(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(s(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(s(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},6740:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>A,__asyncGenerator:()=>w,__asyncValues:()=>k,__await:()=>v,__awaiter:()=>l,__classPrivateFieldGet:()=>P,__classPrivateFieldIn:()=>I,__classPrivateFieldSet:()=>T,__createBinding:()=>d,__decorate:()=>s,__exportStar:()=>h,__extends:()=>i,__generator:()=>f,__importDefault:()=>_,__importStar:()=>x,__makeTemplateObject:()=>E,__metadata:()=>c,__param:()=>u,__read:()=>y,__rest:()=>a,__spread:()=>m,__spreadArray:()=>b,__spreadArrays:()=>g,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof v?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function A(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:v(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&d(t,e,r);return S(t,e),t}function _(e){return e&&e.__esModule?e:{default:e}}function P(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function T(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function I(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},7952:(e,t,r)=>{var n=t;n.utils=r(7426),n.common=r(6166),n.sha=r(6229),n.ripemd=r(6784),n.hmac=r(8948),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},6166:(e,t,r)=>{"use strict";var n=r(7426),i=r(3349);function o(){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}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o{"use strict";var n=r(7426),i=r(3349);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(7426),i=r(6166),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,c),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],b=r,v=n,w=i,A=c,k=l,E=0;E<80;E++){var S=a(o(u(r,f(E,n,i,c),e[p[E]+t],d(E)),m[E]),l);r=l,l=c,c=o(i,10),i=n,n=S,S=a(o(u(b,f(79-E,v,w,A),e[y[E]+t],h(E)),g[E]),k),b=k,k=A,A=o(w,10),w=v,v=S}S=s(this.h[1],i,A),this.h[1]=s(this.h[2],c,k),this.h[2]=s(this.h[3],l,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,w),this.h[0]=S},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],y=[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],m=[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],g=[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]},6229:(e,t,r)=>{"use strict";t.sha1=r(3917),t.sha224=r(7714),t.sha256=r(2287),t.sha384=r(1911),t.sha512=r(7766)},3917:(e,t,r)=>{"use strict";var n=r(7426),i=r(6166),o=r(6225),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,l=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,l),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(7426),i=r(2287);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},2287:(e,t,r)=>{"use strict";var n=r(7426),i=r(6166),o=r(6225),a=r(3349),s=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,f=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,y=o.g1_256,m=i.BlockHash,g=[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 b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(b,m),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(7426),i=r(7766);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},7766:(e,t,r)=>{"use strict";var n=r(7426),i=r(6166),o=r(3349),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,f=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,y=n.sum64_5_hi,m=n.sum64_5_lo,g=i.BlockHash,b=[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 v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function k(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function S(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function _(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function B(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,g),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(7426).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},7426:(e,t,r)=>{"use strict";var n=r(3349),i=r(6698);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var l=0,f=t;return l+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,l=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*y}},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},1176:(e,t,r)=>{var n,i=r(5606);!function(){"use strict";var o="input is invalid type",a="object"==typeof window,s=a?window:{};s.JS_SHA3_NO_WINDOW&&(a=!1);var u=!a&&"object"==typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?s=r.g:u&&(s=self);var c=!s.JS_SHA3_NO_COMMON_JS&&e.exports,l=r.amdO,f=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),h=[4,1024,262144,67108864],p=[0,8,16,24],y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],g=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!f||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new M(e,t,e).update(n)[r]()}},A=function(e,t,r){return function(n,i){return new M(e,t,i).update(n)[r]()}},k=function(e,t,r){return function(t,n,i,o){return P["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return P["kmac"+e].update(t,n,i,o)[r]()}},S=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function U(e,t,r){M.call(this,e,t,r)}M.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,a=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,l=0,d=this.s;l>2]|=e[l]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(a[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=s){for(this.start=n-s,this.block=a[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},M.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var a=0;a=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},M.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t==0&&(L(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},M.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&L(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},U.prototype=new M,U.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var L=function(e){var t,r,n,i,o,a,s,u,c,l,f,d,h,p,m,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(d<<1|h>>>31),r=c^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],m=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=p^~g&v,e[1]=m^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&p,e[7]=k^~S&m,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~p&g,e[9]=S^~m&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=y[n],e[1]^=y[n+1]};if(c)e.exports=P;else{for(I=0;I{"use strict";const{isArray:n,isObject:i,isString:o}=r(7382),{asArray:a}=r(9263),{prependBase:s}=r(470),u=r(2207),c=r(7532);function l(e){throw new u("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}function f({context:e,base:t}){if(!e)return;const r=e["@context"];if(o(r))e["@context"]=s(t,r);else if(n(r))for(let e=0;e10)throw new u("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"loading remote context failed":"context overflow",max:10});if(a.has(t))throw new u("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"recursive context inclusion":"context overflow",url:t});let s,c;a.add(t);try{c=await r(t),s=c.document||null,o(s)&&(s=JSON.parse(s))}catch(e){throw new u("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!i(s))throw new u("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:t});return s="@context"in s?{"@context":s["@context"]}:{"@context":{}},c.contextUrl&&(n(s["@context"])||(s["@context"]=[s["@context"]]),s["@context"].push(c.contextUrl)),{context:s,remoteDoc:c}}}},2207:e=>{"use strict";e.exports=class extends Error{constructor(e="An unspecified JSON-LD error occurred.",t="jsonld.Error",r={}){super(e),this.name=t,this.message=e,this.details=r}}},5445:e=>{"use strict";e.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,r){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,r)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}},8229:(e,t,r)=>{"use strict";e.exports=r(989).NQuads},3743:e=>{"use strict";e.exports=class{constructor(){this._requests={}}wrapLoader(e){const t=this;return t._loader=e,function(){return t.add.apply(t,arguments)}}async add(e){let t=this._requests[e];if(t)return Promise.resolve(t);t=this._requests[e]=this._loader(e);try{return await t}finally{delete this._requests[e]}}}},7532:(e,t,r)=>{"use strict";const n=r(9749);e.exports=class{constructor({document:e}){this.document=e,this.cache=new n({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},1058:(e,t,r)=>{"use strict";const n=r(2207),{isArray:i,isObject:o,isString:a,isUndefined:s}=r(7382),{isList:u,isValue:c,isGraph:l,isSimpleGraph:f,isSubjectReference:d}=r(3978),{expandIri:h,getContextValue:p,isKeyword:y,process:m,processingMode:g}=r(1972),{removeBase:b,prependBase:v}=r(470),{REGEX_KEYWORD:w,addValue:A,asArray:k,compareShortestLeast:E}=r(9263),S={};function x(e,t,r){if("@nest"!==h(e,t,{vocab:!0},r))throw new n("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}e.exports=S,S.compact=async({activeCtx:e,activeProperty:t=null,element:r,options:h={}})=>{if(i(r)){let n=[];for(let i=0;i1&&(_=Array.from(_).sort());const P=e;for(const t of _){const r=S.compactIri({activeCtx:P,iri:t,relativeTo:{vocab:!0}}),n=p(w,r,"@context");s(n)||(e=await m({activeCtx:e,localCtx:n,options:h,propagate:!1}))}const T=Object.keys(r).sort();for(const s of T){const d=r[s];if("@id"!==s)if("@type"!==s)if("@reverse"!==s)if("@preserve"!==s)if("@index"!==s)if("@graph"!==s&&"@list"!==s&&"@included"!==s&&y(s)){const t=S.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});A(v,t,d)}else{if(!i(d))throw new n("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===d.length){const t=S.compactIri({activeCtx:e,iri:s,value:d,relativeTo:{vocab:!0},reverse:b}),r=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let n=v;r&&(x(e,r,h),o(v[r])||(v[r]={}),n=v[r]),A(n,t,d,{propertyIsArray:!0})}for(const t of d){const r=S.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:b}),n=e.mappings.has(r)?e.mappings.get(r)["@nest"]:null;let d=v;n&&(x(e,n,h),o(v[n])||(v[n]={}),d=v[n]);const y=p(e,r,"@container")||[],m=l(t),g=u(t);let w;g?w=t["@list"]:m&&(w=t["@graph"]);let E=await S.compact({activeCtx:e,activeProperty:r,element:g||m?w:t,options:h});if(g){if(i(E)||(E=[E]),y.includes("@list")){A(d,r,E,{valueIsArray:!0,allowDuplicate:!0});continue}E={[S.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:!0}})]:E},"@index"in t&&(E[S.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"])}if(m)if(y.includes("@graph")&&(y.includes("@id")||y.includes("@index")&&f(t))){let n;d.hasOwnProperty(r)?n=d[r]:d[r]=n={};const i=(y.includes("@id")?t["@id"]:t["@index"])||S.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}});A(n,i,E,{propertyIsArray:!h.compactArrays||y.includes("@set")})}else y.includes("@graph")&&f(t)?(i(E)&&E.length>1&&(E={"@included":E}),A(d,r,E,{propertyIsArray:!h.compactArrays||y.includes("@set")})):(i(E)&&1===E.length&&h.compactArrays&&(E=E[0]),E={[S.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:!0}})]:E},"@id"in t&&(E[S.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t["@id"]),"@index"in t&&(E[S.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"]),A(d,r,E,{propertyIsArray:!h.compactArrays||y.includes("@set")}));else if(y.includes("@language")||y.includes("@index")||y.includes("@id")||y.includes("@type")){let n,i;if(d.hasOwnProperty(r)?n=d[r]:d[r]=n={},y.includes("@language"))c(E)&&(E=E["@value"]),i=t["@language"];else if(y.includes("@index")){const n=p(e,r,"@index")||"@index",o=S.compactIri({activeCtx:e,iri:n,relativeTo:{vocab:!0}});if("@index"===n)i=t["@index"],delete E[o];else{let e;if([i,...e]=k(E[n]||[]),a(i))switch(e.length){case 0:delete E[n];break;case 1:E[n]=e[0];break;default:E[n]=e}else i=null}}else if(y.includes("@id")){const t=S.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}});i=E[t],delete E[t]}else if(y.includes("@type")){const n=S.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}});let o;switch([i,...o]=k(E[n]||[]),o.length){case 0:delete E[n];break;case 1:E[n]=o[0];break;default:E[n]=o}1===Object.keys(E).length&&"@id"in t&&(E=await S.compact({activeCtx:e,activeProperty:r,element:{"@id":t["@id"]},options:h}))}i||(i=S.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}})),A(n,i,E,{propertyIsArray:y.includes("@set")})}else{const e=!h.compactArrays||y.includes("@set")||y.includes("@list")||i(E)&&0===E.length||"@list"===s||"@graph"===s;A(d,r,E,{propertyIsArray:e})}}}else{if((p(e,t,"@container")||[]).includes("@index"))continue;const r=S.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});A(v,r,d)}else{const r=await S.compact({activeCtx:e,activeProperty:t,element:d,options:h});i(r)&&0===r.length||A(v,s,r)}else{const t=await S.compact({activeCtx:e,activeProperty:"@reverse",element:d,options:h});for(const r in t)if(e.mappings.has(r)&&e.mappings.get(r).reverse){const n=t[r],i=(p(e,r,"@container")||[]).includes("@set")||!h.compactArrays;A(v,r,n,{propertyIsArray:i}),delete t[r]}if(Object.keys(t).length>0){const r=S.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});A(v,r,t)}}else{let t=k(d).map((e=>S.compactIri({activeCtx:w,iri:e,relativeTo:{vocab:!0}})));1===t.length&&(t=t[0]);const r=S.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}}),n=(p(e,r,"@container")||[]).includes("@set")&&g(e,1.1)||i(t)&&0===d.length;A(v,r,t,{propertyIsArray:n})}else{let t=k(d).map((t=>S.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:h.base})));1===t.length&&(t=t[0]);v[S.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t}}return v}return r},S.compactIri=({activeCtx:e,iri:t,value:r=null,relativeTo:i={vocab:!1},reverse:a=!1,base:s=null})=>{if(null===t)return t;e.isPropertyTermScoped&&e.previousContext&&(e=e.previousContext);const f=e.getInverse();if(y(t)&&t in f&&"@none"in f[t]&&"@type"in f[t]["@none"]&&"@none"in f[t]["@none"]["@type"])return f[t]["@none"]["@type"]["@none"];if(i.vocab&&t in f){const n=e["@language"]||"@none",i=[];o(r)&&"@index"in r&&!("@graph"in r)&&i.push("@index","@index@set"),o(r)&&"@preserve"in r&&(r=r["@preserve"][0]),l(r)?("@index"in r&&i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r&&i.push("@graph@id","@graph@id@set"),i.push("@graph","@graph@set","@set"),"@index"in r||i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r||i.push("@graph@id","@graph@id@set")):o(r)&&!c(r)&&i.push("@id","@id@set","@type","@set@type");let s="@language",f="@null";if(a)s="@type",f="@reverse",i.push("@set");else if(u(r)){"@index"in r||i.push("@list");const e=r["@list"];if(0===e.length)s="@any",f="@none";else{let t=0===e.length?n:null,r=null;for(let n=0;ne.includes("_")));e&&s.push(e.replace(/^[^_]+_/,"_"))}s.push("@none");const u=e.inverse[t];for(const e of n){if(!(e in u))continue;const t=u[e][i];for(const e of s)if(e in t)return t[e]}return null}(e,t,r,i,s,f);if(null!==d)return d}if(i.vocab&&"@vocab"in e){const r=e["@vocab"];if(0===t.indexOf(r)&&t!==r){const n=t.substr(r.length);if(!e.mappings.has(n))return n}}let d=null;const h=[];let p=e.fastCurieMap;const m=t.length-1;for(let e=0;e=0;--n){const i=h[n],o=i.terms;for(const n of o){const o=n+":"+t.substr(i.iri.length);e.mappings.get(n)._prefix&&(!e.mappings.has(o)||null===r&&e.mappings.get(o)["@id"]===t)&&(null===d||E(o,d)<0)&&(d=o)}}if(null!==d)return d;for(const[r,i]of e.mappings)if(i&&i._prefix&&t.startsWith(r+":"))throw new n(`Absolute IRI "${t}" confused with prefix "${r}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e});if(!i.vocab){if("@base"in e){if(e["@base"]){const r=b(v(s,e["@base"]),t);return w.test(r)?`./${r}`:r}return t}return b(s,t)}return t},S.compactValue=({activeCtx:e,activeProperty:t,value:r,options:n})=>{if(c(r)){const n=p(e,t,"@type"),i=p(e,t,"@language"),o=p(e,t,"@direction"),s=p(e,t,"@container")||[],u="@index"in r&&!s.includes("@index");if(!u&&"@none"!==n){if(r["@type"]===n)return r["@value"];if("@language"in r&&r["@language"]===i&&"@direction"in r&&r["@direction"]===o)return r["@value"];if("@language"in r&&r["@language"]===i)return r["@value"];if("@direction"in r&&r["@direction"]===o)return r["@value"]}const c=Object.keys(r).length,l=1===c||2===c&&"@index"in r&&!u,f="@language"in e,d=a(r["@value"]),h=e.mappings.has(t)&&null===e.mappings.get(t)["@language"];if(l&&"@none"!==n&&(!f||!d||h))return r["@value"];const y={};return u&&(y[S.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=r["@index"]),"@type"in r?y[S.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}})]=S.compactIri({activeCtx:e,iri:r["@type"],relativeTo:{vocab:!0}}):"@language"in r&&(y[S.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:!0}})]=r["@language"]),"@direction"in r&&(y[S.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:!0}})]=r["@direction"]),y[S.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:!0}})]=r["@value"],y}const i=h(e,t,{vocab:!0},n),o=p(e,t,"@type"),s=S.compactIri({activeCtx:e,iri:r["@id"],relativeTo:{vocab:"@vocab"===o},base:n.base});return"@id"===o||"@vocab"===o||"@graph"===i?s:{[S.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]:s}}},9378:e=>{"use strict";const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#",r="http://www.w3.org/2001/XMLSchema#";e.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:t,RDF_LIST:t+"List",RDF_FIRST:t+"first",RDF_REST:t+"rest",RDF_NIL:t+"nil",RDF_TYPE:t+"type",RDF_PLAIN_LITERAL:t+"PlainLiteral",RDF_XML_LITERAL:t+"XMLLiteral",RDF_JSON_LITERAL:t+"JSON",RDF_OBJECT:t+"object",RDF_LANGSTRING:t+"langString",XSD:r,XSD_BOOLEAN:r+"boolean",XSD_DOUBLE:r+"double",XSD_INTEGER:r+"integer",XSD_STRING:r+"string"}},1972:(e,t,r)=>{"use strict";const n=r(9263),i=r(2207),{isArray:o,isObject:a,isString:s,isUndefined:u}=r(7382),{isAbsolute:c,isRelative:l,prependBase:f}=r(470),{handleEvent:d}=r(2246),{REGEX_BCP47:h,REGEX_KEYWORD:p,asArray:y,compareShortestLeast:m}=r(9263),g=new Map,b={};function v(e,t,r,n,i,o){if(null===t||!s(t)||b.isKeyword(t))return t;if(t.match(p))return null;if(n&&n.hasOwnProperty(t)&&!0!==i.get(t)&&b.createTermDefinition({activeCtx:e,localCtx:n,term:t,defined:i,options:o}),(r=r||{}).vocab){const r=e.mappings.get(t);if(null===r)return null;if(a(r)&&"@id"in r)return r["@id"]}const u=t.indexOf(":");if(u>0){const r=t.substr(0,u),a=t.substr(u+1);if("_"===r||0===a.indexOf("//"))return t;n&&n.hasOwnProperty(r)&&b.createTermDefinition({activeCtx:e,localCtx:n,term:r,defined:i,options:o});const s=e.mappings.get(r);if(s&&s._prefix)return s["@id"]+a;if(c(t))return t}if(r.vocab&&"@vocab"in e){t=e["@vocab"]+t}else if(r.base){let r,n;"@base"in e?e["@base"]?(n=f(o.base,e["@base"]),r=f(n,t)):(n=e["@base"],r=t):(n=o.base,r=f(o.base,t)),t=r}return t}function w(e,t){if(!e||"object"!=typeof e||!t||"object"!=typeof t)return e===t;const r=Array.isArray(e);if(r!==Array.isArray(t))return!1;if(r){if(e.length!==t.length)return!1;for(let r=0;r{a(t)&&"@context"in t&&o(t["@context"])&&(t=t["@context"]);if(0===y(t).length)return e;const m=[],g=[({event:e,next:t})=>{m.push(e),t()}];r.eventHandler&&g.push(r.eventHandler);const w=r;r={...r,eventHandler:g};const A=await r.contextResolver.resolve({activeCtx:e,context:t,documentLoader:r.documentLoader,base:r.base});a(A[0].document)&&"boolean"==typeof A[0].document["@propagate"]&&(n=A[0].document["@propagate"]);let k=e;n||k.previousContext||(k=k.clone(),k.previousContext=e);for(const n of A){let{document:o}=n;if(e=k,null===o){if(!u&&0!==Object.keys(e.protected).length)throw new i("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});k=e=b.getInitialContext(r).clone();continue}const y=n.getProcessed(e);if(y){if(w.eventHandler)for(const e of y.events)d({event:e,options:w});k=e=y.context;continue}if(a(o)&&"@context"in o&&(o=o["@context"]),!a(o))throw new i("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:o});k=k.clone();const g=new Map;if("@version"in o){if(1.1!==o["@version"])throw new i("Unsupported JSON-LD version: "+o["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:o});if(e.processingMode&&"json-ld-1.0"===e.processingMode)throw new i("@version: "+o["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:o});k.processingMode="json-ld-1.1",k["@version"]=o["@version"],g.set("@version",!0)}if(k.processingMode=k.processingMode||e.processingMode,"@base"in o){let e=o["@base"];if(null===e||c(e));else{if(!l(e))throw new i('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:o});e=f(k["@base"],e)}k["@base"]=e,g.set("@base",!0)}if("@vocab"in o){const e=o["@vocab"];if(null===e)delete k["@vocab"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});if(!c(e)&&b.processingMode(k,1))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});{const t=v(k,e,{vocab:!0,base:!0},void 0,void 0,r);c(t)||r.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:t}},options:r}),k["@vocab"]=t}}g.set("@vocab",!0)}if("@language"in o){const e=o["@language"];if(null===e)delete k["@language"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:o});e.match(h)||r.eventHandler&&d({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:r}),k["@language"]=e.toLowerCase()}g.set("@language",!0)}if("@direction"in o){const t=o["@direction"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:o});if(null===t)delete k["@direction"];else{if("ltr"!==t&&"rtl"!==t)throw new i('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:o});k["@direction"]=t}g.set("@direction",!0)}if("@propagate"in o){const r=o["@propagate"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if("boolean"!=typeof r)throw new i("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});g.set("@propagate",!0)}if("@import"in o){const n=o["@import"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if(!s(n))throw new i("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const a=await r.contextResolver.resolve({activeCtx:e,context:n,documentLoader:r.documentLoader,base:r.base});if(1!==a.length)throw new i("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const u=a[0].getProcessed(e);if(u)o=u;else{const r=a[0].document;if("@import"in r)throw new i("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const e in r)o.hasOwnProperty(e)||(o[e]=r[e]);a[0].setProcessed(e,o)}g.set("@import",!0)}g.set("@protected",o["@protected"]||!1);for(const e in o)if(b.createTermDefinition({activeCtx:k,localCtx:o,term:e,defined:g,options:r,overrideProtected:u}),a(o[e])&&"@context"in o[e]){const t=o[e]["@context"];let n=!0;if(s(t)){const e=f(r.base,t);p.has(e)?n=!1:p.add(e)}if(n)try{await b.process({activeCtx:k.clone(),localCtx:o[e]["@context"],overrideProtected:!0,options:r,cycles:p})}catch(t){throw new i("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:o[e]["@context"],term:e})}}n.setProcessed(e,{context:k,events:m})}return k},b.createTermDefinition=({activeCtx:e,localCtx:t,term:r,defined:n,options:u,overrideProtected:l=!1})=>{if(n.has(r)){if(n.get(r))return;throw new i("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:r})}let f;if(n.set(r,!1),t.hasOwnProperty(r)&&(f=t[r]),"@type"===r&&a(f)&&"@set"===(f["@container"]||"@set")&&b.processingMode(e,1.1)){const e=["@container","@id","@protected"],n=Object.keys(f);if(0===n.length||n.some((t=>!e.includes(t))))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r})}else{if(b.isKeyword(r))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r});if(r.match(p))return void(u.eventHandler&&d({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:r}},options:u}));if(""===r)throw new i("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const h=e.mappings.get(r);e.mappings.has(r)&&e.mappings.delete(r);let y=!1;if((s(f)||null===f)&&(y=!0,f={"@id":f}),!a(f))throw new i("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const m={};e.mappings.set(r,m),m.reverse=!1;const g=["@container","@id","@language","@reverse","@type"];b.processingMode(e,1.1)&&g.push("@context","@direction","@index","@nest","@prefix","@protected");for(const e in f)if(!g.includes(e))throw new i("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const A=r.indexOf(":");if(m._termHasColon=A>0,"@reverse"in f){if("@id"in f)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in f)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const o=f["@reverse"];if(!s(o))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(o.match(p))return u.eventHandler&&d({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:o}},options:u}),void(h?e.mappings.set(r,h):e.mappings.delete(r));const a=v(e,o,{vocab:!0,base:!1},t,n,u);if(!c(a))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});m["@id"]=a,m.reverse=!0}else if("@id"in f){let o=f["@id"];if(o&&!s(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(null===o)m["@id"]=null;else{if(!b.isKeyword(o)&&o.match(p))return u.eventHandler&&d({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:o}},options:u}),void(h?e.mappings.set(r,h):e.mappings.delete(r));if(o!==r){if(o=v(e,o,{vocab:!0,base:!1},t,n,u),!c(o)&&!b.isKeyword(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(r.match(/(?::[^:])|\//)){if(v(e,r,{vocab:!0,base:!1},t,new Map(n).set(r,!0),u)!==o)throw new i("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t})}m["@id"]=o,m._prefix=y&&!m._termHasColon&&null!==o.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in m))if(m._termHasColon){const i=r.substr(0,A);if(t.hasOwnProperty(i)&&b.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:n,options:u}),e.mappings.has(i)){const t=r.substr(A+1);m["@id"]=e.mappings.get(i)["@id"]+t}else m["@id"]=r}else if("@type"===r)m["@id"]=r;else{if(!("@vocab"in e))throw new i("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:r});m["@id"]=e["@vocab"]+r}if((!0===f["@protected"]||!0===n.get("@protected")&&!1!==f["@protected"])&&(e.protected[r]=!0,m.protected=!0),n.set(r,!0),"@type"in f){let r=f["@type"];if(!s(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if("@json"===r||"@none"===r){if(b.processingMode(e,1))throw new i(`Invalid JSON-LD syntax; an @context @type value must not be "${r}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if("@id"!==r&&"@vocab"!==r){if(r=v(e,r,{vocab:!0,base:!1},t,n,u),!c(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(0===r.indexOf("_:"))throw new i("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}m["@type"]=r}if("@container"in f){const r=s(f["@container"])?[f["@container"]]:f["@container"]||[],n=["@list","@set","@index","@language"];let a=!0;const u=r.includes("@set");if(b.processingMode(e,1.1)){if(n.push("@graph","@id","@type"),r.includes("@list")){if(1!==r.length)throw new i("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(r.includes("@graph")){if(r.some((e=>"@graph"!==e&&"@id"!==e&&"@index"!==e&&"@set"!==e)))throw new i("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else a&=r.length<=(u?2:1);if(r.includes("@type")&&(m["@type"]=m["@type"]||"@id",!["@id","@vocab"].includes(m["@type"])))throw new i("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else a&=!o(f["@container"]),a&=r.length<=1;if(a&=r.every((e=>n.includes(e))),a&=!(u&&r.includes("@list")),!a)throw new i("Invalid JSON-LD syntax; @context @container value must be one of the following: "+n.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(m.reverse&&!r.every((e=>["@index","@set"].includes(e))))throw new i("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});m["@container"]=r}if("@index"in f){if(!("@container"in f)||!m["@container"].includes("@index"))throw new i(`Invalid JSON-LD syntax; @index without @index in @container: "${f["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!s(f["@index"])||0===f["@index"].indexOf("@"))throw new i(`Invalid JSON-LD syntax; @index must expand to an IRI: "${f["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});m["@index"]=f["@index"]}if("@context"in f&&(m["@context"]=f["@context"]),"@language"in f&&!("@type"in f)){let e=f["@language"];if(null!==e&&!s(e))throw new i("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});null!==e&&(e=e.toLowerCase()),m["@language"]=e}if("@prefix"in f){if(r.match(/:|\//))throw new i("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(b.isKeyword(m["@id"]))throw new i("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if("boolean"!=typeof f["@prefix"])throw new i("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t});m._prefix=!0===f["@prefix"]}if("@direction"in f){const e=f["@direction"];if(null!==e&&"ltr"!==e&&"rtl"!==e)throw new i('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});m["@direction"]=e}if("@nest"in f){const e=f["@nest"];if(!s(e)||"@nest"!==e&&0===e.indexOf("@"))throw new i("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});m["@nest"]=e}const k=m["@id"];if("@context"===k||"@preserve"===k)throw new i("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(h&&h.protected&&!l&&(e.protected[r]=!0,m.protected=!0,!w(h,m)))throw new i("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:r})},b.expandIri=(e,t,r,n)=>v(e,t,r,void 0,void 0,n),b.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),r=g.get(t);if(r)return r;const i={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},r=e.fastCurieMap={},n={},i=(e["@language"]||"@none").toLowerCase(),s=e["@direction"],u=e.mappings,c=[...u.keys()].sort(m);for(const e of c){const o=u.get(e);if(null===o)continue;let c=o["@container"]||"@none";if(c=[].concat(c).sort().join(""),null===o["@id"])continue;const l=y(o["@id"]);for(const u of l){let l=t[u];const f=b.isKeyword(u);if(l)f||o._termHasColon||n[u].push(e);else if(t[u]=l={},!f&&!o._termHasColon){n[u]=[e];const t={iri:u,terms:n[u]};u[0]in r?r[u[0]].push(t):r[u[0]]=[t]}if(l[c]||(l[c]={"@language":{},"@type":{},"@any":{}}),l=l[c],a(e,l["@any"],"@none"),o.reverse)a(e,l["@type"],"@reverse");else if("@none"===o["@type"])a(e,l["@any"],"@none"),a(e,l["@language"],"@none"),a(e,l["@type"],"@none");else if("@type"in o)a(e,l["@type"],o["@type"]);else if("@language"in o&&"@direction"in o){const t=o["@language"],r=o["@direction"];a(e,l["@language"],t&&r?`${t}_${r}`.toLowerCase():t?t.toLowerCase():r?`_${r}`:"@null")}else"@language"in o?a(e,l["@language"],(o["@language"]||"@null").toLowerCase()):"@direction"in o?o["@direction"]?a(e,l["@language"],`_${o["@direction"]}`):a(e,l["@language"],"@none"):s?(a(e,l["@language"],`_${s}`),a(e,l["@language"],"@none"),a(e,l["@type"],"@none")):(a(e,l["@language"],i),a(e,l["@language"],"@none"),a(e,l["@type"],"@none"))}}for(const e in r)o(r,e,1);return t},clone:function(){const e={};e.mappings=n.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=n.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone());e.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(e["@base"]=this["@base"]);"@language"in this&&(e["@language"]=this["@language"]);"@vocab"in this&&(e["@vocab"]=this["@vocab"]);return e},revertToPreviousContext:function(){if(!this.previousContext)return this;return this.previousContext.clone()},protected:{}};return 1e4===g.size&&g.clear(),g.set(t,i),i;function o(e,t,r){const n=e[t],i=e[t]={};let a,s;for(const e of n)a=e.iri,s=r>=a.length?"":a[r],s in i?i[s].push(e):i[s]=[e];for(const e in i)""!==e&&o(i,e,r+1)}function a(e,t,r){t.hasOwnProperty(r)||(t[r]=e)}},b.getContextValue=(e,t,r)=>{if(null===t){if("@context"===r)return;return null}if(e.mappings.has(t)){const n=e.mappings.get(t);if(u(r))return n;if(n.hasOwnProperty(r))return n[r]}return"@language"===r&&r in e||"@direction"===r&&r in e?e[r]:"@context"!==r?null:void 0},b.processingMode=(e,t)=>t.toString()>="1.1"?!e.processingMode||e.processingMode>="json-ld-"+t.toString():"json-ld-1.0"===e.processingMode,b.isKeyword=e=>{if(!s(e)||"@"!==e[0])return!1;switch(e){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},6957:(e,t,r)=>{"use strict";const{parseLinkHeader:n,buildHeaders:i}=r(9263),{LINK_HEADER_CONTEXT:o}=r(9378),a=r(2207),s=r(3743),{prependBase:u}=r(470),c=/(^|(\r\n))link:/i;e.exports=({secure:e,headers:t={},xhr:r}={headers:{}})=>{t=i(t);return(new s).wrapLoader((async function i(s){if(0!==s.indexOf("http:")&&0!==s.indexOf("https:"))throw new a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:s});if(e&&0!==s.indexOf("https"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:s});let l;try{l=await function(e,t,r){e=e||XMLHttpRequest;const n=new e;return new Promise(((e,i)=>{n.onload=()=>e(n),n.onerror=e=>i(e),n.open("GET",t,!0);for(const e in r)n.setRequestHeader(e,r[e]);n.send()}))}(r,s,t)}catch(e){throw new a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:s,cause:e})}if(l.status>=400)throw new a("URL could not be dereferenced: "+l.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:s,httpStatusCode:l.status});let f={contextUrl:null,documentUrl:s,document:l.response},d=null;const h=l.getResponseHeader("Content-Type");let p;c.test(l.getAllResponseHeaders())&&(p=l.getResponseHeader("Link"));if(p&&"application/ld+json"!==h){const e=n(p),t=e[o];if(Array.isArray(t))throw new a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:s});t&&(f.contextUrl=t.target),d=e.alternate,d&&"application/ld+json"==d.type&&!(h||"").match(/^application\/(\w*\+)?json$/)&&(f=await i(u(s,d.target)))}return f}))}},2246:(e,t,r)=>{"use strict";const n=r(2207),{isArray:i}=r(7382),{asArray:o}=r(9263),a={};function s({event:e,handlers:t}){let r=!0;for(let o=0;r&&o{r=!0}});else{if("object"!=typeof a)throw new n("Invalid event handler.","jsonld.InvalidEventHandler",{event:e});e.code in a?a[e.code]({event:e,next:()=>{r=!0}}):r=!0}}return r}e.exports=a,a.defaultEventHandler=null,a.setupEventHandler=({options:e={}})=>{const t=[].concat(e.safe?a.safeEventHandler:[],e.eventHandler?o(e.eventHandler):[],a.defaultEventHandler?a.defaultEventHandler:[]);return 0===t.length?null:t},a.handleEvent=({event:e,options:t})=>{s({event:e,handlers:t.eventHandler})};const u=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);a.safeEventHandler=function({event:e,next:t}){if("warning"===e.level&&u.has(e.code))throw new n("Safe mode validation error.","jsonld.ValidationError",{event:e});t()},a.logEventHandler=function({event:e,next:t}){console.log(`EVENT: ${e.message}`,{event:e}),t()},a.logWarningEventHandler=function({event:e,next:t}){"warning"===e.level&&console.warn(`WARNING: ${e.message}`,{event:e}),t()},a.unhandledEventHandler=function({event:e}){throw new n("No handler for event.","jsonld.UnhandledEvent",{event:e})},a.setDefaultEventHandler=function({eventHandler:e}={}){a.defaultEventHandler=e?o(e):null}},4019:(e,t,r)=>{"use strict";const n=r(2207),{isArray:i,isObject:o,isEmptyObject:a,isString:s,isUndefined:u}=r(7382),{isList:c,isValue:l,isGraph:f,isSubject:d}=r(3978),{expandIri:h,getContextValue:p,isKeyword:y,process:m,processingMode:g}=r(1972),{isAbsolute:b}=r(470),{REGEX_BCP47:v,REGEX_KEYWORD:w,addValue:A,asArray:k,getValues:E,validateTypeValue:S}=r(9263),{handleEvent:x}=r(2246),_={};function P({value:e,count:t,options:r}){if(0===t||"@value"in e||"@list"in e||1===t&&"@id"in e){if(r.eventHandler){let n,i;0===t?(n="empty object",i="Dropping empty object."):"@value"in e?(n="object with only @value",i="Dropping object with only @value."):"@list"in e?(n="object with only @list",i="Dropping object with only @list."):1===t&&"@id"in e&&(n="object with only @id",i="Dropping object with only @id."),x({event:{type:["JsonLdEvent"],code:n,level:"warning",message:i,details:{value:e}},options:r})}return null}return e}async function T({activeCtx:e,activeProperty:t,expandedActiveProperty:r,element:f,expandedParent:w,options:E={},insideList:I,typeKey:C,typeScopedContext:N}){const R=Object.keys(f).sort(),M=[];let U;const L=f[C]&&"@json"===h(e,i(f[C])?f[C][0]:f[C],{vocab:!0},{...E,typeExpansion:!0});for(const T of R){let I,C=f[T];if("@context"===T)continue;const R=h(e,T,{vocab:!0},E);if(null===R||!b(R)&&!y(R)){E.eventHandler&&x({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:T,expandedProperty:R}},options:E});continue}if(y(R)){if("@reverse"===r)throw new n("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:C});if(R in w&&"@included"!==R&&"@type"!==R)throw new n("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:R})}if("@id"===R){if(!s(C)){if(!E.isFrame)throw new n('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:C});if(o(C)){if(!a(C))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C})}else{if(!i(C))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C});if(!C.every((e=>s(e))))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C})}}A(w,"@id",k(C).map((t=>{if(s(t)){const r=h(e,t,{base:!0},E);return E.eventHandler&&(null===r?x(null===t?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:t}},options:E}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:E}):b(r)||x({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:t,expandedId:r}},options:E})),r}return t})),{propertyIsArray:E.isFrame});continue}if("@type"===R){o(C)&&(C=Object.fromEntries(Object.entries(C).map((([e,t])=>[h(N,e,{vocab:!0}),k(t).map((e=>h(N,e,{base:!0,vocab:!0},{...E,typeExpansion:!0})))])))),S(C,E.isFrame),A(w,"@type",k(C).map((e=>{if(s(e)){const t=h(N,e,{base:!0,vocab:!0},{...E,typeExpansion:!0});return"@json"===t||b(t)||E.eventHandler&&x({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:e}},options:E}),t}return e})),{propertyIsArray:!!E.isFrame});continue}if("@included"===R&&g(e,1.1)){const r=k(await _.expand({activeCtx:e,activeProperty:t,element:C,options:E}));if(!r.every((e=>d(e))))throw new n("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:C});A(w,"@included",r,{propertyIsArray:!0});continue}if("@graph"===R&&!o(C)&&!i(C))throw new n('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:C});if("@value"===R){U=C,L&&g(e,1.1)?w["@value"]=C:A(w,"@value",C,{propertyIsArray:E.isFrame});continue}if("@language"===R){if(null===C)continue;if(!s(C)&&!E.isFrame)throw new n('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:C});C=k(C).map((e=>s(e)?e.toLowerCase():e));for(const e of C)s(e)&&!e.match(v)&&E.eventHandler&&x({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:E});A(w,"@language",C,{propertyIsArray:E.isFrame});continue}if("@direction"===R){if(!s(C)&&!E.isFrame)throw new n('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:C});C=k(C);for(const e of C)if(s(e)&&"ltr"!==e&&"rtl"!==e)throw new n('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:C});A(w,"@direction",C,{propertyIsArray:E.isFrame});continue}if("@index"===R){if(!s(C))throw new n('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:C});A(w,"@index",C);continue}if("@reverse"===R){if(!o(C))throw new n('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:C});if(I=await _.expand({activeCtx:e,activeProperty:"@reverse",element:C,options:E}),"@reverse"in I)for(const e in I["@reverse"])A(w,e,I["@reverse"][e],{propertyIsArray:!0});let t=w["@reverse"]||null;for(const e in I){if("@reverse"===e)continue;null===t&&(t=w["@reverse"]={}),A(t,e,[],{propertyIsArray:!0});const r=I[e];for(let i=0;i"@id"===e||"@index"===e))){if(I=k(I),E.isFrame||(I=I.filter((e=>null!==P({value:e,count:Object.keys(e).length,options:E})))),0===I.length)continue;I=I.map((e=>({"@graph":k(e)})))}if(j.mappings.has(T)&&j.mappings.get(T).reverse){const e=w["@reverse"]=w["@reverse"]||{};I=k(I);for(let t=0;t"@value"===h(e,t,{vocab:!0},E))))throw new n("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:i});await T({activeCtx:e,activeProperty:t,expandedActiveProperty:r,element:i,expandedParent:w,options:E,insideList:I,typeScopedContext:N,typeKey:C})}}}function I({activeCtx:e,activeProperty:t,value:r,options:n}){if(null==r)return null;const i=h(e,t,{vocab:!0},n);if("@id"===i)return h(e,r,{base:!0},n);if("@type"===i)return h(e,r,{vocab:!0,base:!0},{...n,typeExpansion:!0});const o=p(e,t,"@type");if(("@id"===o||"@graph"===i)&&s(r)){const i=h(e,r,{base:!0},n);return null===i&&r.match(w)&&n.eventHandler&&x({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:n}),{"@id":i}}if("@vocab"===o&&s(r))return{"@id":h(e,r,{vocab:!0,base:!0},n)};if(y(i))return r;const a={};if(o&&!["@id","@vocab","@none"].includes(o))a["@type"]=o;else if(s(r)){const r=p(e,t,"@language");null!==r&&(a["@language"]=r);const n=p(e,t,"@direction");null!==n&&(a["@direction"]=n)}return["boolean","number","string"].includes(typeof r)||(r=r.toString()),a["@value"]=r,a}function O(e,t,r,o){const a=[],u=Object.keys(t).sort();for(const c of u){const u=h(e,c,{vocab:!0},o);let l=t[c];i(l)||(l=[l]);for(const e of l){if(null===e)continue;if(!s(e))throw new n("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t});const i={"@value":e};"@none"!==u&&(c.match(v)||o.eventHandler&&x({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:c}},options:o}),i["@language"]=c.toLowerCase()),r&&(i["@direction"]=r),a.push(i)}}return a}async function B({activeCtx:e,options:t,activeProperty:r,value:o,asGraph:a,indexKey:s,propertyIndex:c}){const d=[],y=Object.keys(o).sort(),g="@type"===s;for(let b of y){if(g){const r=p(e,b,"@context");u(r)||(e=await m({activeCtx:e,localCtx:r,propagate:!1,options:t}))}let y,v=o[b];i(v)||(v=[v]),v=await _.expand({activeCtx:e,activeProperty:r,element:v,options:t,insideList:!1,insideIndex:!0}),y=c?"@none"===b?"@none":I({activeCtx:e,activeProperty:s,value:b,options:t}):h(e,b,{vocab:!0},t),"@id"===s?b=h(e,b,{base:!0},t):g&&(b=y);for(let e of v){if(a&&!f(e)&&(e={"@graph":[e]}),"@type"===s)"@none"===y||(e["@type"]?e["@type"]=[b].concat(e["@type"]):e["@type"]=[b]);else{if(l(e)&&!["@language","@type","@index"].includes(s))throw new n(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${s}".`,"jsonld.SyntaxError",{code:"invalid value object",value:e});c?"@none"!==y&&A(e,c,y,{propertyIsArray:!0,prependValue:!0}):"@none"===y||s in e||(e[s]=b)}d.push(e)}}return d}e.exports=_,_.expand=async({activeCtx:e,activeProperty:t=null,element:r,options:c={},insideList:l=!1,insideIndex:f=!1,typeScopedContext:d=null})=>{if(null==r)return null;if("@default"===t&&(c=Object.assign({},c,{isFrame:!1})),!i(r)&&!o(r))return l||null!==t&&"@graph"!==h(e,t,{vocab:!0},c)?I({activeCtx:e,activeProperty:t,value:r,options:c}):(c.eventHandler&&x({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:r}},options:c}),null);if(i(r)){let n=[];const o=p(e,t,"@container")||[];l=l||o.includes("@list");for(let o=0;o1?n.slice().sort():n:[n];for(const t of i){const r=p(d,t,"@context");u(r)||(e=await m({activeCtx:e,localCtx:r,options:c,propagate:!1}))}}}let O={};await T({activeCtx:e,activeProperty:t,expandedActiveProperty:y,element:r,expandedParent:O,options:c,insideList:l,typeKey:S,typeScopedContext:d}),w=Object.keys(O);let B=w.length;if("@value"in O){if("@type"in O&&("@language"in O||"@direction"in O))throw new n('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:O});let t=B-1;if("@type"in O&&(t-=1),"@index"in O&&(t-=1),"@language"in O&&(t-=1),"@direction"in O&&(t-=1),0!==t)throw new n('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:O});const r=null===O["@value"]?[]:k(O["@value"]),i=E(O,"@type");if(g(e,1.1)&&i.includes("@json")&&1===i.length);else if(0===r.length)c.eventHandler&&x({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:O}},options:c}),O=null;else{if(!r.every((e=>s(e)||a(e)))&&"@language"in O)throw new n("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:O});if(!i.every((e=>b(e)&&!(s(e)&&0===e.indexOf("_:"))||a(e))))throw new n('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:O})}}else if("@type"in O&&!i(O["@type"]))O["@type"]=[O["@type"]];else if("@set"in O||"@list"in O){if(B>1&&(2!==B||!("@index"in O)))throw new n('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:O});"@set"in O&&(O=O["@set"],w=Object.keys(O),B=w.length)}else 1===B&&"@language"in O&&(c.eventHandler&&x({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:O}},options:c}),O=null);return!o(O)||c.keepFreeFloatingNodes||l||null!==t&&"@graph"!==y&&!(p(e,t,"@container")||[]).includes("@graph")||(O=P({value:O,count:B,options:c})),O}},5229:(e,t,r)=>{"use strict";const{isSubjectReference:n}=r(3978),{createMergedNodeMap:i}=r(9233),o={};e.exports=o,o.flatten=e=>{const t=i(e),r=[],o=Object.keys(t).sort();for(let e=0;e{"use strict";const{isKeyword:n}=r(1972),i=r(3978),o=r(7382),a=r(9263),s=r(470),u=r(2207),{createNodeMap:c,mergeNodeMapGraphs:l}=r(9233),f={};function d(e){const t={};for(const r in e)void 0!==e[r]&&(t["@"+r]=[e[r]]);return[t]}function h(e,t,r){for(let n=r.length-1;n>=0;--n){const i=r[n];if(i.graph===t&&i.subject["@id"]===e["@id"])return!0}return!1}function p(e,t,r){const n="@"+r;let i=n in e?e[n][0]:t[r];if("embed"===r)if(!0===i)i="@once";else if(!1===i)i="@never";else if("@always"!==i&&"@never"!==i&&"@link"!==i&&"@first"!==i&&"@last"!==i&&"@once"!==i)throw new u("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e});return i}function y(e){if(!o.isArray(e)||1!==e.length||!o.isObject(e[0]))throw new u("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e});if("@id"in e[0])for(const t of a.asArray(e[0]["@id"]))if(!o.isObject(t)&&!s.isAbsolute(t)||o.isString(t)&&0===t.indexOf("_:"))throw new u("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e});if("@type"in e[0])for(const t of a.asArray(e[0]["@type"]))if(!o.isObject(t)&&!s.isAbsolute(t)&&"@json"!==t||o.isString(t)&&0===t.indexOf("_:"))throw new u("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}function m(e,t,r,s){let u=!0,c=!1;for(const l in r){let f=!1;const d=a.getValues(t,l),h=0===a.getValues(r,l).length;if("@id"===l){if(o.isEmptyObject(r["@id"][0]||{})?f=!0:r["@id"].length>=0&&(f=r["@id"].includes(d[0])),!s.requireAll)return f}else if("@type"===l){if(u=!1,h){if(d.length>0)return!1;f=!0}else if(1===r["@type"].length&&o.isEmptyObject(r["@type"][0]))f=d.length>0;else for(const e of r["@type"])f=!(!o.isObject(e)||!("@default"in e))||(f||d.some((t=>t===e)));if(!s.requireAll)return f}else{if(n(l))continue;{const t=a.getValues(r,l)[0];let n=!1;if(t&&(y([t]),n="@default"in t),u=!1,0===d.length&&n)continue;if(d.length>0&&h)return!1;if(void 0===t){if(d.length>0)return!1;f=!0}else if(i.isList(t)){const r=t["@list"][0];if(i.isList(d[0])){const t=d[0]["@list"];i.isValue(r)?f=t.some((e=>A(r,e))):(i.isSubject(r)||i.isSubjectReference(r))&&(f=t.some((t=>w(e,r,t,s))))}}else f=i.isValue(t)?d.some((e=>A(t,e))):i.isSubjectReference(t)?d.some((r=>w(e,t,r,s))):!!o.isObject(t)&&d.length>0}}if(!f&&s.requireAll)return!1;c=c||f}return u||c}function g(e,t){const r=e.uniqueEmbeds[e.graph],n=r[t],i=n.parent,s=n.property,u={"@id":t};if(o.isArray(i)){for(let e=0;e{const t=Object.keys(r);for(const n of t)n in r&&o.isObject(r[n].parent)&&r[n].parent["@id"]===e&&(delete r[n],c(n))};c(t)}function b(e,t){if(o.isArray(e))return e.map((e=>b(e,t)));if(o.isObject(e)){if("@preserve"in e)return e["@preserve"][0];if(i.isValue(e))return e;if(i.isList(e))return e["@list"]=b(e["@list"],t),e;if("@id"in e){const r=e["@id"];if(t.link.hasOwnProperty(r)){const n=t.link[r].indexOf(e);if(-1!==n)return t.link[r][n];t.link[r].push(e)}else t.link[r]=[e]}for(const r in e)"@id"===r&&t.bnodesToClear.includes(e[r])?delete e["@id"]:e[r]=b(e[r],t)}return e}function v(e,t,r){o.isObject(e)?a.addValue(e,t,r,{propertyIsArray:!0}):e.push(r)}function w(e,t,r,n){if(!("@id"in r))return!1;const i=e.subjects[r["@id"]];return i&&m(e,i,t,n)}function A(e,t){const r=t["@value"],n=t["@type"],i=t["@language"],a=e["@value"]?o.isArray(e["@value"])?e["@value"]:[e["@value"]]:[],s=e["@type"]?o.isArray(e["@type"])?e["@type"]:[e["@type"]]:[],u=e["@language"]?o.isArray(e["@language"])?e["@language"]:[e["@language"]]:[];return 0===a.length&&0===s.length&&0===u.length||!(!a.includes(r)&&!o.isEmptyObject(a[0]))&&(!!(!n&&0===s.length||s.includes(n)||n&&o.isEmptyObject(s[0]))&&!!(!i&&0===u.length||u.includes(i)||i&&o.isEmptyObject(u[0])))}e.exports=f,f.frameMergedOrDefault=(e,t,r)=>{const n={options:r,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},i=new a.IdentifierIssuer("_:b");c(e,n.graphMap,"@default",i),r.merged&&(n.graphMap["@merged"]=l(n.graphMap),n.graph="@merged"),n.subjects=n.graphMap[n.graph];const o=[];return f.frame(n,Object.keys(n.subjects).sort(),t,o),r.pruneBlankNodeIdentifiers&&(r.bnodesToClear=Object.keys(n.bnodeMap).filter((e=>1===n.bnodeMap[e].length))),r.link={},b(o,r)},f.frame=(e,t,r,s,c=null)=>{y(r),r=r[0];const l=e.options,b={embed:p(r,l,"embed"),explicit:p(r,l,"explicit"),requireAll:p(r,l,"requireAll")};e.link.hasOwnProperty(e.graph)||(e.link[e.graph]={});const w=e.link[e.graph],k=function(e,t,r,n){const i={};for(const o of t){const t=e.graphMap[e.graph][o];m(e,t,r,n)&&(i[o]=t)}return i}(e,t,r,b),E=Object.keys(k).sort();for(const y of E){const m=k[y];if(null===c?e.uniqueEmbeds={[e.graph]:{}}:e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{},"@link"===b.embed&&y in w){v(s,c,w[y]);continue}const E={"@id":y};if(0===y.indexOf("_:")&&a.addValue(e.bnodeMap,y,E,{propertyIsArray:!0}),w[y]=E,("@first"===b.embed||"@last"===b.embed)&&e.is11)throw new u("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:r});if(e.embedded||!e.uniqueEmbeds[e.graph].hasOwnProperty(y))if(!e.embedded||"@never"!==b.embed&&!h(m,e.graph,e.subjectStack))if(!e.embedded||"@first"!=b.embed&&"@once"!=b.embed||!e.uniqueEmbeds[e.graph].hasOwnProperty(y)){if("@last"===b.embed&&y in e.uniqueEmbeds[e.graph]&&g(e,y),e.uniqueEmbeds[e.graph][y]={parent:s,property:c},e.subjectStack.push({subject:m,graph:e.graph}),y in e.graphMap){let t=!1,n=null;"@graph"in r?(n=r["@graph"][0],t=!("@merged"===y||"@default"===y),o.isObject(n)||(n={})):(t="@merged"!==e.graph,n={}),t&&f.frame({...e,graph:y,embedded:!1},Object.keys(e.graphMap[y]).sort(),[n],E,"@graph")}"@included"in r&&f.frame({...e,embedded:!1},t,r["@included"],E,"@included");for(const t of Object.keys(m).sort())if(n(t)){if(E[t]=a.clone(m[t]),"@type"===t)for(const t of m["@type"])0===t.indexOf("_:")&&a.addValue(e.bnodeMap,t,E,{propertyIsArray:!0})}else if(!b.explicit||t in r)for(const n of m[t]){const o=t in r?r[t]:d(b);if(i.isList(n)){const o=r[t]&&r[t][0]&&r[t][0]["@list"]?r[t][0]["@list"]:d(b),s={"@list":[]};v(E,t,s);const u=n["@list"];for(const t of u)i.isSubjectReference(t)?f.frame({...e,embedded:!0},[t["@id"]],o,s,"@list"):v(s,"@list",a.clone(t))}else i.isSubjectReference(n)?f.frame({...e,embedded:!0},[n["@id"]],o,E,t):A(o[0],n)&&v(E,t,a.clone(n))}for(const e of Object.keys(r).sort()){if("@type"===e){if(!o.isObject(r[e][0])||!("@default"in r[e][0]))continue}else if(n(e))continue;const t=r[e][0]||{};if(!p(t,l,"omitDefault")&&!(e in E)){let r="@null";"@default"in t&&(r=a.clone(t["@default"])),o.isArray(r)||(r=[r]),E[e]=[{"@preserve":r}]}}for(const t of Object.keys(r["@reverse"]||{}).sort()){const n=r["@reverse"][t];for(const r of Object.keys(e.subjects)){a.getValues(e.subjects[r],t).some((e=>e["@id"]===y))&&(E["@reverse"]=E["@reverse"]||{},a.addValue(E["@reverse"],t,[],{propertyIsArray:!0}),f.frame({...e,embedded:!0},[r],n,E["@reverse"][t],c))}}v(s,c,E),e.subjectStack.pop()}else v(s,c,E);else v(s,c,E)}},f.cleanupNull=(e,t)=>{if(o.isArray(e)){return e.map((e=>f.cleanupNull(e,t))).filter((e=>e))}if("@null"===e)return null;if(o.isObject(e)){if("@id"in e){const r=e["@id"];if(t.link.hasOwnProperty(r)){const n=t.link[r].indexOf(e);if(-1!==n)return t.link[r][n];t.link[r].push(e)}else t.link[r]=[e]}for(const r in e)e[r]=f.cleanupNull(e[r],t)}return e}},3947:(e,t,r)=>{"use strict";const n=r(2207),i=r(3978),o=r(7382),{REGEX_BCP47:a,addValue:s}=r(9263),{handleEvent:u}=r(2246),{RDF_LIST:c,RDF_FIRST:l,RDF_REST:f,RDF_NIL:d,RDF_TYPE:h,RDF_JSON_LITERAL:p,XSD_BOOLEAN:y,XSD_DOUBLE:m,XSD_INTEGER:g,XSD_STRING:b}=r(9378),v={};function w(e,t,r,i){if(e.termType.endsWith("Node"))return{"@id":e.value};const s={"@value":e.value};if(e.language)e.language.match(a)||i.eventHandler&&u({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e.language}},options:i}),s["@language"]=e.language;else{let c=e.datatype.value;if(c||(c=b),c===p){c="@json";try{s["@value"]=JSON.parse(s["@value"])}catch(e){throw new n("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:s["@value"],cause:e})}}if(t){if(c===y)"true"===s["@value"]?s["@value"]=!0:"false"===s["@value"]&&(s["@value"]=!1);else if(o.isNumeric(s["@value"]))if(c===g){const e=parseInt(s["@value"],10);e.toFixed(0)===s["@value"]&&(s["@value"]=e)}else c===m&&(s["@value"]=parseFloat(s["@value"]));[y,g,m,b].includes(c)||(s["@type"]=c)}else if("i18n-datatype"===r&&c.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=c.split(/[#_]/);e.length>0&&(s["@language"]=e,e.match(a)||i.eventHandler&&u({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:i})),s["@direction"]=t}else c!==b&&(s["@type"]=c)}return s}e.exports=v,v.fromRDF=async(e,t)=>{const{useRdfType:r=!1,useNativeTypes:a=!1,rdfDirection:u=null}=t,p={},y={"@default":p},m={};if(u){if("compound-literal"===u)throw new n("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:u});if("i18n-datatype"!==u)throw new n("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:u})}for(const n of e){const e="DefaultGraph"===n.graph.termType?"@default":n.graph.value;e in y||(y[e]={}),"@default"===e||e in p||(p[e]={"@id":e});const i=y[e],o=n.subject.value,c=n.predicate.value,l=n.object;o in i||(i[o]={"@id":o});const f=i[o],g=l.termType.endsWith("Node");if(g&&!(l.value in i)&&(i[l.value]={"@id":l.value}),c===h&&!r&&g){s(f,"@type",l.value,{propertyIsArray:!0});continue}const b=w(l,a,u,t);if(s(f,c,b,{propertyIsArray:!0}),g)if(l.value===d){const e=i[l.value];"usages"in e||(e.usages=[]),e.usages.push({node:f,property:c,value:b})}else l.value in m?m[l.value]=!1:m[l.value]={node:f,property:c,value:b}}for(const e in y){const t=y[e];if(!(d in t))continue;const r=t[d];if(r.usages){for(let e of r.usages){let r=e.node,n=e.property,a=e.value;const s=[],u=[];let d=Object.keys(r).length;for(;n===f&&o.isObject(m[r["@id"]])&&o.isArray(r[l])&&1===r[l].length&&o.isArray(r[f])&&1===r[f].length&&(3===d||4===d&&o.isArray(r["@type"])&&1===r["@type"].length&&r["@type"][0]===c)&&(s.push(r[l][0]),u.push(r["@id"]),e=m[r["@id"]],r=e.node,n=e.property,a=e.value,d=Object.keys(r).length,i.isBlankNode(r)););delete a["@id"],a["@list"]=s.reverse();for(const e of u)delete t[e]}delete r.usages}}const g=[],b=Object.keys(p).sort();for(const e of b){const t=p[e];if(e in y){const r=t["@graph"]=[],n=y[e],o=Object.keys(n).sort();for(const e of o){const t=n[e];i.isSubjectReference(t)||r.push(t)}}i.isSubjectReference(t)||g.push(t)}return g}},3978:(e,t,r)=>{"use strict";const n=r(7382),i={};e.exports=i,i.isSubject=e=>{if(n.isObject(e)&&!("@value"in e||"@set"in e||"@list"in e)){return Object.keys(e).length>1||!("@id"in e)}return!1},i.isSubjectReference=e=>n.isObject(e)&&1===Object.keys(e).length&&"@id"in e,i.isValue=e=>n.isObject(e)&&"@value"in e,i.isList=e=>n.isObject(e)&&"@list"in e,i.isGraph=e=>n.isObject(e)&&"@graph"in e&&1===Object.keys(e).filter((e=>"@id"!==e&&"@index"!==e)).length,i.isSimpleGraph=e=>i.isGraph(e)&&!("@id"in e),i.isBlankNode=e=>{if(n.isObject(e)){if("@id"in e){const t=e["@id"];return!n.isString(t)||0===t.indexOf("_:")}return 0===Object.keys(e).length||!("@value"in e||"@set"in e||"@list"in e)}return!1}},4841:(e,t,r)=>{const n=r(989),i=r(701),o=r(9263),a=r(7034),s=o.IdentifierIssuer,u=r(2207),c=r(9749),l=r(8229),{expand:f}=r(4019),{flatten:d}=r(5229),{fromRDF:h}=r(3947),{toRDF:p}=r(9180),{frameMergedOrDefault:y,cleanupNull:m}=r(7946),{isArray:g,isObject:b,isString:v}=r(7382),{isSubjectReference:w}=r(3978),{expandIri:A,getInitialContext:k,process:E,processingMode:S}=r(1972),{compact:x,compactIri:_}=r(1058),{createNodeMap:P,createMergedNodeMap:T,mergeNodeMaps:I}=r(9233),{logEventHandler:O,logWarningEventHandler:B,safeEventHandler:C,setDefaultEventHandler:N,setupEventHandler:R,strictEventHandler:M,unhandledEventHandler:U}=r(2246),L=function(e){const t={},L=new c({max:100});function j(t,{documentLoader:r=e.documentLoader,...n}){if(t&&"compactionMap"in t)throw new u('"compactionMap" not supported.',"jsonld.OptionsError");if(t&&"expansionMap"in t)throw new u('"expansionMap" not supported.',"jsonld.OptionsError");return Object.assign({},{documentLoader:r},n,t,{eventHandler:R({options:t})})}return e.compact=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(null===r)throw new u("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(null===t)return null;let i;(n=j(n,{base:v(t)?t:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new s("_:b"),contextResolver:new a({sharedCache:L})})).link&&(n.skipExpansion=!0),n.compactToRelative||delete n.base,i=n.skipExpansion?t:await e.expand(t,n);const c=await e.processContext(k(n),r,n);let l=await x({activeCtx:c,element:i,options:n});n.compactArrays&&!n.graph&&g(l)?1===l.length?l=l[0]:0===l.length&&(l={}):n.graph&&b(l)&&(l=[l]),b(r)&&"@context"in r&&(r=r["@context"]),r=o.clone(r),g(r)||(r=[r]);const f=r;r=[];for(let e=0;e0)&&r.push(f[e]);const d=r.length>0;if(1===r.length&&(r=r[0]),g(l)){const e=_({activeCtx:c,iri:"@graph",relativeTo:{vocab:!0}}),t=l;l={},d&&(l["@context"]=r),l[e]=t}else if(b(l)&&d){const e=l;l={"@context":r};for(const t in e)l[t]=e[t]}return l},e.expand=async function(t,r){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");const n={},i=[];if("expandContext"in(r=j(r,{keepFreeFloatingNodes:!1,contextResolver:new a({sharedCache:L})}))){const e=o.clone(r.expandContext);b(e)&&"@context"in e?n.expandContext=e:n.expandContext={"@context":e},i.push(n.expandContext)}let s;if(v(t)){const o=await e.get(t,r);s=o.documentUrl,n.input=o.document,o.contextUrl&&(n.remoteContext={"@context":o.contextUrl},i.push(n.remoteContext))}else n.input=o.clone(t);"base"in r||(r.base=s||"");let u=k(r);for(const e of i)u=await E({activeCtx:u,localCtx:e,options:r});let c=await f({activeCtx:u,element:n.input,options:r});return b(c)&&"@graph"in c&&1===Object.keys(c).length?c=c["@graph"]:null===c&&(c=[]),g(c)||(c=[c]),c},e.flatten=async function(t,r,n){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");r="function"==typeof r?null:r||null,n=j(n,{base:v(t)?t:"",contextResolver:new a({sharedCache:L})});const i=await e.expand(t,n),o=d(i);if(null===r)return o;n.graph=!0,n.skipExpansion=!0;return await e.compact(o,r,n)},e.frame=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(n=j(n,{base:v(t)?t:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new a({sharedCache:L})}),v(r)){const t=await e.get(r,n);if(r=t.document,t.contextUrl){let e=r["@context"];e?g(e)?e.push(t.contextUrl):e=[e,t.contextUrl]:e=t.contextUrl,r["@context"]=e}}const i=r&&r["@context"]||{},o=await e.processContext(k(n),i,n);n.hasOwnProperty("omitGraph")||(n.omitGraph=S(o,1.1)),n.hasOwnProperty("pruneBlankNodeIdentifiers")||(n.pruneBlankNodeIdentifiers=S(o,1.1));const s=await e.expand(t,n),u={...n};u.isFrame=!0,u.keepFreeFloatingNodes=!0;const c=await e.expand(r,u),l=Object.keys(r).map((e=>A(o,e,{vocab:!0})));u.merged=!l.includes("@graph"),u.is11=S(o,1.1);const f=y(s,c,u);u.graph=!n.omitGraph,u.skipExpansion=!0,u.link={},u.framing=!0;let d=await e.compact(f,i,u);return u.link={},d=m(d,u),d},e.link=async function(t,r,n){const i={};return r&&(i["@context"]=r),i["@embed"]="@link",e.frame(t,i,n)},e.normalize=e.canonize=async function(t,r){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if("inputFormat"in(r=j(r,{base:v(t)?t:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new a({sharedCache:L})}))){if("application/n-quads"!==r.inputFormat&&"application/nquads"!==r.inputFormat)throw new u("Unknown canonicalization input format.","jsonld.CanonizeError");const e=l.parse(t);return n.canonize(e,r)}const i={...r};delete i.format,i.produceGeneralizedRdf=!1;const o=await e.toRDF(t,i);return n.canonize(o,r)},e.fromRDF=async function(e,r){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");r=j(r,{format:v(e)?"application/n-quads":void 0});const{format:n}=r;let{rdfParser:i}=r;if(n){if(i=i||t[n],!i)throw new u("Unknown input format.","jsonld.UnknownFormat",{format:n})}else i=()=>e;const o=await i(e);return h(o,r)},e.toRDF=async function(t,r){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");let n;n=(r=j(r,{base:v(t)?t:"",skipExpansion:!1,contextResolver:new a({sharedCache:L})})).skipExpansion?t:await e.expand(t,r);const i=p(n,r);if(r.format){if("application/n-quads"===r.format||"application/nquads"===r.format)return l.serialize(i);throw new u("Unknown output format.","jsonld.UnknownFormat",{format:r.format})}return i},e.createNodeMap=async function(t,r){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");r=j(r,{base:v(t)?t:"",contextResolver:new a({sharedCache:L})});const n=await e.expand(t,r);return T(n,r)},e.merge=async function(t,r,n){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!g(t))throw new TypeError('Could not merge, "docs" must be an array.');r="function"==typeof r?null:r||null,n=j(n,{contextResolver:new a({sharedCache:L})});const i=await Promise.all(t.map((t=>{const r={...n};return e.expand(t,r)})));let u=!0;"mergeNodes"in n&&(u=n.mergeNodes);const c=n.issuer||new s("_:b"),l={"@default":{}};for(let e=0;ee._documentLoader,set:t=>e._documentLoader=t}),e.documentLoader=async e=>{throw new u("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:e})},e.get=async function(t,r){let n;n="function"==typeof r.documentLoader?r.documentLoader:e.documentLoader;const i=await n(t);try{if(!i.document)throw new u("No remote document found at the given URL.","jsonld.NullRemoteDocument");v(i.document)&&(i.document=JSON.parse(i.document))}catch(e){throw new u("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:i})}return i},e.processContext=async function(e,t,r){return r=j(r,{base:"",contextResolver:new a({sharedCache:L})}),null===t?k(r):(t=o.clone(t),b(t)&&"@context"in t||(t={"@context":t}),E({activeCtx:e,localCtx:t,options:r}))},e.getContextValue=r(1972).getContextValue,e.documentLoaders={},e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new u('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,r){t[e]=r},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser("application/n-quads",l.parse),e.registerRDFParser("application/nquads",l.parse),e.url=r(470),e.logEventHandler=O,e.logWarningEventHandler=B,e.safeEventHandler=C,e.setDefaultEventHandler=N,e.strictEventHandler=M,e.unhandledEventHandler=U,e.util=o,Object.assign(e,o),e.promises=e,e.RequestQueue=r(3743),e.JsonLdProcessor=r(5445)(e),i.setupGlobals(e),i.setupDocumentLoaders(e),e},j=function(){return L((function(){return j()}))};L(j),e.exports=j},9233:(e,t,r)=>{"use strict";const{isKeyword:n}=r(1972),i=r(3978),o=r(7382),a=r(9263),s=r(2207),u={};e.exports=u,u.createMergedNodeMap=(e,t)=>{const r=(t=t||{}).issuer||new a.IdentifierIssuer("_:b"),n={"@default":{}};return u.createNodeMap(e,n,"@default",r),u.mergeNodeMaps(n)},u.createNodeMap=(e,t,r,c,l,f)=>{if(o.isArray(e)){for(const n of e)u.createNodeMap(n,t,r,c,void 0,f);return}if(!o.isObject(e))return void(f&&f.push(e));if(i.isValue(e)){if("@type"in e){let t=e["@type"];0===t.indexOf("_:")&&(e["@type"]=t=c.getId(t))}return void(f&&f.push(e))}if(f&&i.isList(e)){const n=[];return u.createNodeMap(e["@list"],t,r,c,l,n),void f.push({"@list":n})}if("@type"in e){const t=e["@type"];for(const e of t)0===e.indexOf("_:")&&c.getId(e)}o.isUndefined(l)&&(l=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"]),f&&f.push({"@id":l});const d=t[r],h=d[l]=d[l]||{};h["@id"]=l;const p=Object.keys(e).sort();for(let o of p){if("@id"===o)continue;if("@reverse"===o){const n={"@id":l},o=e["@reverse"];for(const e in o){const s=o[e];for(const o of s){let s=o["@id"];i.isBlankNode(o)&&(s=c.getId(s)),u.createNodeMap(o,t,r,c,s),a.addValue(d[s],e,n,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if("@graph"===o){l in t||(t[l]={}),u.createNodeMap(e[o],t,l,c);continue}if("@included"===o){u.createNodeMap(e[o],t,r,c);continue}if("@type"!==o&&n(o)){if("@index"===o&&o in h&&(e[o]!==h[o]||e[o]["@id"]!==h[o]["@id"]))throw new s("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:h});h[o]=e[o];continue}const f=e[o];if(0===o.indexOf("_:")&&(o=c.getId(o)),0!==f.length)for(let e of f)if("@type"===o&&(e=0===e.indexOf("_:")?c.getId(e):e),i.isSubject(e)||i.isSubjectReference(e)){if("@id"in e&&!e["@id"])continue;const n=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"];a.addValue(h,o,{"@id":n},{propertyIsArray:!0,allowDuplicate:!1}),u.createNodeMap(e,t,r,c,n)}else if(i.isValue(e))a.addValue(h,o,e,{propertyIsArray:!0,allowDuplicate:!1});else if(i.isList(e)){const n=[];u.createNodeMap(e["@list"],t,r,c,l,n),e={"@list":n},a.addValue(h,o,e,{propertyIsArray:!0,allowDuplicate:!1})}else u.createNodeMap(e,t,r,c,l),a.addValue(h,o,e,{propertyIsArray:!0,allowDuplicate:!1});else a.addValue(h,o,[],{propertyIsArray:!0})}},u.mergeNodeMapGraphs=e=>{const t={};for(const r of Object.keys(e).sort())for(const i of Object.keys(e[r]).sort()){const o=e[r][i];i in t||(t[i]={"@id":i});const s=t[i];for(const e of Object.keys(o).sort())if(n(e)&&"@type"!==e)s[e]=a.clone(o[e]);else for(const t of o[e])a.addValue(s,e,a.clone(t),{propertyIsArray:!0,allowDuplicate:!1})}return t},u.mergeNodeMaps=e=>{const t=e["@default"],r=Object.keys(e).sort();for(const n of r){if("@default"===n)continue;const r=e[n];let o=t[n];o?"@graph"in o||(o["@graph"]=[]):t[n]=o={"@id":n,"@graph":[]};const a=o["@graph"];for(const e of Object.keys(r).sort()){const t=r[e];i.isSubjectReference(t)||a.push(t)}}return t}},701:(e,t,r)=>{"use strict";const n=r(6957),i={};e.exports=i,i.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=n,e.useDocumentLoader("xhr"))},i.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},9180:(e,t,r)=>{"use strict";const{createNodeMap:n}=r(9233),{isKeyword:i}=r(1972),o=r(3978),a=r(2341),s=r(2207),u=r(7382),c=r(9263),{handleEvent:l}=r(2246),{RDF_FIRST:f,RDF_REST:d,RDF_NIL:h,RDF_TYPE:p,RDF_JSON_LITERAL:y,RDF_LANGSTRING:m,XSD_BOOLEAN:g,XSD_DOUBLE:b,XSD_INTEGER:v,XSD_STRING:w}=r(9378),{isAbsolute:A}=r(470),k={};function E(e,t,r,n,o){const a=Object.keys(t).sort();for(const s of a){const a=t[s],u=Object.keys(a).sort();for(let t of u){const u=a[t];if("@type"===t)t=p;else if(i(t))continue;for(const i of u){const a={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!A(s)){o.eventHandler&&l({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:s}},options:o});continue}const u={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!A(t)){o.eventHandler&&l({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:o});continue}if("BlankNode"===u.termType&&!o.produceGeneralizedRdf){o.eventHandler&&l({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:n.getOldIds().find((e=>n.getId(e)===t))}},options:o});continue}const c=S(i,n,e,r,o.rdfDirection,o);c&&e.push({subject:a,predicate:u,object:c,graph:r})}}}}function S(e,t,r,n,i,c){const p={};if(o.isValue(e)){p.termType="Literal",p.value=void 0,p.datatype={termType:"NamedNode"};let t=e["@value"];const r=e["@type"]||null;if("@json"===r)p.value=a(t),p.datatype.value=y;else if(u.isBoolean(t))p.value=t.toString(),p.datatype.value=r||g;else if(u.isDouble(t)||r===b)u.isDouble(t)||(t=parseFloat(t)),p.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),p.datatype.value=r||b;else if(u.isNumber(t))p.value=t.toFixed(0),p.datatype.value=r||v;else if("@direction"in e&&"i18n-datatype"===i){const r=`https://www.w3.org/ns/i18n#${(e["@language"]||"").toLowerCase()}_${e["@direction"]}`;p.datatype.value=r,p.value=t}else{if("@direction"in e&&"compound-literal"===i)throw new s("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:i});if("@direction"in e&&i)throw new s("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:i});"@language"in e?("@direction"in e&&!i&&c.eventHandler&&l({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:p.value}},options:c}),p.value=t,p.datatype.value=r||m,p.language=e["@language"]):("@direction"in e&&!i&&c.eventHandler&&l({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:p.value}},options:c}),p.value=t,p.datatype.value=r||w)}}else if(o.isList(e)){const o=function(e,t,r,n,i,o){const a={termType:"NamedNode",value:f},s={termType:"NamedNode",value:d},u={termType:"NamedNode",value:h},c=e.pop(),l=c?{termType:"BlankNode",value:t.getId()}:u;let p=l;for(const u of e){const e=S(u,t,r,n,i,o),c={termType:"BlankNode",value:t.getId()};r.push({subject:p,predicate:a,object:e,graph:n}),r.push({subject:p,predicate:s,object:c,graph:n}),p=c}if(c){const e=S(c,t,r,n,i,o);r.push({subject:p,predicate:a,object:e,graph:n}),r.push({subject:p,predicate:s,object:u,graph:n})}return l}(e["@list"],t,r,n,i,c);p.termType=o.termType,p.value=o.value}else{const t=u.isObject(e)?e["@id"]:e;p.termType=t.startsWith("_:")?"BlankNode":"NamedNode",p.value=t}return"NamedNode"!==p.termType||A(p.value)?p:(c.eventHandler&&l({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:p.value}},options:c}),null)}e.exports=k,k.toRDF=(e,t)=>{const r=new c.IdentifierIssuer("_:b"),i={"@default":{}};n(e,i,"@default",r);const o=[],a=Object.keys(i).sort();for(const e of a){let n;if("@default"===e)n={termType:"DefaultGraph",value:""};else{if(!A(e)){t.eventHandler&&l({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t});continue}n=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},n.value=e}E(o,i[e],n,r,t)}return o}},7382:e=>{"use strict";const t={};e.exports=t,t.isArray=Array.isArray,t.isBoolean=e=>"boolean"==typeof e||"[object Boolean]"===Object.prototype.toString.call(e),t.isDouble=e=>t.isNumber(e)&&(-1!==String(e).indexOf(".")||Math.abs(e)>=1e21),t.isEmptyObject=e=>t.isObject(e)&&0===Object.keys(e).length,t.isNumber=e=>"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e),t.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),t.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),t.isString=e=>"string"==typeof e||"[object String]"===Object.prototype.toString.call(e),t.isUndefined=e=>void 0===e},470:(e,t,r)=>{"use strict";const n=r(7382),i={};e.exports=i,i.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([a-zA-Z][a-zA-Z0-9+-.]*):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},i.parse=(e,t)=>{const r={},n=i.parsers[t||"full"],o=n.regex.exec(e);let a=n.keys.length;for(;a--;)r[n.keys[a]]=void 0===o[a]?null:o[a];return("https"===r.scheme&&"443"===r.port||"http"===r.scheme&&"80"===r.port)&&(r.href=r.href.replace(":"+r.port,""),r.authority=r.authority.replace(":"+r.port,""),r.port=null),r.normalizedPath=i.removeDotSegments(r.path),r},i.prependBase=(e,t)=>{if(null===e)return t;if(i.isAbsolute(t))return t;e&&!n.isString(e)||(e=i.parse(e||""));const r=i.parse(t),o={protocol:e.protocol||""};if(null!==r.authority)o.authority=r.authority,o.path=r.path,o.query=r.query;else if(o.authority=e.authority,""===r.path)o.path=e.path,null!==r.query?o.query=r.query:o.query=e.query;else{if(0===r.path.indexOf("/"))o.path=r.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1),(t.length>0||e.authority)&&"/"!==t.substr(-1)&&(t+="/"),t+=r.path,o.path=t}o.query=r.query}""!==r.path&&(o.path=i.removeDotSegments(o.path));let a=o.protocol;return null!==o.authority&&(a+="//"+o.authority),a+=o.path,null!==o.query&&(a+="?"+o.query),null!==r.fragment&&(a+="#"+r.fragment),""===a&&(a="./"),a},i.removeBase=(e,t)=>{if(null===e)return t;e&&!n.isString(e)||(e=i.parse(e||""));let r="";if(""!==e.href?r+=(e.protocol||"")+"//"+(e.authority||""):t.indexOf("//")&&(r+="//"),0!==t.indexOf(r))return t;const o=i.parse(t.substr(r.length)),a=e.normalizedPath.split("/"),s=o.normalizedPath.split("/"),u=o.fragment||o.query?0:1;for(;a.length>0&&s.length>u&&a[0]===s[0];)a.shift(),s.shift();let c="";if(a.length>0){a.pop();for(let e=0;e{if(0===e.length)return"";const t=e.split("/"),r=[];for(;t.length>0;){const e=t.shift(),n=0===t.length;"."!==e?".."!==e?r.push(e):(r.pop(),n&&r.push("")):n&&r.push("")}return"/"===e[0]&&r.length>0&&""!==r[0]&&r.unshift(""),1===r.length&&""===r[0]?"/":r.join("/")};const o=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;i.isAbsolute=e=>n.isString(e)&&o.test(e),i.isRelative=e=>n.isString(e)},9263:(e,t,r)=>{"use strict";const n=r(3978),i=r(7382),o=r(989).IdentifierIssuer,a=r(2207),s=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,u=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,c=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,l={accept:"application/ld+json, application/json"},f={};function d(e,t){if(i.isArray(t))for(let r=0;r{if(Object.keys(e).some((e=>"accept"===e.toLowerCase())))throw new RangeError('Accept header may not be specified; only "'+l.accept+'" is supported.');return Object.assign({Accept:l.accept},e)},f.parseLinkHeader=e=>{const t={},r=e.match(s);for(let e=0;e{if(!(i.isString(e)||i.isArray(e)&&e.every((e=>i.isString(e))))){if(t&&i.isObject(e))switch(Object.keys(e).length){case 0:return;case 1:if("@default"in e&&f.asArray(e["@default"]).every((e=>i.isString(e))))return}throw new a('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:e})}},f.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const r=e[t];return!i.isArray(r)||r.length>0}return!1},f.hasValue=(e,t,r)=>{if(f.hasProperty(e,t)){let o=e[t];const a=n.isList(o);if(i.isArray(o)||a){a&&(o=o["@list"]);for(let e=0;e{if("propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1),"valueIsArray"in n||(n.valueIsArray=!1),"allowDuplicate"in n||(n.allowDuplicate=!0),"prependValue"in n||(n.prependValue=!1),n.valueIsArray)e[t]=r;else if(i.isArray(r)){0===r.length&&n.propertyIsArray&&!e.hasOwnProperty(t)&&(e[t]=[]),n.prependValue&&(r=r.concat(e[t]),e[t]=[]);for(let i=0;i[].concat(e[t]||[]),f.removeProperty=(e,t)=>{delete e[t]},f.removeValue=(e,t,r,n)=>{"propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1);const i=f.getValues(e,t).filter((e=>!f.compareValues(e,r)));0===i.length?f.removeProperty(e,t):1!==i.length||n.propertyIsArray?e[t]=i:e[t]=i[0]},f.relabelBlankNodes=(e,t)=>d((t=t||{}).issuer||new o("_:b"),e),f.compareValues=(e,t)=>e===t||(!(!n.isValue(e)||!n.isValue(t)||e["@value"]!==t["@value"]||e["@type"]!==t["@type"]||e["@language"]!==t["@language"]||e["@index"]!==t["@index"])||!!(i.isObject(e)&&"@id"in e&&i.isObject(t)&&"@id"in t)&&e["@id"]===t["@id"]),f.compareShortestLeast=(e,t)=>e.length{"use strict";const n=r(8799),i=Symbol("max"),o=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),d=Symbol("cache"),h=Symbol("updateAgeOnGet"),p=()=>1;const y=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(m(e,t)){if(b(e,n),!e[s])return}else r&&(e[h]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]},g=e=>{if(e[o]>e[i])for(let t=e[f].tail;e[o]>e[i]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[o]-=r.length,e[d].delete(r.key),e[f].removeNode(t)}};class v{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const w=(e,t,r,n)=>{let i=r.value;m(e,i)&&(b(e,r),e[s]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||p;if(this[a]="function"!=typeof t?p:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,g(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,g(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[a]&&(this[a]=e,this[o]=0,this[f].forEach((e=>{e.length=this[a](e.value,e.key),this[o]+=e.length}))),g(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;w(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;w(this,e,r,t),r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[f]=new n,this[o]=0}dump(){return this[f].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){if((r=r||this[u])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,s=this[a](t,e);if(this[d].has(e)){if(s>this[i])return b(this,this[d].get(e)),!1;const a=this[d].get(e).value;return this[c]&&(this[l]||this[c](e,a.value)),a.now=n,a.maxAge=r,a.value=t,this[o]+=s-a.length,a.length=s,this.get(e),g(this),!0}const h=new v(e,t,s,n,r);return h.length>this[i]?(this[c]&&this[c](e,t),!1):(this[o]+=h.length,this[f].unshift(h),this[d].set(e,this[f].head),g(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!m(this,t)}get(e){return y(this,e,!0)}peek(e){return y(this,e,!1)}pop(){const e=this[f].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach(((e,t)=>y(this,t,!1)))}}},7284:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Base=void 0;const i=r(8287),o=n(r(1396));class a{print(){a.print(this)}bufferIndexOf(e,t,r=!1){if(r)return this.binarySearch(e,t,i.Buffer.compare);return this.linearSearch(e,t,((e,t)=>e.equals(t)))}static binarySearch(e,t,r){let n=0,i=e.length-1;for(;n<=i;){const o=Math.floor((n+i)/2),a=r(e[o],t);if(0===a){for(let n=o-1;n>=0;n--)if(0!==r(e[n],t))return n+1;return 0}a<0?n=o+1:i=o-1}return-1}binarySearch(e,t,r){return a.binarySearch(e,t,r)}static linearSearch(e,t,r){for(let n=0;n{const r=e(t);return i.Buffer.isBuffer(r)?r:this.isHexString(r)?i.Buffer.from(r.replace("0x",""),"hex"):"string"==typeof r?i.Buffer.from(r):"bigint"==typeof r?i.Buffer.from(t.toString(16),"hex"):ArrayBuffer.isView(r)?i.Buffer.from(r.buffer,r.byteOffset,r.byteLength):i.Buffer.from(e(o.default.enc.Hex.parse(t.toString("hex"))).toString(o.default.enc.Hex),"hex")}}isHexString(e){return a.isHexString(e)}log2(e){return 1===e?0:1+this.log2(e/2|0)}zip(e,t){return e.map(((e,r)=>[e,t[r]]))}static hexZeroPad(e,t){return"0x"+e.replace("0x","").padStart(t,"0")}}t.Base=a,t.default=a},9655:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IncrementalMerkleTree=void 0;const i=n(r(7284)),o=n(r(2539));class a extends i.default{constructor(e,t){if(super(),this.hashFn=e,t.depth&&(this.depth=t.depth),t.arity&&(this.arity=t.arity),this.depth<1)throw new Error("depth must be greater than 0");if(this.arity<1)throw new Error("arity must be greater than 0");const r=[];let n=t.zeroValue;if(this.zeroValue=n,this.zeroes=[],this.depth)for(let e=0;e=this.getMaxLeaves())throw new Error("tree is full");let t=e,r=this.nodes[0].length;for(let e=0;e=this.nodes[0].length)throw new Error("out of bounds");let r=t;for(let t=0;tBigInt(e)))}getLayers(){const e=[];for(const t of this.nodes)e.push(this.copyList(t));if(e[0].length=e[r].length&&(e[r][t]=this.zeroes[r]);t=Math.floor(t/this.arity)}}return e.push([this.root]),e}getHexLayers(){return this.getLayers().reduce(((e,t)=>(Array.isArray(t)?e.push(t.map((e=>this.bufferToHex(this.bufferify(e))))):e.push(t),e)),[])}getLayersAsObject(){const e=this.getLayers().map((e=>e.map((e=>this.bufferToHex(this.bufferify(e),!1))))),t=[];for(let r=0;r=this.nodes[0].length)throw new Error("The leaf does not exist in this tree");const t=[],r=[],n=e;for(let n=0;n0&&!(e&1<=t));o--);if(n!==r.length)throw new Error("invalid bit calculation");return r}numOfPeaks(e){let t=e,r=0;for(;t>0;)t%2==1&&r++,t>>=1;return r}peakBagging(e,t){const r=this.getSize(e);if(this.numOfPeaks(e)!==t.length)throw new Error("received invalid number of peaks");return 0!==e||t.length?this.peakBaggingFn?this.bufferify(this.peakBaggingFn(r,t)):this.hashFn(i.Buffer.concat([this.bufferify(r),...t.map(this.bufferify)])):i.Buffer.alloc(0)}getSize(e){return(e<<1)-this.numOfPeaks(e)}getRoot(){return this.root}getHexRoot(){return this.bufferToHex(this.getRoot())}getNode(e){return this.hashes[e]}mountainHeight(e){let t=1;for(;1<r;)t-=(1<this.size)throw new Error("out of range");if(!this.isLeaf(e))throw new Error("not a leaf");const t=this.root,r=this.width,n=this.getPeakIndexes(this.width),i=[];let o=0;for(let t=0;t=e&&0===o&&(o=n[t]);let a=0,s=0,u=this.heightAt(o);const c=[];for(;o!==e;)u--,[a,s]=this.getChildren(o),o=e<=a?a:s,c[u-1]=this.hashes[e<=a?s:a];return{root:t,width:r,peakBagging:i,siblings:c}}verify(e,t,r,n,i,o){n=this.bufferify(n);if(this.getSize(t)=r){a=i[e],s=u[e];break}if(!a)throw new Error("target not found");let c=o.length+1;const l=new Array(c);let f,d=0,h=0;for(;c>0&&(l[--c]=s,s!==r);)[d,h]=this.getChildren(s),s=r>d?h:d;for(;cthis.size)throw new Error("out of range");if(!this.hashes[e]){const[t,r]=this.getChildren(e),n=this._getOrCreateNode(t),i=this._getOrCreateNode(r);this.hashes[e]=this.hashBranch(e,n,i)}return this.hashes[e]}}t.MerkleMountainRange=s,"undefined"!=typeof window&&(window.MerkleMountainRange=s),t.default=s},9232:(e,t,r)=>{"use strict";var n=r(8287).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleSumTree=t.ProofStep=t.Leaf=t.Bucket=void 0;const i=r(7284);class o{constructor(e,t){this.size=BigInt(e),this.hashed=t,this.parent=null,this.left=null,this.right=null}}t.Bucket=o;t.Leaf=class{constructor(e,t,r){this.hashFn=e,this.rng=t.map((e=>BigInt(e))),this.data=r}getBucket(){let e;return e=this.data?this.hashFn(this.data):n.alloc(32),new o(BigInt(this.rng[1])-BigInt(this.rng[0]),e)}};class a{constructor(e,t){this.bucket=e,this.right=t}}t.ProofStep=a;class s extends i.Base{constructor(e,t){super(),this.leaves=e,this.hashFn=t,s.checkConsecutive(e),this.buckets=[];for(const t of e)this.buckets.push(t.getBucket());let r=[];for(const e of this.buckets)r.push(e);for(;1!==r.length;){const e=[];for(;r.length;)if(r.length>=2){const t=r.shift(),i=r.shift(),a=t.size+i.size,s=this.hashFn(n.concat([this.sizeToBuffer(t.size),this.bufferify(t.hashed),this.sizeToBuffer(i.size),this.bufferify(i.hashed)])),u=new o(a,s);i.parent=u,t.parent=i.parent,t.right=i,i.left=t,e.push(u)}else e.push(r.shift());r=e}this.root=r[0]}sizeToBuffer(e){const t=n.alloc(8);return new DataView(t.buffer).setBigInt64(0,BigInt(e),!1),t}static checkConsecutive(e){let t=BigInt(0);for(const r of e){if(r.rng[0]!==t)throw new Error("leaf ranges are invalid");t=BigInt(r.rng[1])}}getProof(e){let t=this.buckets[Number(e)];const r=[];for(;t&&t.parent;){const e=!!t.right,n=t.right?t.right:t.left;t=t.parent,r.push(new a(n,e))}return r}sum(e){let t=BigInt(0);for(const r of e)t+=BigInt(r);return t}verifyProof(e,t,r){const i=[this.sum(r.filter((e=>!e.right)).map((e=>e.bucket.size))),BigInt(e.size)-this.sum(r.filter((e=>e.right)).map((e=>e.bucket.size)))];if(i[0]!==t.rng[0]||i[1]!==t.rng[1])return!1;let a,s=t.getBucket();for(const e of r)a=e.right?this.hashFn(n.concat([this.sizeToBuffer(s.size),this.bufferify(s.hashed),this.sizeToBuffer(e.bucket.size),this.bufferify(e.bucket.hashed)])):this.hashFn(n.concat([this.sizeToBuffer(e.bucket.size),this.bufferify(e.bucket.hashed),this.sizeToBuffer(s.size),this.bufferify(s.hashed)])),s=new o(BigInt(s.size)+BigInt(e.bucket.size),a);return s.size===e.size&&s.hashed.toString("hex")===e.hashed.toString("hex")}}t.MerkleSumTree=s,"undefined"!=typeof window&&(window.MerkleSumTree=s),t.default=s},259:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleTree=void 0;const i=r(8287),o=n(r(8924)),a=n(r(3009)),s=n(r(2539)),u=n(r(7284));class c extends u.default{constructor(e,t=a.default,r={}){if(super(),this.duplicateOdd=!1,this.concatenator=i.Buffer.concat,this.hashLeaves=!1,this.isBitcoinTree=!1,this.leaves=[],this.layers=[],this.sortLeaves=!1,this.sortPairs=!1,this.sort=!1,this.fillDefaultHash=null,this.complete=!1,r.complete){if(r.isBitcoinTree)throw new Error('option "complete" is incompatible with "isBitcoinTree"');if(r.duplicateOdd)throw new Error('option "complete" is incompatible with "duplicateOdd"')}if(this.isBitcoinTree=!!r.isBitcoinTree,this.hashLeaves=!!r.hashLeaves,this.sortLeaves=!!r.sortLeaves,this.sortPairs=!!r.sortPairs,this.complete=!!r.complete,r.fillDefaultHash)if("function"==typeof r.fillDefaultHash)this.fillDefaultHash=r.fillDefaultHash;else{if(!i.Buffer.isBuffer(r.fillDefaultHash)&&"string"!=typeof r.fillDefaultHash)throw new Error('method "fillDefaultHash" must be a function, Buffer, or string');this.fillDefaultHash=(e,t)=>r.fillDefaultHash}this.sort=!!r.sort,this.sort&&(this.sortLeaves=!0,this.sortPairs=!0),this.duplicateOdd=!!r.duplicateOdd,r.concatenator&&(this.concatenator=r.concatenator),this.hashFn=this.bufferifyFn(t),this.processLeaves(e)}getOptions(){var e,t;return{complete:this.complete,isBitcoinTree:this.isBitcoinTree,hashLeaves:this.hashLeaves,sortLeaves:this.sortLeaves,sortPairs:this.sortPairs,sort:this.sort,fillDefaultHash:null!==(t=null===(e=this.fillDefaultHash)||void 0===e?void 0:e.toString())&&void 0!==t?t:null,duplicateOdd:this.duplicateOdd}}processLeaves(e){if(this.hashLeaves&&(e=e.map(this.hashFn)),this.leaves=e.map(this.bufferify),this.sortLeaves&&(this.leaves=this.leaves.sort(i.Buffer.compare)),this.fillDefaultHash)for(let e=this.leaves.length;e1;){const t=this.layers.length;this.layers.push([]);const r=this.complete&&1===t&&!Number.isInteger(Math.log2(e.length))?2*e.length-Math.pow(2,Math.ceil(Math.log2(e.length))):e.length;for(let n=0;n=r){this.layers[t].push(...e.slice(r));break}if(n+1===e.length&&e.length%2==1){const r=e[e.length-1];let i=r;if(this.isBitcoinTree){i=this.hashFn(this.concatenator([o.default(r),o.default(r)])),i=o.default(this.hashFn(i)),this.layers[t].push(i);continue}if(!this.duplicateOdd){this.layers[t].push(e[n]);continue}}const a=e[n],s=n+1===e.length?a:e[n+1];let u=null;u=this.isBitcoinTree?[o.default(a),o.default(s)]:[a,s],this.sortPairs&&u.sort(i.Buffer.compare);let c=this.hashFn(this.concatenator(u));this.isBitcoinTree&&(c=o.default(this.hashFn(c))),this.layers[t].push(c)}e=this.layers[t]}}addLeaf(e,t=!1){t&&(e=this.hashFn(e)),this.processLeaves(this.leaves.concat(e))}addLeaves(e,t=!1){t&&(e=e.map(this.hashFn)),this.processLeaves(this.leaves.concat(e))}getLeaves(e){return Array.isArray(e)?(this.hashLeaves&&(e=e.map(this.hashFn),this.sortLeaves&&(e=e.sort(i.Buffer.compare))),this.leaves.filter((t=>-1!==this.bufferIndexOf(e,t,this.sortLeaves)))):this.leaves}getLeaf(e){return e<0||e>this.leaves.length-1?i.Buffer.from([]):this.leaves[e]}getLeafIndex(e){e=this.bufferify(e);const t=this.getLeaves();for(let r=0;rthis.bufferToHex(e)))}static marshalLeaves(e){return JSON.stringify(e.map((e=>c.bufferToHex(e))),null,2)}static unmarshalLeaves(e){let t=null;if("string"==typeof e)t=JSON.parse(e);else{if(!(e instanceof Object))throw new Error("Expected type of string or object");t=e}if(!t)return[];if(!Array.isArray(t))throw new Error("Expected JSON string to be array");return t.map(c.bufferify)}getLayers(){return this.layers}getHexLayers(){return this.layers.reduce(((e,t)=>(Array.isArray(t)?e.push(t.map((e=>this.bufferToHex(e)))):e.push(t),e)),[])}getLayersFlat(){const e=this.layers.reduce(((e,t)=>(Array.isArray(t)?e.unshift(...t):e.unshift(t),e)),[]);return e.unshift(i.Buffer.from([0])),e}getHexLayersFlat(){return this.getLayersFlat().map((e=>this.bufferToHex(e)))}getLayerCount(){return this.getLayers().length}getRoot(){return 0===this.layers.length?i.Buffer.from([]):this.layers[this.layers.length-1][0]||i.Buffer.from([])}getHexRoot(){return this.bufferToHex(this.getRoot())}getProof(e,t){if(void 0===e)throw new Error("leaf is required");e=this.bufferify(e);const r=[];if(!Number.isInteger(t)){t=-1;for(let r=0;rthis.bufferToHex(e.data)))}getProofs(){const e=[];return this.getProofsDFS(this.layers.length-1,0,[],e),e}getProofsDFS(e,t,r,n){const i=t%2;if(-1===e)return void(i||n.push([...r].reverse()));if(t>=this.layers[e].length)return;const o=this.layers[e],a=i?t-1:t+1;let s=!1;athis.bufferToHex(e.data)))}getPositionalHexProof(e,t){return this.getProof(e,t).map((e=>["left"===e.position?0:1,this.bufferToHex(e.data)]))}static marshalProof(e){const t=e.map((e=>"string"==typeof e?e:i.Buffer.isBuffer(e)?c.bufferToHex(e):{position:e.position,data:c.bufferToHex(e.data)}));return JSON.stringify(t,null,2)}static unmarshalProof(e){let t=null;if("string"==typeof e)t=JSON.parse(e);else{if(!(e instanceof Object))throw new Error("Expected type of string or object");t=e}if(!t)return[];if(!Array.isArray(t))throw new Error("Expected JSON string to be array");return t.map((e=>{if("string"==typeof e)return c.bufferify(e);if(e instanceof Object)return{position:e.position,data:c.bufferify(e.data)};throw new Error("Expected item to be of type string or object")}))}static marshalTree(e){const t=e.getHexRoot(),r=e.leaves.map((e=>c.bufferToHex(e))),n=e.getHexLayers(),i=e.getOptions();return JSON.stringify({options:i,root:t,layers:n,leaves:r},null,2)}static unmarshalTree(e,t=a.default,r={}){let n=null;if("string"==typeof e)n=JSON.parse(e);else{if(!(e instanceof Object))throw new Error("Expected type of string or object");n=e}if(!n)throw new Error("could not parse json");return r=Object.assign({},n.options||{},r),new c(n.leaves,t,r)}getProofIndices(e,t){const r=Math.pow(2,t);let n=new Set;for(const t of e){let e=r+t;for(;e>1;)n.add(1^e),e=e/2|0}const i=e.map((e=>r+e)),o=Array.from(n).sort(((e,t)=>e-t)).reverse();n=i.concat(o);const a=new Set,s=[];for(let e of n)if(!a.has(e))for(s.push(e);e>1&&(a.add(e),a.has(1^e));)e=e/2|0;return s.filter((t=>!e.includes(t-r)))}getProofIndicesForUnevenTree(e,t){const r=Math.ceil(Math.log2(t)),n=[];for(let e=0;ee%2==0?e+1:e-1)).filter((e=>!o.includes(e)));const r=n.find((({index:t})=>t===e));r&&o.includes(r.leavesCount-1)&&(t=t.slice(0,-1)),i.push(t),o=[...new Set(o.map((e=>e%2==0?e/2:e%2==0?(e+1)/2:(e-1)/2)))]}return i}getMultiProof(e,t){this.complete||console.warn("Warning: For correct multiProofs it's strongly recommended to set complete: true"),t||(t=e,e=this.getLayersFlat());if(this.isUnevenTree()&&t.every(Number.isInteger))return this.getMultiProofForUnevenTree(t);if(!t.every(Number.isInteger)){let e=t;this.sortPairs&&(e=e.sort(i.Buffer.compare));let r=e.map((e=>this.bufferIndexOf(this.leaves,e,this.sortLeaves))).sort(((e,t)=>e===t?0:e>t?1:-1));if(!r.every((e=>-1!==e)))throw new Error("Element does not exist in Merkle tree");const n=[],o=[];let a=[];for(let e=0;er.indexOf(e)===t)),a=[]}return o.filter((e=>!n.includes(e)))}return this.getProofIndices(t,Math.log2(e.length/2|0)).map((t=>e[t]))}getMultiProofForUnevenTree(e,t){t||(t=e,e=this.getLayers());let r=[],n=t;for(const t of e){const e=[];for(const r of n){if(r%2==0){const i=r+1;if(!n.includes(i)&&t[i]){e.push(t[i]);continue}}const i=r-1;n.includes(i)||!t[i]||e.push(t[i])}r=r.concat(e);const i=new Set;for(const e of n)e%2!=0?e%2!=0?i.add((e-1)/2):i.add((e+1)/2):i.add(e/2);n=Array.from(i)}return r}getHexMultiProof(e,t){return this.getMultiProof(e,t).map((e=>this.bufferToHex(e)))}getProofFlags(e,t){if(!Array.isArray(e)||e.length<=0)throw new Error("Invalid Inputs!");let r;if(r=e.every(Number.isInteger)?[...e].sort(((e,t)=>e===t?0:e>t?1:-1)):e.map((e=>this.bufferIndexOf(this.leaves,e,this.sortLeaves))).sort(((e,t)=>e===t?0:e>t?1:-1)),!r.every((e=>-1!==e)))throw new Error("Element does not exist in Merkle tree");const n=t.map((e=>this.bufferify(e))),i=[],o=[];for(let e=0;e{if(!i.includes(t[r])){const e=this.getPairNode(t,r),a=n.includes(t[r])||n.includes(e);e&&o.push(!a),i.push(t[r]),i.push(e)}return e.push(r/2|0),e}),[])}return o}verify(e,t,r){let n=this.bufferify(t);if(r=this.bufferify(r),!Array.isArray(e)||!t||!r)return!1;for(let t=0;tthis.bufferify(e))),o=o.map((e=>this.bufferify(e)));const s={};for(const[e,n]of this.zip(t,r))s[Math.pow(2,a)+e]=n;for(const[e,r]of this.zip(this.getProofIndices(t,a),o))s[e]=r;let u=Object.keys(s).map((e=>+e)).sort(((e,t)=>e-t));u=u.slice(0,u.length-1);let c=0;for(;c=2&&{}.hasOwnProperty.call(s,1^e)){let t=[s[e-e%2],s[e-e%2+1]];this.sortPairs&&(t=t.sort(i.Buffer.compare));const r=t[1]?this.hashFn(this.concatenator(t)):t[0];s[e/2|0]=r,u.push(e/2|0)}c+=1}return!t.length||{}.hasOwnProperty.call(s,1)&&s[1].equals(e)}verifyMultiProofWithFlags(e,t,r,n){e=this.bufferify(e),t=t.map(this.bufferify),r=r.map(this.bufferify);const o=t.length,a=n.length,s=[];let u=0,c=0,l=0;for(let e=0;ethis.bufferify(e))),i=i.map((e=>this.bufferify(e)));const o=this.calculateRootForUnevenTree(t,r,n,i);return e.equals(o)}getDepth(){return this.getLayers().length-1}getLayersAsObject(){const e=this.getLayers().map((e=>e.map((e=>this.bufferToHex(e,!1))))),t=[];for(let r=0;re-t)),o=i.map((([e])=>e)),a=this.getProofIndicesForUnevenTree(o,r);let s=0;const u=[];for(let e=0;ee-t)).map((([,e])=>e)),r=c[e].map((([e])=>e)),n=[...new Set(r.map((e=>e%2==0?e/2:e%2==0?(e+1)/2:(e-1)/2)))],i=[];for(let e=0;e{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},5606:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&d())}function d(){if(!c){var e=a(f);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l1)for(var r=1;r{e.exports=r(4005)},2985:e=>{"use strict";e.exports=class e{constructor(e,t=new Map,r=0){this.prefix=e,this._existing=t,this.counter=r}clone(){const{prefix:t,_existing:r,counter:n}=this;return new e(t,new Map(r),n)}getId(e){const t=e&&this._existing.get(e);if(t)return t;const r=this.prefix+this.counter;return this.counter++,e&&this._existing.set(e,r),r}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}},3751:(e,t,r)=>{"use strict";r(2791);const n=self.crypto||self.msCrypto;e.exports=class{constructor(e){if(!n||!n.subtle)throw new Error("crypto.subtle not found.");if("sha256"===e)this.algorithm={name:"SHA-256"};else{if("sha1"!==e)throw new Error(`Unsupported algorithm "${e}".`);this.algorithm={name:"SHA-1"}}this._content=""}update(e){this._content+=e}async digest(){const e=(new TextEncoder).encode(this._content),t=new Uint8Array(await n.subtle.digest(this.algorithm,e));let r="";for(let e=0;e{"use strict";const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",r="http://www.w3.org/2001/XMLSchema#string",n="NamedNode",i="BlankNode",o="Literal",a="DefaultGraph",s={};function u(e,t){return e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType&&(e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value&&(e.object.termType!==o||e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value))}(()=>{const e="(?:<([^:]+:[^>]*)>)",t="A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_",r=t+"0-9-·̀-ͯ‿-⁀",n="(_:(?:["+t+"0-9])(?:(?:["+r+".])*(?:["+r+"]))?)",i="[ \\t]+",o="[ \\t]*",a="(?:"+e+"|"+n+")"+i,u=e+i,c="(?:"+e+"|"+n+"|"+('(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:'+("(?:\\^\\^"+e+")")+"|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?)")+")"+o,l="(?:\\.|(?:(?:"+e+"|"+n+")"+o+"\\.))";s.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,s.empty=new RegExp("^"+o+"$"),s.quad=new RegExp("^"+o+a+u+c+l+o+"$")})(),e.exports=class e{static parse(e){const c=[],f={},d=e.split(s.eoln);let h=0;for(const e of d){if(h++,s.empty.test(e))continue;const d=e.match(s.quad);if(null===d)throw new Error("N-Quads parse error on line "+h+".");const p={subject:null,predicate:null,object:null,graph:null};if(void 0!==d[1]?p.subject={termType:n,value:d[1]}:p.subject={termType:i,value:d[2]},p.predicate={termType:n,value:d[3]},void 0!==d[4]?p.object={termType:n,value:d[4]}:void 0!==d[5]?p.object={termType:i,value:d[5]}:(p.object={termType:o,value:void 0,datatype:{termType:n}},void 0!==d[7]?p.object.datatype.value=d[7]:void 0!==d[8]?(p.object.datatype.value=t,p.object.language=d[8]):p.object.datatype.value=r,p.object.value=d[6].replace(l,(function(e,t,r,n){if(t)switch(t){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(r)return String.fromCharCode(parseInt(r,16));if(n)throw new Error("Unsupported U escape")}))),void 0!==d[9]?p.graph={termType:n,value:d[9]}:void 0!==d[10]?p.graph={termType:i,value:d[10]}:p.graph={termType:a,value:""},p.graph.value in f){let e=!0;const t=f[p.graph.value];for(const r of t)if(u(r,p)){e=!1;break}e&&(t.push(p),c.push(p))}else f[p.graph.value]=[p],c.push(p)}return c}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const r=[];for(const n of t)r.push(e.serializeQuad(n));return r.sort().join("")}static serializeQuadComponents(e,o,a,s){let u="";return e.termType===n?u+=`<${e.value}>`:u+=`${e.value}`,u+=` <${o.value}> `,a.termType===n?u+=`<${a.value}>`:a.termType===i?u+=a.value:(u+=`"${function(e){return e.replace(c,(function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}}))}(a.value)}"`,a.datatype.value===t?a.language&&(u+=`@${a.language}`):a.datatype.value!==r&&(u+=`^^<${a.datatype.value}>`)),s.termType===n?u+=` <${s.value}>`:s.termType===i&&(u+=` ${s.value}`),u+=" .\n",u}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const s=[],u={"blank node":i,IRI:n,literal:o};for(const c in e){e[c].forEach((e=>{const l={};for(const i in e){const a=e[i],s={termType:u[a.type],value:a.value};s.termType===o&&(s.datatype={termType:n},"datatype"in a&&(s.datatype.value=a.datatype),"language"in a?("datatype"in a||(s.datatype.value=t),s.language=a.language):"datatype"in a||(s.datatype.value=r)),l[i]=s}l.graph="@default"===c?{termType:a,value:""}:{termType:c.startsWith("_:")?i:n,value:c},s.push(l)}))}return s}};const c=/["\\\n\r]/g;const l=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g},9925:e=>{"use strict";e.exports=class{constructor(e){this.current=e.sort(),this.done=!1,this.dir=new Map;for(let t=0;tn)&&(s&&r>0&&a>e[r-1]||!s&&re[r+1])&&(n=a,i=r)}if(null===n)this.done=!0;else{const r=t.get(n)?i-1:i+1;e[i]=e[r],e[r]=n;for(const r of e)r>n&&t.set(r,!t.get(r))}return r}}},3513:(e,t,r)=>{"use strict";const n=r(2985),i=r(3751),o=r(9925),a=r(1227);function s(e,t){return e.hasht.hash?1:0}e.exports=class{constructor({createMessageDigest:e=()=>new i("sha256"),canonicalIdMap:t=new Map,maxDeepIterations:r=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n",t),this.createMessageDigest=e,this.maxDeepIterations=r,this.quads=null,this.deepIterations=null}async main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];let i=0;for(const e of r)++i%100==0&&await this._yield(),await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const o=[...t.keys()].sort(),u=[];for(const e of o){const r=t.get(e);if(r.length>1){u.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of u){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=await this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const c=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId(e.subject),e.predicate,this._componentWithCanonicalId(e.object),this._componentWithCanonicalId(e.graph));c.push(t)}return c.sort(),c.join("")}async hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=await i.digest(),r.hash}async hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}async hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=await this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));let u=0;for(;s.hasNext();){const e=s.next();++u%3==0&&await this._yield();let n=t.clone(),i="";const o=[];let c=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){c=!0;break}if(!c){for(const e of o){const t=await this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){c=!0;break}}c||(0===a.length||i`}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n)++i%100==0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:"g",id:e,issuer:t,hashToRelated:r})]);return r}async _hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=await this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}async _addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=await this.hashRelatedBlankNode(a,e,i,r),u=o.get(s);u?u.push(a):o.set(s,[a])}_componentWithCanonicalId(e){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}async _yield(){return new Promise((e=>setImmediate(e)))}}},2438:(e,t,r)=>{"use strict";const n=r(2985),i=r(3751),o=r(9925),a=r(1227);function s(e,t){return e.hasht.hash?1:0}e.exports=class{constructor({createMessageDigest:e=()=>new i("sha256"),canonicalIdMap:t=new Map,maxDeepIterations:r=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n",t),this.createMessageDigest=e,this.maxDeepIterations=r,this.quads=null,this.deepIterations=null}main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];for(const e of r)this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const i=[...t.keys()].sort(),o=[];for(const e of i){const r=t.get(e);if(r.length>1){o.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of o){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const u=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId({component:e.subject}),e.predicate,this._componentWithCanonicalId({component:e.object}),this._componentWithCanonicalId({component:e.graph}));u.push(t)}return u.sort(),u.join("")}hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=i.digest(),r.hash}hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));for(;s.hasNext();){const e=s.next();let n=t.clone(),i="";const o=[];let u=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){u=!0;break}if(!u){for(const e of o){const t=this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){u=!0;break}}u||(0===a.length||i`}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n)this._addRelatedBlankNodeHash({quad:i,component:i.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.graph,position:"g",id:e,issuer:t,hashToRelated:r});return r}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}_addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=this.hashRelatedBlankNode(a,e,i,r),u=o.get(s);u?u.push(a):o.set(s,[a])}_componentWithCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}}},3845:(e,t,r)=>{"use strict";const n=r(3751),i=r(3513);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n){let n,a;if("BlankNode"===o.subject.termType&&o.subject.value!==e)a=o.subject.value,n="p";else{if("BlankNode"!==o.object.termType||o.object.value===e)continue;a=o.object.value,n="r"}++i%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(a,o,t,n),u=r.get(s);u?u.push(a):r.set(s,[a])}return r}}},378:(e,t,r)=>{"use strict";const n=r(3751),i=r(2438);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n){let n,o;if("BlankNode"===i.subject.termType&&i.subject.value!==e)o=i.subject.value,n="p";else{if("BlankNode"!==i.object.termType||i.object.value===e)continue;o=i.object.value,n="r"}const a=this.hashRelatedBlankNode(o,i,t,n),s=r.get(a);s?s.push(o):r.set(a,[o])}return r}}},4005:(e,t,r)=>{"use strict";const n=r(3513),i=r(3845),o=r(2438),a=r(378);let s;try{s=r(7789)}catch(e){}function u(e){return Array.isArray(e)?e:t.NQuads.legacyDatasetToQuads(e)}t.NQuads=r(1227),t.IdentifierIssuer=r(2985),t._rdfCanonizeNative=function(e){return e&&(s=e),s},t.canonize=async function(e,t){const r=u(e);if(t.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return new Promise(((e,n)=>s.canonize(r,t,((t,r)=>t?n(t):e(r)))))}if("URDNA2015"===t.algorithm)return new n(t).main(r);if("URGNA2012"===t.algorithm){if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new i(t).main(r)}if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)},t._canonizeSync=function(e,t){const r=u(e);if(t.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return s.canonizeSync(r,t)}if("URDNA2015"===t.algorithm)return new o(t).main(r);if("URGNA2012"===t.algorithm){if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new a(t).main(r)}if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)}},9983:function(e){"use strict";!function(){const t=2147483647;function r(e){const t=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 r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225;const l=new Uint32Array(64);function f(e){let f=0,d=e.length;for(;d>=64;){let h,p,y,m,g,b=r,v=n,w=i,A=o,k=a,E=s,S=u,x=c;for(p=0;p<16;p++)y=f+4*p,l[p]=(255&e[y])<<24|(255&e[y+1])<<16|(255&e[y+2])<<8|255&e[y+3];for(p=16;p<64;p++)h=l[p-2],m=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,h=l[p-15],g=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,l[p]=(m+l[p-7]|0)+(g+l[p-16]|0)|0;for(p=0;p<64;p++)m=(((k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7))+(k&E^~k&S)|0)+(x+(t[p]+l[p]|0)|0)|0,g=((b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10))+(b&v^b&w^v&w)|0,x=S,S=E,E=k,k=A+m|0,A=w,w=v,v=b,b=m+g|0;r=r+b|0,n=n+v|0,i=i+w|0,o=o+A|0,a=a+k|0,s=s+E|0,u=u+S|0,c=c+x|0,f+=64,d-=64}}f(e);let d,h=e.length%64,p=e.length/536870912|0,y=e.length<<3,m=h<56?56:120,g=e.slice(e.length-h,e.length);for(g.push(128),d=h+1;d>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(y>>>24&255),g.push(y>>>16&255),g.push(y>>>8&255),g.push(y>>>0&255),f(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function n(e,t,n){e=e.length<=64?e:r(e);const i=64+t.length+4,o=new Array(i),a=new Array(64);let s,u=[];for(s=0;s<64;s++)o[s]=54;for(s=0;s=i-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;n>=32;)c(),u=u.concat(r(a.concat(r(o)))),n-=32;return n>0&&(c(),u=u.concat(r(a.concat(r(o))).slice(0,n))),u}function i(e,t,r,n,i){let o;for(u(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)s(e,16*o,i,16),a(i,n),u(i,0,e,t+16*o,16);for(o=0;o>>32-t}function a(e,t){u(e,0,t,0,16);for(let e=8;e>0;e-=2)t[4]^=o(t[0]+t[12],7),t[8]^=o(t[4]+t[0],9),t[12]^=o(t[8]+t[4],13),t[0]^=o(t[12]+t[8],18),t[9]^=o(t[5]+t[1],7),t[13]^=o(t[9]+t[5],9),t[1]^=o(t[13]+t[9],13),t[5]^=o(t[1]+t[13],18),t[14]^=o(t[10]+t[6],7),t[2]^=o(t[14]+t[10],9),t[6]^=o(t[2]+t[14],13),t[10]^=o(t[6]+t[2],18),t[3]^=o(t[15]+t[11],7),t[7]^=o(t[3]+t[15],9),t[11]^=o(t[7]+t[3],13),t[15]^=o(t[11]+t[7],18),t[1]^=o(t[0]+t[3],7),t[2]^=o(t[1]+t[0],9),t[3]^=o(t[2]+t[1],13),t[0]^=o(t[3]+t[2],18),t[6]^=o(t[5]+t[4],7),t[7]^=o(t[6]+t[5],9),t[4]^=o(t[7]+t[6],13),t[5]^=o(t[4]+t[7],18),t[11]^=o(t[10]+t[9],7),t[8]^=o(t[11]+t[10],9),t[9]^=o(t[8]+t[11],13),t[10]^=o(t[9]+t[8],18),t[12]^=o(t[15]+t[14],7),t[13]^=o(t[12]+t[15],9),t[14]^=o(t[13]+t[12],13),t[15]^=o(t[14]+t[13],18);for(let r=0;r<16;++r)e[r]+=t[r]}function s(e,t,r,n){for(let i=0;i=256)return!1}return!0}function l(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function f(e,r,o,a,f,d,h){if(o=l(o,"N"),a=l(a,"r"),f=l(f,"p"),d=l(d,"dkLen"),0===o||o&o-1)throw new Error("N must be power of 2");if(o>t/128/a)throw new Error("N too large");if(a>t/128/f)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);let p=n(e,r,128*f*a);const y=new Uint32Array(32*f*a);for(let e=0;eI&&(t=I);for(let e=0;eI&&(t=I);for(let e=0;e>8&255),p.push(y[e]>>16&255),p.push(y[e]>>24&255);const r=n(e,p,d);return h&&h(null,1,r),r}h&&O(B)};if(!h)for(;;){const e=B();if(null!=e)return e}B()}const d={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(s,u){let c=0;a&&a(0),f(e,t,r,n,i,o,(function(e,t,r){if(e)u(e);else if(r)a&&1!==c&&a(1),s(new Uint8Array(r));else if(a&&t!==c)return c=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(f(e,t,r,n,i,o))}};e.exports=d}()},2791:function(e,t,r){var n=r(5606);!function(e){"use strict";if(!e.setImmediate){var t,r,i,o,a,s=1,u={},c=!1,l=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?t=function(e){n.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},t=function(e){i.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(r=l.documentElement,t=function(e){var t=l.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):t=function(e){setTimeout(h,0,e)}:(o="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),t=function(t){e.postMessage(o+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),n=0;n0&&(a.forEach((function(e,t){t>0&&(d+=(e[1]?" ":"│")+" "),f||e[0]!==i||(f=!0)})),d+=e(n,o)+n,s&&("object"!=typeof i||i instanceof Date)&&(d+=": "+i),f&&(d+=" (circular ref.)"),c(d)),!f&&"object"==typeof i){var y=t(i,u);y.forEach((function(e){l=++h===y.length,r(e,i[e],l,p,s,u,c)}))}}var n={asLines:function(e,t,n,i){r(".",e,!1,[],t,"function"!=typeof n&&n,i||n)},asTree:function(e,t,n){var i="";return r(".",e,!1,[],t,n,(function(e){i+=e+"\n"})),i}};return n}()},6450:e=>{var t;self,t=()=>(()=>{var e={81645:(e,t,r)=>{"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.chains=t._getInitializedChains=void 0;var i=n(r(87295)),o=n(r(31227)),a=n(r(40439)),s=n(r(37098)),u=n(r(17687)),c=n(r(49422));function l(e){var t,r,n={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli",11155111:"sepolia"},l={mainnet:i.default,ropsten:o.default,rinkeby:a.default,kovan:s.default,goerli:u.default,sepolia:c.default};if(e)try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),d=f.next();!d.done;d=f.next()){var h=d.value,p=h.name;n[h.chainId.toString()]=p,l[p]=h}}catch(e){t={error:e}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}return l.names=n,l}t._getInitializedChains=l,t.chains=l()},425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1153:r(96561),1559:r(77523),2315:r(83339),2537:r(26769),2565:r(17897),2718:r(62170),2929:r(88436),2930:r(96213),3198:r(25491),3529:r(20070),3540:r(52256),3541:r(21871),3554:r(47225),3607:r(3968),3651:r(29496),3670:r(74290),3675:r(98571),3855:r(64551),3860:r(94300),4345:r(74818),4399:r(68372),5133:r(4759)}},7002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",r(60114)],["homestead",r(62800)],["dao",r(7197)],["tangerineWhistle",r(22302)],["spuriousDragon",r(90716)],["byzantium",r(26985)],["constantinople",r(35993)],["petersburg",r(4064)],["istanbul",r(83166)],["muirGlacier",r(42946)],["berlin",r(20015)],["london",r(61250)],["shanghai",r(5553)],["arrowGlacier",r(51971)],["grayGlacier",r(31088)],["mergeForkIdTransition",r(49347)],["merge",r(88648)]]},3863:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=r(28847)(r(3355)),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=t.CustomChain=void 0;var c,l,f,d,h,p=r(38291),y=r(64628),m=r(33062),g=r(81645),b=r(7002),v=r(425);!function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.xDaiChain="x-dai-chain",e.OptimisticKovan="optimistic-kovan",e.OptimisticEthereum="optimistic-ethereum"}(c=t.CustomChain||(t.CustomChain={})),(h=t.Chain||(t.Chain={}))[h.Mainnet=1]="Mainnet",h[h.Ropsten=3]="Ropsten",h[h.Rinkeby=4]="Rinkeby",h[h.Kovan=42]="Kovan",h[h.Goerli=5]="Goerli",h[h.Sepolia=11155111]="Sepolia",function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london",e.ArrowGlacier="arrowGlacier",e.GrayGlacier="grayGlacier",e.MergeForkIdTransition="mergeForkIdTransition",e.Merge="merge",e.Shanghai="shanghai"}(l=t.Hardfork||(t.Hardfork={})),(d=t.ConsensusType||(t.ConsensusType={})).ProofOfStake="pos",d.ProofOfWork="pow",d.ProofOfAuthority="poa",(f=t.ConsensusAlgorithm||(t.ConsensusAlgorithm={})).Ethash="ethash",f.Clique="clique",f.Casper="casper";var w=function(e){function t(t){var r,n,i,o,a=this;(a=e.call(this)||this)._supportedHardforks=[],a._eips=[],a._customChains=null!==(i=t.customChains)&&void 0!==i?i:[],a._chainParams=a.setChain(t.chain),a.DEFAULT_HARDFORK=null!==(o=a._chainParams.defaultHardfork)&&void 0!==o?o:l.Istanbul;try{for(var s=u(a._chainParams.hardforks),c=s.next();!c.done;c=s.next()){var f=c.value;f.forkHash||(f.forkHash=a._calcForkHash(f.name))}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return a._hardfork=a.DEFAULT_HARDFORK,t.supportedHardforks&&(a._supportedHardforks=t.supportedHardforks),t.hardfork&&a.setHardfork(t.hardfork),t.eips&&a.setEIPs(t.eips),a}return a(t,e),t.custom=function(e,r){var n;void 0===r&&(r={});var i=null!==(n=r.baseChain)&&void 0!==n?n:"mainnet",o=s({},t._getChainParams(i));if(o.name="custom-chain","string"!=typeof e)return new t(s({chain:s(s({},o),e)},r));if(e===c.PolygonMainnet)return t.custom({name:c.PolygonMainnet,chainId:137,networkId:137},r);if(e===c.PolygonMumbai)return t.custom({name:c.PolygonMumbai,chainId:80001,networkId:80001},r);if(e===c.ArbitrumRinkebyTestnet)return t.custom({name:c.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},r);if(e===c.xDaiChain)return t.custom({name:c.xDaiChain,chainId:100,networkId:100},r);if(e===c.OptimisticKovan)return t.custom({name:c.OptimisticKovan,chainId:69,networkId:69},s({hardfork:l.Berlin},r));if(e===c.OptimisticEthereum)return t.custom({name:c.OptimisticEthereum,chainId:10,networkId:10},s({hardfork:l.Berlin},r));throw new Error("Custom chain ".concat(e," not supported"))},t.forCustomChain=function(e,r,n,i){var o=t._getChainParams(e);return new t({chain:s(s({},o),r),hardfork:n,supportedHardforks:i})},t.isSupportedChainId=function(e){var t=(0,g._getInitializedChains)();return Boolean(t.names[e.toString()])},t._getChainParams=function(e,t){var r=(0,g._getInitializedChains)(t);if("number"==typeof e||m.BN.isBN(e)){if(e=e.toString(),r.names[e])return r[r.names[e]];throw new Error("Chain with ID ".concat(e," not supported"))}if(r[e])return r[e];throw new Error("Chain with name ".concat(e," not supported"))},t.prototype.setChain=function(e){var r,n;if("number"==typeof e||"string"==typeof e||m.BN.isBN(e)){var i;i=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map((function(e){return e[0]})):this._customChains,this._chainParams=t._getChainParams(e,i)}else{if("object"!==(0,o.default)(e))throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var a=u(["networkId","genesis","hardforks","bootstrapNodes"]),s=a.next();!s.done;s=a.next()){var c=s.value;if(void 0===e[c])throw new Error("Missing required chain parameter: ".concat(c))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this._chainParams=e}return this._chainParams},t.prototype.setHardfork=function(e){var t,r;if(!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"));var n=!1;try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next())o.value[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}if(!n)throw new Error("Hardfork with name ".concat(e," not supported"))},t.prototype.getHardforkByBlockNumber=function(e,t){var r,n;e=(0,m.toType)(e,m.TypeOutput.BN),t=(0,m.toType)(t,m.TypeOutput.BN);var i,o,a,s=l.Chainstart;try{for(var c=u(this.hardforks()),f=c.next();!f.done;f=c.next()){var d=f.value;if(null!==d.block)e.gte(new m.BN(d.block))&&(s=d.name),t&&d.td&&(t.gte(new m.BN(d.td))?i=d.name:o=a),a=d.name;else if(null!=t&&void 0!==d.td&&null!==d.td&&t.gte(new m.BN(d.td)))return d.name}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}if(t){var h="block number: ".concat(e," (-> ").concat(s,"), ");if(i&&!this.hardforkGteHardfork(s,i)){var p="HF determined by block number is lower than the minimum total difficulty HF";throw h+="total difficulty: ".concat(t," (-> ").concat(i,")"),new Error("".concat(p,": ").concat(h))}if(o&&!this.hardforkGteHardfork(o,s))throw p="Maximum HF determined by total difficulty is lower than the block number HF",h+="total difficulty: ".concat(t," (-> ").concat(o,")"),new Error("".concat(p,": ").concat(h))}return s},t.prototype.setHardforkByBlockNumber=function(e,t){var r=this.getHardforkByBlockNumber(e,t);return this.setHardfork(r),r},t.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"))}else e=this._hardfork;return e},t.prototype._getHardfork=function(e){var t,r,n=this.hardforks();try{for(var i=u(n),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.name===e)return a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}throw new Error("Hardfork ".concat(e," not defined for chain ").concat(this.chainName()))},t.prototype._isSupportedHardfork=function(e){var t,r;if(!(this._supportedHardforks.length>0))return!0;try{for(var n=u(this._supportedHardforks),i=n.next();!i.done;i=n.next())if(e===i.value)return!0}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.setEIPs=function(e){var t,r,n=this;void 0===e&&(e=[]);var i=function(t){if(!(t in v.EIPs))throw new Error("".concat(t," not supported"));var r=o.gteHardfork(v.EIPs[t].minimumHardfork);if(!r)throw new Error("".concat(t," cannot be activated on hardfork ").concat(o.hardfork(),", minimumHardfork: ").concat(r));v.EIPs[t].requiredEIPs&&v.EIPs[t].requiredEIPs.forEach((function(r){if(!e.includes(r)&&!n.isActivatedEIP(r))throw new Error("".concat(t," requires EIP ").concat(r,", but is not included in the EIP list"))}))},o=this;try{for(var a=u(e),s=a.next();!s.done;s=a.next())i(s.value)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}this._eips=e},t.prototype.param=function(e,t){var r,n,i=null;try{for(var o=u(this._eips),a=o.next();!a.done;a=o.next()){var s=a.value;if(null!==(i=this.paramByEIP(e,t,s)))return i}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this.paramByHardfork(e,t,this._hardfork)},t.prototype.paramByHardfork=function(e,t,r){var n,i,o,a;r=this._chooseHardfork(r);var s=null;try{for(var c=u(b.hardforks),l=c.next();!l.done;l=c.next()){var f=l.value;if("eips"in f[1]){var d=f[1].eips;try{for(var h=(o=void 0,u(d)),p=h.next();!p.done;p=h.next()){var y=p.value,m=this.paramByEIP(e,t,y);s=null!==m?m:s}}catch(e){o={error:e}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}else{if(!f[1][e])throw new Error("Topic ".concat(e," not defined"));void 0!==f[1][e][t]&&(s=f[1][e][t].v)}if(f[0]===r)break}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return s},t.prototype.paramByEIP=function(e,t,r){if(!(r in v.EIPs))throw new Error("".concat(r," not supported"));var n=v.EIPs[r];if(!(e in n))throw new Error("Topic ".concat(e," not defined"));return void 0===n[e][t]?null:n[e][t].v},t.prototype.paramByBlock=function(e,t,r){var n=this.activeHardforks(r),i=n[n.length-1].name;return this.paramByHardfork(e,t,i)},t.prototype.isActivatedEIP=function(e){var t,r;if(this.eips().includes(e))return!0;try{for(var n=u(b.hardforks),i=n.next();!i.done;i=n.next()){var o=i.value[1];if(this.gteHardfork(o.name)&&"eips"in o&&o.eips.includes(e))return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.hardforkIsActiveOnBlock=function(e,t,r){var n;void 0===r&&(r={}),t=(0,m.toType)(t,m.TypeOutput.BN);var i=null!==(n=r.onlySupported)&&void 0!==n&&n;e=this._chooseHardfork(e,i);var o=this.hardforkBlockBN(e);return!(!o||!t.gte(o))},t.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},t.prototype.hardforkGteHardfork=function(e,t,r){var n,i;void 0===r&&(r={});var o,a=void 0!==r.onlyActive&&r.onlyActive;e=this._chooseHardfork(e,r.onlySupported),o=a?this.activeHardforks(null,r):this.hardforks();var s=-1,c=-1,l=0;try{for(var f=u(o),d=f.next();!d.done;d=f.next()){var h=d.value;h.name===e&&(s=l),h.name===t&&(c=l),l+=1}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return s>=c&&-1!==c},t.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},t.prototype.hardforkIsActiveOnChain=function(e,t){var r,n,i;void 0===t&&(t={});var o=null!==(i=t.onlySupported)&&void 0!==i&&i;e=this._chooseHardfork(e,o);try{for(var a=u(this.hardforks()),s=a.next();!s.done;s=a.next()){var c=s.value;if(c.name===e&&null!==c.block)return!0}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!1},t.prototype.activeHardforks=function(e,t){var r,n;void 0===t&&(t={});var i=[],o=this.hardforks();try{for(var a=u(o),s=a.next();!s.done;s=a.next()){var c=s.value;if(null!==c.block){if(null!=e&&e0)return r[r.length-1].name;throw new Error("No (supported) active hardfork found")},t.prototype.hardforkBlock=function(e){var t=this.hardforkBlockBN(e);return(0,m.toType)(t,m.TypeOutput.Number)},t.prototype.hardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).block;return null==t?null:new m.BN(t)},t.prototype.hardforkTD=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).td;return null==t?null:new m.BN(t)},t.prototype.isHardforkBlock=function(e,t){e=(0,m.toType)(e,m.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.hardforkBlockBN(t);return!!r&&r.eq(e)},t.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return(0,m.toType)(t,m.TypeOutput.Number)},t.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);return null===t?null:this.hardforks().reduce((function(e,r){var n=new m.BN(r.block);return n.gt(t)&&null===e?n:e}),null)},t.prototype.isNextHardforkBlock=function(e,t){e=(0,m.toType)(e,m.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.nextHardforkBlockBN(t);return null!==r&&r.eq(e)},t.prototype._calcForkHash=function(e){var t,r,n=i.from(this.genesis().hash.substr(2),"hex"),o=i.alloc(0),a=0;try{for(var s=u(this.hardforks()),c=s.next();!c.done;c=s.next()){var l=c.value,f=l.block;if(0!==f&&null!==f&&f!==a){var d=i.from(f.toString(16).padStart(16,"0"),"hex");o=i.concat([o,d])}if(l.name===e)break;null!==f&&(a=f)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}var h=i.concat([n,o]),p=(0,m.intToBuffer)((0,y.buf)(h)>>>0).toString("hex");return"0x".concat(p)},t.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t.block&&void 0===t.td)throw new Error("No fork hash calculation possible for future hardfork");return void 0!==t.forkHash?t.forkHash:this._calcForkHash(e)},t.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},t.prototype.genesis=function(){return this._chainParams.genesis},t.prototype.genesisState=function(){var e,t;switch(this.chainName()){case"mainnet":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/mainnet.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"ropsten":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/ropsten.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"rinkeby":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/rinkeby.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"kovan":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/kovan.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"goerli":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/goerli.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"sepolia":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/sepolia.json'");throw e.code="MODULE_NOT_FOUND",e}()))}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var n=u(this._customChains),i=n.next();!i.done;i=n.next()){var o=i.value;if(o[0].name===this.chainName())return o[1]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return{}},t.prototype.hardforks=function(){return this._chainParams.hardforks},t.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},t.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},t.prototype.hardfork=function(){return this._hardfork},t.prototype.chainId=function(){return(0,m.toType)(this.chainIdBN(),m.TypeOutput.Number)},t.prototype.chainIdBN=function(){return new m.BN(this._chainParams.chainId)},t.prototype.chainName=function(){return this._chainParams.name},t.prototype.networkId=function(){return(0,m.toType)(this.networkIdBN(),m.TypeOutput.Number)},t.prototype.networkIdBN=function(){return new m.BN(this._chainParams.networkId)},t.prototype.eips=function(){return this._eips},t.prototype.consensusType=function(){var e,t,r,n=this.hardfork();try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.type),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.type},t.prototype.consensusAlgorithm=function(){var e,t,r,n=this.hardfork();try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.algorithm),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.algorithm},t.prototype.consensusConfig=function(){var e,t,r,n=this.hardfork();try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus[a[1].consensus.algorithm]),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}if(r)return r;var s=this.consensusAlgorithm();return this._chainParams.consensus[s]},t.prototype.copy=function(){var e=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return e.removeAllListeners(),e},t}(p.EventEmitter);t.default=w},89658:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));function i(e){if(Array.isArray(e)){for(var t=[],r=0,n=0;ne.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function a(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return d(f(e))}function s(e,t){if(e<56)return Uint8Array.from([e+t]);var r=m(e),n=m(t+55+r.length/2);return Uint8Array.from(h(n+r))}function u(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e||0===e.length)return Uint8Array.from([]);var r=c(b(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function c(e){var t,r,n,i,s,u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,n=128===l?Uint8Array.from([]):o(e,1,t),2===t&&n[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:n,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1e.length)throw new Error("invalid RLP: total length is larger than the data");for(i=o(e,r,f);i.length;)s=c(i),u.push(s.data),i=s.remainder;return{data:u,remainder:e.slice(f)}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=i,t.decode=u;var l=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));function f(e){for(var t="",r=0;r=2&&"0"===e[0]&&"x"===e[1]}function b(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return g(e)?h((t="string"!=typeof(r=e)?r:g(r)?r.slice(2):r).length%2?"0".concat(t):t):y(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?h(m(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+(0,n.default)(e))}t.utils={bytesToHex:f,concatBytes:p,hexToBytes:h,utf8ToBytes:y},t.RLP={encode:i,decode:u}},75058:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransaction=void 0;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t}(r(3863)),s=r(33062),u=r(87325),c=function(){function e(e,t){this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=a.Chain.Mainnet,this.DEFAULT_HARDFORK=a.Hardfork.Istanbul;var r=e.nonce,n=e.gasLimit,i=e.to,o=e.value,u=e.data,c=e.v,l=e.r,f=e.s,d=e.type;this._type=new s.BN((0,s.toBuffer)(d)).toNumber(),this.txOptions=t;var h=(0,s.toBuffer)(""===i?"0x":i),p=(0,s.toBuffer)(""===c?"0x":c),y=(0,s.toBuffer)(""===l?"0x":l),m=(0,s.toBuffer)(""===f?"0x":f);this.nonce=new s.BN((0,s.toBuffer)(""===r?"0x":r)),this.gasLimit=new s.BN((0,s.toBuffer)(""===n?"0x":n)),this.to=h.length>0?new s.Address(h):void 0,this.value=new s.BN((0,s.toBuffer)(""===o?"0x":o)),this.data=(0,s.toBuffer)(""===u?"0x":u),this.v=p.length>0?new s.BN(p):void 0,this.r=y.length>0?new s.BN(y):void 0,this.s=m.length>0?new s.BN(m):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0)}return Object.defineProperty(e.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.supports=function(e){return this.activeCapabilities.includes(e)},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.getBaseFee().gt(this.gasLimit)&&t.push("gasLimit is too low. given ".concat(this.gasLimit,", need at least ").concat(this.getBaseFee())),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length},e.prototype.getBaseFee=function(){var e=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this.common.param("gasPrices","txCreation")),e},e.prototype.getDataFee=function(){for(var e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),r=0,n=0;n-1&&this.activeCapabilities.splice(f,1)}return l},e.prototype._getCommon=function(e,t){var r;if(t){var n=new s.BN((0,s.toBuffer)(t));if(e){if(!e.chainIdBN().eq(n)){var i=this._errorMsg("The chain ID does not match the chain ID of Common");throw new Error(i)}return e.copy()}return a.default.isSupportedChainId(n)?new a.default({chain:n,hardfork:this.DEFAULT_HARDFORK}):a.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:n,chainId:n},this.DEFAULT_HARDFORK)}return null!==(r=null==e?void 0:e.copy())&&void 0!==r?r:new a.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},e.prototype._validateCannotExceedMaxInteger=function(e,t,r){var n,i;void 0===t&&(t=256),void 0===r&&(r=!1);try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),u=a.next();!u.done;u=a.next()){var c=o(u.value,2),l=c[0],f=c[1];switch(t){case 64:if(r){if(null==f?void 0:f.gte(s.MAX_UINT64)){var d=this._errorMsg("".concat(l," cannot equal or exceed MAX_UINT64 (2^64-1), given ").concat(f));throw new Error(d)}}else if(null==f?void 0:f.gt(s.MAX_UINT64))throw d=this._errorMsg("".concat(l," cannot exceed MAX_UINT64 (2^64-1), given ").concat(f)),new Error(d);break;case 256:if(r){if(null==f?void 0:f.gte(s.MAX_INTEGER))throw d=this._errorMsg("".concat(l," cannot equal or exceed MAX_INTEGER (2^256-1), given ").concat(f)),new Error(d)}else if(null==f?void 0:f.gt(s.MAX_INTEGER))throw d=this._errorMsg("".concat(l," cannot exceed MAX_INTEGER (2^256-1), given ").concat(f)),new Error(d);break;default:throw d=this._errorMsg("unimplemented bits value"),new Error(d)}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype._getSharedErrorPostfix=function(){var e="";try{e=this.isSigned()?(0,s.bufferToHex)(this.hash()):"not available (unsigned)"}catch(t){e="error"}var t="";try{t=this.isSigned().toString()}catch(t){e="error"}var r="";try{r=this.common.hardfork()}catch(e){r="error"}return"tx type=".concat(this.type," hash=").concat(e," nonce=").concat(this.nonce," value=").concat(this.value," ")+"signed=".concat(t," hf=").concat(r)},e}();t.BaseTransaction=c},660:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,12),i=n[0],o=n[1],a=n[2],u=n[3],c=n[4],l=n[5],f=n[6],d=n[7],h=n[8],p=n[9],y=n[10],m=n[11];return(0,s.validateNoLeadingZeroes)({nonce:o,maxPriorityFeePerGas:a,maxFeePerGas:u,gasLimit:c,value:f,v:p,r:y,s:m}),new t({chainId:new s.BN(i),nonce:o,maxPriorityFeePerGas:a,maxFeePerGas:u,gasLimit:c,to:l,value:f,data:d,accessList:null!=h?h:[],v:void 0!==p?new s.BN(p):void 0,r:y,s:m},r)},t.prototype.getDataFee=function(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;var t=e.prototype.getDataFee.call(this);return t.iaddn(l.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t},t.prototype.getUpfrontCost=function(e){void 0===e&&(e=new s.BN(0));var t=s.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(e)).add(e);return this.gasLimit.mul(t).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,s.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){var e=this.raw();return i.concat([f,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,9),r=i.concat([f,s.rlp.encode(t)]);return e?(0,s.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned()){var e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned()){var t=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(t)}var r=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(c.N_DIV_2)))throw t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid"),new Error(t);var n=this,i=n.v,o=n.r,a=n.s;try{return(0,s.ecrecover)(r,i.addn(27),(0,s.bnToUnpaddedBuffer)(o),(0,s.bnToUnpaddedBuffer)(a))}catch(e){throw t=this._errorMsg("Invalid Signature"),new Error(t)}},t.prototype._processSignature=function(e,r,n){var i=a(a({},this.txOptions),{common:this.common});return t.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(r),s:new s.BN(n)},i)},t.prototype.toJSON=function(){var e=l.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,s.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,s.bnToHex)(this.maxFeePerGas),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype.errorStr=function(){return this._getSharedErrorPostfix()+" maxFeePerGas=".concat(this.maxFeePerGas," maxPriorityFeePerGas=").concat(this.maxPriorityFeePerGas)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(u.BaseTransaction);t.default=d},97613:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,11),i=n[0],o=n[1],a=n[2],u=n[3],c=n[4],l=n[5],f=n[6],d=n[7],h=n[8],p=n[9],y=n[10];return(0,s.validateNoLeadingZeroes)({nonce:o,gasPrice:a,gasLimit:u,value:l,v:h,r:p,s:y}),new t({chainId:new s.BN(i),nonce:o,gasPrice:a,gasLimit:u,to:c,value:l,data:f,accessList:null!=d?d:[],v:void 0!==h?new s.BN(h):void 0,r:p,s:y},r)},t.prototype.getDataFee=function(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;var t=e.prototype.getDataFee.call(this);return t.iaddn(l.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){var e=this.raw();return i.concat([f,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,8),r=i.concat([f,s.rlp.encode(t)]);return e?(0,s.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned()){var e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned()){var t=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(t)}var r=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(c.N_DIV_2)))throw t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid"),new Error(t);var n=this,i=n.yParity,o=n.r,a=n.s;try{return(0,s.ecrecover)(r,i.addn(27),(0,s.bnToUnpaddedBuffer)(o),(0,s.bnToUnpaddedBuffer)(a))}catch(e){throw t=this._errorMsg("Invalid Signature"),new Error(t)}},t.prototype._processSignature=function(e,r,n){var i=a(a({},this.txOptions),{common:this.common});return t.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(r),s:new s.BN(n)},i)},t.prototype.toJSON=function(){var e=l.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype.errorStr=function(){var e,t;return this._getSharedErrorPostfix()+" gasPrice=".concat(this.gasPrice," accessListCount=").concat(null!==(t=null===(e=this.accessList)||void 0===e?void 0:e.length)&&void 0!==t?t:0)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(u.BaseTransaction);t.default=d},42339:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeeMarketEIP1559Transaction=t.TransactionFactory=t.AccessListEIP2930Transaction=t.Transaction=void 0;var o=r(53088);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i(o).default}});var a=r(97613);Object.defineProperty(t,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return i(a).default}});var s=r(89562);Object.defineProperty(t,"TransactionFactory",{enumerable:!0,get:function(){return i(s).default}});var u=r(660);Object.defineProperty(t,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return i(u).default}}),function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)}(r(87325),t)},53088:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,9),i=n[0],o=n[1],a=n[2],u=n[3],c=n[4],l=n[5],f=n[6],d=n[7],h=n[8];return(0,s.validateNoLeadingZeroes)({nonce:i,gasPrice:o,gasLimit:a,value:c,v:f,r:d,s:h}),new t({nonce:i,gasPrice:o,gasLimit:a,to:u,value:c,data:l,v:f,r:d,s:h},r)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){return s.rlp.encode(this.raw())},t.prototype._getMessageToSign=function(){var e=[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(u.Capability.EIP155ReplayProtection)&&(e.push((0,s.toBuffer)(this.common.chainIdBN())),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0))),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0)))),e},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this._getMessageToSign();return e?(0,s.rlphash)(t):t},t.prototype.getDataFee=function(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:e.prototype.getDataFee.call(this),hardfork:this.common.hardfork()}),e.prototype.getDataFee.call(this))},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.rlphash)(this.raw())),this.cache.hash):(0,s.rlphash)(this.raw())},t.prototype.getMessageToVerifySignature=function(){if(!this.isSigned()){var e=this._errorMsg("This transaction is not signed");throw new Error(e)}var t=this._getMessageToSign();return(0,s.rlphash)(t)},t.prototype.getSenderPublicKey=function(){var e,t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2))){var r=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(r)}var n=this,i=n.v,o=n.r,a=n.s;try{return(0,s.ecrecover)(t,i,(0,s.bnToUnpaddedBuffer)(o),(0,s.bnToUnpaddedBuffer)(a),this.supports(u.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch(e){throw r=this._errorMsg("Invalid Signature"),new Error(r)}},t.prototype._processSignature=function(e,r,n){var i=new s.BN(e);this.supports(u.Capability.EIP155ReplayProtection)&&i.iadd(this.common.chainIdBN().muln(2).addn(8));var o=a(a({},this.txOptions),{common:this.common});return t.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:i,r:new s.BN(r),s:new s.BN(n)},o)},t.prototype.toJSON=function(){return{nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype._validateTxV=function(e,t){if(void 0!==e&&e.ltn(37)&&!e.eqn(27)&&!e.eqn(28))throw new Error("Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ".concat(e));var r;if(void 0!==e&&(!t||t.gteHardfork("spuriousDragon"))&&!e.eqn(27)&&!e.eqn(28))if(t){var n=t.chainIdBN().muln(2);if(!e.eq(n.addn(35))&&!e.eq(n.addn(36)))throw new Error("Incompatible EIP155-based V ".concat(e," and chain id ").concat(t.chainIdBN(),". See the Common parameter of the Transaction constructor to set the chain id."))}else{var i;i=e.subn(35).isEven()?35:36,r=e.subn(i).divn(2)}return this._getCommon(t,r)},t.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},t.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned()){var e=this._errorMsg("This transaction is not signed");throw new Error(e)}var t=this.common.gteHardfork("spuriousDragon"),r=this.v,n=this.common.chainIdBN().muln(2);return(r.eq(n.addn(35))||r.eq(n.addn(36)))&&t},t.prototype.errorStr=function(){return this._getSharedErrorPostfix()+" gasPrice=".concat(this.gasPrice)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(c.BaseTransaction);t.default=f},89562:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var i=r(33062),o=r(42339),a=function(){function e(){}return e.fromTxData=function(e,t){if(void 0===t&&(t={}),"type"in e&&void 0!==e.type){var r=new i.BN((0,i.toBuffer)(e.type)).toNumber();if(0===r)return o.Transaction.fromTxData(e,t);if(1===r)return o.AccessListEIP2930Transaction.fromTxData(e,t);if(2===r)return o.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error("Tx instantiation with type ".concat(r," not supported"))}return o.Transaction.fromTxData(e,t)},e.fromSerializedData=function(e,t){if(void 0===t&&(t={}),e[0]<=127){var r=void 0;switch(e[0]){case 1:r=2930;break;case 2:r=1559;break;default:throw new Error("TypedTransaction with ID ".concat(e[0]," unknown"))}return 1559===r?o.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):o.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return o.Transaction.fromSerializedTx(e,t)},e.fromBlockBodyData=function(e,t){if(void 0===t&&(t={}),n.isBuffer(e))return this.fromSerializedData(e,t);if(Array.isArray(e))return o.Transaction.fromValuesArray(e,t);throw new Error("Cannot decode transaction: unknown type input")},e.getTransactionClass=function(e,t){if(void 0===e&&(e=0),0==e||e>=128&&e<=255)return o.Transaction;switch(e){case 1:return o.AccessListEIP2930Transaction;case 2:return o.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID ".concat(e," unknown"))}},e}();t.default=a},87325:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.N_DIV_2=t.isAccessList=t.isAccessListBuffer=t.Capability=void 0;var n,i=r(33062);function o(e){if(0===e.length)return!0;var t=e[0];return!!Array.isArray(t)}(n=t.Capability||(t.Capability={}))[n.EIP155ReplayProtection=155]="EIP155ReplayProtection",n[n.EIP1559FeeMarket=1559]="EIP1559FeeMarket",n[n.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",n[n.EIP2930AccessLists=2930]="EIP2930AccessLists",t.isAccessListBuffer=o,t.isAccessList=function(e){return!o(e)},t.N_DIV_2=new i.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16)},53789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessLists=t.checkMaxInitCodeSize=void 0;var n=r(33062),i=r(87325);t.checkMaxInitCodeSize=function(e,t){if(t>e.param("vm","maxInitCodeSize"))throw new Error("the initcode size of this transaction is too large: it is ".concat(t," while the max is ").concat(e.param("vm","maxInitCodeSize")))};var o=function(){function e(){}return e.getAccessListData=function(e){var t,r;if(e&&(0,i.isAccessList)(e)){t=e;for(var o=[],a=0;a{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(74519)),a=i(r(69721)),s=i(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var u=r(89658),c=r(1243),l=r(86992),f=r(40890),d=r(55803),h=r(21449),p=r(99047),y=r(72560),m=BigInt(0),g=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.KECCAK256_RLP,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h.KECCAK256_NULL;(0,a.default)(this,e),this.nonce=t,this.balance=r,this.storageRoot=n,this.codeHash=i,this._validate()}return(0,s.default)(e,[{key:"_validate",value:function(){if(this.nonce=8?s+=r[u].toUpperCase():s+=r[u];return s},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,p.assertIsBuffer)(e),(0,p.assertIsBuffer)(t),(0,d.bufferToBigInt)(t)===BigInt(0)?n.from((0,c.keccak256)(u.RLP.encode((0,d.bufArrToArr)([e,null])))).slice(-20):n.from((0,c.keccak256)(u.RLP.encode((0,d.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,p.assertIsBuffer)(e),(0,p.assertIsBuffer)(t),(0,p.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");var i=(0,c.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,c.keccak256)(r)]));return(0,d.toBuffer)(i).slice(-20)},t.isValidPrivate=function(e){return l.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,p.assertIsBuffer)(e),64===e.length)try{return l.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return l.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,p.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from(l.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return n.from((0,c.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,p.assertIsBuffer)(e),n.from(l.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,p.assertIsBuffer)(e),64!==e.length&&(e=n.from(l.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){var e=(0,d.zeros)(20);return(0,d.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,p.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=b;var v=new Uint8Array(0);t.accountBodyToSlim=function(e){var t=(0,o.default)(e,4),r=t[0],n=t[1],i=t[2],a=t[3];return[r,n,(0,d.arrToBufArr)(i).equals(h.KECCAK256_RLP)?v:i,(0,d.arrToBufArr)(a).equals(h.KECCAK256_NULL)?v:a]},t.accountBodyToRLP=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:b(e);return(0,d.arrToBufArr)(u.RLP.encode(t))}},78718:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(69721)),a=i(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var s=r(59786),u=r(55803),c=function(){function e(t){if((0,o.default)(this,e),20!==t.length)throw new Error("Invalid address length");this.buf=t}return(0,a.default)(e,[{key:"equals",value:function(e){return this.buf.equals(e.buf)}},{key:"isZero",value:function(){return this.equals(e.zero())}},{key:"isPrecompileOrSystemAddress",value:function(){var e=(0,u.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}},{key:"toString",value:function(){return"0x"+this.buf.toString("hex")}},{key:"toBuffer",value:function(){return n.from(this.buf)}}],[{key:"zero",value:function(){return new e((0,u.zeros)(20))}},{key:"fromString",value:function(t){if(!(0,s.isValidAddress)(t))throw new Error("Invalid address");return new e((0,u.toBuffer)(t))}},{key:"fromPublicKey",value:function(t){if(!n.isBuffer(t))throw new Error("Public key should be Buffer");return new e((0,s.pubToAddress)(t))}},{key:"fromPrivateKey",value:function(t){if(!n.isBuffer(t))throw new Error("Private key should be Buffer");return new e((0,s.privateToAddress)(t))}},{key:"generate",value:function(t,r){if("bigint"!=typeof r)throw new Error("Expected nonce to be a bigint");return new e((0,s.generateAddress)(t.buf,(0,u.bigIntToBuffer)(r)))}},{key:"generate2",value:function(t,r,i){if(!n.isBuffer(r))throw new Error("Expected salt to be a Buffer");if(!n.isBuffer(i))throw new Error("Expected initCode to be a Buffer");return new e((0,s.generateAddress2)(t.buf,r,i))}}]),e}();t.Address=c},77692:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(69721)),a=n(r(58985)),s=n(r(119)),u=n(r(15163)),c=n(r(34650)),l=n(r(21949)),f=n(r(94571));function d(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new h(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function h(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return h=function(e){this.s=e,this.n=e.next},h.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new h(e)}function p(){return(p=(0,f.default)(i.default.mark((function e(t,r,n){var o,a,s,u,c,l,f;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=!1,s=!1,e.prev=2,c=i.default.mark((function e(){var r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=f.value,e.prev=1,!(r.length<2)){e.next=6;break}r.call(t,n),e.next=8;break;case 6:return e.next=8,new Promise((function(e,i){r.call(t,n,(function(t){t?i(t):e()}))}));case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),o=e.t0;case 13:case"end":return e.stop()}}),e,null,[[1,10]])})),l=d(r);case 5:return e.next=7,l.next();case 7:if(!(a=!(f=e.sent).done)){e.next=12;break}return e.delegateYield(c(),"t0",9);case 9:a=!1,e.next=5;break;case 12:e.next=18;break;case 14:e.prev=14,e.t1=e.catch(2),s=!0,u=e.t1;case 18:if(e.prev=18,e.prev=19,!a||null==l.return){e.next=23;break}return e.next=23,l.return();case 23:if(e.prev=23,!s){e.next=26;break}throw u;case 26:return e.finish(23);case 27:return e.finish(18);case 28:if(!o){e.next=30;break}throw o;case 30:case"end":return e.stop()}}),e,null,[[2,14,18,28],[19,,23,27]])})))).apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;var y=function(e){(0,u.default)(i,e);var t,r,n=(t=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,l.default)(t);if(r){var i=(0,l.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,c.default)(this,e)});function i(){return(0,o.default)(this,i),n.apply(this,arguments)}return(0,a.default)(i,[{key:"emit",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i0}},{key:"once",value:function(e,t){var r,n=this;if("function"!=typeof t)throw new TypeError("listener must be a function");return r=t.length>=2?function(i,o){n.removeListener(e,r),t(i,o)}:function(i){n.removeListener(e,r),t(i,r)},n.on(e,r),n}},{key:"first",value:function(e,t){var r,n=null!==(r=this._events[e])&&void 0!==r?r:[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[e]=n=[n]),n.unshift(t),this}},{key:"before",value:function(e,t,r){return this.beforeOrAfter(e,t,r)}},{key:"after",value:function(e,t,r){return this.beforeOrAfter(e,t,r,"after")}},{key:"beforeOrAfter",value:function(e,t,r,n){var i,o,a,s=null!==(i=this._events[e])&&void 0!==i?i:[],u="after"===n?1:0;if("function"!=typeof r)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[e]=s=[s]),a=s.length,o=s.length;o--;)if(s[o]===t){a=o+u;break}return s.splice(a,0,r),this}},{key:"on",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"on",this).call(this,e,t)}},{key:"addListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"addListener",this).call(this,e,t)}},{key:"prependListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"prependListener",this).call(this,e,t)}},{key:"prependOnceListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"prependOnceListener",this).call(this,e,t)}},{key:"removeAllListeners",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"removeAllListeners",this).call(this,e)}},{key:"removeListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"removeListener",this).call(this,e,t)}},{key:"eventNames",value:function(){return(0,s.default)((0,l.default)(i.prototype),"eventNames",this).call(this)}},{key:"listeners",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"listeners",this).call(this,e)}},{key:"listenerCount",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"listenerCount",this).call(this,e)}},{key:"getMaxListeners",value:function(){return(0,s.default)((0,l.default)(i.prototype),"getMaxListeners",this).call(this)}},{key:"setMaxListeners",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"setMaxListeners",this).call(this,e)}}]),i}(r(38291).EventEmitter);t.AsyncEventEmitter=y},55803:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(74519));Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var o=r(99047),a=r(72560);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))},t.intToBuffer=function(e){var r=(0,t.intToHex)(e);return n.from((0,a.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};var s=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function c(e){var r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function l(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,o.assertIsBuffer)(e),u(e)},t.unpadArray=function(e){return(0,o.assertIsArray)(e),u(e)},t.unpadHexString=function(e){return(0,o.assertIsHexString)(e),e=(0,a.stripHexPrefix)(e),"0x"+u(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,a.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,a.padToEven)((0,a.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e1&&void 0!==arguments[1]?arguments[1]:50,r=n.isBuffer(e)?e.toString("hex"):e;return r.length<=t?r:r.slice(0,t)+"…"},t.toUtf8=function(e){if((e=(0,a.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],i=0;i0&&0===a[0])throw new Error("".concat(o," cannot have leading zeroes, received: ").concat(a.toString("hex")))}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!=t?t:[])},t.bigIntToHex=function(e){return"0x"+e.toString(16)},t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(l(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},21449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(29033),i=r(86992);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=i.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},89890:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=function(e){return e.length>0&&16===e[e.length-1]},t.nibblesToBytes=function(e,t){for(var r=0,n=0;n{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var i=r(72560);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}},t.assertIsBuffer=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}},t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}},t.assertIsString=function(e){if("string"!=typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},65907:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=void 0,i(r(21449),t),i(r(44205),t),i(r(59786),t),i(r(78718),t),i(r(1313),t),i(r(65404),t),i(r(55803),t),i(r(62198),t),i(r(89890),t),i(r(77692),t);var o=r(72560);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),i(r(35651),t),i(r(6449),t)},72560:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(3355));function o(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,i.default)(e)));return"0"===e[0]&&"x"===e[1]}function a(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat((0,i.default)(t)));return t.length%2&&(t="0".concat(t)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=o,t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,i.default)(e)));return o(e)?e.slice(2):e},t.padToEven=a,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received ".concat((0,i.default)(e)));return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,i.default)(e),"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,i.default)(t),"'"));return t[!0===r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r0&&e.length!==2+2*t)}},35651:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571)),a=n(r(69721)),s=n(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0;var u=function(){function e(){(0,a.default)(this,e),this.permits=1,this.promiseResolverQueue=[]}var t;return(0,s.default)(e,[{key:"acquire",value:(t=(0,o.default)(i.default.mark((function e(){var t=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.permits>0)){e.next=3;break}return this.permits-=1,e.abrupt("return",Promise.resolve(!0));case 3:return e.abrupt("return",new Promise((function(e){return t.promiseResolverQueue.push(e)})));case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"release",value:function(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;var e=this.promiseResolverQueue.shift();e&&e(!0)}}}]),e}();t.Lock=u},6449:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571));Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;var a=r(37441),s=function(){var e=(0,o.default)(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.default)(t,{headers:{"content-type":"application/json"},type:"json",data:{method:r.method,params:r.params,jsonrpc:"2.0",id:1}});case 2:return n=e.sent,e.abrupt("return",n.result);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.fetchFromProvider=s,t.getProvider=function(e){var t;if("string"==typeof e)return e;if(void 0!==(null==e||null===(t=e.connection)||void 0===t?void 0:t.url))return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},65404:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var i=r(1243),o=r(86992),a=r(55803),s=r(21449),u=r(99047);function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function l(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){var i=o.secp256k1.sign(e,t),a=i.toCompactRawBytes();return{r:n.from(a.slice(0,32)),s:n.from(a.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,i,s){var u=n.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(i,32)],64),f=c(t,s);if(!l(f))throw new Error("Invalid signature v value");var d=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return n.from(d.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!l(c(e,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(r,32),(0,a.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!l(c(e,i)))throw new Error("Invalid signature v value");var o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&((o=n.from(r))[0]|=128),(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(o,32)]))},t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToBigInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=BigInt((0,a.bufferToInt)(i.slice(32,33))>>7),r[0]&=127}return n<27&&(n+=BigInt(27)),{v:n,r:t,s:r}},t.isValidSignature=function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4?arguments[4]:void 0;if(32!==t.length||32!==r.length)return!1;if(!l(c(e,i)))return!1;var o=(0,a.bufferToBigInt)(t),u=(0,a.bufferToBigInt)(r);return!(o===BigInt(0)||o>=s.SECP256K1_ORDER||u===BigInt(0)||u>=s.SECP256K1_ORDER||n&&u>=s.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,u.assertIsBuffer)(e);var t=n.from("Ethereum Signed Message:\n".concat(e.length),"utf-8");return n.from((0,i.keccak256)(n.concat([t,e])))}},62198:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;var n,i=r(55803),o=r(72560);!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(n=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,o.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,i.toBuffer)(e);switch(t){case n.Buffer:return r;case n.BigInt:return(0,i.bufferToBigInt)(r);case n.Number:var a=(0,i.bufferToBigInt)(r);if(a>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(a);case n.PrefixedHexString:return(0,i.bufferToHex)(r);default:throw new Error("unknown outputType")}}}},44205:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},1313:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(74519)),a=i(r(69721)),s=i(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;var u=r(78718),c=r(55803),l=r(62198),f=function(){function e(t,r,n,i){(0,a.default)(this,e),this.index=t,this.validatorIndex=r,this.address=n,this.amount=i}return(0,s.default)(e,[{key:"raw",value:function(){return e.toBufferArray(this)}},{key:"toValue",value:function(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}},{key:"toJSON",value:function(){return{index:(0,c.bigIntToHex)(this.index),validatorIndex:(0,c.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,c.bigIntToHex)(this.amount)}}}],[{key:"fromWithdrawalData",value:function(t){var r=t.index,n=t.validatorIndex,i=t.address,o=t.amount;return new e((0,l.toType)(r,l.TypeOutput.BigInt),(0,l.toType)(n,l.TypeOutput.BigInt),new u.Address((0,l.toType)(i,l.TypeOutput.Buffer)),(0,l.toType)(o,l.TypeOutput.BigInt))}},{key:"fromValuesArray",value:function(t){if(4!==t.length)throw Error("Invalid withdrawalArray length expected=4 actual=".concat(t.length));var r=(0,o.default)(t,4),n=r[0],i=r[1],a=r[2],s=r[3];return e.fromWithdrawalData({index:n,validatorIndex:i,address:a,amount:s})}},{key:"toBufferArray",value:function(e){var t=e.index,r=e.validatorIndex,i=e.address,o=e.amount;return[(0,l.toType)(t,l.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,l.toType)(t,l.TypeOutput.Buffer),(0,l.toType)(r,l.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,l.toType)(r,l.TypeOutput.Buffer),i instanceof u.Address?i.buf:(0,l.toType)(i,l.TypeOutput.Buffer),(0,l.toType)(o,l.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,l.toType)(o,l.TypeOutput.Buffer)]}}]),e}();t.Withdrawal=f},98067:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="abi/5.7.0"},44937:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.defaultAbiCoder=t.AbiCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=r(908),s=r(23694),u=r(64327),c=r(98067),l=r(17316),f=r(49146),d=r(4341),h=r(30024),p=r(53861),y=r(90028),m=r(4522),g=r(88287),b=r(48040),v=r(52010),w=r(60800),A=new u.Logger(c.version),k=new RegExp(/^bytes([0-9]*)$/),E=new RegExp(/^(u?int)([0-9]*)$/),S=function(){function e(t){(0,i.default)(this,e),(0,s.defineReadOnly)(this,"coerceFunc",t||null)}return(0,o.default)(e,[{key:"_getCoder",value:function(e){var t=this;switch(e.baseType){case"address":return new f.AddressCoder(e.name);case"bool":return new h.BooleanCoder(e.name);case"string":return new b.StringCoder(e.name);case"bytes":return new p.BytesCoder(e.name);case"array":return new d.ArrayCoder(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new v.TupleCoder((e.components||[]).map((function(e){return t._getCoder(e)})),e.name);case"":return new m.NullCoder(e.name)}var r=e.type.match(E);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!=0)&&A.throwArgumentError("invalid "+r[1]+" bit length","param",e),new g.NumberCoder(n/8,"int"===r[1],e.name)}if(r=e.type.match(k)){var i=parseInt(r[1]);return(0===i||i>32)&&A.throwArgumentError("invalid bytes length","param",e),new y.FixedBytesCoder(i,e.name)}return A.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new l.Reader(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new l.Writer(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(w.ParamType.from(e))}));return new v.TupleCoder(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&A.throwError("types/values length mismatch",u.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(w.ParamType.from(e))})),i=new v.TupleCoder(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,r){var n=this,i=e.map((function(e){return n._getCoder(w.ParamType.from(e))}));return new v.TupleCoder(i,"_").decode(this._getReader((0,a.arrayify)(t),r))}}]),e}();t.AbiCoder=S;var x=new S;t.defaultAbiCoder=x},17316:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.Writer=t.Reader=t.Coder=void 0,t.checkResultErrors=function(e){var t=[];return function e(r,n){if(Array.isArray(n))for(var i in n){var o=r.slice();o.push(i);try{e(o,n[i])}catch(e){t.push({path:o,error:e})}}}([],e),t};var i=n(r(69721)),o=n(r(58985)),a=r(908),s=r(34952),u=r(23694),c=r(64327),l=r(98067),f=new c.Logger(l.version),d=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.type=r,this.localName=n,this.dynamic=o}return(0,o.default)(e,[{key:"_throwError",value:function(e,t){f.throwArgumentError(e,this.localName,t)}}]),e}();t.Coder=d;var h=function(){function e(t){(0,i.default)(this,e),(0,u.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData((0,a.concat)(e._data))}},{key:"writeBytes",value:function(e){var t=(0,a.arrayify)(e),r=t.length%this.wordSize;return r&&(t=(0,a.concat)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=(0,a.arrayify)(s.BigNumber.from(e));return t.length>this.wordSize&&f.throwError("value out-of-bounds",c.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,a.concat)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}();t.Writer=h;var p=function(){function e(t,r,n,o){(0,i.default)(this,e),(0,u.defineReadOnly)(this,"_data",(0,a.arrayify)(t)),(0,u.defineReadOnly)(this,"wordSize",r||32),(0,u.defineReadOnly)(this,"_coerceFunc",n),(0,u.defineReadOnly)(this,"allowLoose",o),this._offset=0}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:f.throwError("data out-of-bounds",c.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return s.BigNumber.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}();t.Reader=p},49146:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=r(77921),l=r(908),f=function(e){(0,a.default)(f,e);var t,r,n=(t=f,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function f(e){return(0,i.default)(this,f),n.call(this,"address","address",e,!1)}return(0,o.default)(f,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=(0,c.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return(0,c.getAddress)((0,l.hexZeroPad)(e.readValue().toHexString(),20))}}]),f}(r(17316).Coder);t.AddressCoder=f},58090:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e){var t;return(0,i.default)(this,c),(t=n.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,t}return(0,o.default)(c,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),c}(r(17316).Coder);t.AnonymousCoder=c},4341:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=void 0,t.pack=y,t.unpack=m;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=n(r(3355)),l=r(64327),f=r(98067),d=r(17316),h=r(58090),p=new l.Logger(f.version);function y(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===(0,c.default)(r)){var i={};n=t.map((function(e){var t=e.localName;return t||p.throwError("cannot encode object for signature with missing names",l.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]&&p.throwError("cannot encode object for signature with duplicate names",l.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]=!0,r[t]}))}else p.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&p.throwArgumentError("types/value length mismatch","tuple",r);var o=new d.Writer(e.wordSize),a=new d.Writer(e.wordSize),s=[];return t.forEach((function(e,t){var r=n[t];if(e.dynamic){var i=a.length;e.encode(a,r);var u=o.writeUpdatableValue();s.push((function(e){u(e+i)}))}else e.encode(o,r)})),s.forEach((function(e){e(o.length)})),e.appendWriter(o)+e.appendWriter(a)}function m(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var i=null;if(t.dynamic){var o=e.readValue(),a=n.subReader(o.toNumber());try{i=t.decode(a)}catch(e){if(e.code===l.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===l.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));var i=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===i[n]&&("length"===n&&(n="_length"),null==r[n])){var o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw o}}):r[n]=o}}));for(var o=function(e){var t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:function(){throw t}})},a=0;a=0?t:"")+"]",s=-1===t||e.dynamic;return(o=n.call(this,"array",a,r,s)).coder=e,o.length=t,o}return(0,o.default)(c,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&p.throwError("insufficient data length",l.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e){return(0,i.default)(this,c),n.call(this,"bool","bool",e,!1)}return(0,o.default)(c,[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(e,t){return e.writeValue(t?1:0)}},{key:"decode",value:function(e){return e.coerce(this.type,!e.readValue().isZero())}}]),c}(r(17316).Coder);t.BooleanCoder=c},53861:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicBytesCoder=t.BytesCoder=void 0;var i=n(r(119)),o=n(r(69721)),a=n(r(58985)),s=n(r(15163)),u=n(r(34650)),c=n(r(21949)),l=r(908);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,c.default)(e);if(t){var i=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,u.default)(this,r)}}var d=function(e){(0,s.default)(r,e);var t=f(r);function r(e,n){return(0,o.default)(this,r),t.call(this,e,e,n,!0)}return(0,a.default)(r,[{key:"defaultValue",value:function(){return"0x"}},{key:"encode",value:function(e,t){return t=(0,l.arrayify)(t),e.writeValue(t.length)+e.writeBytes(t)}},{key:"decode",value:function(e){return e.readBytes(e.readValue().toNumber(),!0)}}]),r}(r(17316).Coder);t.DynamicBytesCoder=d;var h=function(e){(0,s.default)(r,e);var t=f(r);function r(e){return(0,o.default)(this,r),t.call(this,"bytes",e)}return(0,a.default)(r,[{key:"decode",value:function(e){return e.coerce(this.name,(0,l.hexlify)((0,i.default)((0,c.default)(r.prototype),"decode",this).call(this,e)))}}]),r}(d);t.BytesCoder=h},90028:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=r(908),l=function(e){(0,a.default)(l,e);var t,r,n=(t=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function l(e,t){var r;(0,i.default)(this,l);var o="bytes"+String(e);return(r=n.call(this,o,o,t,!1)).size=e,r}return(0,o.default)(l,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(e,t){var r=(0,c.arrayify)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}},{key:"decode",value:function(e){return e.coerce(this.name,(0,c.hexlify)(e.readBytes(this.size)))}}]),l}(r(17316).Coder);t.FixedBytesCoder=l},4522:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e){return(0,i.default)(this,c),n.call(this,"null","",e,!1)}return(0,o.default)(c,[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}},{key:"decode",value:function(e){return e.readBytes(0),e.coerce(this.name,null)}}]),c}(r(17316).Coder);t.NullCoder=c},88287:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=r(34952),l=r(5465),f=function(e){(0,a.default)(f,e);var t,r,n=(t=f,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function f(e,t,r){var o;(0,i.default)(this,f);var a=(t?"int":"uint")+8*e;return(o=n.call(this,a,a,r,!1)).size=e,o.signed=t,o}return(0,o.default)(f,[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(e,t){var r=c.BigNumber.from(t),n=l.MaxUint256.mask(8*e.wordSize);if(this.signed){var i=n.mask(8*this.size-1);(r.gt(i)||r.lt(i.add(l.One).mul(l.NegativeOne)))&&this._throwError("value out-of-bounds",t)}else(r.lt(l.Zero)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}},{key:"decode",value:function(e){var t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}]),f}(r(17316).Coder);t.NumberCoder=f},48040:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(119)),s=n(r(15163)),u=n(r(34650)),c=n(r(21949)),l=r(78627),f=function(e){(0,s.default)(f,e);var t,r,n=(t=f,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,u.default)(this,e)});function f(e){return(0,i.default)(this,f),n.call(this,"string",e)}return(0,o.default)(f,[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(e,t){return(0,a.default)((0,c.default)(f.prototype),"encode",this).call(this,e,(0,l.toUtf8Bytes)(t))}},{key:"decode",value:function(e){return(0,l.toUtf8String)((0,a.default)((0,c.default)(f.prototype),"decode",this).call(this,e))}}]),f}(r(53861).DynamicBytesCoder);t.StringCoder=f},52010:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.TupleCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=r(17316),l=r(4341),f=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e,t){var r;(0,i.default)(this,c);var o=!1,a=[];e.forEach((function(e){e.dynamic&&(o=!0),a.push(e.type)}));var s="tuple("+a.join(",")+")";return(r=n.call(this,"tuple",s,t,o)).coders=e,r}return(0,o.default)(c,[{key:"defaultValue",value:function(){var e=[];this.coders.forEach((function(t){e.push(t.defaultValue())}));var t=this.coders.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach((function(r,n){var i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}},{key:"encode",value:function(e,t){return(0,l.pack)(e,this.coders,t)}},{key:"decode",value:function(e){return e.coerce(this.name,(0,l.unpack)(e,this.coders))}}]),c}(c.Coder);t.TupleCoder=f},60800:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.ParamType=t.FunctionFragment=t.Fragment=t.FormatTypes=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=void 0;var i=n(r(15163)),o=n(r(34650)),a=n(r(21949)),s=n(r(69721)),u=n(r(58985)),c=r(34952),l=r(23694),f=r(64327),d=r(98067);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,a.default)(e);if(t){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}var p=new f.Logger(d.version),y={},m={calldata:!0,memory:!0,storage:!0},g={calldata:!0,memory:!0};function b(e,t){if("bytes"===e||"string"===e){if(m[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&g[t])return!0;return(m[t]||"payable"===t)&&p.throwArgumentError("invalid modifier","name",t),!1}function v(e,t){for(var r in t)(0,l.defineReadOnly)(e,r,t[r])}var w=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});t.FormatTypes=w;var A=new RegExp(/^(.*)\[([0-9]*)\]$/),k=function(){function e(t,r){(0,s.default)(this,e),t!==y&&p.throwError("use fromString",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),v(this,r);var n=this.type.match(A);v(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return(0,u.default)(e,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==w.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+")"):r+=this.type,e!==w.sighash&&(!0===this.indexed&&(r+=" indexed"),e===w.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"==typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(y,{name:t.name||null,type:N(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return n=function(e,t){var r=e;function n(t){p.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s2&&p.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||p.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=c.BigNumber.from(r[1]),r[0]):e}function P(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function T(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&p.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&p.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||p.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&p.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&p.throwArgumentError("unable to determine stateMutability","value",e),t}t.EventFragment=x;var I=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,u.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===w.sighash&&p.throwError("cannot format a constructor for sighash",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&p.throwArgumentError("invalid constructor object","value",e);var t=T(e);t.constant&&p.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(k.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?c.BigNumber.from(e.gas):null};return new r(y,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=_(e,t)).match(U);return n&&"constructor"===n[1].trim()||p.throwArgumentError("invalid constructor string","value",e),t.inputs=E(n[2].trim(),!1),P(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(S);t.ConstructorFragment=I;var O=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,u.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ",e!==w.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&p.throwArgumentError("invalid function object","value",e);var t=T(e),n={type:e.type,name:M(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(k.fromObject):[],outputs:e.outputs?e.outputs.map(k.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?c.BigNumber.from(e.gas):null};return new r(y,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=_(e,t)).split(" returns ");n.length>2&&p.throwArgumentError("invalid function string","value",e);var i=n[0].match(U);if(i||p.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&M(t.name),t.inputs=E(i[2],!1),P(i[3].trim(),t),n.length>1){var o=n[1].match(U);""==o[1].trim()&&""==o[3].trim()||p.throwArgumentError("unexpected tokens","value",e),t.outputs=E(o[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(I);function B(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||p.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}t.FunctionFragment=O;var C=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,u.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&p.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:M(e.name),inputs:e.inputs?e.inputs.map(k.fromObject):[]};return B(new r(y,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(U);return n||p.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&M(t.name),t.inputs=E(n[2],!1),B(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(S);function N(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}t.ErrorFragment=C;var R=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function M(e){return e&&e.match(R)||p.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var U=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},62914:(e,t,r)=>{"use strict";Object.defineProperty(t,"RQ",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"_R",{enumerable:!0,get:function(){return n.ParamType}});var n=r(60800),i=r(44937);r(69044)},69044:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDescription=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=void 0,Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return m.checkResultErrors}});var i=n(r(58985)),o=n(r(69721)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=r(77921),l=r(34952),f=r(908),d=r(37515),h=r(64642),p=r(23694),y=r(44937),m=r(17316),g=r(60800),b=r(64327),v=r(98067);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.default)(e);if(t){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var A=new b.Logger(v.version),k=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.LogDescription=k;var E=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.TransactionDescription=E;var S=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.ErrorDescription=S;var x=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),r}(p.Description);t.Indexed=x;var _={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function P(e,t){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}var T=function(){function e(t){var r=this;(0,o.default)(this,e);var n=[];n="string"==typeof t?JSON.parse(t):t,(0,p.defineReadOnly)(this,"fragments",n.map((function(e){return g.Fragment.from(e)})).filter((function(e){return null!=e}))),(0,p.defineReadOnly)(this,"_abiCoder",(0,p.getStatic)(this instanceof e?this.constructor:void 0,"getAbiCoder")()),(0,p.defineReadOnly)(this,"functions",{}),(0,p.defineReadOnly)(this,"errors",{}),(0,p.defineReadOnly)(this,"events",{}),(0,p.defineReadOnly)(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return r.deploy?void A.warn("duplicate definition - constructor"):void(0,p.defineReadOnly)(r,"deploy",e);case"function":t=r.functions;break;case"event":t=r.events;break;case"error":t=r.errors;break;default:return}var n=e.format();t[n]?A.warn("duplicate definition - "+n):t[n]=e})),this.deploy||(0,p.defineReadOnly)(this,"deploy",g.ConstructorFragment.from({payable:!1,type:"constructor"})),(0,p.defineReadOnly)(this,"_isInterface",!0)}return(0,i.default)(e,[{key:"format",value:function(e){e||(e=g.FormatTypes.full),e===g.FormatTypes.sighash&&A.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===g.FormatTypes.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if((0,f.isHexString)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];A.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var r=e.trim(),n=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===r}));return 0===n.length?A.throwArgumentError("no matching function","name",r):n.length>1&&A.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var i=this.functions[g.FunctionFragment.fromString(e).format()];return i||A.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if((0,f.isHexString)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];A.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?A.throwArgumentError("no matching event","name",n):i.length>1&&A.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}var o=this.events[g.EventFragment.fromString(e).format()];return o||A.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if((0,f.isHexString)(e)){var t=(0,p.getStatic)(this.constructor,"getSighash");for(var r in this.errors)if(e===t(this.errors[r]))return this.errors[r];A.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?A.throwArgumentError("no matching error","name",n):i.length>1&&A.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}var o=this.errors[g.FunctionFragment.fromString(e).format()];return o||A.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,p.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,p.getStatic)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"==typeof e&&(e=this.getError(e));var r=(0,f.arrayify)(t);return(0,f.hexlify)(r.slice(0,4))!==this.getSighash(e)&&A.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,f.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,f.hexlify)((0,f.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,f.arrayify)(t);return(0,f.hexlify)(r.slice(0,4))!==this.getSighash(e)&&A.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,f.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,f.hexlify)((0,f.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,f.arrayify)(t),n=null,i="",o=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(l){}break;case 4:var u=(0,f.hexlify)(r.slice(0,4)),c=_[u];if(c)o=this._abiCoder.decode(c.inputs,r.slice(4)),a=c.name,s=c.signature,c.reason&&(n=o[0]),"Error"===a?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===a&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{var l=this.getError(u);o=this._abiCoder.decode(l.inputs,r.slice(4)),a=l.name,s=l.format()}catch(l){}}return A.throwError("call revert exception"+i,b.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,f.hexlify)(t),errorArgs:o,errorName:a,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,f.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&A.throwError("too many arguments for "+e.format(),b.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?(0,d.id)(t):"bytes"===e.type?(0,h.keccak256)((0,f.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=l.BigNumber.from(t).toHexString()),"address"===e.type&&r._abiCoder.encode(["address"],[t]),(0,f.hexZeroPad)((0,f.hexlify)(t),32))};for(t.forEach((function(t,r){var o=e.inputs[r];o.indexed?null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?A.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map((function(e){return i(o,e)}))):n.push(i(o,t)):null!=t&&A.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e));var n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&A.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)n.push((0,d.id)(s));else if("bytes"===e.type)n.push((0,h.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);(0,f.isHexString)(r[0],32)&&r[0].toLowerCase()===n||A.throwError("fragment/topic mismatch",b.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(g.ParamType.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=r?this._abiCoder.decode(i,(0,f.concat)(r)):null,u=this._abiCoder.decode(o,t,!0),c=[],l=0,d=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)c[t]=new x({_isIndexed:!0,hash:null});else if(a[t])c[t]=new x({_isIndexed:!0,hash:s[d++]});else try{c[t]=s[d++]}catch(e){c[t]=e}else try{c[t]=u[l++]}catch(e){c[t]=e}if(e.name&&null==c[e.name]){var r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:function(){throw P("property ".concat(JSON.stringify(e.name)),r)}}):c[e.name]=r}}));for(var h=function(e){var t=c[e];t instanceof Error&&Object.defineProperty(c,e,{enumerable:!0,get:function(){throw P("index ".concat(e),t)}})},p=0;p{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="address/5.7.0"},77921:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=g,t.getContractAddress=function(e){var t=null;try{t=g(e.from)}catch(t){c.throwArgumentError("missing from address","transaction",e)}var r=(0,n.stripZeros)((0,n.arrayify)(i.BigNumber.from(e.nonce).toHexString()));return g((0,n.hexDataSlice)((0,o.keccak256)((0,a.encode)([t,r])),12))},t.getCreate2Address=function(e,t,r){return 32!==(0,n.hexDataLength)(t)&&c.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.hexDataLength)(r)&&c.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),g((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",g(e),t,r])),12))},t.getIcapAddress=function(e){for(var t=(0,i._base16To36)(g(e).substring(2)).toUpperCase();t.length<30;)t="0"+t;return"XE"+m("XE00"+t)+t},t.isAddress=function(e){try{return g(e),!0}catch(e){}return!1};var n=r(908),i=r(34952),o=r(64642),a=r(55265),s=r(64327),u=r(88222),c=new s.Logger(u.version);function l(e){(0,n.isHexString)(e,20)||c.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),i=0;i<40;i++)r[i]=t[i].charCodeAt(0);for(var a=(0,n.arrayify)((0,o.keccak256)(r)),s=0;s<40;s+=2)a[s>>1]>>4>=8&&(t[s]=t[s].toUpperCase()),(15&a[s>>1])>=8&&(t[s+1]=t[s+1].toUpperCase());return"0x"+t.join("")}for(var f={},d=0;d<10;d++)f[String(d)]=String(d);for(var h=0;h<26;h++)f[String.fromCharCode(65+h)]=String(10+h);var p,y=Math.floor((p=9007199254740991,Math.log10?Math.log10(p):Math.log(p)/Math.LN10));function m(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return f[e]})).join("");t.length>=y;){var r=t.substring(0,y);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function g(e){var t=null;if("string"!=typeof e&&c.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=l(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&c.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==m(e)&&c.throwArgumentError("bad icap checksum","address",e),t=(0,i._base36To16)(e.substring(4));t.length<40;)t="0"+t;t=l("0x"+t)}else c.throwArgumentError("invalid address","address",e);return t}},75798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){e=atob(e);for(var t=[],r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"decode",{enumerable:!0,get:function(){return n.decode}}),Object.defineProperty(t,"encode",{enumerable:!0,get:function(){return n.encode}});var n=r(75798)},3042:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="bignumber/5.7.0"},1872:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.BigNumber=void 0,t._base16To36=function(e){return new l(e,16).toString(36)},t._base36To16=function(e){return new l(e,36).toString(16)},t.isBigNumberish=function(e){return null!=e&&(y.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,s.isHexString)(e)||"bigint"==typeof e||(0,s.isBytes)(e))};var i=n(r(69721)),o=n(r(58985)),a=n(r(31734)),s=r(908),u=r(64327),c=r(3042),l=a.default.BN,f=new u.Logger(c.version),d={},h=9007199254740991,p=!1,y=function(){function e(t,r){(0,i.default)(this,e),t!==d&&f.throwError("cannot call constructor directly; use BigNumber.from",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return(0,o.default)(e,[{key:"fromTwos",value:function(e){return g(b(this).fromTwos(e))}},{key:"toTwos",value:function(e){return g(b(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return g(b(this).add(b(e)))}},{key:"sub",value:function(e){return g(b(this).sub(b(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&v("division-by-zero","div"),g(b(this).div(b(t)))}},{key:"mul",value:function(e){return g(b(this).mul(b(e)))}},{key:"mod",value:function(e){var t=b(e);return t.isNeg()&&v("division-by-zero","mod"),g(b(this).umod(t))}},{key:"pow",value:function(e){var t=b(e);return t.isNeg()&&v("negative-power","pow"),g(b(this).pow(t))}},{key:"and",value:function(e){var t=b(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","and"),g(b(this).and(t))}},{key:"or",value:function(e){var t=b(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","or"),g(b(this).or(t))}},{key:"xor",value:function(e){var t=b(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","xor"),g(b(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","mask"),g(b(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shl"),g(b(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shr"),g(b(this).shrn(e))}},{key:"eq",value:function(e){return b(this).eq(b(e))}},{key:"lt",value:function(e){return b(this).lt(b(e))}},{key:"lte",value:function(e){return b(this).lte(b(e))}},{key:"gt",value:function(e){return b(this).gt(b(e))}},{key:"gte",value:function(e){return b(this).gte(b(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return b(this).isZero()}},{key:"toNumber",value:function(){try{return b(this).toNumber()}catch(e){v("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return f.throwError("this platform does not support BigInt",u.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?p||(p=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?f.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.Logger.errors.UNEXPECTED_ARGUMENT,{}):f.throwError("BigNumber.toString does not accept parameters",u.Logger.errors.UNEXPECTED_ARGUMENT,{})),b(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(d,m(t)):t.match(/^-?[0-9]+$/)?new e(d,m(new l(t))):f.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=h||t<=-h)&&v("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"==typeof r)return e.from(r.toString());if((0,s.isBytes)(r))return e.from((0,s.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"==typeof i&&((0,s.isHexString)(i)||"-"===i[0]&&(0,s.isHexString)(i.substring(1))))return e.from(i)}return f.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function m(e){if("string"!=typeof e)return m(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&f.throwArgumentError("invalid hex","value",e),"0x00"===(e=m(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function g(e){return y.from(m(e))}function b(e){var t=y.from(e).toHexString();return"-"===t[0]?new l("-"+t.substring(3),16):new l(t.substring(2),16)}function v(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),f.throwError(e,u.Logger.errors.NUMERIC_FAULT,n)}t.BigNumber=y},68390:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=t.FixedFormat=void 0,t.formatFixed=b,t.parseFixed=v;var i=n(r(3355)),o=n(r(69721)),a=n(r(58985)),s=r(908),u=r(64327),c=r(3042),l=r(1872),f=new u.Logger(c.version),d={},h=l.BigNumber.from(0),p=l.BigNumber.from(-1);function y(e,t,r,n){var i={fault:t,operation:r};return void 0!==n&&(i.value=n),f.throwError(e,u.Logger.errors.NUMERIC_FAULT,i)}for(var m="0";m.length<256;)m+=m;function g(e){if("number"!=typeof e)try{e=l.BigNumber.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+m.substring(0,e):f.throwArgumentError("invalid decimal size","decimals",e)}function b(e,t){null==t&&(t=0);var r=g(t),n=(e=l.BigNumber.from(e)).lt(h);n&&(e=e.mul(p));for(var i=e.mod(r).toString();i.length2&&f.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&y("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&f.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new e(d,r,n,o)}}]),e}();t.FixedFormat=w;var A=function(){function e(t,r,n,i){(0,o.default)(this,e),t!==d&&f.throwError("cannot use FixedNumber constructor; use FixedNumber.from",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return(0,a.default)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&f.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=v(this._value,this.format.decimals),n=v(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=v(this._value,this.format.decimals),n=v(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=v(this._value,this.format.decimals),n=v(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=v(this._value,this.format.decimals),n=v(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(k.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(k.toFormat(r.format))),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&f.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+m.substring(0,t),this.format),i=E.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&f.throwArgumentError("invalid byte width","width",e);var t=l.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,s.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||(0,l.isBigNumberish)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(b(t,r),w.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=w.from(r),i=v(t,n.decimals);!n.signed&&i.lt(h)&&y("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=(0,s.hexZeroPad)(o,n.width/8));var a=b(i,n.decimals);return new e(d,o,a,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=w.from(r);if((0,s.arrayify)(t).length>n.width/8)throw new Error("overflow");var i=l.BigNumber.from(t);n.signed&&(i=i.fromTwos(n.width));var o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=b(i,n.decimals);return new e(d,o,a,n)}},{key:"from",value:function(t,r){if("string"==typeof t)return e.fromString(t,r);if((0,s.isBytes)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(e){if(e.code!==u.Logger.errors.INVALID_ARGUMENT)throw e}return f.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}();t.FixedNumber=A;var k=A.from(1),E=A.from("0.5")},34952:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BigNumber",{enumerable:!0,get:function(){return n.BigNumber}}),Object.defineProperty(t,"FixedFormat",{enumerable:!0,get:function(){return i.FixedFormat}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return i.FixedNumber}}),Object.defineProperty(t,"_base16To36",{enumerable:!0,get:function(){return n._base16To36}}),Object.defineProperty(t,"_base36To16",{enumerable:!0,get:function(){return n._base36To16}}),Object.defineProperty(t,"formatFixed",{enumerable:!0,get:function(){return i.formatFixed}}),Object.defineProperty(t,"parseFixed",{enumerable:!0,get:function(){return i.parseFixed}});var n=r(1872),i=r(68390)},8729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="bytes/5.7.0"},908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayify=f,t.concat=d,t.hexConcat=function(e){var t="0x";return e.forEach((function(e){t+=m(e).substring(2)})),t},t.hexDataLength=function(e){if("string"!=typeof e)e=m(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2},t.hexDataSlice=function(e,t,r){return"string"!=typeof e?e=m(e):(!p(e)||e.length%2)&&o.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)},t.hexStripZeros=g,t.hexValue=function(e){var t=g(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t},t.hexZeroPad=b,t.hexlify=m,t.isBytes=l,t.isBytesLike=u,t.isHexString=p,t.joinSignature=function(e){return m(d([(e=v(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))},t.splitSignature=v,t.stripZeros=function(e){var t=f(e);if(0===t.length)return t;for(var r=0;r=256)return!1}return!0}function f(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),p(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":o.throwArgumentError("hex data is odd-length","value",e));for(var i=[],u=0;ut&&o.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}var y="0123456789abcdef";function m(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r=y[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":o.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(l(e)){for(var n="0x",i=0;i>4]+y[15&s]}return n}return o.throwArgumentError("invalid hexlify value","value",e)}function g(e){"string"!=typeof e&&(e=m(e)),p(e)||o.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&o.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function v(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(u(e)){var r=f(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64))):65===r.length?(t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64)),t.v=r[64]):o.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:o.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=m(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var n=h(f(t._vs),32);t._vs=m(n);var i=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&o.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;var a=m(n);null==t.s?t.s=a:t.s!==a&&o.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?o.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var s=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==s&&o.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=b(t.r,32):o.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=b(t.s,32):o.throwArgumentError("signature missing or invalid s","signature",e);var c=f(t.s);c[0]>=128&&o.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(c[0]|=128);var l=m(c);t._vs&&(p(t._vs)||o.throwArgumentError("signature invalid _vs","signature",e),t._vs=b(t._vs,32)),null==t._vs?t._vs=l:t._vs!==l&&o.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},48721:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressZero=void 0,t.AddressZero="0x0000000000000000000000000000000000000000"},22997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Zero=t.WeiPerEther=t.Two=t.One=t.NegativeOne=t.MinInt256=t.MaxUint256=t.MaxInt256=void 0;var n=r(34952),i=n.BigNumber.from(-1);t.NegativeOne=i;var o=n.BigNumber.from(0);t.Zero=o;var a=n.BigNumber.from(1);t.One=a;var s=n.BigNumber.from(2);t.Two=s;var u=n.BigNumber.from("1000000000000000000");t.WeiPerEther=u;var c=n.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxUint256=c;var l=n.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");t.MinInt256=l;var f=n.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxInt256=f},90396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashZero=void 0,t.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},5465:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AddressZero",{enumerable:!0,get:function(){return n.AddressZero}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return a.EtherSymbol}}),Object.defineProperty(t,"HashZero",{enumerable:!0,get:function(){return o.HashZero}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return i.MaxInt256}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return i.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return i.MinInt256}}),Object.defineProperty(t,"NegativeOne",{enumerable:!0,get:function(){return i.NegativeOne}}),Object.defineProperty(t,"One",{enumerable:!0,get:function(){return i.One}}),Object.defineProperty(t,"Two",{enumerable:!0,get:function(){return i.Two}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return i.WeiPerEther}}),Object.defineProperty(t,"Zero",{enumerable:!0,get:function(){return i.Zero}});var n=r(48721),i=r(22997),o=r(90396),a=r(68347)},68347:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherSymbol=void 0,t.EtherSymbol="Ξ"},33989:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="hash/5.7.0"},33731:(e,t)=>{"use strict";function r(e,t){null==t&&(t=1);var r=[],n=r.forEach;return function e(t,i){n.call(t,(function(t){i>0&&Array.isArray(t)?e(t,i-1):r.push(t)}))}(e,t),r}function n(e){var t=0;function r(){return e[t++]<<8|e[t++]}for(var n=r(),i=1,o=[0,1],a=1;a>--c&1}for(var d=Math.pow(2,31),h=d>>>1,p=h>>1,y=d-1,m=0,g=0;g<31;g++)m=m<<1|f();for(var b=[],v=0,w=d;;){for(var A=Math.floor(((m-v+1)*i-1)/w),k=0,E=n;E-k>1;){var S=k+E>>>1;A>>1|f(),x=x<<1^h,_=(_^h)<<1|h|1;v=x,w=1+_-x}var P=n-4;return b.map((function(t){switch(t-P){case 3:return P+65792+(e[u++]<<16|e[u++]<<8|e[u++]);case 2:return P+256+(e[u++]<<8|e[u++]);case 1:return P+e[u++];default:return t-1}}))}function i(e){var t=0;return function(){return e[t++]}}function o(e){return 1&e?~e>>1:e>>1}function a(e,t){for(var r=Array(e),n=0,i=-1;n>=1),check:2==o}}()},t.read_mapped_map=function(e){for(var t=[];;){var n=e();if(0==n)break;t.push(f(n,e))}for(;;){var i=e()-1;if(i<0)break;t.push(d(i,e))}return function(e){for(var t={},r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=function(){return(0,i.read_compressed_payload)((0,n.decode)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))};var n=r(80997),i=r(33731)},17032:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.ens_normalize=function(e){return b(function(e,t){for(var r=m(e).reverse(),n=[];r.length;){var o=v(r);if(o)n.push.apply(n,(0,i.default)(t(o)));else{var a=r.pop();if(l.has(a))n.push(a);else if(!f.has(a)){var s=d[a];if(!s)throw new Error("Disallowed codepoint: 0x".concat(a.toString(16).toUpperCase()));n.push.apply(n,(0,i.default)(s))}}}return b(String.fromCodePoint.apply(String,n).normalize("NFC"))}(e,g))},t.ens_normalize_post_check=b;var i=n(r(93106)),o=r(78627),a=r(63961),s=r(33731);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e.split("."));try{for(r.s();!(t=r.n()).done;){var n=t.value,i=m(n);try{for(var o=i.lastIndexOf(y)-1;o>=0;o--)if(i[o]!==y)throw new Error("underscore only allowed at start");if(i.length>=4&&i.every((function(e){return e<128}))&&i[2]===p&&i[3]===p)throw new Error("invalid label extension")}catch(e){throw new Error('Invalid label "'.concat(n,'": ').concat(e.message))}}}catch(e){r.e(e)}finally{r.f()}return e}function v(e,t){var r,n,o,a=h,s=[],u=e.length;t&&(t.length=0);for(var c=function(){var c=e[--u];if(!(a=null===(r=a.branches.find((function(e){return e.set.has(c)})))||void 0===r?void 0:r.node))return"break";if(a.save)o=c;else if(a.check&&c===o)return"break";s.push(c),a.fe0f&&(s.push(65039),u>0&&65039==e[u-1]&&u--),a.valid&&(n=s.slice(),2==a.valid&&n.splice(1,1),t&&t.push.apply(t,(0,i.default)(e.slice(u).reverse())),e.length=u)};u&&"break"!==c(););return n}},57901:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=function(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))};var n=r(64642),i=r(78627)},37515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return a.TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return i.dnsEncode}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return i.ensNormalize}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return o.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return n.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return i.isValidName}}),Object.defineProperty(t,"messagePrefix",{enumerable:!0,get:function(){return o.messagePrefix}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return i.namehash}});var n=r(57901),i=r(84898),o=r(34443),a=r(12171)},34443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=function(e){return"string"==typeof e&&(e=(0,o.toUtf8Bytes)(e)),(0,i.keccak256)((0,n.concat)([(0,o.toUtf8Bytes)(a),(0,o.toUtf8Bytes)(String(e.length)),e]))},t.messagePrefix=void 0;var n=r(908),i=r(64642),o=r(78627),a="Ethereum Signed Message:\n";t.messagePrefix=a},84898:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=function(e){return(0,n.hexlify)((0,n.concat)(d(e).map((function(e){if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"},t.ensNormalize=function(e){return d(e).map((function(e){return(0,i.toUtf8String)(e)})).join(".")},t.isValidName=function(e){try{return 0!==d(e).length}catch(e){}return!1},t.namehash=function(e){"string"!=typeof e&&c.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=l,r=d(e);r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)};var n=r(908),i=r(78627),o=r(64642),a=r(64327),s=r(33989),u=r(17032),c=new a.Logger(s.version),l=new Uint8Array(32);function f(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function d(e){var t=(0,i.toUtf8Bytes)((0,u.ens_normalize)(e)),r=[];if(0===e.length)return r;for(var n=0,o=0;o=t.length)throw new Error("invalid ENS name; empty component");return r.push(f(t.slice(n))),r}l.fill(0)},12171:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.TypedDataEncoder=void 0;var i=n(r(82247)),o=n(r(69721)),a=n(r(58985)),s=r(77921),u=r(34952),c=r(908),l=r(64642),f=r(23694),d=r(64327),h=r(33989),p=r(57901),y=new d.Logger(h.version),m=new Uint8Array(32);m.fill(0);var g=u.BigNumber.from(-1),b=u.BigNumber.from(0),v=u.BigNumber.from(1),w=u.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),A=(0,c.hexZeroPad)(v.toHexString(),32),k=(0,c.hexZeroPad)(b.toHexString(),32),E={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},S=["name","version","chainId","verifyingContract","salt"];function x(e){return function(t){return"string"!=typeof t&&y.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var _={name:x("name"),version:x("version"),chainId:function(e){try{return u.BigNumber.from(e).toString()}catch(e){}return y.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,s.getAddress)(e).toLowerCase()}catch(e){}return y.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=(0,c.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,c.hexlify)(t)}catch(e){}return y.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function P(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&y.throwArgumentError("invalid numeric width","type",e);var i=w.mask(r?n-1:n),o=r?i.add(v).mul(g):b;return function(t){var r=u.BigNumber.from(t);return(r.lt(o)||r.gt(i))&&y.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,c.hexZeroPad)(r.toTwos(256).toHexString(),32)}}var a=e.match(/^bytes(\d+)$/);if(a){var f=parseInt(a[1]);return(0===f||f>32||a[1]!==String(f))&&y.throwArgumentError("invalid bytes width","type",e),function(t){return(0,c.arrayify)(t).length!==f&&y.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=(0,c.arrayify)(e),r=t.length%32;return r?(0,c.hexConcat)([t,m.slice(r)]):(0,c.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return(0,c.hexZeroPad)((0,s.getAddress)(e),32)};case"bool":return function(e){return e?A:k};case"bytes":return function(e){return(0,l.keccak256)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function T(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var I=function(){function e(t){(0,o.default)(this,e),(0,f.defineReadOnly)(this,"types",Object.freeze((0,f.deepCopy)(t))),(0,f.defineReadOnly)(this,"_encoderCache",{}),(0,f.defineReadOnly)(this,"_types",{});var r={},n={},i={};Object.keys(t).forEach((function(e){r[e]={},n[e]=[],i[e]={}}));var a=function(e){var i={};t[e].forEach((function(o){i[o.name]&&y.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&y.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),P(a)||(n[a]||y.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),n[a].push(e),r[e][a]=!0)}))};for(var s in t)a(s);var u=Object.keys(n).filter((function(e){return 0===n[e].length}));for(var c in 0===u.length?y.throwArgumentError("missing primary type","types",t):u.length>1&&y.throwArgumentError("ambiguous primary types or unused types: ".concat(u.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),(0,f.defineReadOnly)(this,"primaryType",u[0]),function e(o,a){a[o]&&y.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),a[o]=!0,Object.keys(r[o]).forEach((function(t){n[t]&&(e(t,a),Object.keys(a).forEach((function(e){i[e][t]=!0})))})),delete a[o]}(this.primaryType,{}),i){var l=Object.keys(i[c]);l.sort(),this._types[c]=T(c,t[c])+l.map((function(e){return T(e,t[e])})).join("")}}return(0,a.default)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=P(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var i=n[1],o=this.getEncoder(i),a=parseInt(n[3]);return function(e){a>=0&&e.length!==a&&y.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(o);return t._types[i]&&(r=r.map(l.keccak256)),(0,l.keccak256)((0,c.hexConcat)(r))}}var s=this.types[e];if(s){var u=(0,p.id)(this._types[e]);return function(e){var r=s.map((function(r){var n=r.name,i=r.type,o=t.getEncoder(i)(e[n]);return t._types[i]?(0,l.keccak256)(o):o}));return r.unshift(u),(0,c.hexConcat)(r)}}return y.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||y.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return(0,l.keccak256)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(P(e))return r(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&y.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(o,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=n._visit(a,t[o],r),e}),{}):y.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var i=E[n];i||y.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:i})}return r.sort((function(e,t){return S.indexOf(e.name)-S.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return(0,c.hexConcat)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return(0,l.keccak256)(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,o){return a=this,s=void 0,u=i.default.mark((function a(){var s,u,l;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=(0,f.shallowCopy)(t),s={},t.verifyingContract&&!(0,c.isHexString)(t.verifyingContract,20)&&(s[t.verifyingContract]="0x"),(u=e.from(r)).visit(n,(function(e,t){return"address"!==e||(0,c.isHexString)(t,20)||(s[t]="0x"),t})),a.t0=i.default.keys(s);case 6:if((a.t1=a.t0()).done){a.next=13;break}return l=a.t1.value,a.next=10,o(l);case 10:s[l]=a.sent,a.next=6;break;case 13:return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),n=u.visit(n,(function(e,t){return"address"===e&&s[t]?s[t]:t})),a.abrupt("return",{domain:t,value:n});case 16:case"end":return a.stop()}}),a)})),new(s||(s=Promise))((function(e,t){function r(e){try{i(u.next(e))}catch(e){t(e)}}function n(e){try{i(u.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(r,n)}i((u=u.apply(a,[])).next())}));var a,s,u}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var i={},o=[];S.forEach((function(e){var r=t[e];null!=r&&(i[e]=_[e](r),o.push({name:e,type:E[e]}))}));var a=e.from(r),s=(0,f.shallowCopy)(r);return s.EIP712Domain?y.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=o,a.encode(n),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return(0,c.hexlify)((0,c.arrayify)(t));if(e.match(/^u?int/))return u.BigNumber.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&y.throwArgumentError("invalid string","value",t),t}return y.throwArgumentError("unsupported type","type",e)}))}}}]),e}();t.TypedDataEncoder=I},64642:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e){return"0x"+i.default.keccak_256((0,o.arrayify)(e))};var i=n(r(95975)),o=r(908)},95975:(e,t,r)=>{"use strict";e=r.nmd(e);var n,i=r(19142),o=r(28847)(r(3355));!function(){var a="input is invalid type",s="object"===("undefined"==typeof window?"undefined":(0,o.default)(window)),u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"===("undefined"==typeof self?"undefined":(0,o.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===i?"undefined":(0,o.default)(i))&&i.versions&&i.versions.node?u=r.g:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,o.default)(e)&&e.exports,f=r.amdO,d=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),p=[4,1024,262144,67108864],y=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],b=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!d||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,o.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var A=function(e,t,r){return function(n){return new U(e,t,e).update(n)[r]()}},k=function(e,t,r){return function(n,i){return new U(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,o){return T["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return T["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){U.call(this,e,t,r)}U.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var n,i,s=this.blocks,u=this.byteCount,c=e.length,l=this.blockCount,f=0,h=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=u){for(this.start=n-u,this.block=s[l],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},U.prototype.encodeString=function(e){var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}var n=0,i=e.length;if(t)n=i;else for(var s=0;s=57344?n+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},U.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];a%t==0&&(j(r),o=0)}return i&&(e=r[o],s+=h[e>>4&15]+h[15&e],i>1&&(s+=h[e>>12&15]+h[e>>8&15]),i>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},U.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&j(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},L.prototype=new U,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),U.prototype.finalize.call(this)};var j=function(e){var t,r,n,i,o,a,s,u,c,l,f,d,h,p,y,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(d<<1|h>>>31),r=c^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],y=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=p^~g&v,e[1]=y^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&p,e[7]=k^~S&y,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~p&g,e[9]=S^~y&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(l)e.exports=T;else{for(O=0;O{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="logger/5.7.0"},64327:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=t.ErrorCode=void 0;var i,o,a=n(r(69721)),s=n(r(58985)),u=r(37252),c=!1,l=!1,f={debug:1,default:2,info:2,warning:3,error:4,off:5},d=f.default,h=null,p=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();t.LogLevel=i,function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(i||(t.LogLevel=i={})),t.ErrorCode=o,function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(o||(t.ErrorCode=o={}));var y="0123456789abcdef",m=function(){function e(t){(0,a.default)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return(0,s.default)(e,[{key:"_log",value:function(e,t){var r=e.toLowerCase();null==f[r]&&this.throwArgumentError("invalid log level name","logLevel",e),d>f[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=y[15&t[o]];i.push(e+"=Uint8Array(0x"+r+")")}else i.push(e+"="+JSON.stringify(t))}catch(t){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var a=t,s="";switch(r){case o.NUMERIC_FAULT:s="NUMERIC_FAULT";var u=t;switch(u){case"overflow":case"underflow":case"division-by-zero":s+="-"+u;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case o.CALL_EXCEPTION:case o.INSUFFICIENT_FUNDS:case o.MISSING_NEW:case o.NONCE_EXPIRED:case o.REPLACEMENT_UNDERPRICED:case o.TRANSACTION_REPLACED:case o.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var c=new Error(t);return c.reason=a,c.code=r,Object.keys(n).forEach((function(e){c[e]=n[e]})),c}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}},{key:"checkSafeUint53",value:function(t,r){"number"==typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return h||(h=new e(u.version)),h}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),c){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}l=!!t,c=!!r}},{key:"setLogLevel",value:function(t){var r=f[t.toLowerCase()];null!=r?d=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();t.Logger=m,m.errors=o,m.levels=i},64071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="properties/5.7.0"},23694:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.Description=void 0,t.checkProperties=function(e,t){e&&"object"===(0,s.default)(e)||f.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(r){t[r]||f.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))},t.deepCopy=m,t.defineReadOnly=d,t.getStatic=function(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==(0,s.default)(e.prototype))break;e=Object.getPrototypeOf(e.prototype).constructor}return null},t.resolveProperties=function(e){return l(this,void 0,void 0,i.default.mark((function t(){var r,n;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))},t.shallowCopy=function(e){var t={};for(var r in e)t[r]=e[r];return t};var i=n(r(82247)),o=n(r(58985)),a=n(r(69721)),s=n(r(3355)),u=r(64327),c=r(64071),l=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},f=new u.Logger(c.version);function d(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}var h={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function p(e){if(null==e||h[(0,s.default)(e)])return!0;if(Array.isArray(e)||"object"===(0,s.default)(e)){if(!Object.isFrozen(e))return!1;for(var t=Object.keys(e),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="rlp/5.7.0"},55265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){var t=(0,n.arrayify)(e),r=f(t,0);return r.consumed!==t.length&&a.throwArgumentError("invalid rlp data","data",e),r.result},t.encode=function(e){return(0,n.hexlify)(c(e))};var n=r(908),i=r(64327),o=r(61466),a=new i.Logger(o.version);function s(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function u(e,t,r){for(var n=0,i=0;it+1+n&&a.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function f(e,t){if(0===e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&a.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});var o=u(e,t+1,r);return t+1+r+o>e.length&&a.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),l(e,t,t+1+r,r+o)}if(e[t]>=192){var s=e[t]-192;return t+1+s>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),l(e,t,t+1,s)}if(e[t]>=184){var c=e[t]-183;t+1+c>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});var f=u(e,t+1,c);return t+1+c+f>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+c+f,result:(0,n.hexlify)(e.slice(t+1+c,t+1+c+f))}}if(e[t]>=128){var d=e[t]-128;return t+1+d>e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+d,result:(0,n.hexlify)(e.slice(t+1,t+1+d))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}},48100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="signing-key/5.7.0"},36918:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.EC=void 0;var i=n(r(3355)),o=n(r(31734)),a=n(r(37198));function s(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var u=c;function c(e,t){if(!e)throw new Error(t||"Assertion failed")}c.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var l=s((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),f=s((function(e,t){var r=t;r.assert=u,r.toArray=l.toArray,r.zero2=l.zero2,r.toHex=l.toHex,r.encode=l.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=1&u?3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u:0,r[0].push(a),s=1&c?3!=(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c:0,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new o.default(e,"hex","le")}})),d=f.getNAF,h=f.getJSF,p=f.assert;function y(e,t){this.type=e,this.p=new o.default(t.p,16),this.red=t.prime?o.default.red(t.prime):o.default.mont(this.p),this.zero=new o.default(0).toRed(this.red),this.one=new o.default(1).toRed(this.red),this.two=new o.default(2).toRed(this.red),this.n=t.n&&new o.default(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var m=y;function g(e,t){this.curve=e,this.type=t,this.precomputed=null}y.prototype.point=function(){throw new Error("Not implemented")},y.prototype.validate=function(){throw new Error("Not implemented")},y.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=d(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=i;f>0;f--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];p(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},y.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,f=0;for(o=0;o=1;o-=2){var y=o-1,m=o;if(1===u[y]&&1===u[m]){var g=[t[y],null,null,t[m]];0===t[y].y.cmp(t[m].y)?(g[1]=t[y].add(t[m]),g[2]=t[y].toJ().mixedAdd(t[m].neg())):0===t[y].y.cmp(t[m].y.redNeg())?(g[1]=t[y].toJ().mixedAdd(t[m]),g[2]=t[y].add(t[m].neg())):(g[1]=t[y].toJ().mixedAdd(t[m]),g[2]=t[y].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=h(r[y],r[m]);for(f=Math.max(v[0].length,f),l[y]=new Array(f),l[m]=new Array(f),a=0;a=0;o--){for(var S=0;o>=0;){var x=!0;for(a=0;a=0&&S++,k=k.dblp(S),o<0)break;for(a=0;a0?s=c[a][_-1>>1]:_<0&&(s=c[a][-_-1>>1].neg()),k="affine"===s.type?k.mixedAdd(s):k.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},g.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(a=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new o.default(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},k.prototype.isInfinity=function(){return this.inf},k.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},k.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},k.prototype.getX=function(){return this.x.fromRed()},k.prototype.getY=function(){return this.y.fromRed()},k.prototype.mul=function(e){return e=new o.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},k.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},k.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},k.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},k.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},k.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},b(E,m.BasePoint),w.prototype.jpoint=function(e,t,r){return new E(this,e,t,r)},E.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},E.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},E.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),f=n.redMul(c),d=u.redSqr().redIAdd(l).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},E.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),d=s.redMul(l.redISub(f)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},E.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},E.prototype.inspect=function(){return this.isInfinity()?"":""},E.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var S=s((function(e,t){var r=t;r.base=m,r.short=A,r.mont=null,r.edwards=null})),x=s((function(e,t){var r,n=t,i=f.assert;function o(e){"short"===e.type?this.curve=new S.short(e):"edwards"===e.type?this.curve=new S.edwards(e):this.curve=new S.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.default.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function _(e){if(!(this instanceof _))return new _(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=l.toArray(e.entropy,e.entropyEnc||"hex"),r=l.toArray(e.nonce,e.nonceEnc||"hex"),n=l.toArray(e.pers,e.persEnc||"hex");u(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var P=_;_.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},_.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=l.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var B=f.assert;function C(e,t){if(e instanceof C)return e;this._importDER(e,t)||(B(e.r&&e.s,"Signature without r or s"),this.r=new o.default(e.r,16),this.s=new o.default(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var N=C;function R(){this.place=0}function M(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function U(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}C.prototype._importDER=function(e,t){e=f.toArray(e,t);var r=new R;if(48!==e[r.place++])return!1;var n=M(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=M(e,r);if(!1===i)return!1;var a=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var s=M(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var u=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new o.default(a),this.s=new o.default(u),this.recoveryParam=null,!0},C.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=U(t),r=U(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];L(n,t.length),(n=n.concat(t)).push(2),L(n,r.length);var i=n.concat(r),o=[48];return L(o,i.length),o=o.concat(i),f.encode(o,e)};var j=function(){throw new Error("unsupported")},F=f.assert;function D(e){if(!(this instanceof D))return new D(e);"string"==typeof e&&(F(Object.prototype.hasOwnProperty.call(x,e),"Unknown curve "+e),e=x[e]),e instanceof x.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var H=D;D.prototype.keyPair=function(e){return new O(this,e)},D.prototype.keyFromPrivate=function(e,t){return O.fromPrivate(this,e,t)},D.prototype.keyFromPublic=function(e,t){return O.fromPublic(this,e,t)},D.prototype.genKeyPair=function(e){e||(e={});for(var t=new P({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||j(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new o.default(2));;){var i=new o.default(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},D.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},D.prototype.sign=function(e,t,r,n){"object"===(0,i.default)(r)&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new o.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new P({hash:this.hash,entropy:s,nonce:u,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new o.default(1)),f=0;;f++){var d=n.k?n.k(f):new o.default(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var h=this.g.mul(d);if(!h.isInfinity()){var p=h.getX(),y=p.umod(this.n);if(0!==y.cmpn(0)){var m=d.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(h.getY().isOdd()?1:0)|(0!==p.cmp(y)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new N({r:y,s:m,recoveryParam:g})}}}}}},D.prototype.verify=function(e,t,r,n){e=this._truncateToN(new o.default(e,16)),r=this.keyFromPublic(r,n);var i=(t=new N(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},D.prototype.recoverPubKey=function(e,t,r,n){F((3&r)===r,"The recovery param is more than two bits"),t=new N(t,n);var i=this.n,a=new o.default(e),s=t.r,u=t.s,c=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var f=t.r.invm(i),d=i.sub(a).mul(f).umod(i),h=u.mul(f).umod(i);return this.g.mulAdd(d,s,h)},D.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new N(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var z=s((function(e,t){var r=t;r.version="6.5.4",r.utils=f,r.rand=function(){throw new Error("unsupported")},r.curve=S,r.curves=x,r.ec=H,r.eddsa=null})),q=z.ec;t.EC=q},17612:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0,t.computePublicKey=y,t.recoverPublicKey=function(e,t){var r=(0,s.splitSignature)(t),n={r:(0,s.arrayify)(r.r),s:(0,s.arrayify)(r.s)};return"0x"+h().recoverPubKey((0,s.arrayify)(e),n,r.recoveryParam).encode("hex",!1)};var i=n(r(69721)),o=n(r(58985)),a=r(36918),s=r(908),u=r(23694),c=r(64327),l=r(48100),f=new c.Logger(l.version),d=null;function h(){return d||(d=new a.EC("secp256k1")),d}var p=function(){function e(t){(0,i.default)(this,e),(0,u.defineReadOnly)(this,"curve","secp256k1"),(0,u.defineReadOnly)(this,"privateKey",(0,s.hexlify)(t)),32!==(0,s.hexDataLength)(this.privateKey)&&f.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=h().keyFromPrivate((0,s.arrayify)(this.privateKey));(0,u.defineReadOnly)(this,"publicKey","0x"+r.getPublic(!1,"hex")),(0,u.defineReadOnly)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),(0,u.defineReadOnly)(this,"_isSigningKey",!0)}return(0,o.default)(e,[{key:"_addPoint",value:function(e){var t=h().keyFromPublic((0,s.arrayify)(this.publicKey)),r=h().keyFromPublic((0,s.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=h().keyFromPrivate((0,s.arrayify)(this.privateKey)),r=(0,s.arrayify)(e);32!==r.length&&f.throwArgumentError("bad digest length","digest",e);var n=t.sign(r,{canonical:!0});return(0,s.splitSignature)({recoveryParam:n.recoveryParam,r:(0,s.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,s.hexZeroPad)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=h().keyFromPrivate((0,s.arrayify)(this.privateKey)),r=h().keyFromPublic((0,s.arrayify)(y(e)));return(0,s.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function y(e,t){var r=(0,s.arrayify)(e);if(32===r.length){var n=new p(r);return t?"0x"+h().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?t?(0,s.hexlify)(r):"0x"+h().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+h().keyFromPublic(r).getPublic(!0,"hex"):(0,s.hexlify)(r):f.throwArgumentError("invalid public or private key","key","[REDACTED]")}t.SigningKey=p},56518:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="strings/5.7.0"},95856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=function(e){var t=(0,o.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.HashZero]).slice(0,32))},t.parseBytes32String=function(e){var t=(0,i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===t[r-1];)r--;return(0,o.toUtf8String)(t.slice(0,r))};var n=r(5465),i=r(908),o=r(34997)},68645:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._nameprepTableA1=p,t._nameprepTableB2=y,t._nameprepTableC=m,t.nameprep=function(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();var t,r=(0,n.toUtf8CodePoints)(e);t=r.map((function(e){return u.indexOf(e)>=0||e>=65024&&e<=65039?[]:y(e)||[e]})),r=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(r=(0,n.toUtf8CodePoints)((0,n._toUtf8String)(r),n.UnicodeNormalizationForm.NFKC)).forEach((function(e){if(m(e))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(e){if(p(e))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var i=(0,n._toUtf8String)(r);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");return i};var n=r(34997);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function o(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function a(e,t){for(var r=0,n=0;n=(r+=i.l)&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}var s=o("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),u="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),c=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],l=i("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),f=i("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),d=i("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");for(var t=[],r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return o.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return o.Utf8ErrorFuncs}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return o.Utf8ErrorReason}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return o._toEscapedUtf8String}}),Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return n.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return i.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return n.parseBytes32String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return o.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return o.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return o.toUtf8String}});var n=r(95856),i=r(68645),o=r(34997)},34997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ErrorReason=t.Utf8ErrorFuncs=t.UnicodeNormalizationForm=void 0,t._toEscapedUtf8String=function(e,t){return'"'+f(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?h(e):h(55296+((e-=65536)>>10&1023))+h(56320+(1023&e))})).join("")+'"'},t._toUtf8String=p,t.toUtf8Bytes=d,t.toUtf8CodePoints=function(e){return f(d(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current))},t.toUtf8String=function(e,t){return p(f(e,t))};var n,i,o=r(908),a=r(64327),s=r(56518),u=new a.Logger(s.version);function c(e,t,r,n,o){if(e===i.BAD_PREFIX||e===i.UNEXPECTED_CONTINUE){for(var a=0,s=t+1;s>6==2;s++)a++;return a}return e===i.OVERRUN?r.length-t-1:0}t.UnicodeNormalizationForm=n,function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(t.UnicodeNormalizationForm=n={})),t.Utf8ErrorReason=i,function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(i||(t.Utf8ErrorReason=i={}));var l=Object.freeze({error:function(e,t,r,n,i){return u.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:c,replace:function(e,t,r,n,o){return e===i.OVERLONG?(n.push(o),0):(n.push(65533),c(e,t,r))}});function f(e,t){null==t&&(t=l.error),e=(0,o.arrayify)(e);for(var r=[],n=0;n>7){var s=null,u=null;if(192==(224&a))s=1,u=127;else if(224==(240&a))s=2,u=2047;else{if(240!=(248&a)){n+=t(128==(192&a)?i.UNEXPECTED_CONTINUE:i.BAD_PREFIX,n-1,e,r);continue}s=3,u=65535}if(n-1+s>=e.length)n+=t(i.OVERRUN,n-1,e,r);else{for(var c=a&(1<<8-s-1)-1,f=0;f1114111?n+=t(i.OUT_OF_RANGE,n-1-s,e,r,c):c>=55296&&c<=57343?n+=t(i.UTF16_SURROGATE,n-1-s,e,r,c):c<=u?n+=t(i.OVERLONG,n-1-s,e,r,c):r.push(c))}}else r.push(a)}return r}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(u.checkNormalize(),e=e.normalize(t));for(var r=[],i=0;i>6|192),r.push(63&a|128);else if(55296==(64512&a)){i++;var s=e.charCodeAt(i);if(i>=e.length||56320!=(64512&s))throw new Error("invalid utf-8 string");var c=65536+((1023&a)<<10)+(1023&s);r.push(c>>18|240),r.push(c>>12&63|128),r.push(c>>6&63|128),r.push(63&c|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return(0,o.arrayify)(r)}function h(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function p(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}t.Utf8ErrorFuncs=l},96783:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="transactions/5.7.0"},21936:(e,t,r)=>{"use strict";var n=r(3355);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionTypes=void 0,t.accessListify=x,t.computeAddress=A,t.parse=function(e){var t=(0,a.arrayify)(e);if(t[0]>127)return function(e){var t=l.decode(e);9!==t.length&&6!==t.length&&m.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:b(t[0]).toNumber(),gasPrice:b(t[1]),gasLimit:b(t[2]),to:g(t[3]),value:b(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=o.BigNumber.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,a.hexZeroPad)(t[7],32),r.s=(0,a.hexZeroPad)(t[8],32),o.BigNumber.from(r.r).isZero()&&o.BigNumber.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,i=t.slice(0,6);0!==r.chainId&&(i.push((0,a.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);var s=(0,u.keccak256)(l.encode(i));try{r.from=k(s,{r:(0,a.hexlify)(r.r),s:(0,a.hexlify)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,u.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=l.decode(e.slice(1));8!==t.length&&11!==t.length&&m.throwArgumentError("invalid component count for transaction type: 1","payload",(0,a.hexlify)(e));var r={type:1,chainId:b(t[0]).toNumber(),nonce:b(t[1]).toNumber(),gasPrice:b(t[2]),gasLimit:b(t[3]),to:g(t[4]),value:b(t[5]),data:t[6],accessList:x(t[7])};return 8===t.length||(r.hash=(0,u.keccak256)(e),I(r,t.slice(8),T)),r}(t);case 2:return function(e){var t=l.decode(e.slice(1));9!==t.length&&12!==t.length&&m.throwArgumentError("invalid component count for transaction type: 2","payload",(0,a.hexlify)(e));var r=b(t[2]),n=b(t[3]),i={type:2,chainId:b(t[0]).toNumber(),nonce:b(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:b(t[4]),to:g(t[5]),value:b(t[6]),data:t[7],accessList:x(t[8])};return 9===t.length||(i.hash=(0,u.keccak256)(e),I(i,t.slice(9),P)),i}(t)}return m.throwError("unsupported transaction type: ".concat(t[0]),d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})},t.recoverAddress=k,t.serialize=function(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&m.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,c.checkProperties)(e,w);var r=[];v.forEach((function(t){var n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=(0,a.arrayify)((0,a.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&m.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,a.stripZeros)(n)).length>t.maxLength&&m.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push((0,a.hexlify)(n))}));var n=0;if(null!=e.chainId?"number"!=typeof(n=e.chainId)&&m.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,a.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,a.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return l.encode(r);var i=(0,a.splitSignature)(t),o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&m.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&m.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,a.hexlify)(o)),r.push((0,a.stripZeros)((0,a.arrayify)(i.r))),r.push((0,a.stripZeros)((0,a.arrayify)(i.s))),l.encode(r)}(e,t);switch(e.type){case 1:return T(e,t);case 2:return P(e,t)}return m.throwError("unsupported transaction type: ".concat(e.type),d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})};var i=r(77921),o=r(34952),a=r(908),s=r(5465),u=r(64642),c=r(23694),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=p(void 0);if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}(r(55265)),f=r(17612),d=r(64327),h=r(96783);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}var y,m=new d.Logger(h.version);function g(e){return"0x"===e?null:(0,i.getAddress)(e)}function b(e){return"0x"===e?s.Zero:o.BigNumber.from(e)}t.TransactionTypes=y,function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(y||(t.TransactionTypes=y={}));var v=[{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 A(e){var t=(0,f.computePublicKey)(e);return(0,i.getAddress)((0,a.hexDataSlice)((0,u.keccak256)((0,a.hexDataSlice)(t,1)),12))}function k(e,t){return A((0,f.recoverPublicKey)((0,a.arrayify)(e),t))}function E(e,t){var r=(0,a.stripZeros)(o.BigNumber.from(e).toHexString());return r.length>32&&m.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function S(e,t){return{address:(0,i.getAddress)(e),storageKeys:(t||[]).map((function(t,r){return 32!==(0,a.hexDataLength)(t)&&m.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function x(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&m.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),S(e[0],e[1])):S(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return S(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function _(e){return x(e).map((function(e){return[e.address,e.storageKeys]}))}function P(e,t){if(null!=e.gasPrice){var r=o.BigNumber.from(e.gasPrice),n=o.BigNumber.from(e.maxFeePerGas||0);r.eq(n)||m.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var s=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),E(e.maxFeePerGas||0,"maxFeePerGas"),E(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){var u=(0,a.splitSignature)(t);s.push(E(u.recoveryParam,"recoveryParam")),s.push((0,a.stripZeros)(u.r)),s.push((0,a.stripZeros)(u.s))}return(0,a.hexConcat)(["0x02",l.encode(s)])}function T(e,t){var r=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.gasPrice||0,"gasPrice"),E(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){var n=(0,a.splitSignature)(t);r.push(E(n.recoveryParam,"recoveryParam")),r.push((0,a.stripZeros)(n.r)),r.push((0,a.stripZeros)(n.s))}return(0,a.hexConcat)(["0x01",l.encode(r)])}function I(e,t,r){try{var n=b(t[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");e.v=n}catch(e){m.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,a.hexZeroPad)(t[1],32),e.s=(0,a.hexZeroPad)(t[2],32);try{var i=(0,u.keccak256)(r(e));e.from=k(i,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}},96546:(e,t,r)=>{"use strict";var n=r(28847)(r(90775));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t1?r-1:0),i=1;i{"use strict";var n=r(28847)(r(90775));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;tu;)r&c&&(n=n.add(i)),i=i.double(),r>>=c;return n},precomputeWindow:function(e,t){for(var r=n(t),i=r.windows,o=r.windowSize,a=[],s=e,u=s,c=0;c>=p,g>u&&(g-=h,o+=c);var b=m,v=m+Math.abs(g)-1,w=y%2!=0,A=g<0;0===g?f=f.add(r(w,i[b])):l=l.add(r(A,i[v]))}return{p:l,f}},wNAFCached:function(e,t,r,n){var i=e._WINDOW_SIZE||1,o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,a.validateField)(e.Fp),(0,s.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze(o(o(o({},(0,a.nLength)(e.n,e.nBitLength)),e),{p:e.Fp.ORDER}))}},19751:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(90775)),o=n(r(74519));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=1<<8*t)throw new Error("bad I2OSP call: value=".concat(e," length=").concat(t));for(var r=Array.from({length:t}).fill(0),n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function d(e,t){for(var r=new Uint8Array(e.length),n=0;n255&&(t=n((0,c.concatBytes)((0,c.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));var i=n.outputLen,o=n.blockLen,a=Math.ceil(r/i);if(a>255)throw new Error("Invalid xmd length");var s=(0,c.concatBytes)(t,f(t.length,1)),u=f(0,o),l=f(r,2),y=new Array(a),m=n((0,c.concatBytes)(u,e,l,f(0,1),s));y[0]=n((0,c.concatBytes)(m,f(1,1),s));for(var g=1;g<=a;g++){var b=[d(m,y[g-1]),f(g+1,1),s];y[g]=n(c.concatBytes.apply(void 0,b))}return c.concatBytes.apply(void 0,y).slice(0,r)}function m(e,t,r,n,i){if(h(e),h(t),p(r),t.length>255){var o=Math.ceil(2*n/8);t=i.create({dkLen:o}).update((0,c.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(e).update(f(r,2)).update(t).update(f(t.length,1)).digest()}function g(e,t,r){(0,c.validateObject)(r,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});var n=r.p,i=r.k,o=r.m,a=r.hash,s=r.expand,f=r.DST;h(e),p(t);var d,g=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,c.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(f),b=n.toString(2).length,v=Math.ceil((b+i)/8),w=t*o*v;if("xmd"===s)d=y(e,g,w,a);else if("xof"===s)d=m(e,g,w,i,a);else{if("_internal_pass"!==s)throw new Error('expand must be "xmd" or "xof"');d=e}for(var A=new Array(t),k=0;k{"use strict";var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;var i=r(46928),o=BigInt(0),a=BigInt(1),s=BigInt(2),u=BigInt(3),c=BigInt(4),l=BigInt(5),f=BigInt(8);function d(e,t){var r=e%t;return r>=o?r:t+r}function h(e,t,r){if(r<=o||t 0");if(r===a)return o;for(var n=a;t>o;)t&a&&(n=n*e%r),e=e*e%r,t>>=a;return n}function p(e,t){if(e===o||t<=o)throw new Error("invert: expected positive integers, got n=".concat(e," mod=").concat(t));for(var r=d(e,t),n=t,i=o,s=a,u=a,c=o;r!==o;){var l=n/r,f=n%r,h=i-u*l,p=s-c*l;n=r,r=f,i=u,s=c,u=h,c=p}if(n!==a)throw new Error("invert: does not exist");return d(i,t)}function y(e){var t,r,n,i=(e-a)/s;for(t=e-a,r=0;t%s===o;t/=s,r++);for(n=s;no;)n*=n,n%=r;return n},t.invert=p,t.tonelliShanks=y,t.FpSqrt=m,t.isNegativeLE=function(e,t){return(d(e,t)&a)===a};var g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function b(e,t,r){if(r 0");if(r===o)return e.ONE;if(r===a)return t;for(var n=e.ONE,i=t;r>o;)r&a&&(n=e.mul(n,i)),i=e.sqr(i),r>>=a;return n}function v(e,t){var r=new Array(t.length),n=t.reduce((function(t,n,i){return e.is0(n)?t:(r[i]=t,e.mul(t,n))}),e.ONE),i=e.inv(n);return t.reduceRight((function(t,n,i){return e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))}),i),r}function w(e,t){var r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}t.validateField=function(e){var t=g.reduce((function(e,t){return e[t]="function",e}),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,i.validateObject)(e,t)},t.FpPow=b,t.FpInvertBatch=v,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?p(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){var t=(e.ORDER-a)/s;return function(r){var n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=w,t.Field=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=o)throw new Error("Expected Fp ORDER > 0, got ".concat(e));var u=w(e,t),c=u.nBitLength,l=u.nByteLength;if(l>2048)throw new Error("Field lengths over 2048 bytes are not supported");var f=m(e),h=Object.freeze({ORDER:e,BITS:c,BYTES:l,MASK:(0,i.bitMask)(c),ZERO:o,ONE:a,create:function(t){return d(t,e)},isValid:function(t){if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got ".concat((0,n.default)(t)));return o<=t&&t2&&void 0!==arguments[2]&&arguments[2],n=(e=(0,i.ensureBytes)("privateHash",e)).length,o=w(t).nByteLength+8;if(o<24||n1024)throw new Error("hashToPrivateScalar: expected ".concat(o,"-1024 bytes of input, got ").concat(n));return d(r?(0,i.bytesToNumberLE)(e):(0,i.bytesToNumberBE)(e),t-a)+a}},46928:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(74519)),o=n(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;var a=BigInt(0),s=BigInt(1),u=BigInt(2),c=function(e){return e instanceof Uint8Array},l=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));function f(e){if(!c(e))throw new Error("Uint8Array expected");for(var t="",r=0;ra;e>>=s,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&s},t.bitSet=function(e,t,r){return e|(r?s:a)<0&&void 0!==arguments[0]?arguments[0]:g();i=s(b([0]),e),n=s(),0!==e.length&&(i=s(b([1]),e),n=s())},c=function(){if(o++>=1e3)throw new Error("drbg: tried 1000 values");for(var e=0,r=[];e2&&void 0!==arguments[2]?arguments[2]:{},n=function(t,r,n){var i=v[r];if("function"!=typeof i)throw new Error('Invalid validator "'.concat(r,'", expected function'));var a=e[t];if(!(n&&void 0===a||i(a,e)))throw new Error("Invalid param ".concat(String(t),"=").concat(a," (").concat((0,o.default)(a),"), expected ").concat(r))},a=0,s=Object.entries(t);a{"use strict";var n=r(28847),i=n(r(58985)),o=n(r(69721)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=n(r(22940)),l=n(r(90775)),f=n(r(3355));function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return(0,o.default)(this,c),n.call(this,e)}return(0,i.default)(c)}((0,c.default)(Error)),_parseInt:function(e){var r=t.DER.Err;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");var n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:b(i),l:e.subarray(n+2)}},toSig:function(e){var r=t.DER.Err,n="string"==typeof e?v(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");var i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");var o=t.DER._parseInt(n.subarray(2)),a=o.d,s=o.l,u=t.DER._parseInt(s),c=u.d;if(u.l.length)throw new r("Invalid signature: left bytes after parsing");return{r:a,s:c}},hexFromSig:function(e){var t=function(e){return 8&Number.parseInt(e[0],16)?"00"+e:e},r=function(e){var t=e.toString(16);return 1&t.length?"0".concat(t):t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,a=i.length/2,s=r(o),u=r(a);return"30".concat(r(a+o+4),"02").concat(u).concat(i,"02").concat(s).concat(n)}};var w=BigInt(0),A=BigInt(1),k=BigInt(2),E=BigInt(3),S=BigInt(4);function x(e){var t=function(e){var t=(0,g.validateBasic)(e);y.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});var r=t.endo,n=t.Fp,i=t.a;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==(0,f.default)(r)||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze(h({},t))}(e),r=t.Fp,n=t.toBytes||function(e,t,n){var i=t.toAffine();return y.concatBytes(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))},a=t.fromBytes||function(e){var t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}};function s(e){var n=t.a,i=t.b,o=r.sqr(e),a=r.mul(o,e);return r.add(r.add(a,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function u(e){return"bigint"==typeof e&&ww||f>w;)u&A&&(d=d.add(p)),f&A&&(h=h.add(p)),p=p.double(),u>>=A,f>>=A;return s&&(d=d.negate()),l&&(h=h.negate()),h=new e(r.mul(h.px,o.beta),h.py,h.pz),d.add(h)}},{key:"multiply",value:function(n){c(n);var i,o,a=n,s=t.endo;if(s){var u=s.splitScalar(a),l=u.k1neg,f=u.k1,d=u.k2neg,h=u.k2,p=this.wNAF(f),y=p.p,m=p.f,g=this.wNAF(h),b=g.p,v=g.f;y=S.constTimeNegate(l,y),b=S.constTimeNegate(d,b),b=new e(r.mul(b.px,s.beta),b.py,b.pz),i=y.add(b),o=m.add(v)}else{var w=this.wNAF(a);i=w.p,o=w.f}return e.normalizeZ([i,o])[0]}},{key:"multiplyAndAddUnsafe",value:function(t,r,n){var i=e.BASE,o=function(e,t){return t!==w&&t!==A&&e.equals(i)?e.multiply(t):e.multiplyUnsafe(t)},a=o(this,r).add(o(t,n));return a.is0()?void 0:a}},{key:"toAffine",value:function(e){var t=this.px,n=this.py,i=this.pz,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));var a=r.mul(t,e),s=r.mul(n,e),u=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:a,y:s}}},{key:"isTorsionFree",value:function(){var r=t.h,n=t.isTorsionFree;if(r===A)return!0;if(n)return n(e,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}},{key:"clearCofactor",value:function(){var r=t.h,n=t.clearCofactor;return r===A?this:n?n(e,this):this.multiplyUnsafe(t.h)}},{key:"toRawBytes",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),n(e,this,t)}},{key:"toHex",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return y.bytesToHex(this.toRawBytes(e))}}],[{key:"fromAffine",value:function(t){var n=t||{},i=n.x,o=n.y;if(!t||!r.isValid(i)||!r.isValid(o))throw new Error("invalid affine point");if(t instanceof e)throw new Error("projective point not allowed");var a=function(e){return r.eql(e,r.ZERO)};return a(i)&&a(o)?e.ZERO:new e(i,o,r.ONE)}},{key:"normalizeZ",value:function(t){var n=r.invertBatch(t.map((function(e){return e.pz})));return t.map((function(e,t){return e.toAffine(n[t])})).map(e.fromAffine)}},{key:"fromHex",value:function(t){var r=e.fromAffine(a((0,m.ensureBytes)("pointHex",t)));return r.assertValidity(),r}},{key:"fromPrivateKey",value:function(t){return e.BASE.multiply(l(t))}}]),e}();v.BASE=new v(t.Gx,t.Gy,r.ONE),v.ZERO=new v(r.ZERO,r.ONE,r.ZERO);var k=t.nBitLength,S=(0,g.wNAF)(v,t.endo?Math.ceil(k/2):k);return{CURVE:t,ProjectivePoint:v,normPrivateKeyToScalar:l,weierstrassEquation:s,isWithinCurveOrder:u}}function _(e,t){for(var r=e.ORDER,n=w,i=r-A;i%k===w;i/=k)n+=A;var o=n,a=k<A;y--){var m=y-k;m=k<u>>A}var I=function(e,t,r){return y.bytesToNumberBE(e.slice(t,r))},O=function(){function e(t,r,n){(0,o.default)(this,e),this.r=t,this.s=r,this.recovery=n,this.assertValidity()}return(0,i.default)(e,[{key:"assertValidity",value:function(){if(!_(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!_(this.s))throw new Error("s must be 0 < s < CURVE.n")}},{key:"addRecoveryBit",value:function(t){return new e(this.r,this.s,t)}},{key:"recoverPublicKey",value:function(e){var t=this.r,r=this.s,n=this.recovery,i=R((0,m.ensureBytes)("msgHash",e));if(null==n||![0,1,2,3].includes(n))throw new Error("recovery id invalid");var o=2===n||3===n?t+a.n:t;if(o>=s.ORDER)throw new Error("recovery id 2 or 3 invalid");var u=1&n?"03":"02",c=k.fromHex(u+P(o)),l=b(o),f=d(-i*l),h=d(r*l),p=k.BASE.multiplyAndAddUnsafe(c,f,h);if(!p)throw new Error("point at infinify");return p.assertValidity(),p}},{key:"hasHighS",value:function(){return T(this.s)}},{key:"normalizeS",value:function(){return this.hasHighS()?new e(this.r,d(-this.s),this.recovery):this}},{key:"toDERRawBytes",value:function(){return y.hexToBytes(this.toDERHex())}},{key:"toDERHex",value:function(){return t.DER.hexFromSig({r:this.r,s:this.s})}},{key:"toCompactRawBytes",value:function(){return y.hexToBytes(this.toCompactHex())}},{key:"toCompactHex",value:function(){return P(this.r)+P(this.s)}}],[{key:"fromCompact",value:function(t){var r=a.nByteLength;return t=(0,m.ensureBytes)("compactSignature",t,2*r),new e(I(t,0,r),I(t,r,2*r))}},{key:"fromDER",value:function(r){var n=t.DER.toSig((0,m.ensureBytes)("DER",r));return new e(n.r,n.s)}}]),e}(),B={isValidPrivateKey:function(e){try{return E(e),!0}catch(e){return!1}},normPrivateKeyToScalar:E,randomPrivateKey:function(){var e=a.randomBytes(s.BYTES+8),t=p.hashToPrivateScalar(e,u);return y.numberToBytesBE(t,a.nByteLength)},precompute:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k.BASE;return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function C(e){var t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===c||n===l:r?n===2*c||n===2*l:e instanceof k}var N=a.bits2int||function(e){var t=y.bytesToNumberBE(e),r=8*e.length-a.nBitLength;return r>0?t>>BigInt(r):t},R=a.bits2int_modN||function(e){return d(N(e))},M=y.bitMask(a.nBitLength);function U(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(w<=e&&e1&&void 0!==arguments[1])||arguments[1];return k.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(C(e))throw new Error("first arg must be private key");if(!C(t))throw new Error("second arg must be public key");return k.fromHex(t).multiply(E(e)).toRawBytes(r)},sign:function(e,t){var r=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:L;if(["recovered","canonical"].some((function(e){return e in r})))throw new Error("sign() legacy options not supported");var n=a.hash,i=a.randomBytes,o=r.lowS,u=r.prehash,c=r.extraEntropy;null==o&&(o=!0),e=(0,m.ensureBytes)("msgHash",e),u&&(e=(0,m.ensureBytes)("prehashed msgHash",n(e)));var l=R(e),f=E(t),h=[U(f),U(l)];if(null!=c){var p=!0===c?i(s.BYTES):c;h.push((0,m.ensureBytes)("extraEntropy",p,s.BYTES))}var g=y.concatBytes.apply(y,h),v=l;return{seed:g,k2sig:function(e){var t=N(e);if(_(t)){var r=b(t),n=k.BASE.multiply(t).toAffine(),i=d(n.x);if(i!==w){var a=d(r*d(v+i*f));if(a!==w){var s=(n.x===i?0:2)|Number(n.y&A),u=a;return o&&T(a)&&(u=function(e){return T(e)?d(-e):e}(a),s^=1),new O(i,u,s)}}}}}}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:L),n=r.seed,i=r.k2sig,o=a;return y.createHmacDrbg(o.hash.outputLen,o.nByteLength,o.hmac)(n,i)},verify:function(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,s=e;if(r=(0,m.ensureBytes)("msgHash",r),n=(0,m.ensureBytes)("publicKey",n),"strict"in o)throw new Error("options.strict was renamed to lowS");var u,c=o.lowS,l=o.prehash,h=void 0;try{if("string"==typeof s||s instanceof Uint8Array)try{h=O.fromDER(s)}catch(e){if(!(e instanceof t.DER.Err))throw e;h=O.fromCompact(s)}else{if("object"!==(0,f.default)(s)||"bigint"!=typeof s.r||"bigint"!=typeof s.s)throw new Error("PARSE");var p=s.r,y=s.s;h=new O(p,y)}u=k.fromHex(n)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&h.hasHighS())return!1;l&&(r=a.hash(r));var g=h,v=g.r,w=g.s,A=R(r),E=b(w),S=d(A*E),x=d(v*E),_=null===(i=k.BASE.multiplyAndAddUnsafe(u,S,x))||void 0===i?void 0:i.toAffine();return!!_&&d(_.x)===v},ProjectivePoint:k,Signature:O,utils:B}},t.SWUFpSqrtRatio=_,t.mapToCurveSimpleSWU=function(e,t){if(p.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");var r=_(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return function(n){var i,o,a,s,u,c,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),a=e.add(o,e.ONE),a=e.mul(a,t.B),s=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),s=e.mul(s,t.A),o=e.sqr(a),c=e.sqr(s),u=e.mul(c,t.A),o=e.add(o,u),o=e.mul(o,a),c=e.mul(c,s),u=e.mul(c,t.B),o=e.add(o,u),l=e.mul(i,a);var d=r(o,c),h=d.isValid,p=d.value;f=e.mul(i,n),f=e.mul(f,p),l=e.cmov(l,a,h),f=e.cmov(f,p,h);var y=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,y),{x:l=e.div(l,s),y:f}}}},4158:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;var n=r(61241),i=r(72434),o=r(3970),a=r(16573),s=r(46928),u=r(19751),c=r(96546),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),d=BigInt(1),h=BigInt(2),p=function(e,t){return(e+t/h)/t};function y(e){var t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),a=BigInt(22),s=BigInt(23),u=BigInt(44),c=BigInt(88),f=e*e*e%t,d=f*f*e%t,p=(0,o.pow2)(d,r,t)*d%t,y=(0,o.pow2)(p,r,t)*d%t,g=(0,o.pow2)(y,h,t)*f%t,b=(0,o.pow2)(g,i,t)*g%t,v=(0,o.pow2)(b,a,t)*b%t,w=(0,o.pow2)(v,u,t)*v%t,A=(0,o.pow2)(w,c,t)*w%t,k=(0,o.pow2)(A,u,t)*v%t,E=(0,o.pow2)(k,r,t)*d%t,S=(0,o.pow2)(E,s,t)*b%t,x=(0,o.pow2)(S,n,t)*f%t,_=(0,o.pow2)(x,h,t);if(!m.eql(m.sqr(_),e))throw new Error("Cannot find square root");return _}var m=(0,o.Field)(l,void 0,void 0,{sqrt:y});t.secp256k1=(0,c.createCurve)({a:BigInt(0),b:BigInt(7),Fp:m,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:function(e){var t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-d*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=BigInt("0x100000000000000000000000000000000"),u=p(a*e,t),c=p(-n*e,t),l=(0,o.mod)(e-u*r-c*i,t),h=(0,o.mod)(-u*n-c*a,t),y=l>s,m=h>s;if(y&&(l=t-l),m&&(h=t-h),l>s||h>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:y,k1:l,k2neg:m,k2:h}}}},n.sha256);var g=BigInt(0),b=function(e){return"bigint"==typeof e&&g1?i-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:(0,i.randomBytes)(32),n=(0,s.ensureBytes)("message",e),o=P(t),a=o.bytes,u=o.scalar,c=(0,s.ensureBytes)("auxRand",r,32),l=E(u^(0,s.bytesToNumberBE)(A("BIP0340/aux",c))),f=A("BIP0340/nonce",l,a,n),d=x((0,s.bytesToNumberBE)(f));if(d===g)throw new Error("sign failed: k is zero");var h=P(d),p=h.bytes,y=h.scalar,m=I(p,a,n),b=new Uint8Array(64);if(b.set(p,0),b.set(E(x(y+m*u)),32),!O(b,n,a))throw new Error("sign: Invalid signature produced");return b},verify:O,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:T,pointToBytes:k,numberToBytesBE:s.numberToBytesBE,bytesToNumberBE:s.bytesToNumberBE,taggedHash:A,mod:o.mod}};var B=(0,u.isogenyMap)(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((function(e){return e.map((function(e){return BigInt(e)}))}))),C=(0,a.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))}),N=(0,u.createHasher)(t.secp256k1.ProjectivePoint,(function(e){var t=C(m.create(e[0])),r=t.x,n=t.y;return B(r,n)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256});t.hashToCurve=N.hashToCurve,t.encodeToCurve=N.encodeToCurve},96822:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Wrong positive integer: ".concat(e))}function n(e){if("boolean"!=typeof e)throw new Error("Expected boolean, not ".concat(e))}function i(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&!r.includes(e.length))throw new Error("Expected Uint8Array of length ".concat(r,", not of length=").concat(e.length))}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){i(e);var r=t.outputLen;if(e.length{"use strict";var n=r(28847),i=n(r(93106)),o=n(r(69721)),a=n(r(58985)),s=n(r(15163)),u=n(r(34650)),c=n(r(21949));Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;var l=r(96822),f=r(72434),d=function(e){(0,s.default)(d,e);var t,r,n=(t=d,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,u.default)(this,e)});function d(e,t,r,i){var a;return(0,o.default)(this,d),(a=n.call(this)).blockLen=e,a.outputLen=t,a.padOffset=r,a.isLE=i,a.finished=!1,a.length=0,a.pos=0,a.destroyed=!1,a.buffer=new Uint8Array(e),a.view=(0,f.createView)(a.buffer),a}return(0,a.default)(d,[{key:"update",value:function(e){l.default.exists(this);for(var t=this.view,r=this.buffer,n=this.blockLen,i=(e=(0,f.toBytes)(e)).length,o=0;on-o&&(this.process(r,0),o=0);for(var a=o;a>i&o),s=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,a,n),e.setUint32(t+c,s,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);var s=(0,f.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");var c=u/4,d=this.get();if(c>d.length)throw new Error("_sha2: outputLen bigger than state");for(var h=0;h{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.toBig=t.split=t.fromBig=void 0;var r=BigInt(Math.pow(2,32)-1),n=BigInt(32);function i(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(e.length),n=new Uint32Array(e.length),o=0;o>>0)+(n>>>0);return{h:e+r+(i/Math.pow(2,32)|0)|0,l:0|i}}t.fromBig=i,t.split=o,t.toBig=function(e,t){return BigInt(e>>>0)<>>0)},t.add=a;var s={fromBig:i,split:o,toBig:t.toBig,shrSH:function(e,t,r){return e>>>r},shrSL:function(e,t,r){return e<<32-r|t>>>r},rotrSH:function(e,t,r){return e>>>r|t<<32-r},rotrSL:function(e,t,r){return e<<32-r|t>>>r},rotrBH:function(e,t,r){return e<<64-r|t>>>r-32},rotrBL:function(e,t,r){return e>>>r-32|t<<64-r},rotr32H:function(e,t){return t},rotr32L:function(e,t){return e},rotlSH:function(e,t,r){return e<>>32-r},rotlSL:function(e,t,r){return t<>>32-r},rotlBH:function(e,t,r){return t<>>64-r},rotlBL:function(e,t,r){return e<>>64-r},add:a,add3L:function(e,t,r){return(e>>>0)+(t>>>0)+(r>>>0)},add3H:function(e,t,r,n){return t+r+n+(e/Math.pow(2,32)|0)|0},add4L:function(e,t,r,n){return(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)},add4H:function(e,t,r,n,i){return t+r+n+i+(e/Math.pow(2,32)|0)|0},add5H:function(e,t,r,n,i,o){return t+r+n+i+o+(e/Math.pow(2,32)|0)|0},add5L:function(e,t,r,n,i){return(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)}};t.default=s},39712:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))&&"crypto"in globalThis?globalThis.crypto:void 0},45896:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949));Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;var c=r(96822),l=r(72434),f=function(e){(0,a.default)(f,e);var t,r,n=(t=f,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function f(e,t){var r;(0,i.default)(this,f),(r=n.call(this)).finished=!1,r.destroyed=!1,c.default.hash(e);var o=(0,l.toBytes)(t);if(r.iHash=e.create(),"function"!=typeof r.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");r.blockLen=r.iHash.blockLen,r.outputLen=r.iHash.outputLen;var a=r.blockLen,s=new Uint8Array(a);s.set(o.length>a?e.create().update(o).digest():o);for(var u=0;u{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949));function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.default)(e);if(t){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;var l=r(20330),f=r(72434),d=function(e,t,r){return e&t^e&r^t&r},h=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]),p=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),y=new Uint32Array(64),m=function(e){(0,a.default)(r,e);var t=c(r);function r(){var e;return(0,i.default)(this,r),(e=t.call(this,64,32,8,!1)).A=0|p[0],e.B=0|p[1],e.C=0|p[2],e.D=0|p[3],e.E=0|p[4],e.F=0|p[5],e.G=0|p[6],e.H=0|p[7],e}return(0,o.default)(r,[{key:"get",value:function(){return[this.A,this.B,this.C,this.D,this.E,this.F,this.G,this.H]}},{key:"set",value:function(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}},{key:"process",value:function(e,t){for(var r=0;r<16;r++,t+=4)y[r]=e.getUint32(t,!1);for(var n=16;n<64;n++){var i=y[n-15],o=y[n-2],a=(0,f.rotr)(i,7)^(0,f.rotr)(i,18)^i>>>3,s=(0,f.rotr)(o,17)^(0,f.rotr)(o,19)^o>>>10;y[n]=s+y[n-7]+a+y[n-16]|0}var u,c=this.A,l=this.B,p=this.C,m=this.D,g=this.E,b=this.F,v=this.G,w=this.H;for(r=0;r<64;r++){var A=w+((0,f.rotr)(g,6)^(0,f.rotr)(g,11)^(0,f.rotr)(g,25))+((u=g)&b^~u&v)+h[r]+y[r]|0,k=((0,f.rotr)(c,2)^(0,f.rotr)(c,13)^(0,f.rotr)(c,22))+d(c,l,p)|0;w=v,v=b,b=g,g=m+A|0,m=p,p=l,l=c,c=A+k|0}c=c+this.A|0,l=l+this.B|0,p=p+this.C|0,m=m+this.D|0,g=g+this.E|0,b=b+this.F|0,v=v+this.G|0,w=w+this.H|0,this.set(c,l,p,m,g,b,v,w)}},{key:"roundClean",value:function(){y.fill(0)}},{key:"destroy",value:function(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}]),r}(l.SHA2),g=function(e){(0,a.default)(r,e);var t=c(r);function r(){var e;return(0,i.default)(this,r),(e=t.call(this)).A=-1056596264,e.B=914150663,e.C=812702999,e.D=-150054599,e.E=-4191439,e.F=1750603025,e.G=1694076839,e.H=-1090891868,e.outputLen=28,e}return(0,o.default)(r)}(m);t.sha256=(0,f.wrapConstructor)((function(){return new m})),t.sha224=(0,f.wrapConstructor)((function(){return new g}))},64376:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=n(r(74519));Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;for(var l=r(96822),f=r(64356),d=r(72434),h=[],p=[],y=[],m=BigInt(0),g=BigInt(1),b=BigInt(2),v=BigInt(7),w=BigInt(256),A=BigInt(113),k=0,E=g,S=1,x=0;k<24;k++){var _=[x,(2*S+3*x)%5];S=_[0],x=_[1],h.push(2*(5*x+S)),p.push((k+1)*(k+2)/2%64);for(var P=m,T=0;T<7;T++)(E=(E<>v)*A)%w)&b&&(P^=g<<(g<32?f.default.rotlBH(e,t,r):f.default.rotlSH(e,t,r)},R=function(e,t,r){return r>32?f.default.rotlBL(e,t,r):f.default.rotlSL(e,t,r)};function M(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,r=new Uint32Array(10),n=24-t;n<24;n++){for(var i=0;i<10;i++)r[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(var o=0;o<10;o+=2)for(var a=(o+8)%10,s=(o+2)%10,u=r[s],c=r[s+1],l=N(u,c,1)^r[a],f=R(u,c,1)^r[a+1],d=0;d<50;d+=10)e[o+d]^=l,e[o+d+1]^=f;for(var y=e[2],m=e[3],g=0;g<24;g++){var b=p[g],v=N(y,m,b),w=R(y,m,b),A=h[g];y=e[A],m=e[A+1],e[A]=v,e[A+1]=w}for(var k=0;k<50;k+=10){for(var E=0;E<10;E++)r[E]=e[k+E];for(var S=0;S<10;S++)e[k+S]^=~r[(S+2)%10]&r[(S+4)%10]}e[0]^=B[n],e[1]^=C[n]}r.fill(0)}t.keccakP=M;var U=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e,t,r){var o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if((0,i.default)(this,c),(o=n.call(this)).blockLen=e,o.suffix=t,o.outputLen=r,o.enableXOF=a,o.rounds=s,o.pos=0,o.posOut=0,o.finished=!1,o.destroyed=!1,l.default.number(r),0>=o.blockLen||o.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");return o.state=new Uint8Array(200),o.state32=(0,d.u32)(o.state),o}return(0,o.default)(c,[{key:"keccak",value:function(){M(this.state32,this.rounds),this.posOut=0,this.pos=0}},{key:"update",value:function(e){l.default.exists(this);for(var t=this.blockLen,r=this.state,n=(e=(0,d.toBytes)(e)).length,i=0;i=r&&this.keccak();var o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}},{key:"xofInto",value:function(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}},{key:"xof",value:function(e){return l.default.number(e),this.xofInto(new Uint8Array(e))}},{key:"digestInto",value:function(e){if(l.default.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}},{key:"digest",value:function(){return this.digestInto(new Uint8Array(this.outputLen))}},{key:"destroy",value:function(){this.destroyed=!0,this.state.fill(0)}},{key:"_cloneInto",value:function(e){var t=this.blockLen,r=this.suffix,n=this.outputLen,i=this.rounds,o=this.enableXOF;return e||(e=new c(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}]),c}(d.Hash);t.Keccak=U;var L=function(e,t,r){return(0,d.wrapConstructor)((function(){return new U(t,e,r)}))};t.sha3_224=L(6,144,28),t.sha3_256=L(6,136,32),t.sha3_384=L(6,104,48),t.sha3_512=L(6,72,64),t.keccak_224=L(1,144,28),t.keccak_256=L(1,136,32),t.keccak_384=L(1,104,48),t.keccak_512=L(1,72,64);var j=function(e,t,r){return(0,d.wrapXOFConstructorWithOpts)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new U(t,e,void 0===n.dkLen?r:n.dkLen,!0)}))};t.shake128=j(31,168,16),t.shake256=j(31,136,32)},72434:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(69721)),a=n(r(58985)),s=n(r(94571)),u=n(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;var c=r(39712),l=function(e){return e instanceof Uint8Array};if(t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");var f=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));t.bytesToHex=function(e){if(!l(e))throw new Error("Uint8Array expected");for(var t="",r=0;r=0&&u0&&void 0!==arguments[0]?arguments[0]:32;if(c.crypto&&"function"==typeof c.crypto.getRandomValues)return c.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},53368:(e,t,r)=>{"use strict";var n,i,o=r(28847)(r(3355));void 0===(i="function"==typeof(n=function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r{"use strict";var n=t;n.bignum=r(31734),n.define=r(41568).define,n.base=r(12412),n.constants=r(79387),n.decoders=r(61500),n.encoders=r(47506)},41568:(e,t,r)=>{"use strict";var n=r(47506),i=r(61500),o=r(41736);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){var t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},90585:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(41736),o=r(32719).b,a=r(11755).Buffer;function s(e,t){o.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function u(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return u.isEncoderBuffer(e)||(e=new u(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+(0,n.default)(e));this.value=e,this.length=e.length}}i(s,o),t.C=s,s.isDecoderBuffer=function(e){return e instanceof s||"object"===(0,n.default)(e)&&a.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=u,u.isEncoderBuffer=function(e){return e instanceof u||"object"===(0,n.default)(e)&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},u.prototype.join=function(e,t){return e||(e=a.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},12412:(e,t,r)=>{"use strict";var n=t;n.Reporter=r(32719).b,n.DecoderBuffer=r(90585).C,n.EncoderBuffer=r(90585).R,n.Node=r(51371)},51371:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(32719).b,o=r(90585).R,a=r(90585).C,s=r(94504),u=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u);function l(e,t,r){var n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=l;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){var e=this._baseState,t={};f.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},l.prototype._wrap=function(){var e=this._baseState;c.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},l.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==(0,n.default)(e)||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){l.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),u.forEach((function(e){l.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),l.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},l.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,o=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(o=this._peekTag(e,u,r.any),e.isError(o))return o}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(c)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){var l=this._decodeTag(e,r.explicit);if(e.isError(l))return l;e=l}var f=e.offset;if(null===r.use&&null===r.choice){var d;r.any&&(d=e.save());var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?i=e.raw(d):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),f,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},l.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},l.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=e.save(),s=r.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;n={type:o,value:u},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},l.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},l.prototype._encodeValue=function(e,t,r){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new i);var a=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var s=null,u=!1;if(o.any)a=this._createEncoderBuffer(e);else if(o.choice)a=this._encodeChoice(e,t);else if(o.contains)s=this._getUse(o.contains,r)._encode(e,t),u=!0;else if(o.children)s=o.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if("object"!==(0,n.default)(e))return t.error("Child expected, but input is not object");var o=r._encode(e[r._baseState.key],t,e);return t.leaveKey(i),o}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),c))}else null!==o.use?a=this._getUse(o.use,r)._encode(e,t):(s=this._encodePrimitive(o.tag,e),u=!0);if(!o.any&&null===o.choice){var l=null!==o.implicit?o.implicit:o.tag,f=null===o.implicit?"universal":"context";null===l?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(a=this._encodeComposite(l,u,f,s))}return null!==o.explicit&&(a=this._encodeComposite(o.explicit,!1,"context",a)),a},l.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},32719:(e,t,r)=>{"use strict";var n=r(41736);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},6520:(e,t)=>{"use strict";function r(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},79387:(e,t,r)=>{"use strict";var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(6520)},92387:(e,t,r)=>{"use strict";var n=r(41736),i=r(31734),o=r(90585).C,a=r(51371),s=r(6520);function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.call(this,"der",e)}function l(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=!(32&r);if(31&~r)r&=31;else{var o=r;for(r=0;!(128&~o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function f(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(!(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o{"use strict";var n=t;n.der=r(92387),n.pem=r(50529)},50529:(e,t,r)=>{"use strict";var n=r(41736),i=r(11755).Buffer,o=r(92387);function a(e){o.call(this,e),this.enc="pem"}n(a,o),e.exports=a,a.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,u=-1,c=0;c{"use strict";var n=r(41736),i=r(11755).Buffer,o=r(51371),a=r(6520);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(u,o),u.prototype._encodeComposite=function(e,t,r,n){var o=function(e,t,r,n){var i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[r||"universal"]<<6)}(e,t,r,this.reporter);if(n.length<128){var s=i.alloc(2);return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var u=1,c=n.length;c>=256;c>>=8)u++;var l=i.alloc(2+u);l[0]=o,l[1]=128|u;for(var f=1+u,d=n.length;d>0;f--,d>>=8)l[f]=255&d;return this._createEncoderBuffer([l,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=i.alloc(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s=128;u>>=7)a++}for(var c=i.alloc(a),l=c.length-1,f=e.length-1;f>=0;f--){var d=e[f];for(c[l--]=127&d;(d>>=7)>0;)c[l--]=128|127&d}return this._createEncoderBuffer(c)},u.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=i.from(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=i.alloc(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var a=1,s=e;s>=256;s>>=8)a++;for(var u=new Array(a),c=u.length-1;c>=0;c--)u[c]=255&e,e>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(i.from(u))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n{"use strict";var n=t;n.der=r(11068),n.pem=r(38520)},38520:(e,t,r)=>{"use strict";var n=r(41736),i=r(11068);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],o=0;o{"use strict";var n=r(28847)(r(3355)),i=r(33103);function o(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(!w(e[a=l[u]],t[a],r,n))return!1;return!0}(e,t,r,i))}return r?e===t:e==t}function A(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function k(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&b(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!e&&i&&!r;if((!e&&s.isError(i)&&o&&k(i,r)||a)&&b(i,r,"Got unwanted exception"+n),e&&i&&r&&!k(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=y(t),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},s.inherits(h.AssertionError,Error),h.fail=b,h.ok=v,h.equal=function(e,t,r){e!=t&&b(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&b(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){w(e,t,!1)||b(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){w(e,t,!0)||b(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){w(e,t,!1)&&b(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){w(t,r,!0)&&b(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&b(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&b(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){E(!0,e,t,r)},h.doesNotThrow=function(e,t,r){E(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=i((function e(t,r){t||b(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var S=Object.keys||function(e){var t=[];for(var r in e)u.call(e,r)&&t.push(r);return t}},94074:e=>{"use strict";"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},86732:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},69954:(e,t,r)=>{"use strict";var n=r(19142),i=r(28847)(r(3355)),o=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),f(n,e,n.depth)}function c(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function l(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=f(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),E(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(r);if(0===a.length){if(S(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return d(r)}var c,l="",A=!1,x=["{","}"];return p(r)&&(A=!0,x=["[","]"]),S(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(l=" "+RegExp.prototype.toString.call(r)),k(r)&&(l=" "+Date.prototype.toUTCString.call(r)),E(r)&&(l=" "+d(r)),0!==a.length||A&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=A?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,x)):x[0]+l+x[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),T(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=m(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function v(e){return void 0===e}function w(e){return A(e)&&"[object RegExp]"===x(e)}function A(e){return"object"===(0,i.default)(e)&&null!==e}function k(e){return A(e)&&"[object Date]"===x(e)}function E(e){return A(e)&&("[object Error]"===x(e)||e instanceof Error)}function S(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(v(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=y,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=b,t.isSymbol=function(e){return"symbol"===(0,i.default)(e)},t.isUndefined=v,t.isRegExp=w,t.isObject=A,t.isDate=k,t.isError=E,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,i.default)(e)||void 0===e},t.isBuffer=r(86732);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[_((e=new Date).getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),P[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(94074),t._extend=function(e,t){if(!t||!A(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},27548:(e,t,r)=>{"use strict";var n=r(48850).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,l=new Uint8Array(a);e[r];){var f=t[e.charCodeAt(r)];if(255===f)return;for(var d=0,h=a-1;(0!==f||d>>0,l[h]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");o=d,r++}for(var p=a-o;p!==a&&0===l[p];)p++;var y=n.allocUnsafe(i+(a-p));y.fill(0,0,i);for(var m=i;p!==a;)y[m++]=l[p++];return y}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,r++;for(var c=(a-o)*l+1>>>0,f=new Uint8Array(c);o!==a;){for(var d=t[o],h=0,p=c-1;(0!==d||h>>0,f[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");i=h,o++}for(var y=c-i;y!==c&&0===f[y];)y++;for(var m=u.repeat(r);y{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},31734:(e,t,r)=>{"use strict";e=r.nmd(e);var n=r(28847)(r(3355));!function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===(0,n.default)(e)?e.exports=o:(void 0).BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(29033).Buffer}catch(e){}function s(e,r){var n=e.charCodeAt(r);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void t(!1,"Invalid character in "+e)}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,r,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=r;u=49?c-49+10:c>=17?c-17+10:c,t(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,r,i){if("number"==typeof e)return this._initNumber(e,r,i);if("object"===(0,n.default)(e))return this._initArray(e,r,i);"hex"===r&&(r=16),t(r===(0|r)&&r>=2&&r<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=u(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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"],h=[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],p=[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];function y(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,r){var n;if(r=0|r||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?d[6-u.length]+u+n:u+n}for(0!==o&&(n=o.toString(16)+n);n.length%r!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],l=p[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var y=f.modrn(l).toString(e);n=(f=f.idivn(l)).isZero()?y+n:d[c-y.length]+y+n}for(this.isZero()&&(n="0"+n);n.length%r!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}t(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,r,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);t(i<=o,"byte array longer than desired length"),t(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===r?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return!(8191&t)&&(r+=13,t>>>=13),!(127&t)&&(r+=7,t>>>=7),!(15&t)&&(r+=4,t>>>=4),!(3&t)&&(r+=2,t>>>=2),!(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){t("number"==typeof e&&e>=0);var r=0|Math.ceil(e/26),n=e%26;this._expand(r),n>0&&r--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,r){t("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=r?this.words[n]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,y=h>>>13,m=0|a[2],g=8191&m,b=m>>>13,v=0|a[3],w=8191&v,A=v>>>13,k=0|a[4],E=8191&k,S=k>>>13,x=0|a[5],_=8191&x,P=x>>>13,T=0|a[6],I=8191&T,O=T>>>13,B=0|a[7],C=8191&B,N=B>>>13,R=0|a[8],M=8191&R,U=R>>>13,L=0|a[9],j=8191&L,F=L>>>13,D=0|s[0],H=8191&D,z=D>>>13,q=0|s[1],G=8191&q,K=q>>>13,V=0|s[2],J=8191&V,W=V>>>13,Q=0|s[3],Z=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(d,H)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(y,H)|0,o=Math.imul(y,z);var ge=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,H),i=(i=Math.imul(g,z))+Math.imul(b,H)|0,o=Math.imul(b,z),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,K)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,z))+Math.imul(A,H)|0,o=Math.imul(A,z),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,W)|0;var ve=(c+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,z))+Math.imul(S,H)|0,o=Math.imul(S,z),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Y)|0;var we=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(_,H),i=(i=Math.imul(_,z))+Math.imul(P,H)|0,o=Math.imul(P,z),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,K)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0;var Ae=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,z))+Math.imul(O,H)|0,o=Math.imul(O,z),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var ke=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,z))+Math.imul(N,H)|0,o=Math.imul(N,z),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0;var Ee=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,z))+Math.imul(U,H)|0,o=Math.imul(U,z),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,K)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0;var Se=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,z))+Math.imul(F,H)|0,o=Math.imul(F,z),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(U,G)|0,o=o+Math.imul(U,K)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(N,J)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ye)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,K))+Math.imul(F,G)|0,o=Math.imul(F,K),n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(U,J)|0,o=o+Math.imul(U,W)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var _e=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,W))+Math.imul(F,J)|0,o=Math.imul(F,W),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Pe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,Y))+Math.imul(F,Z)|0,o=Math.imul(F,Y),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Te=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Ie=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ye)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(U,ue)|0,o=o+Math.imul(U,ce)|0,n=n+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(N,fe)|0,o=o+Math.imul(N,de)|0;var Be=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(U,fe)|0,o=o+Math.imul(U,de)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ye)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ne=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ye)|0)+Math.imul(U,pe)|0))<<13)|0;c=((o=o+Math.imul(U,ye)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Re=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ye))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,u[0]=me,u[1]=ge,u[2]=be,u[3]=ve,u[4]=we,u[5]=Ae,u[6]=ke,u[7]=Ee,u[8]=Se,u[9]=xe,u[10]=_e,u[11]=Pe,u[12]=Te,u[13]=Ie,u[14]=Oe,u[15]=Be,u[16]=Ce,u[17]=Ne,u[18]=Re,0!==c&&(u[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(m=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?y(this,e,t):r<1024?g(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*r;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),r?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var r,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(r=0;r>>26-n}a&&(this.words[r]=a,this.length++)}if(0!==i){for(r=this.length-1;r>=0;r--)this.words[r+i]=this.words[r];for(r=0;r=0),i=r?(r-r%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,r,n){return t(0===this.negative),this.iushrn(e,r,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){t("number"==typeof e&&e>=0);var r=e%26,n=(e-r)/26,i=1<=0);var r=e%26,n=(e-r)/26;if(t(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==r&&n++,this.length=Math.min(n,this.length),0!==r){var i=67108863^67108863>>>r<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(t("number"==typeof e),t(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var r=0;r>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(t(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,r,n){return t(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,r),"mod"!==r&&(i=s.div.neg()),"div"!==r&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),r),"mod"!==r&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),r),"div"!==r&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===r?{div:this.divn(e.words[0]),mod:null}:"mod"===r?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,r);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var r=e<0;r&&(e=-e),t(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return r?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var r=e<0;r&&(e=-e),t(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),r?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){t(0===e.negative),t(!e.isZero());var r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;r.isEven()&&n.isEven();)r.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),f=r.clone();!r.isZero();){for(var d=0,h=1;!(r.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,y=1;!(n.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);r.cmp(n)>=0?(r.isub(n),i.isub(s),a.isub(u)):(n.isub(r),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(e){t(0===e.negative),t(!e.isZero());var r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();r.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;!(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;!(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);r.cmp(n)>=0?(r.isub(n),a.isub(s)):(n.isub(r),s.isub(a))}return(i=0===r.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){t("number"==typeof e);var r=e%26,n=(e-r)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var r,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)r=1;else{n&&(e=-e),t(e<=67108863,"Number is too big");var i=0|this.words[0];r=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return t(!this.red,"Already a number in reduction context"),t(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return t(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return t(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var r=o._prime(e);this.m=r.p,this.prime=r}else t(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function P(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(k,A),k.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new E;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return w[e]=t,t},_.prototype._verify1=function(e){t(0===e.negative,"red works only with positives"),t(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,r){t(!(e.negative|r.negative),"red works only with positives"),t(e.red&&e.red===r.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var r=this.m.andln(3);if(t(r%2==1),3===r){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);t(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var y=h,m=0;0!==y.cmp(s);m++)y=y.redSqr();t(m=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new P(e)},i(P,_),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},P.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},P.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},P.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e)},82202:(e,t,r)=>{"use strict";var n,i=r(28847)(r(3355));function o(e){this.rand=e}if(e.exports=function(e){return n||(n=new o(null)),n.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r{"use strict";var n=r(48850).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i>>24]^l[p>>>16&255]^f[y>>>8&255]^d[255&m]^t[g++],a=c[p>>>24]^l[y>>>16&255]^f[m>>>8&255]^d[255&h]^t[g++],s=c[y>>>24]^l[m>>>16&255]^f[h>>>8&255]^d[255&p]^t[g++],u=c[m>>>24]^l[h>>>16&255]^f[p>>>8&255]^d[255&y]^t[g++],h=o,p=a,y=s,m=u;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[y>>>8&255]<<8|n[255&m])^t[g++],a=(n[p>>>24]<<24|n[y>>>16&255]<<16|n[m>>>8&255]<<8|n[255&h])^t[g++],s=(n[y>>>24]<<24|n[m>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[g++],u=(n[m>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&y])^t[g++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var l=e[a],f=e[l],d=e[f],h=257*e[c]^16843008*c;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*d^65537*f^257*l^16843008*a,o[0][c]=h<<24|h>>>8,o[1][c]=h<<16|h>>>16,o[2][c]=h<<8|h>>>24,o[3][c]=h,0===a?a=s=1:(a=l^e[e[e[d^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],l=0;l>>24]]^u.INV_SUB_MIX[1][u.SBOX[d>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[d>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&d]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},10426:(e,t,r)=>{"use strict";var n=r(37494),i=r(48850).Buffer,o=r(93013),a=r(41736),s=r(26626),u=r(96316),c=r(67557);function l(e,t,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var l=this._cipher.encryptBlock(u);this._ghash=new s(l),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,l=i.alloc(8);l.writeUIntBE(u,0,8),n.update(l),e._finID=n.state;var f=i.from(e._finID);return c(f),f}(this,r,l),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(l,o),l.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i{"use strict";var n=r(85478),i=r(32184),o=r(44946);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},32184:(e,t,r)=>{"use strict";var n=r(10426),i=r(48850).Buffer,o=r(58408),a=r(21408),s=r(93013),u=r(37494),c=r(27085);function l(e,t,r){s.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function d(e,t,r){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new l(s.module,t,r)}r(41736)(l,s),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return d(e,n.key,n.iv)},t.createDecipheriv=d},85478:(e,t,r)=>{"use strict";var n=r(58408),i=r(10426),o=r(48850).Buffer,a=r(21408),s=r(93013),u=r(37494),c=r(27085);function l(e,t,r){s.call(this),this._cache=new d,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(41736)(l,s),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var f=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function h(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new l(s.module,t,r)}l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r{"use strict";var n=r(48850).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},67557:e=>{"use strict";e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},77427:(e,t,r)=>{"use strict";var n=r(96316);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},44030:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(96316);function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},13206:(e,t,r)=>{"use strict";var n=r(48850).Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s{"use strict";var n=r(48850).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s{"use strict";var n=r(96316),i=r(48850).Buffer,o=r(67557);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;s{"use strict";t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},58408:(e,t,r)=>{"use strict";var n={ECB:r(59297),CBC:r(77427),CFB:r(44030),CFB8:r(14726),CFB1:r(13206),OFB:r(91962),CTR:r(32802),GCM:r(32802)},i=r(44946);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},91962:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(96316);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length{"use strict";var n=r(37494),i=r(48850).Buffer,o=r(93013);function a(e,t,r,a){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}r(41736)(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},56805:(e,t,r)=>{"use strict";var n=r(19120),i=r(98073),o=r(58408),a=r(30867),s=r(27085);function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function c(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return u(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=u,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return c(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},19120:(e,t,r)=>{"use strict";var n=r(93013),i=r(75626),o=r(41736),a=r(48850).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var u=e.iv;a.isBuffer(u)||(u=a.from(u)),this._des=i.create({key:o,iv:u,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=u,o(u,n),u.prototype._update=function(e){return a.from(this._des.update(e))},u.prototype._final=function(){return a.from(this._des.final())}},30867:(e,t)=>{"use strict";t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},99782:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(31734),o=r(75010);function a(e){var t,r=e.modulus.byteLength();do{t=new i(o(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var r=function(e){var t=a(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),s=new i(e).mul(r.blinder).umod(t.modulus),u=s.toRed(i.mont(t.prime1)),c=s.toRed(i.mont(t.prime2)),l=t.coefficient,f=t.prime1,d=t.prime2,h=u.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),y=h.isub(p).imul(l).umod(f).imul(d);return p.iadd(y).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",o)}s.getr=a,e.exports=s},26561:(e,t,r)=>{"use strict";e.exports=r(75207)},79527:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(35866),o=r(86505),a=r(41736),s=r(11628),u=r(15410),c=r(75207);function l(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new l(e)}function h(e){return new f(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),a(l,o.Writable),l.prototype._write=function(e,t,r){this._hash.update(e),r()},l.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},l.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},f.prototype.verify=function(e,t,r){var i="string"==typeof t?n.from(t,r):t;this.end();var o=this._hash.digest();return u(i,o,e,this._signType,this._tag)},e.exports={Sign:d,Verify:h,createSign:d,createVerify:h}},11628:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(34424),o=r(99782),a=r(36597).ec,s=r(31734),u=r(27552),c=r(1308);function l(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function d(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length{"use strict";var n=r(48850).Buffer,i=r(31734),o=r(36597).ec,a=r(27552),s=r(1308);function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,r,c,l){var f=a(r);if("ec"===f.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,f)}if("dsa"===f.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,l=a.signature.decode(e,"der"),f=l.s,d=l.r;u(f,o),u(d,o);var h=i.mont(n),p=f.invm(o);return 0===s.toRed(h).redPow(new i(t).mul(p).mod(o)).fromRed().mul(c.toRed(h).redPow(d.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(d)}(e,t,f)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([l,t]);for(var d=f.modulus.byteLength(),h=[1],p=0;t.length+h.length+2{"use strict";var n=r(29033).Buffer,i=r(19142),o=r(3894),a=r(47563),s=r(54151),u=r(63534),c=r(29806);for(var l in c)t[l]=c[l];function f(e){if("number"!=typeof e||et.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,f.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?s.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||u.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},f.prototype.write=function(e,t,r,n,i,o,a){return this._write(!0,e,t,r,n,i,o,a)},f.prototype.writeSync=function(e,t,r,n,i,o,a){return this._write(!1,e,t,r,n,i,o,a)},f.prototype._write=function(e,r,a,s,u,c,l,f){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==t.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===r,"must provide flush value"),this.write_in_progress=!0,r!==t.Z_NO_FLUSH&&r!==t.Z_PARTIAL_FLUSH&&r!==t.Z_SYNC_FLUSH&&r!==t.Z_FULL_FLUSH&&r!==t.Z_FINISH&&r!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==a&&(a=n.alloc(0),u=0,s=0),this.strm.avail_in=u,this.strm.input=a,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=c,this.strm.next_out=l,this.flush=r,!e)return this._process(),this._checkError()?this._afterSync():void 0;var d=this;return i.nextTick((function(){d._process(),d._after()})),this},f.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},f.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=u.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=u.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=u.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=u.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},f.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},f.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},f.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},f.prototype.init=function(e,r,n,i,a){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(e>=8&&e<=15,"invalid windowBits"),o(r>=-1&&r<=9,"invalid compression level"),o(n>=1&&n<=9,"invalid memlevel"),o(i===t.Z_FILTERED||i===t.Z_HUFFMAN_ONLY||i===t.Z_RLE||i===t.Z_FIXED||i===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,n,i,a),this._setDictionary()},f.prototype.params=function(){throw new Error("deflateParams Not supported")},f.prototype.reset=function(){this._reset(),this._setDictionary()},f.prototype._init=function(e,r,n,i,o){switch(this.level=e,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=u.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=o,this.write_in_progress=!1,this.init_done=!0},f.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},f.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=s.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=u.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=f},77611:(e,t,r)=>{"use strict";var n=r(19142),i=r(29033).Buffer,o=r(57245).Transform,a=r(19626),s=r(45058),u=r(3894).ok,c=r(29033).kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+c.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var f=Object.keys(a),d=0;d=c?a=new RangeError(l):t=i.concat(n,o),n=[],e.close(),r(a,t)}e.on("error",(function(t){e.removeListener("end",s),e.removeListener("readable",a),r(t)})),e.on("end",s),e.end(t),a()}function v(e,t){if("string"==typeof t&&(t=i.from(t)),!i.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function w(e){if(!(this instanceof w))return new w(e);T.call(this,e,a.DEFLATE)}function A(e){if(!(this instanceof A))return new A(e);T.call(this,e,a.INFLATE)}function k(e){if(!(this instanceof k))return new k(e);T.call(this,e,a.GZIP)}function E(e){if(!(this instanceof E))return new E(e);T.call(this,e,a.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);T.call(this,e,a.DEFLATERAW)}function x(e){if(!(this instanceof x))return new x(e);T.call(this,e,a.INFLATERAW)}function _(e){if(!(this instanceof _))return new _(e);T.call(this,e,a.UNZIP)}function P(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function T(e,r){var n=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,o.call(this,e),e.flush&&!P(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!P(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSizet.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitst.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelt.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelt.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!i.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(e,r){I(s),s._hadError=!0;var n=new Error(e);n.errno=r,n.code=t.codes[r],s.emit("error",n)};var u=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(u=e.level);var c=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(c=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,u,e.memLevel||t.Z_DEFAULT_MEMLEVEL,c,e.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!n._handle},configurable:!0,enumerable:!0})}function I(e,t){t&&n.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function O(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=w,t.Inflate=A,t.Gzip=k,t.Gunzip=E,t.DeflateRaw=S,t.InflateRaw=x,t.Unzip=_,t.createDeflate=function(e){return new w(e)},t.createInflate=function(e){return new A(e)},t.createDeflateRaw=function(e){return new S(e)},t.createInflateRaw=function(e){return new x(e)},t.createGzip=function(e){return new k(e)},t.createGunzip=function(e){return new E(e)},t.createUnzip=function(e){return new _(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new w(t),e,r)},t.deflateSync=function(e,t){return v(new w(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new k(t),e,r)},t.gzipSync=function(e,t){return v(new k(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new S(t),e,r)},t.deflateRawSync=function(e,t){return v(new S(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new _(t),e,r)},t.unzipSync=function(e,t){return v(new _(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new A(t),e,r)},t.inflateSync=function(e,t){return v(new A(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new E(t),e,r)},t.gunzipSync=function(e,t){return v(new E(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new x(t),e,r)},t.inflateRawSync=function(e,t){return v(new x(t),e)},s.inherits(T,o),T.prototype.params=function(e,r,i){if(et.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var o=this;this.flush(a.Z_SYNC_FLUSH,(function(){u(o._handle,"zlib binding closed"),o._handle.params(e,r),o._hadError||(o._level=e,o._strategy=r,i&&i())}))}else n.nextTick(i)},T.prototype.reset=function(){return u(this._handle,"zlib binding closed"),this._handle.reset()},T.prototype._flush=function(e){this._transform(i.alloc(0),"",e)},T.prototype.flush=function(e,t){var r=this,o=this._writableState;("function"==typeof e||void 0===e&&!t)&&(t=e,e=a.Z_FULL_FLUSH),o.ended?t&&n.nextTick(t):o.ending?t&&this.once("end",t):o.needDrain?t&&this.once("drain",(function(){return r.flush(e,t)})):(this._flushFlag=e,this.write(i.alloc(0),"",t))},T.prototype.close=function(e){I(this,e),n.nextTick(O,this)},T.prototype._transform=function(e,t,r){var n,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||i.isBuffer(e)?this._handle?(s?n=this._finishFlushFlag:(n=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(e,n,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},T.prototype._processChunk=function(e,t,r){var n=e&&e.length,o=this._chunkSize-this._offset,a=0,s=this,f="function"==typeof r;if(!f){var d,h=[],p=0;this.on("error",(function(e){d=e})),u(this._handle,"zlib binding closed");do{var y=this._handle.writeSync(t,e,a,n,this._buffer,this._offset,o)}while(!this._hadError&&b(y[0],y[1]));if(this._hadError)throw d;if(p>=c)throw I(this),new RangeError(l);var m=i.concat(h,p);return I(this),m}u(this._handle,"zlib binding closed");var g=this._handle.write(t,e,a,n,this._buffer,this._offset,o);function b(c,l){if(this&&(this.buffer=null,this.callback=null),!s._hadError){var d=o-l;if(u(d>=0,"have should not go down"),d>0){var y=s._buffer.slice(s._offset,s._offset+d);s._offset+=d,f?s.push(y):(h.push(y),p+=y.length)}if((0===l||s._offset>=s._chunkSize)&&(o=s._chunkSize,s._offset=0,s._buffer=i.allocUnsafe(s._chunkSize)),0===l){if(a+=n-c,n=c,!f)return!0;var m=s._handle.write(t,e,a,n,s._buffer,s._offset,s._chunkSize);return m.callback=b,void(m.buffer=e)}if(!f)return!1;r()}}g.buffer=e,g.callback=b},s.inherits(w,T),s.inherits(A,T),s.inherits(k,T),s.inherits(E,T),s.inherits(S,T),s.inherits(x,T),s.inherits(_,T)},96316:(e,t,r)=>{"use strict";var n=r(29033).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),o=0;o{"use strict";var n=r(34919),i=r(83226),o=r(39484);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(n)return D(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var f=!0,d=0;di&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);for(var r="",n=0;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r),f=0;fi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return A(this,e,t,r);case"latin1":case"binary":return k(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;ii)&&(r=i);for(var o="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function M(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}},83675:e=>{"use strict";e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},80593:(e,t,r)=>{"use strict";var n=r(57701),i=r(24373),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},24373:(e,t,r)=>{"use strict";var n=r(3767),i=r(57701),o=r(77990),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(u,s),l=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return o(t,1+f(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(n,s,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d},47759:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(83630),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(29033).Buffer,i=r(26657),o=r(55262),a=r(71842),s=r(40779);(t=e.exports).addPrefix=function(e,t){var r;if(n.isBuffer(e))r=s.varintBufferEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");r=a[e]}return n.concat([r,t])},t.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},t.getCodec=function(e){var t=i.decode(e),r=o.get(t);if(void 0===r)throw new Error("Code ".concat(t," not found"));return r},t.getName=function(e){return o.get(e)},t.getNumber=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return s.varintBufferDecode(t)[0]},t.getCode=function(e){return i.decode(e)},t.getCodeVarint=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=function(e){return i.encode(e)};var u=r(47759);Object.assign(t,u),t.print=r(29268)},55262:(e,t,r)=>{"use strict";var n=r(83630),i=new Map;for(var o in n){var a=n[o];i.set(a,o)}e.exports=Object.freeze(i)},29268:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(83630),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(26657),i=r(29033).Buffer;function o(e){return parseInt(e.toString("hex"),16)}function a(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),i.from(t,"hex")}e.exports={numberToBuffer:a,bufferToNumber:o,varintBufferEncode:function(e){return i.from(n.encode(o(e)))},varintBufferDecode:function(e){return a(n.decode(e))},varintEncode:function(e){return i.from(n.encode(e))}}},71842:(e,t,r)=>{"use strict";var n=r(83630),i=r(40779).varintEncode,o={};for(var a in n){var s=n[a];o[a]=i(s)}e.exports=Object.freeze(o)},59976:(e,t,r)=>{"use strict";var n=r(77748),i=r(29033).Buffer,o={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!i.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){var t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=o},72753:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=r(29033).Buffer,s=r(77748),u=r(6086),c=r(97223),l=r(83630),f=r(59976),d=r(83162)(function(e){function t(e,r,n,o){if((0,i.default)(this,t),d.isCID(e)){var l=e;return this.version=l.version,this.codec=l.codec,this.multihash=a.from(l.multihash),void(this.multibaseName=l.multibaseName||(0===l.version?"base58btc":"base32"))}if("string"==typeof e){var f=u.isEncoded(e);if(f){var h=u.decode(e);this.version=parseInt(h.slice(0,1).toString("hex"),16),this.codec=c.getCodec(h.slice(1)),this.multihash=c.rmPrefix(h.slice(1)),this.multibaseName=f}else this.version=0,this.codec="dag-pb",this.multihash=s.fromB58String(e),this.multibaseName="base58btc";return t.validateCID(this),void Object.defineProperty(this,"string",{value:e})}if(a.isBuffer(e)){var p=e.slice(0,1),y=parseInt(p.toString("hex"),16);if(1===y){var m=e;this.version=y,this.codec=c.getCodec(m.slice(1)),this.multihash=c.rmPrefix(m.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";t.validateCID(this)}else this.version=e,this.codec=r,this.multihash=n,this.multibaseName=o||(0===e?"base58btc":"base32"),t.validateCID(this)}return(0,o.default)(t,[{key:"buffer",get:function(){var e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=a.concat([a.from("01","hex"),c.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}},{key:"prefix",get:function(){return a.concat([a.from("0".concat(this.version),"hex"),c.getCodeVarint(this.codec),s.prefix(this.multihash)])}},{key:"toV0",value:function(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");var e=s.decode(this.multihash),t=e.name,r=e.length;if("sha2-256"!==t)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==r)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new d(0,this.codec,this.multihash)}},{key:"toV1",value:function(){return new d(1,this.codec,this.multihash)}},{key:"toBaseEncodedString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&e===this.multibaseName)return this.string;var t=null;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=s.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=u.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}},{key:e,value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}}],[{key:"validateCID",value:function(e){var t=f.checkCIDComponents(e);if(t)throw new Error(t)}}]),t}(Symbol.for("nodejs.util.inspect.custom")),{className:"CID",symbolName:"@ipld/js-cid/CID"});d.codecs=l,e.exports=d},93013:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(57245).Transform,o=r(23462).s;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(41736)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},83162:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(14727)),o=n(r(90775)),a=n(r(69721)),s=n(r(58985)),u=n(r(58975)),c=n(r(15163)),l=n(r(34650)),f=n(r(21949));e.exports=function(e,t){var r=t.className,n=t.symbolName,i=Symbol.for(n),d=(0,o.default)({},r,function(e,t){(0,c.default)(h,e);var n,o,d=(n=h,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,f.default)(n);if(o){var r=(0,f.default)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,l.default)(this,e)});function h(){var e;(0,a.default)(this,h);for(var t=arguments.length,r=new Array(t),n=0;n{"use strict";var n=r(72753);t.cidV0ToV1Base32=function(e){var t=new n(e);return 0===t.version&&(t=t.toV1()),t.toString("base32")}},94308:(e,t,r)=>{"use strict";var n=r(69206),i=r(39512),o=i.hexStringToBuffer,a=i.profiles,s=r(36834).cidV0ToV1Base32;e.exports={helpers:{cidV0ToV1Base32:s},decode:function(e){var t=o(e),r=n.getCodec(t),i=n.rmPrefix(t),s=a[r];return s||(s=a.default),s.decode(i)},fromIpfs:function(e){return this.encode("ipfs-ns",e)},fromSwarm:function(e){return this.encode("swarm-ns",e)},encode:function(e,t){var r=a[e];r||(r=a.default);var i=r.encode(t);return n.addPrefix(e,i).toString("hex")},getCodec:function(e){var t=o(e);return n.getCodec(t)}}},39512:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(72753),o=r(77748),a=function(e){var t,r=e.slice(0,2),n=e.slice(2);return t="0x"===r?n:e,o.fromHexString(t)},s={swarm:function(e){var t=o.encode(a(e),"keccak-256");return new i(1,"swarm-manifest",t).buffer},ipfs:function(e){var t=o.fromB58String(e);return new i(1,"dag-pb",t).buffer},utf8:function(e){return n.from(e,"utf8")}},u={hexMultiHash:function(e){var t=new i(e);return o.decode(t.multihash).digest.toString("hex")},b58MultiHash:function(e){var t=new i(e);return o.toB58String(t.multihash)},utf8:function(e){return e.toString("utf8")}},c={"swarm-ns":{encode:s.swarm,decode:u.hexMultiHash},"ipfs-ns":{encode:s.ipfs,decode:u.b58MultiHash},"ipns-ns":{encode:s.ipfs,decode:u.b58MultiHash},default:{encode:s.utf8,decode:u.utf8}};t.hexStringToBuffer=a,t.profiles=c},64628:(e,t,r)=>{"use strict";var n,i,o=r(28847)(r(3355));i=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=i[t]=r>>>8^e[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(t),n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],c=r[6],l=r[7],f=r[8],d=r[9],h=r[10],p=r[11],y=r[12],m=r[13],g=r[14];e.table=t,e.bstr=function(e,r){for(var n=~r,i=0,o=e.length;i>>8^t[255&(n^e.charCodeAt(i++))];return~n},e.buf=function(e,r){for(var b=~r,v=e.length-15,w=0;w>8&255]^y[e[w++]^b>>16&255]^p[e[w++]^b>>>24]^h[e[w++]]^d[e[w++]]^f[e[w++]]^l[e[w++]]^c[e[w++]]^u[e[w++]]^s[e[w++]]^a[e[w++]]^o[e[w++]]^i[e[w++]]^n[e[w++]]^t[e[w++]];for(v+=15;w>>8^t[255&(b^e[w++])];return~b},e.str=function(e,r){for(var n=~r,i=0,o=e.length,a=0,s=0;i>>8^t[255&(n^a)]:a<2048?n=(n=n>>>8^t[255&(n^(192|a>>6&31))])>>>8^t[255&(n^(128|63&a))]:a>=55296&&a<57344?(a=64+(1023&a),s=1023&e.charCodeAt(i++),n=(n=(n=(n=n>>>8^t[255&(n^(240|a>>8&7))])>>>8^t[255&(n^(128|a>>2&63))])>>>8^t[255&(n^(128|s>>6&15|(3&a)<<4))])>>>8^t[255&(n^(128|63&s))]):n=(n=(n=n>>>8^t[255&(n^(224|a>>12&15))])>>>8^t[255&(n^(128|a>>6&63))])>>>8^t[255&(n^(128|63&a))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===(0,o.default)(t)?i(t):(n=function(){var e={};return i(e),e}.call(t,r,t,e),void 0===n||(e.exports=n)):i({})},75102:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(36597),o=r(31734);e.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length{"use strict";var n=r(41736),i=r(50807),o=r(26707),a=r(51708),s=r(93013);function u(e){s.call(this,"digest"),this._hash=e}n(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(a(e))}},55349:(e,t,r)=>{"use strict";var n=r(50807);e.exports=function(e){return(new n).update(e).digest()}},34424:(e,t,r)=>{"use strict";var n=r(41736),i=r(19956),o=r(93013),a=r(48850).Buffer,s=r(55349),u=r(26707),c=r(51708),l=a.alloc(128);function f(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new u:c(e)).update(t).digest():t.length{"use strict";var n=r(41736),i=r(48850).Buffer,o=r(93013),a=i.alloc(128),s=64;function u(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length{"use strict";var n=r(28847)(r(3355)),i="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,i="URLSearchParams"in r,o="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in r,u="ArrayBuffer"in r;if(u)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function y(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=m(t);return t.readAsArrayBuffer(e),r}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=y(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,r,n=y(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=m(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function k(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function E(e,t){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})},v.call(A.prototype),v.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function x(e,i){return new Promise((function(o,s){var c=new A(e,i);if(c.signal&&c.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function f(){l.abort()}l.onload=function(){var e,t,r={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in l?l.responseURL:r.headers.get("X-Request-URL");var n="response"in l?l.response:l.responseText;setTimeout((function(){o(new E(n,r))}),0)},l.onerror=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},l.ontimeout=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},l.onabort=function(){setTimeout((function(){s(new t.DOMException("Aborted","AbortError"))}),0)},l.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?l.withCredentials=!0:"omit"===c.credentials&&(l.withCredentials=!1),"responseType"in l&&(a?l.responseType="blob":u&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(l.responseType="arraybuffer")),!i||"object"!==(0,n.default)(i.headers)||i.headers instanceof p?c.headers.forEach((function(e,t){l.setRequestHeader(t,e)})):Object.getOwnPropertyNames(i.headers).forEach((function(e){l.setRequestHeader(e,d(i.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",f),l.onreadystatechange=function(){4===l.readyState&&c.signal.removeEventListener("abort",f)}),l.send(void 0===c._bodyInit?null:c._bodyInit)}))}x.polyfill=!0,r.fetch||(r.fetch=x,r.Headers=p,r.Request=A,r.Response=E),t.Headers=p,t.Request=A,t.Response=E,t.fetch=x}({})}(o),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var a=i.fetch?i:o;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t},24293:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(75010),t.createHash=t.Hash=r(35866),t.createHmac=t.Hmac=r(34424);var n=r(26561),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(54192);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(56805);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var u=r(28333);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=r(79527);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=r(75102);var l=r(86991);t.publicEncrypt=l.publicEncrypt,t.privateEncrypt=l.privateEncrypt,t.publicDecrypt=l.publicDecrypt,t.privateDecrypt=l.privateDecrypt;var f=r(36509);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},80034:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i="%[a-f0-9]{2}",o=new RegExp("("+i+")|([^%]+?)","gi"),a=new RegExp("("+i+")+","gi");function s(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],s(r),s(n))}function u(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(o)||[],r=1;r{"use strict";var n=r(28847)(r(3355)),i=r(1020)(),o=r(57701),a=i&&o("%Object.defineProperty%",!0);if(a)try{a({},"a",{value:1})}catch(e){a=!1}var s=o("%SyntaxError%"),u=o("%TypeError%"),c=r(53820);e.exports=function(e,t,r){if(!e||"object"!==(0,n.default)(e)&&"function"!=typeof e)throw new u("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!==(0,n.default)(t))throw new u("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new u("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new u("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new u("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new u("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],d=!!c&&c(e,t);if(a)a(e,t,{configurable:null===l&&d?d.configurable:!l,enumerable:null===i&&d?d.enumerable:!i,value:r,writable:null===o&&d?d.writable:!o});else{if(!f&&(i||o||l))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},75626:(e,t,r)=>{"use strict";t.utils=r(43349),t.Cipher=r(19591),t.DES=r(63049),t.CBC=r(4375),t.EDE=r(9413)},4375:(e,t,r)=>{"use strict";var n=r(94504),i=r(41736),o={};function a(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t{"use strict";var n=r(94504);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t{"use strict";var n=r(94504),i=r(41736),o=r(43349),a=r(19591);function s(){this.tmp=new Array(2),this.keys=null}function u(e){a.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(u,a),e.exports=u,u.create=function(e){return new u(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var a=0;a>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},u.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=d}o.rip(s,a,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],l=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],l^=e.tmp[1];var f=o.substitute(c,l),d=a;a=(s^o.permute(f))>>>0,s=d}o.rip(a,s,n,i)}},9413:(e,t,r)=>{"use strict";var n=r(94504),i=r(41736),o=r(19591),a=r(63049);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function u(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},43349:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u>>r[u]&1;for(u=s;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)];return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length{"use strict";var n=r(29033).Buffer,i=r(78557),o=r(29799),a=r(51592),s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new n(o[e].prime,"hex"),r=new n(o[e].gen,"hex");return new a(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,o,u){return n.isBuffer(r)||void 0===s[r]?e(t,"binary",r,o):(r=r||"binary",u=u||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,u)),"number"==typeof t?new a(i(t,o),o,!0):(n.isBuffer(t)||(t=new n(t,r)),new a(t,o,!0)))}},51592:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(31734),o=new(r(31962)),a=new i(24),s=new i(11),u=new i(10),c=new i(3),l=new i(7),f=r(78557),d=r(75010);function h(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new i(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new i(e),this}e.exports=m;var y={};function m(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=h,this.setPrivateKey=p):this._primeCode=8}function g(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in y)return y[n];var i,d=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!o.test(e))return d+=1,d+="02"===r||"05"===r?8:4,y[n]=d,d;switch(o.test(e.shrn(1))||(d+=2),r){case"02":e.mod(a).cmp(s)&&(d+=8);break;case"05":(i=e.mod(u)).cmp(c)&&i.cmp(l)&&(d+=8);break;default:d+=4}return y[n]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new i(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(t.toArray()),o=this.getPrime();if(r.length{"use strict";var n=r(75010);e.exports=g,g.simpleSieve=y,g.fermatTest=m;var i=r(31734),o=new i(24),a=new(r(31962)),s=new i(1),u=new i(2),c=new i(5),l=(new i(16),new i(8),new i(10)),f=new i(3),d=(new i(7),new i(11)),h=new i(4),p=(new i(12),null);function y(e){for(var t=function(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;ie;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(l).cmp(f);)r.iadd(h)}else for(;r.mod(o).cmp(d);)r.iadd(h);if(y(p=r.shrn(1))&&y(r)&&m(p)&&m(r)&&a.test(p)&&a.test(r))return r}}},36597:(e,t,r)=>{"use strict";var n=t;n.version=r(18597).i8,n.utils=r(7528),n.rand=r(82202),n.curve=r(76063),n.curves=r(40506),n.ec=r(28320),n.eddsa=r(68027)},11249:(e,t,r)=>{"use strict";var n=r(31734),i=r(7528),o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;l--)u=(u<<1)+n[l];c.push(u)}for(var f=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;c--){for(var l=0;c>=0&&0===a[c];c--)l++;if(c>=0&&l++,u=u.dblp(l),c<0)break;var f=a[c];s(0!==f),u="affine"===e.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var s,u,c,l=this._wnafT1,f=this._wnafT2,d=this._wnafT3,h=0;for(s=0;s=1;s-=2){var y=s-1,m=s;if(1===l[y]&&1===l[m]){var g=[t[y],null,null,t[m]];0===t[y].y.cmp(t[m].y)?(g[1]=t[y].add(t[m]),g[2]=t[y].toJ().mixedAdd(t[m].neg())):0===t[y].y.cmp(t[m].y.redNeg())?(g[1]=t[y].toJ().mixedAdd(t[m]),g[2]=t[y].add(t[m].neg())):(g[1]=t[y].toJ().mixedAdd(t[m]),g[2]=t[y].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=a(r[y],r[m]);for(h=Math.max(v[0].length,h),d[y]=new Array(h),d[m]=new Array(h),u=0;u=0;s--){for(var S=0;s>=0;){var x=!0;for(u=0;u=0&&S++,k=k.dblp(S),s<0)break;for(u=0;u0?c=f[u][_-1>>1]:_<0&&(c=f[u][-_-1>>1].neg()),k="affine"===c.type?k.mixedAdd(c):k.add(c))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i{"use strict";var n=r(7528),i=r(31734),o=r(41736),a=r(11249),s=n.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(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 i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,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()))))}o(u,a),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(t&&!u||!t&&u)&&(s=s.redNeg()),this.point(e,s)},u.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(c,a.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),l=i.redMul(s),f=a.redMul(o);return this.curve.point(u,c,f,l)},c.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(u)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),l=s.redMul(u),f=o.redMul(u),d=a.redMul(s);return this.curve.point(c,l,d,f)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),f=n.redMul(u).redMul(l);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(f,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},76063:(e,t,r)=>{"use strict";var n=t;n.base=r(11249),n.short=r(53148),n.mont=r(51105),n.edwards=r(81123)},51105:(e,t,r)=>{"use strict";var n=r(31734),i=r(41736),o=r(11249),a=r(7528);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},53148:(e,t,r)=>{"use strict";var n=r(7528),i=r(31734),o=r(41736),a=r(11249),s=n.assert;function u(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,u,c,l,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new i(1),y=new i(0),m=new i(0),g=new i(1),b=0;0!==d.cmpn(0);){var v=h.div(d);c=h.sub(v.mul(d)),l=m.sub(v.mul(p));var w=g.sub(v.mul(y));if(!n&&c.cmp(f)<0)t=u.neg(),r=p,n=c.neg(),o=l;else if(n&&2==++b)break;u=c,h=d,d=c,m=p,p=l,g=y,y=w}a=c.neg(),s=l;var A=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(A)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),f=n.redMul(c),d=u.redSqr().redIAdd(l).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),d=s.redMul(l.redISub(f)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},40506:(e,t,r)=>{"use strict";var n,i=t,o=r(37198),a=r(76063),s=r(7528).assert;function u(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,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:o.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:o.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:o.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:o.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:o.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:o.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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(46401)}catch(e){n=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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},28320:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(29410),a=r(7528),s=r(40506),u=r(82202),c=a.assert,l=r(37791),f=r(30488);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(c(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new l(this,e)},d.prototype.keyFromPrivate=function(e,t){return l.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return l.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||u(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var a=new i(t.generate(r));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,a){"object"===(0,n.default)(r)&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),u=t.getPrivate().toArray("be",s),c=e.toArray("be",s),l=new o({hash:this.hash,entropy:u,nonce:c,pers:a.pers,persEnc:a.persEnc||"utf8"}),d=this.n.sub(new i(1)),h=0;;h++){var p=a.k?a.k(h):new i(l.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(d)>=0)){var y=this.g.mul(p);if(!y.isInfinity()){var m=y.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var b=p.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(y.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new f({r:g,s:b,recoveryParam:v})}}}}}},d.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var o=(t=new f(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,n){c((3&r)===r,"The recovery param is more than two bits"),t=new f(t,n);var o=this.n,a=new i(e),s=t.r,u=t.s,l=1&r,d=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),y=u.mul(h).umod(o);return this.g.mulAdd(p,s,y)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},37791:(e,t,r)=>{"use strict";var n=r(31734),i=r(7528).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},30488:(e,t,r)=>{"use strict";var n=r(31734),i=r(7528),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var l=u(e,r);if(!1===l)return!1;if(e.length!==l+r.place)return!1;var f=e.slice(r.place,l+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(c),this.s=new n(f),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];l(n,t.length),(n=n.concat(t)).push(2),l(n,r.length);var o=n.concat(r),a=[48];return l(a,o.length),a=a.concat(o),i.encode(a,e)}},68027:(e,t,r)=>{"use strict";var n=r(37198),i=r(40506),o=r(7528),a=o.assert,s=o.parseBytes,u=r(27303),c=r(36646);function l(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=l,l.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},l.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var n=r(7528),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},36646:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(7528),a=o.assert,s=o.cachedProperty,u=o.parseBytes;function c(e,t){this.eddsa=e,"object"!==(0,n.default)(t)&&(t=u(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(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()},e.exports=c},46401:e=>{"use strict";e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},7528:(e,t,r)=>{"use strict";var n=t,i=r(31734),o=r(94504),a=r(96580);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=1&u?3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u:0,r[0].push(a),s=1&c?3!=(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c:0,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},26464:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=function(){if("object"===("undefined"==typeof self?"undefined":(0,n.default)(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":(0,n.default)(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return i()}try{return __global__||i()}finally{delete Object.prototype.__global__}}()},54258:(e,t,r)=>{"use strict";var n,i,o,a=r(19142),s=r(28847)(r(3355));o=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,i=void 0,o=void 0,u=function(e,t){y[n]=e,y[n+1]=t,2===(n+=2)&&(o?o(m):A())},c="undefined"!=typeof window?window:void 0,l=c||{},f=l.MutationObserver||l.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==a&&"[object process]"==={}.toString.call(a),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(m,1)}}var y=new Array(1e3);function m(){for(var e=0;e{"use strict";var n=r(29033).Buffer,i=r(24858).keccak_256,o=r(3956);function a(e){return e?o.toUnicode(e,{useStd3ASCII:!0,transitional:!1}):e}t.hash=function(e){for(var t="",r=0;r<32;r++)t+="00";if(name=a(e),name){var o=name.split(".");for(r=o.length-1;r>=0;r--){var s=i(o[r]);t=i(new n(t+s,"hex"))}}return"0x"+t},t.normalize=a},53058:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(74519)),o=r(58320),a=r(88645),s=r(36597),u=(r(46740),new s.ec("secp256k1")),c=r(22922),l=c.keccak256,f=c.keccak256s,d=function(e){for(var t=f(e.slice(2)),r="0x",n=0;n<40;n++)r+=parseInt(t[n+2],16)>7?e[n+2].toUpperCase():e[n+2];return r},h=function(e){var t=new n(e.slice(2),"hex"),r="0x"+u.keyFromPrivate(t).getPublic(!1,"hex").slice(2),i=l(r);return{address:d("0x"+i.slice(-40)),privateKey:e}},p=function(e){var t=(0,i.default)(e,3),r=t[0],n=t[1],a=t[2];return o.flatten([n,a,r])},y=function(e){return[o.slice(64,o.length(e),e),o.slice(0,32,e),o.slice(32,64,e)]},m=function(e){return function(t,r){var i=u.keyFromPrivate(new n(r.slice(2),"hex")).sign(new n(t.slice(2),"hex"),{canonical:!0});return p([a.fromString(o.fromNumber(e+i.recoveryParam)),o.pad(32,o.fromNat("0x"+i.r.toString(16))),o.pad(32,o.fromNat("0x"+i.s.toString(16)))])}},g=m(27);e.exports={create:function(e){var t=l(o.concat(o.random(32),e||o.random(32))),r=o.concat(o.concat(o.random(32),t),o.random(32)),n=l(r);return h(n)},toChecksum:d,fromPrivate:h,sign:g,makeSigner:m,recover:function(e,t){var r=y(t),i={v:o.toNumber(r[0]),r:r[1].slice(2),s:r[2].slice(2)},a="0x"+u.recoverPubKey(new n(e.slice(2),"hex"),i,i.v<2?i.v:1-i.v%2).encode("hex",!1).slice(2),s=l(a);return d("0x"+s.slice(-40))},encodeSignature:p,decodeSignature:y}},51376:e=>{"use strict";var t=function(e,t){for(var r=[],n=0;n{"use strict";r(51376);var n=function(e,t){return parseInt(e.slice(2*t+2,2*t+4),16)},i=function(e){return(e.length-2)/2},o=function(e){for(var t=[],r=2,n=e.length;r>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},22922:e=>{"use strict";var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],i=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],o=function(e){var t,r,n,o,a,s,u,c,l,f,d,h,p,y,m,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(c<<1|l>>>31),r=a^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(f<<1|d>>>31),r=u^(d<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(h<<1|p>>>31),r=l^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(o<<1|a>>>31),r=d^(a<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,y=e[0],m=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=y^~g&v,e[1]=m^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&y,e[7]=k^~S&m,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~y&g,e[9]=S^~m&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=i[n],e[1]^=i[n+1]},a=function(e){return function(i){var a;if("0x"===i.slice(0,2)){a=[];for(var s=2,u=i.length;s>2]|=i[h]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(u[m>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=c){for(e.start=m-c,e.block=u[l],m=0;m>2]|=r[3&m],e.lastByteIndex===c)for(u[0]=u[l],m=1;m>4&15]+t[15&p]+t[p>>12&15]+t[p>>8&15]+t[p>>20&15]+t[p>>16&15]+t[p>>28&15]+t[p>>24&15];g%l==0&&(o(d),m=0)}return"0x"+y}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),a)}};e.exports={keccak256:a(256),keccak512:a(512),keccak256s:a(256),keccak512s:a(512)}},88645:(e,t,r)=>{"use strict";var n=r(31734),i=r(58320),o=function(e){return new n(e.slice(2),16)},a=function(e){var t="0x"+("0x"===e.slice(0,2)?new n(e.slice(2),16):new n(e,10)).toString("hex");return"0x0"===t?"0x":t},s=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new n(e).toString("hex")},u=function(e){return o(e).toNumber()},c=function(e){return function(t,r){return"0x"+o(t)[e](o(r)).toString("hex")}},l=c("add"),f=c("mul"),d=c("div"),h=c("sub");e.exports={toString:function(e){return o(e).toString(10)},fromString:a,toNumber:u,fromNumber:s,toEther:function(e){return u(d(e,a("10000000000")))/1e8},fromEther:function(e){return f(s(Math.floor(1e8*e)),a("10000000000"))},toUint256:function(e){return i.pad(32,e)},add:l,mul:f,div:d,sub:h}},46740:e=>{"use strict";e.exports={encode:function(e){var t=function(e){return(t=e.toString(16)).length%2==0?t:"0"+t;var t},r=function(e,r){return e<56?t(r+e):t(r+t(e).length/2+55)+t(e)};return"0x"+function e(t){if("string"==typeof t){var n=t.slice(2);return(2!=n.length||n>="80"?r(n.length/2,128):"")+n}var i=t.map(e).join("");return r(i.length/2,192)+i}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return r<"80"?(t+=2,"0x"+r):r<"c0"?i():o()},n=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return r<56?r:parseInt(e.slice(t,t+=2*(r-55)),16)},i=function(){var r=n();return"0x"+e.slice(t,t+=2*r)},o=function(){for(var e=2*n()+t,i=[];t{"use strict";var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0});var i=r(78179);function o(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{512}$/i.test(e)||!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e))}function a(e,t){"object"===(0,n.default)(t)&&t.constructor===Uint8Array&&(t=i.bytesToHex(t));for(var r=i.keccak256(t).replace("0x",""),o=0;o<12;o+=4){var a=(parseInt(r.substr(o,2),16)<<8)+parseInt(r.substr(o+2,2),16)&2047,u=1<=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom")}function u(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{64}$/i.test(e)||!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))}function c(e){return!("string"!=typeof e||!e.match(/^(0x)?[0-9a-fA-F]{40}$/)&&!e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}t.isBloom=o,t.isInBloom=a,t.isUserEthereumAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!c(t))throw new Error('Invalid ethereum address given: "'.concat(t,'"'));return a(e,i.padLeft(t,64))},t.isContractAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!c(t))throw new Error('Invalid contract address given: "'.concat(t,'"'));return a(e,t)},t.isTopicInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error("Invalid topic");return a(e,t)},t.isTopic=u,t.isAddress=c},78179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34477);function i(e){if(null==e)throw new Error("cannot convert null value to array");if("string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if("0x"!==t[1])throw new Error("hex string must have 0x prefix");(e=e.substring(2)).length%2&&(e="0"+e);for(var r=[],n=0;n=256||parseInt(String(r))!=r)return!1}return!0}(e))return o(new Uint8Array(e));throw new Error("invalid arrayify value")}function o(e){var t=arguments;return void 0!==e.slice||(e.slice=function(){var r=Array.prototype.slice.call(t);return o(new Uint8Array(Array.prototype.slice.apply(e,r)))}),e}t.keccak256=function(e){return"0x"+n.keccak_256(i(e))},t.padLeft=function(e,t){var r=/^0x/i.test(e)||"number"==typeof e,n=t-(e=e.toString().replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(n).join("0")+e},t.bytesToHex=function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x".concat(t.join("").replace(/^0+/,""))},t.toByteArray=i},34477:(e,t,r)=>{"use strict";e=r.nmd(e);var n,i=r(19142),o=r(28847)(r(3355));!function(){var a="input is invalid type",s="object"===("undefined"==typeof window?"undefined":(0,o.default)(window)),u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"===("undefined"==typeof self?"undefined":(0,o.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===i?"undefined":(0,o.default)(i))&&i.versions&&i.versions.node?u=r.g:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,o.default)(e)&&e.exports,f=r.amdO,d=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),p=[4,1024,262144,67108864],y=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],b=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!d||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,o.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var A=function(e,t,r){return function(n){return new U(e,t,e).update(n)[r]()}},k=function(e,t,r){return function(n,i){return new U(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,o){return T["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return T["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){U.call(this,e,t,r)}U.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var n,i,s=this.blocks,u=this.byteCount,c=e.length,l=this.blockCount,f=0,h=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=u){for(this.start=n-u,this.block=s[l],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},U.prototype.encodeString=function(e){var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}var n=0,i=e.length;if(t)n=i;else for(var s=0;s=57344?n+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},U.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];a%t==0&&(j(r),o=0)}return i&&(e=r[o],s+=h[e>>4&15]+h[15&e],i>1&&(s+=h[e>>12&15]+h[e>>8&15]),i>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},U.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&j(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},L.prototype=new U,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),U.prototype.finalize.call(this)};var j=function(e){var t,r,n,i,o,a,s,u,c,l,f,d,h,p,y,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(d<<1|h>>>31),r=c^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],y=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=p^~g&v,e[1]=y^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&p,e[7]=k^~S&y,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~p&g,e[9]=S^~y&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(l)e.exports=T;else{for(O=0;O{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;var n,i=r(64376),o=r(40890);t.keccak224=(0,o.wrapHash)(i.keccak_224),t.keccak256=((n=(0,o.wrapHash)(i.keccak_256)).create=i.keccak_256.create,n),t.keccak384=(0,o.wrapHash)(i.keccak_384),t.keccak512=(0,o.wrapHash)(i.keccak_512)},86992:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(4158);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},40890:(e,t,r)=>{"use strict";e=r.nmd(e);var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;var i,o=(i=r(96822))&&i.__esModule?i:{default:i},a=r(72434),s=o.default.bool;t.assertBool=s;var u=o.default.bytes;t.assertBytes=u;var c,l,f=r(72434);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return f.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return f.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return f.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return f.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return f.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got ".concat((0,n.default)(e)));return(new TextDecoder).decode(e)},t.hexToBytes=function(e){var t=e.startsWith("0x")?e.substring(2):e;return(0,a.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(var r=0;r{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var i,o=(i=r(3894))&&i.__esModule?i:{default:i},a=r(49100),s=r(31439),u=r(23271),c=r(60986),l=r(13464),f=r(39808),d=r(5725),h=r(35513),p=function(){function e(e,t,r,n){void 0===e&&(e=new a.BN(0)),void 0===t&&(t=new a.BN(0)),void 0===r&&(r=c.KECCAK256_RLP),void 0===n&&(n=c.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,i=t.stateRoot,o=t.codeHash;return new e(r?new a.BN((0,l.toBuffer)(r)):void 0,n?new a.BN((0,l.toBuffer)(n)):void 0,i?(0,l.toBuffer)(i):void 0,o?(0,l.toBuffer)(o):void 0)},e.fromRlpSerializedAccount=function(e){var t=a.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(t,4),n=r[0],i=r[1],o=r[2],s=r[3];return new e(new a.BN(n),new a.BN(i),o,s)},e.prototype._validate=function(){if(this.nonce.lt(new a.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new a.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,h.bnToUnpaddedBuffer)(this.nonce),(0,h.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return a.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(c.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(c.KECCAK256_NULL)},e}();t.Account=p,t.isValidAddress=function(e){try{(0,d.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,d.assertIsHexString)(e);var r=(0,u.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,h.toType)(t,h.TypeOutput.BN).toString()+"0x");for(var i=(0,f.keccakFromString)(n+r).toString("hex"),o="0x",a=0;a=8?o+=r[a].toUpperCase():o+=r[a];return o},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){(0,d.assertIsBuffer)(e),(0,d.assertIsBuffer)(t);var r=new a.BN(t);return r.isZero()?(0,f.rlphash)([e,null]).slice(-20):(0,f.rlphash)([e,n.from(r.toArray())]).slice(-20)},t.generateAddress2=function(e,t,r){return(0,d.assertIsBuffer)(e),(0,d.assertIsBuffer)(t),(0,d.assertIsBuffer)(r),(0,o.default)(20===e.length),(0,o.default)(32===t.length),(0,f.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,f.keccak256)(r)])).slice(-20)},t.isValidPrivate=function(e){return(0,s.privateKeyVerify)(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),(0,d.assertIsBuffer)(e),64===e.length?(0,s.publicKeyVerify)(n.concat([n.from([4]),e])):!!t&&(0,s.publicKeyVerify)(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),(0,d.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),(0,o.default)(64===e.length),(0,f.keccak)(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,d.assertIsBuffer)(e),n.from((0,s.publicKeyCreate)(e,!1)).slice(1)},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,d.assertIsBuffer)(e),64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),e},t.zeroAddress=function(){var e=(0,l.zeros)(20);return(0,l.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,d.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}},41984:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var i,o=(i=r(3894))&&i.__esModule?i:{default:i},a=r(49100),s=r(13464),u=r(21968),c=function(){function e(e){(0,o.default)(20===e.length,"Invalid address length"),this.buf=e}return e.zero=function(){return new e((0,s.zeros)(20))},e.fromString=function(t){return(0,o.default)((0,u.isValidAddress)(t),"Invalid address"),new e((0,s.toBuffer)(t))},e.fromPublicKey=function(t){return(0,o.default)(n.isBuffer(t),"Public key should be Buffer"),new e((0,u.pubToAddress)(t))},e.fromPrivateKey=function(t){return(0,o.default)(n.isBuffer(t),"Private key should be Buffer"),new e((0,u.privateToAddress)(t))},e.generate=function(t,r){return(0,o.default)(a.BN.isBN(r)),new e((0,u.generateAddress)(t.buf,r.toArrayLike(n)))},e.generate2=function(t,r,i){return(0,o.default)(n.isBuffer(r)),(0,o.default)(n.isBuffer(i)),new e((0,u.generateAddress2)(t.buf,r,i))},e.prototype.equals=function(e){return this.buf.equals(e.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var e=new a.BN(this.buf),t=new a.BN(0),r=new a.BN("ffff","hex");return e.gte(t)&&e.lte(r)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return n.from(this.buf)},e}();t.Address=c},13464:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var o=r(49100),a=r(23271),s=r(5725);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))},t.intToBuffer=function(e){var r=(0,t.intToHex)(e);return n.from((0,a.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};var u=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,s.assertIsBuffer)(e),c(e)},t.unpadArray=function(e){return(0,s.assertIsArray)(e),c(e)},t.unpadHexString=function(e){return(0,s.assertIsHexString)(e),e=(0,a.stripHexPrefix)(e),c(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,a.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,a.padToEven)((0,a.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if(o.BN.isBN(e)){if(e.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(e));return e.toArrayLike(n)}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToInt=function(e){return new o.BN((0,t.toBuffer)(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.fromSigned=function(e){return new o.BN(e).fromTwos(256)},t.toUnsigned=function(e){return n.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||(0,a.isHexPrefixed)(e)?e:"0x"+e},t.toUtf8=function(e){if((e=(0,a.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],i=0;i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=n.next();!o.done;o=n.next()){var a=i(o.value,2),s=a[0],u=a[1];if(void 0!==u&&u.length>0&&0===u[0])throw new Error("".concat(s," cannot have leading zeroes, received: ").concat(u.toString("hex")))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!=t?t:[])}},60986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(29033),i=r(49100);t.MAX_UINT64=new i.BN("ffffffffffffffff",16),t.MAX_INTEGER=new i.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new i.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},49100:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var o,a=(o=r(31734))&&o.__esModule?o:{default:o};t.BN=a.default;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t}(r(6905));t.rlp=s},39808:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var i=r(8235),o=r(35866),a=r(49100),s=r(13464),u=r(5725);t.keccak=function(e,t){switch(void 0===t&&(t=256),(0,u.assertIsBuffer)(e),t){case 224:return(0,i.keccak224)(e);case 256:return(0,i.keccak256)(e);case 384:return(0,i.keccak384)(e);case 512:return(0,i.keccak512)(e);default:throw new Error("Invald algorithm: keccak".concat(t))}},t.keccak256=function(e){return(0,t.keccak)(e)},t.keccakFromString=function(e,r){void 0===r&&(r=256),(0,u.assertIsString)(e);var i=n.from(e,"utf8");return(0,t.keccak)(i,r)},t.keccakFromHexString=function(e,r){return void 0===r&&(r=256),(0,u.assertIsHexString)(e),(0,t.keccak)((0,s.toBuffer)(e),r)},t.keccakFromArray=function(e,r){return void 0===r&&(r=256),(0,u.assertIsArray)(e),(0,t.keccak)((0,s.toBuffer)(e),r)};var c=function(e){return e=(0,s.toBuffer)(e),o("sha256").update(e).digest()};t.sha256=function(e){return(0,u.assertIsBuffer)(e),c(e)},t.sha256FromString=function(e){return(0,u.assertIsString)(e),c(e)},t.sha256FromArray=function(e){return(0,u.assertIsArray)(e),c(e)};var l=function(e,t){e=(0,s.toBuffer)(e);var r=o("rmd160").update(e).digest();return!0===t?(0,s.setLengthLeft)(r,32):r};t.ripemd160=function(e,t){return(0,u.assertIsBuffer)(e),l(e,t)},t.ripemd160FromString=function(e,t){return(0,u.assertIsString)(e),l(e,t)},t.ripemd160FromArray=function(e,t){return(0,u.assertIsArray)(e),l(e,t)},t.rlphash=function(e){return(0,t.keccak)(a.rlp.encode(e))}},5725:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var i=r(23271);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}},t.assertIsBuffer=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}},t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}},t.assertIsString=function(e){if("string"!=typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},33062:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,i(r(60986),t),i(r(21968),t),i(r(41984),t),i(r(39808),t),i(r(86081),t),i(r(13464),t),i(r(41677),t),i(r(49100),t),i(r(35513),t);var o=r(23271);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},23271:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(3355));function o(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,i.default)(e)));return"0"===e[0]&&"x"===e[1]}function a(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat((0,i.default)(t)));return t.length%2&&(t="0".concat(t)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=o,t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,i.default)(e)));return o(e)?e.slice(2):e},t.padToEven=a,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat((0,i.default)(e)));return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,i.default)(e),"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,i.default)(t),"'"));return t[r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r{"use strict";var n=r(29033).Buffer,i=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var o,a=(o=r(3894))&&o.__esModule?o:{default:o},s=r(23271),u=r(49100),c=r(13464);t.defineProperties=function(e,t,r){if(e.raw=[],e._fields=[],e.toJSON=function(t){if(void 0===t&&(t=!1),t){var r={};return e._fields.forEach((function(t){r[t]="0x".concat(e[t].toString("hex"))})),r}return(0,c.baToJSON)(e.raw)},e.serialize=function(){return u.rlp.encode(e.raw)},t.forEach((function(t,r){function i(){return e.raw[r]}function o(i){"00"!==(i=(0,c.toBuffer)(i)).toString("hex")||t.allowZero||(i=n.allocUnsafe(0)),t.allowLess&&t.length?(i=(0,c.unpadBuffer)(i),(0,a.default)(t.length>=i.length,"The field ".concat(t.name," must not have more ").concat(t.length," bytes"))):t.allowZero&&0===i.length||!t.length||(0,a.default)(t.length===i.length,"The field ".concat(t.name," must have byte length of ").concat(t.length)),e.raw[r]=i}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:i,set:o}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),r)if("string"==typeof r&&(r=n.from((0,s.stripHexPrefix)(r),"hex")),n.isBuffer(r)&&(r=u.rlp.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(t,r){e[e._fields[r]]=(0,c.toBuffer)(t)}))}else{if("object"!==(0,i.default)(r))throw new Error("invalid data");var o=Object.keys(r);t.forEach((function(t){-1!==o.indexOf(t.name)&&(e[t.name]=r[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=r[t.alias])}))}}},86081:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var i=r(31439),o=r(49100),a=r(13464),s=r(39808),u=r(5725),c=r(35513);function l(e,t){var r=(0,c.toType)(e,c.TypeOutput.BN);if(r.eqn(0)||r.eqn(1))return(0,c.toType)(e,c.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,c.toType)(t,c.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function f(e){var t=new o.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(e,t,r){var o=(0,i.ecdsaSign)(e,t),a=o.signature,s=o.recid,u=n.from(a.slice(0,32)),l=n.from(a.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:u,s:l,v:r?s+(2*r+35):s+27}}return{r:u,s:l,v:(0,c.toType)(r,c.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(n)}},t.ecrecover=function(e,t,r,o,s){var u=n.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(o,32)],64),c=l(t,s);if(!f(c))throw new Error("Invalid signature v value");var d=(0,i.ecdsaRecover)(u,c.toNumber(),e);return n.from((0,i.publicKeyConvert)(d,!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!f(l(e,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(r,32),(0,a.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!f(l(e,i)))throw new Error("Invalid signature v value");var o=(0,c.toType)(e,c.TypeOutput.Number),s=r;return(o>28&&o%2==1||1===o||28===o)&&((s=n.from(r))[0]|=128),(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(s,32)]))},t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}},t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var a=new o.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new o.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!f(l(e,i)))return!1;var u=new o.BN(t),c=new o.BN(r);return!(u.isZero()||u.gt(s)||c.isZero()||c.gt(s)||n&&1===c.cmp(a))},t.hashPersonalMessage=function(e){(0,u.assertIsBuffer)(e);var t=n.from("Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,s.keccak)(n.concat([t,e]))}},35513:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var i,o=r(49100),a=r(23271),s=r(13464);function u(e){return(0,s.unpadBuffer)(e.toArrayLike(n))}t.bnToHex=function(e){return"0x".concat(e.toString(16))},t.bnToUnpaddedBuffer=u,t.bnToRlp=function(e){return u(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,a.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,s.toBuffer)(e);if(t===i.Buffer)return r;if(t===i.BN)return new o.BN(r);if(t===i.Number){var n=new o.BN(r),u=new o.BN(Number.MAX_SAFE_INTEGER.toString());if(n.gt(u))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return n.toNumber()}return"0x".concat(r.toString("hex"))}}},73303:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createHashFunction=function(e){return function(t){var r=e();return r.update(t),n.from(r.digest())}}},8235:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(73303),i=r(93135);t.keccak224=n.createHashFunction((function(){return i("keccak224")})),t.keccak256=n.createHashFunction((function(){return i("keccak256")})),t.keccak384=n.createHashFunction((function(){return i("keccak384")})),t.keccak512=n.createHashFunction((function(){return i("keccak512")}))},40739:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(75010);t.getRandomBytes=function(e){return new Promise((function(t,r){n(e,(function(e,n){e?r(e):t(n)}))}))},t.getRandomBytesSync=function(e){return n(e)}},31439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(57902),i=r(40739);t.createPrivateKey=function(){return e=this,r=function(){var e;return function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(77277),a=new i(0),s=new i(-1),u={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function c(e){var t=e?e.toLowerCase():"ether",r=u[t];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(u,null,2));return new i(r,10)}function l(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"===(0,n.default)(e)&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+(0,n.default)(e)+".")}e.exports={unitMap:u,numberToString:l,getValueOfUnit:c,fromWei:function(e,t,r){var n=o(e),i=n.lt(a),l=c(t),f=u[t].length-1||1,d=r||{};i&&(n=n.mul(s));for(var h=n.mod(l).toString(10);h.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var d=f[0],h=f[1];if(d||(d="0"),h||(h="0"),h.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;h.length{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i{"use strict";var n=r(28847)(r(3355)),i=Object.create||function(e){var t=function(){};return t.prototype=e,new t},o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var u,c=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),u=0===l.x}catch(e){u=!1}function f(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,r,o){var a,s,u;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),u=s[t]):(s=e._events=i(null),e._eventsCount=0),u){if("function"==typeof u?u=s[t]=o?[r,u]:[u,r]:o?u.unshift(r):u.push(r),!u.warned&&(a=f(e))&&a>0&&u.length>a){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=u.length,"object"===("undefined"==typeof console?"undefined":(0,n.default)(console))&&console.warn&&console.warn("%s: %s",c.name,c.message)}}else u=s[t]=r,++e._eventsCount;return e}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(r=a[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=g(e,n),o=0;o=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,o=a;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return y(this,e,!0)},s.prototype.rawListeners=function(e){return y(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},27085:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(50807);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var l=new i;l.update(c),l.update(e),t&&l.update(t),c=l.digest();var f=0;if(a>0){var d=s.length-a;f=Math.min(a,c.length),c.copy(s,d,0,f),a-=f}if(f0){var h=u.length-o,p=Math.min(o,c.length-f);c.copy(u,h,f,f+p),o-=p}}return c.fill(0),{key:s,iv:u}}},48184:(e,t,r)=>{"use strict";var n=r(41493),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n{"use strict";var n=r(83161);e.exports=Function.prototype.bind||n},57701:(e,t,r)=>{"use strict";var n,i=r(28847)(r(3355)),o=SyntaxError,a=Function,s=TypeError,u=function(e){try{return a('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var l=function(){throw new s},f=c?function(){try{return l}catch(e){try{return c(arguments,"callee").get}catch(e){return l}}}():l,d=r(58489)(),h=r(61593)(),p=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),y={},m="undefined"!=typeof Uint8Array&&p?p(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d&&p?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&p?p(p([][Symbol.iterator]())):n,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":(0,i.default)(JSON))?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d&&p?p((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d&&p?p((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&p?p(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":f,"%TypedArray%":m,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(p)try{null.error}catch(e){var b=p(p(e));g["%Error.prototype%"]=b}var v=function e(t){var r;if("%AsyncFunction%"===t)r=u("async function () {}");else if("%GeneratorFunction%"===t)r=u("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=u("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&p&&(r=p(i.prototype))}return g[t]=r,r},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=r(3767),k=r(2383),E=A.call(Function.call,Array.prototype.concat),S=A.call(Function.apply,Array.prototype.splice),x=A.call(Function.call,String.prototype.replace),_=A.call(Function.call,String.prototype.slice),P=A.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,O=function(e,t){var r,n=e;if(k(w,n)&&(n="%"+(r=w[n])[0]+"%"),k(g,n)){var i=g[n];if(i===y&&(i=v(n)),void 0===i&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_(e,0,1),r=_(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return x(e,T,(function(e,t,r,i){n[n.length]=r?x(i,I,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=O("%"+n+"%",t),a=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],S(r,E([0,1],f)));for(var d=1,h=!0;d=r.length){var b=c(u,p);u=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[p]}else h=k(u,p),u=u[p];h&&!l&&(g[a]=u)}}return u}},92948:(e,t,r)=>{"use strict";var n;n="undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},e.exports=n},53820:(e,t,r)=>{"use strict";var n=r(57701)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},1020:(e,t,r)=>{"use strict";var n=r(57701)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},61593:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},58489:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i="undefined"!=typeof Symbol&&Symbol,o=r(47027);e.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"===(0,n.default)(i("foo"))&&"symbol"===(0,n.default)(Symbol("bar"))&&o()}},47027:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===(0,n.default)(Symbol.iterator))return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},11191:(e,t,r)=>{"use strict";var n=r(47027);e.exports=function(){return n()&&!!Symbol.toStringTag}},22353:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(86505).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(41736)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},37198:(e,t,r)=>{"use strict";var n=t;n.utils=r(84268),n.common=r(64696),n.sha=r(39310),n.ripemd=r(69294),n.hmac=r(53201),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},64696:(e,t,r)=>{"use strict";var n=r(84268),i=r(94504);function o(){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}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o{"use strict";var n=r(84268),i=r(94504);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(84268),i=r(64696),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,c),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],b=r,v=n,w=i,A=c,k=l,E=0;E<80;E++){var S=a(o(u(r,f(E,n,i,c),e[p[E]+t],d(E)),m[E]),l);r=l,l=c,c=o(i,10),i=n,n=S,S=a(o(u(b,f(79-E,v,w,A),e[y[E]+t],h(E)),g[E]),k),b=k,k=A,A=o(w,10),w=v,v=S}S=s(this.h[1],i,A),this.h[1]=s(this.h[2],c,k),this.h[2]=s(this.h[3],l,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,w),this.h[0]=S},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],y=[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],m=[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],g=[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]},39310:(e,t,r)=>{"use strict";t.sha1=r(38142),t.sha224=r(14909),t.sha256=r(87682),t.sha384=r(74532),t.sha512=r(36515)},38142:(e,t,r)=>{"use strict";var n=r(84268),i=r(64696),o=r(90070),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,l=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,l),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(84268),i=r(87682);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},87682:(e,t,r)=>{"use strict";var n=r(84268),i=r(64696),o=r(90070),a=r(94504),s=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,f=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,y=o.g1_256,m=i.BlockHash,g=[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 b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(b,m),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(84268),i=r(36515);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},36515:(e,t,r)=>{"use strict";var n=r(84268),i=r(64696),o=r(94504),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,f=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,y=n.sum64_5_hi,m=n.sum64_5_lo,g=i.BlockHash,b=[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 v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function k(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function S(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function _(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,g),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(84268).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},84268:(e,t,r)=>{"use strict";var n=r(94504),i=r(41736);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var l=0,f=t;return l+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},2383:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(3767);e.exports=o.call(n,i)},29410:(e,t,r)=>{"use strict";var n=r(37198),i=r(96580),o=r(94504);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length{"use strict";var n=r(29519),i=r(51143),o=e.exports;for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a]);function s(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),n.request.call(this,e,t)},o.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},32996:(e,t,r)=>{"use strict";var n;r(28847)(r(3355)),void 0===(n=function(){return e=[new Uint32Array([2157250,2157314,2157378,2157442,2157506,2157570,2157634,0,2157698,2157762,2157826,2157890,2157954,0,2158018,0]),new Uint32Array([2179041,6291456,2179073,6291456,2179105,6291456,2179137,6291456,2179169,6291456,2179201,6291456,2179233,6291456,2179265,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,2113729,2197345,2197377,2113825,2197409,2197441,2113921,2197473,2114017,2197505,2197537,2197569,2197601,2197633,2197665]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672,23068672,0,0,0,0,23068672]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064]),new Uint32Array([2196001,2196033,2196065,2196097,2196129,2196161,2196193,2196225,2196257,2196289,2196321,2196353,2196385,2196417,2196449,2196481]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2177025,6291456,2177057,6291456,2177089,6291456,2177121,6291456,2177153,6291456,2177185,6291456,2177217,6291456,2177249,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456]),new Uint32Array([2134435,2134531,2134627,2134723,2134723,2134819,2134819,2134915,2134915,2135011,2105987,2135107,2135203,2135299,2131587,2135395]),new Uint32Array([0,0,0,0,0,0,0,6291456,2168673,2169249,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354,2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354]),new Uint32Array([2125219,2125315,2152834,2152898,2125411,2152962,2153026,2125506,2125507,2125603,2153090,2153154,2153218,2153282,2153346,2105348]),new Uint32Array([2203393,6291456,2203425,6291456,2203457,6291456,2203489,6291456,6291456,6291456,6291456,2203521,6291456,2181281,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,6291456,2145538,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,6291456]),new Uint32Array([2139426,2160834,2160898,2160962,2134242,2161026,2161090,2161154,2161218,2161282,2161346,2161410,2138658,2161474,2161538,2134722]),new Uint32Array([2119939,2124930,2125026,2106658,2125218,2128962,2129058,2129154,2129250,2129346,2129442,2108866,2108770,2150466,2150530,2150594]),new Uint32Array([2201601,6291456,2201633,6291456,2201665,6291456,2201697,6291456,2201729,6291456,2201761,6291456,2201793,6291456,2201825,6291456]),new Uint32Array([2193537,2193569,2193601,2193633,2193665,2193697,2193729,2193761,2193793,2193825,2193857,2193889,2193921,2193953,2193985,2194017]),new Uint32Array([6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2190561,6291456,2190593,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2190625,6291456,2190657,6291456,23068672]),new Uint32Array([2215905,2215937,2215969,2216001,2216033,2216065,2216097,2216129,2216161,2216193,2216225,2216257,2105441,2216289,2216321,2216353]),new Uint32Array([23068672,18884130,23068672,23068672,23068672,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2191233,2191265,2191297,2191329,2191361,2191393,2191425,2117377,2191457,2191489,2191521,2191553,2191585,2191617,2191649,2117953]),new Uint32Array([2132227,2132323,2132419,2132419,2132515,2132515,2132611,2132707,2132707,2132803,2132899,2132899,2132995,2132995,2133091,2133187]),new Uint32Array([0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10609889,10610785,10609921,10610817,2222241]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([2219969,2157121,2157441,2157505,2157889,2157953,2220001,2158465,2158529,10575617,2156994,2157058,2129923,2130019,2157122,2157186]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2185249,6291456,2185281,6291456,2185313,6291456,2185345,6291456,2185377,6291456,2185409,6291456,2185441,6291456,2185473,6291456]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,6291456,0]),new Uint32Array([2183361,6291456,2183393,6291456,2183425,6291456,2183457,6291456,2183489,6291456,2183521,6291456,2183553,6291456,2183585,6291456]),new Uint32Array([2192161,2192193,2192225,2192257,2192289,2192321,2192353,2192385,2192417,2192449,2192481,2192513,2192545,2192577,2192609,2192641]),new Uint32Array([2212001,2212033,2212065,2212097,2212129,2212161,2212193,2212225,2212257,2212289,2212321,2212353,2212385,2212417,2212449,2207265]),new Uint32Array([2249825,2249857,2249889,2249921,2249954,2250018,2250082,2250145,2250177,2250209,2250241,2250274,2250337,2250370,2250433,2250465]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147905,2147969,2148033,2148097,2148161,2148225,2148289,2148353]),new Uint32Array([10485857,6291456,2197217,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2180353,2180385,2144033,2180417,2180449,2180481,2180513,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10610209,10610465,10610241,10610753,10609857]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2223842,2223906,2223970,2224034,2224098,2224162,2224226,2224290,2224354,2224418,2224482,2224546,2224610,2224674,2224738,2224802]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,18923650,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,18923714,23068672,23068672]),new Uint32Array([2126179,2125538,2126275,2126371,2126467,2125634,2126563,2105603,2105604,2125346,2126659,2126755,2126851,2098179,2098181,2098182]),new Uint32Array([2227426,2227490,2227554,2227618,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2192353,2240642,2240642,2240705,2240737,2240737,2240769,2240802,2240866,2240929,2240961,2240993,2241025,2241057,2241089,2241121]),new Uint32Array([6291456,2170881,2170913,2170945,6291456,2170977,6291456,2171009,2171041,6291456,6291456,6291456,2171073,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2132226,2132514,2163586,2132610,2160386,2133090,2133186,2160450,2160514,2160578,2133570,2106178,2160642,2133858,2160706,2160770]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10532162,10532226,10532290,10532354,10532418,10532482,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2098209,2108353,2108193,2108481,2170241,2111713,2105473,2105569,2105601,2112289,2112481,2098305,2108321,0,0,0]),new Uint32Array([2209121,2209153,2209185,2209217,2209249,2209281,2209313,2209345,2209377,2209409,2209441,2209473,2207265,2209505,2209537,2209569]),new Uint32Array([2189025,6291456,2189057,6291456,2189089,6291456,2189121,6291456,2189153,6291456,2189185,6291456,2189217,6291456,2189249,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2165764,2140004]),new Uint32Array([2215105,6291456,2215137,6291456,6291456,2215169,2215201,6291456,6291456,6291456,2215233,2215265,2215297,2215329,2215361,2215393]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,23068672,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([10505091,10505187,10505283,10505379,10505475,10505571,10505667,10505763,10505859,10505955,10506051,10506147,10506243,10506339,10506435,10506531]),new Uint32Array([2229730,2229794,2229858,2229922,2229986,2230050,2230114,2230178,2230242,2230306,2230370,2230434,2230498,2230562,2230626,2230690]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,0,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([6291456,6291456,6291456,6291456,10502115,10502178,10502211,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2190305,6291456,2190337,6291456,2190369,6291456,2190401,6291456,2190433,6291456,2190465,6291456,2190497,6291456,2190529,6291456]),new Uint32Array([2173793,2173985,2174017,6291456,2173761,2173697,6291456,2174689,6291456,2174017,2174721,6291456,6291456,2174753,2174785,2174817]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609,2100033]),new Uint32Array([2132898,2163842,2163906,2133282,2132034,2131938,2137410,2132802,2132706,2164866,2133282,2160578,2165186,2165186,6291456,6291456]),new Uint32Array([10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059,10501155,10501251,10501347,10501443]),new Uint32Array([2163458,2130978,2131074,2131266,2131362,2163522,2160130,2132066,2131010,2131106,2106018,2131618,2131298,2132034,2131938,2137410]),new Uint32Array([2212961,2116993,2212993,2213025,2213057,2213089,2213121,2213153,2213185,2213217,2213249,2209633,2213281,2213313,2213345,2213377]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2113729,2113825,2113921,2114017,2114113,2114209,2114305,2114401,2114497,2114593,2114689,2114785,2114881,2114977,2115073,2115169]),new Uint32Array([2238177,2238209,2238241,2238273,2238305,2238337,2238337,2217537,2238369,2238401,2238433,2238465,2215649,2238497,2238529,2238561]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0]),new Uint32Array([6291456,0,6291456,2145026,0,6291456,2145090,0,6291456,6291456,0,0,23068672,0,23068672,23068672]),new Uint32Array([2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129,2100289]),new Uint32Array([6291456,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0]),new Uint32Array([2187681,2187713,2187745,2187777,2187809,2187841,2187873,2187905,2187937,2187969,2188001,2188033,2188065,2188097,2188129,2188161]),new Uint32Array([0,10554498,10554562,10554626,10554690,10554754,10554818,10554882,10554946,10555010,10555074,6291456,6291456,0,0,0]),new Uint32Array([2235170,2235234,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0]),new Uint32Array([2181153,6291456,2188897,6291456,6291456,2188929,6291456,6291456,6291456,6291456,6291456,6291456,2111905,2100865,2188961,2188993]),new Uint32Array([2100833,2100897,0,0,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,2112289]),new Uint32Array([6291456,2172833,6291456,2172865,2172897,2172929,2172961,6291456,2172993,6291456,2173025,6291456,2173057,6291456,2173089,6291456]),new Uint32Array([6291456,0,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,2190721]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456]),new Uint32Array([2184993,6291456,2185025,6291456,2185057,6291456,2185089,6291456,2185121,6291456,2185153,6291456,2185185,6291456,2185217,6291456]),new Uint32Array([2115265,2115361,2115457,2115553,2115649,2115745,2115841,2115937,2116033,2116129,2116225,2116321,2150658,2150722,2200225,6291456]),new Uint32Array([2168321,6291456,2168353,6291456,2168385,6291456,2168417,6291456,2168449,6291456,2168481,6291456,2168513,6291456,2168545,6291456]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,0,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2186625,0,0,6291456,6291456,2186657,2186689,2186721,2173505,0,10496067,10496163,10496259]),new Uint32Array([2178785,6291456,2178817,6291456,2178849,6291456,2178881,6291456,2178913,6291456,2178945,6291456,2178977,6291456,2179009,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2097152,0,0,0,2097152,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2197857,2197889,2197921,2197953,2197985,2198017,0,0,2198049,2198081,2198113,2198145,2198177,2198209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2098209,2167297,2111137,6291456]),new Uint32Array([2171393,6291456,2171425,6291456,2171457,6291456,2171489,6291456,2171521,6291456,2171553,6291456,2171585,6291456,2171617,6291456]),new Uint32Array([2206753,2206785,2195457,2206817,2206849,2206881,2206913,2197153,2197153,2206945,2117857,2206977,2207009,2207041,2207073,2207105]),new Uint32Array([0,0,0,0,0,0,0,23068672,0,0,0,0,2144834,2144898,0,2144962]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,0,2105505,2098241]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,2202049,6291456,2202081,6291456,2202113,6291456,2202145,6291456,2202177,6291456,2202209,6291456,2202241,6291456]),new Uint32Array([10501155,10501251,10501347,10501443,10501539,10501635,10501731,10501827,10501923,10502019,2141731,2105505,2098177,2155586,2166530,0]),new Uint32Array([2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441]),new Uint32Array([2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330,2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10502307,10502403,10502499,10502595,10502691,10502787,10502883,10502979,10503075,10503171,10503267,10503363,10503459,10503555,10503651,10503747]),new Uint32Array([2179937,2179969,2180001,2180033,2156545,2180065,2156577,2180097,2180129,2180161,2180193,2180225,2180257,2180289,2156737,2180321]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,0,0,6291456,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([2227682,2227746,2227810,2227874,2227938,2228002,2228066,2228130,2228194,2228258,2228322,2228386,2228450,2228514,2228578,2228642]),new Uint32Array([2105601,2169121,2108193,2170049,2181025,2181057,2112481,2108321,2108289,2181089,2170497,2100865,2181121,2173601,2173633,2173665]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180641,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,6291456,0,6291456,0,6291456,0,0,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2178273,6291456,2178305,6291456,2178337,6291456,2178369,6291456,2178401,6291456,2178433,6291456,2178465,6291456,2178497,6291456]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2237377,2237409,2236225,2237441,2237473,2217441,2215521,2215553,2217473,2237505,2237537,2209697,2237569,2215585,2237601,2237633]),new Uint32Array([2221985,2165601,2165601,2165665,2165665,2222017,2222017,2165729,2165729,2158913,2158913,2158913,2158913,2097281,2097281,2105921]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2149634,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2176897,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2176929,6291456,2176961,6291456,2176993,6291456]),new Uint32Array([2172641,6291456,2172673,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2172705,2172737,6291456,2172769,2172801,6291456]),new Uint32Array([2099173,2104196,2121667,2099395,2121763,2152258,2152322,2098946,2152386,2121859,2121955,2099333,2122051,2104324,2099493,2122147]),new Uint32Array([6291456,6291456,6291456,2145794,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2145858,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,0,0,6291456,0]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,0,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2239074,2239138,2239201,2239233,2239265,2239297,2239329,2239361,0,2239393,2239425,2239425,2239458,2239521,2239553,2209569]),new Uint32Array([14680064,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,6291456,23068672]),new Uint32Array([2108321,2108289,2113153,2098209,2180897,2180929,2180961,2111137,2098241,2108353,2170241,2170273,2180993,2105825,6291456,2105473]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146114,6291456,6291456,6291456,0,0,0]),new Uint32Array([2105921,2105921,2105921,2222049,2222049,2130977,2130977,2130977,2130977,2160065,2160065,2160065,2160065,2097729,2097729,2097729]),new Uint32Array([2218145,2214785,2207937,2218177,2218209,2192993,2210113,2212769,2218241,2218273,2216129,2218305,2216161,2218337,2218369,2218401]),new Uint32Array([0,0,0,2156546,2156610,2156674,2156738,2156802,0,0,0,0,0,2156866,23068672,2156930]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2213409,2213441,2213473,2213505,2213537,2213569,2213601,2213633,2213665,2195681,2213697,2213729,2213761,2213793,2213825,2213857]),new Uint32Array([2100033,2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2201857,6291456,2201889,6291456,2201921,6291456,2201953,6291456,2201985,6291456,2202017,6291456,2176193,2176257,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2188193,2188225,2188257,2188289,2188321,2188353,2188385,2188417,2188449,2188481,2188513,2188545,2188577,2188609,2188641,0]),new Uint32Array([10554529,2221089,0,10502113,10562017,10537921,10538049,2221121,2221153,0,0,0,0,0,0,0]),new Uint32Array([2213889,2213921,2213953,2213985,2214017,2214049,2214081,2194177,2214113,2214145,2214177,2214209,2214241,2214273,2214305,2214337]),new Uint32Array([2166978,2167042,2099169,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180545,6291456,6291456,6291456]),new Uint32Array([10518915,10519011,10519107,10519203,2162242,2162306,2159554,2162370,2159362,2159618,2105922,2162434,2159746,2162498,2159810,2159874]),new Uint32Array([2161730,2161794,2135586,2161858,2161922,2137186,2131810,2160290,2135170,2161986,2137954,2162050,2162114,2162178,10518723,10518819]),new Uint32Array([10506627,10506723,10506819,10506915,10507011,10507107,10507203,10507299,10507395,10507491,10507587,10507683,10507779,10507875,10507971,10508067]),new Uint32Array([6291456,23068672,23068672,23068672,0,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2175873,2175905,2175937,2175969,2176001,2176033,2176065,2176097,2176129,2176161,2176193,2176225,2176257,2176289,2176321,2176353]),new Uint32Array([2140006,2140198,2140390,2140582,2140774,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241]),new Uint32Array([0,23068672,0,0,0,0,0,0,0,2145154,2145218,2145282,6291456,0,2145346,0]),new Uint32Array([0,0,0,0,10531458,10495395,2148545,2143201,2173473,2148865,2173505,0,2173537,0,2173569,2149121]),new Uint32Array([10537282,10495683,2148738,2148802,2148866,0,6291456,2148930,2186593,2173473,2148737,2148865,2148802,10495779,10495875,10495971]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2215425,2215457,2215489,2215521,2215553,2215585,2215617,2215649,2215681,2215713,2215745,2215777,2192033,2215809,2215841,2215873]),new Uint32Array([2242049,2242081,2242113,2242145,2242177,2242209,2242241,2242273,2215937,2242305,2242338,2242401,2242433,2242465,2242497,2216001]),new Uint32Array([10554529,2221089,0,0,10562017,10502113,10538049,10537921,2221185,10489601,10489697,10609889,10609921,2141729,2141793,10610273]),new Uint32Array([2141923,2142019,2142115,2142211,2142307,2142403,2142499,2142595,2142691,0,0,0,0,0,0,0]),new Uint32Array([0,2221185,2221217,10609857,10609857,10489601,10489697,10609889,10609921,2141729,2141793,2221345,2221377,2221409,2221441,2187105]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18923970,23068672,23068672,23068672,0,6291456,6291456]),new Uint32Array([2183105,6291456,2183137,6291456,2183169,6291456,2183201,6291456,2183233,6291456,2183265,6291456,2183297,6291456,2183329,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2134434,2134818,2097666,2097186,2097474,2097698,2105986,2131586,2132450,2131874,2131778,2135970,2135778,2161602,2136162,2161666]),new Uint32Array([2236865,2236897,2236930,2236993,2237025,2235681,2237058,2237121,2237153,2237185,2237217,2217281,2237250,2191233,2237313,2237345]),new Uint32Array([2190049,6291456,2190081,6291456,2190113,6291456,2190145,6291456,2190177,6291456,2190209,6291456,2190241,6291456,2190273,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2101922,2102050,2102178,2102306,10498755,10498851,10498947,10499043,10499139,10499235,10499331,10499427,10499523,10489604,10489732,10489860]),new Uint32Array([2166914,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2181601,2170561,2181633,2181665,2170753,2181697,2172897,2170881,2181729,2170913,2172929,2113441,2181761,2181793,2171009,2173761]),new Uint32Array([0,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2248001,2248033,2248066,2248130,2248193,2248226,2248289,2248322,2248385,2248417,2216673,2248450,2248514,2248577,2248610,2248673]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([2169729,6291456,2169761,6291456,2169793,6291456,2169825,6291456,2169857,2169889,6291456,2169921,6291456,2143329,6291456,2098305]),new Uint32Array([2162178,2163202,2163266,2135170,2136226,2161986,2137954,2159426,2159490,2163330,2159554,2163394,2159682,2139522,2136450,2159746]),new Uint32Array([2173953,2173985,0,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2174209,2174241,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,4271169,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2174273]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,2190785,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2189793,6291456,2189825,6291456,2189857,6291456,2189889,6291456,2189921,6291456,2189953,6291456,2189985,6291456,2190017,6291456]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,0,2098305,2108321,2108289,2100865,2113153,2108481,2113345,0,2098209,2111137]),new Uint32Array([2172129,6291456,2172161,6291456,2172193,6291456,2172225,6291456,2172257,6291456,2172289,6291456,2172321,6291456,2172353,6291456]),new Uint32Array([2214753,6291456,2214785,6291456,6291456,2214817,2214849,2214881,2214913,2214945,2214977,2215009,2215041,2215073,2194401,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([10610305,10610337,10575617,2221761,10610401,10610433,10502177,0,10610465,10610497,10610529,10610561,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2187105,2187137,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2199393,2199425,2199457,2199489,2199521,2199553,2199585,2199617,2199649,2199681,2199713,2199745,2199777,2199809,2199841,0]),new Uint32Array([2217249,2217281,2217313,2217345,2217377,2217409,2217441,2217473,2215617,2217505,2217537,2217569,2214753,2217601,2217633,2217665]),new Uint32Array([2170273,2170305,6291456,2170337,2170369,6291456,2170401,2170433,2170465,6291456,6291456,6291456,2170497,2170529,6291456,2170561]),new Uint32Array([2188673,6291456,2188705,2188737,2188769,6291456,6291456,2188801,6291456,2188833,6291456,2188865,6291456,2180929,2181505,2180897]),new Uint32Array([10489988,10490116,10490244,10490372,10490500,10490628,10490756,10490884,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147393,2147457,2147521,2147585,2147649,2147713,2147777,2147841]),new Uint32Array([23068672,23068672,0,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2241153,2241185,2241217,2215809,2241250,2241313,2241345,2241377,2217921,2241377,2241409,2215873,2241441,2241473,2241505,2241537]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220417,2220417,2220449,2220449,2220481,2220481,2220513,2220513,2220545,2220545,2220577,2220577,2220609,2220609,2220641,2220641]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2144002,0,6291456,6291456,0,0,6291456,6291456,6291456]),new Uint32Array([2167105,2167137,2167169,2167201,2167233,2167265,2167297,2167329,2167361,2167393,2167425,2167457,2167489,2167521,2167553,2167585]),new Uint32Array([10575521,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2234146,2234210,2234274,2234338,2234402,2234466,2234530,2234594,2234658,2234722,2234786,2234850,2234914,2234978,2235042,2235106]),new Uint32Array([0,0,0,0,0,0,0,2180577,0,0,0,0,0,2180609,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456]),new Uint32Array([2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2242529,2242561,2242593,2242625,2242657,2242689,2242721,2242753,2207937,2218177,2242785,2242817,2242849,2242882,2242945,2242977]),new Uint32Array([2118049,2105345,2118241,2105441,2118433,2118529,2118625,2118721,2118817,2200257,2200289,2191809,2200321,2200353,2200385,2200417]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2185505,6291456,2185537,6291456,2185569,6291456,2185601,6291456,2185633,6291456,2185665,6291456,2185697,6291456,2185729,6291456]),new Uint32Array([2231970,2232034,2232098,2232162,2232226,2232290,2232354,2232418,2232482,2232546,2232610,2232674,2232738,2232802,2232866,2232930]),new Uint32Array([2218625,2246402,2246466,2246530,2246594,2246657,2246689,2246689,2218657,2219681,2246721,2246753,2246785,2246818,2246881,2208481]),new Uint32Array([2197025,2197057,2197089,2197121,2197153,2197185,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2219137,2216961,2219169,2219201,2219233,2219265,2219297,2217025,2215041,2219329,2217057,2219361,2217089,2219393,2197153,2219426]),new Uint32Array([23068672,23068672,23068672,0,0,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713]),new Uint32Array([2243522,2243585,2243617,2243649,2243681,2210113,2243713,2243746,2243810,2243874,2243937,2243970,2244033,2244065,2244097,2244129]),new Uint32Array([2178017,6291456,2178049,6291456,2178081,6291456,2178113,6291456,2178145,6291456,2178177,6291456,2178209,6291456,2178241,6291456]),new Uint32Array([10553858,2165314,10518722,6291456,10518818,0,10518914,2130690,10519010,2130786,10519106,2130882,10519202,2165378,10554050,2165506]),new Uint32Array([0,0,2135491,2135587,2135683,2135779,2135875,2135971,2135971,2136067,2136163,2136259,2136355,2136355,2136451,2136547]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2220033,2220033,2220065,2220065,2220065,2220065,2220097,2220097,2220097,2220097,2220129,2220129,2220129,2220129,2220161,2220161]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2100897,2100898,2100899,2150018,2100865,2100866,2100867,2100868,2150082,2108481,2109858,2109859,2105569,2105505,2098241,2105601]),new Uint32Array([2097217,2097505,2097505,2097505,2097505,2165570,2165570,2165634,2165634,2165698,2165698,2097858,2097858,0,0,2097152]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10503843,10503939,10504035,10504131,10504227,10504323,10504419,10504515,10504611,10504707,10504803,10504899,10504995,10491140,10491268,0]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,2235297,2220769,2235329,2235361]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2222401,2222433,2222465,10531394,2222497,2222529,2222561,0,2222593,2222625,2222657,2222689,2222721,2222753,2222785,0]),new Uint32Array([2184481,6291456,2184513,6291456,2184545,6291456,2184577,6291456,2184609,6291456,2184641,6291456,2184673,6291456,2184705,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2105570,2156034,2126947,2156098,2153666,2127043,2127139,2156162,0,2127235,2156226,2156290,2156354,2156418,2127331,2127427]),new Uint32Array([2215905,2207041,2153185,2241569,2241601,2241633,2241665,2241697,2241730,2241793,2241825,2241857,2241889,2241921,2241954,2242017]),new Uint32Array([2203777,6291456,2203809,6291456,2203841,6291456,2203873,6291456,2203905,6291456,2173121,2180993,2181249,2203937,2181313,0]),new Uint32Array([2168577,6291456,2168609,6291456,2168641,6291456,2168673,6291456,2168705,6291456,2168737,6291456,2168769,6291456,2168801,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,0,0]),new Uint32Array([2210113,2195521,2210145,2210177,2210209,2210241,2210273,2210305,2210337,2210369,2210401,2210433,2210465,2210497,2210529,2210561]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2228706,2228770,2228834,2228898,2228962,2229026,2229090,2229154,2229218,2229282,2229346,2229410,2229474,2229538,2229602,2229666]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,18874368,18874368,18874368,0,0]),new Uint32Array([2133089,2133281,2133281,2133281,2133281,2160577,2160577,2160577,2160577,2097441,2097441,2097441,2097441,2133857,2133857,2133857]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089]),new Uint32Array([2178529,6291456,2178561,6291456,2178593,6291456,2178625,6291456,2178657,6291456,2178689,6291456,2178721,6291456,2178753,6291456]),new Uint32Array([2221025,2221025,2221057,2221057,2159329,2159329,2159329,2159329,2097217,2097217,2158914,2158914,2158978,2158978,2159042,2159042]),new Uint32Array([2208161,2208193,2208225,2208257,2194433,2208289,2208321,2208353,2208385,2208417,2208449,2208481,2208513,2208545,2208577,2208609]),new Uint32Array([2169217,6291456,2169249,6291456,2169281,6291456,2169313,6291456,2169345,6291456,2169377,6291456,2169409,6291456,2169441,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2133187,2133283,2133283,2133379,2133475,2133571,2133667,2133667,2133763,2133859,2133955,2134051,2134147,2134147,2134243,2134339]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,0]),new Uint32Array([2193089,2193121,2193153,2193185,2117665,2117569,2193217,2193249,2193281,2193313,2193345,2193377,2193409,2193441,2193473,2193505]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184225,6291456,2184257,6291456,2184289,6291456,2184321,6291456,2184353,6291456,2184385,6291456,2184417,6291456,2184449,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2100833,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2200801,2200833,2200865,0]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2181153,2105505,2181185,2167617,2180993]),new Uint32Array([2160002,2160066,2160130,2160194,2160258,2132066,2131010,2131106,2106018,2131618,2160322,2131298,2132034,2131938,2137410,2132226]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2183617,6291456,2183649,6291456,2183681,6291456,2183713,6291456,2183745,6291456,2183777,6291456,2183809,6291456,2183841,6291456]),new Uint32Array([0,6291456,6291456,0,6291456,0,0,6291456,6291456,0,6291456,0,0,6291456,0,0]),new Uint32Array([2250977,2251009,2251041,2251073,2195009,2251106,2251169,2251201,2251233,2251265,2251297,2251330,2251394,2251457,2251489,2251521]),new Uint32Array([2205729,2205761,2205793,2205825,2205857,2205889,2205921,2205953,2205985,2206017,2206049,2206081,2206113,2206145,2206177,2206209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2143170,2168993,6291456,2169025,6291456,2169057,6291456,2169089,6291456,2143234,2169121,6291456,2169153,6291456,2169185,6291456]),new Uint32Array([23068672,23068672,2190689,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2248706,2248769,2248801,2248833,2248865,2248897,2248929,2248962,2249026,2249090,2249154,2240705,2249217,2249249,2249281,2249313]),new Uint32Array([10485857,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10495394,6291456,2098209,6291456,6291456,2097152,6291456,10531394]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([6291456,2186977,6291456,6291456,6291456,6291456,6291456,10537858,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2209601,2209633,2209665,2209697,2209729,2209761,2209793,2209825,2209857,2209889,2209921,2209953,2209985,2210017,2210049,2210081]),new Uint32Array([10501539,10501635,10501731,10501827,10501923,10502019,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2194561,2194593,2194625,2119777,2119873,2194657,2194689,2194721,2194753,2194785,2194817,2194849,2194881,2194913,2194945,2194977]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569]),new Uint32Array([2222818,2222882,2222946,2223010,2223074,2223138,2223202,2223266,2223330,2223394,2223458,2223522,2223586,2223650,2223714,2223778]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672]),new Uint32Array([0,2179553,2179585,2179617,2179649,2144001,2179681,2179713,2179745,2179777,2179809,2156705,2179841,2156833,2179873,2179905]),new Uint32Array([6291456,23068672,6291456,2145602,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,6291456,0,0]),new Uint32Array([2196513,2196545,2196577,2196609,2196641,2196673,2196705,2196737,2196769,2196801,2196833,2196865,2196897,2196929,2196961,2196993]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2177281,6291456,2177313,6291456,2177345,6291456,2177377,6291456,2177409,6291456,2177441,6291456,2177473,6291456,2177505,6291456]),new Uint32Array([2187137,2221473,2221505,2221537,2221569,6291456,6291456,10610209,10610241,10537986,10537986,10537986,10537986,10609857,10609857,10609857]),new Uint32Array([2243009,2243041,2216033,2243074,2243137,2243169,2243201,2219617,2243233,2243265,2243297,2243329,2243362,2243425,2243457,2243489]),new Uint32Array([10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,2097152,4194304,4194304,0,0]),new Uint32Array([2143042,6291456,2143106,2143106,2168833,6291456,2168865,6291456,6291456,2168897,6291456,2168929,6291456,2168961,6291456,2143170]),new Uint32Array([6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2204193,2204225,2204257,2204289,2204321,2204353,2204385,2204417,2204449,2204481,2204513,2204545,2204577,2204609,2204641,2204673]),new Uint32Array([2202753,6291456,2202785,6291456,2202817,6291456,2202849,6291456,2202881,6291456,2202913,6291456,2202945,6291456,2202977,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321]),new Uint32Array([2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842,2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842]),new Uint32Array([2253313,2253346,2253409,2253441,2253473,2253505,2253537,2253569,2253601,2253634,2219393,2253697,2253729,2253761,2253793,2253825]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([2162562,2162626,2131362,2162690,2159938,2160002,2162754,2162818,2160130,2162882,2160194,2160258,2160834,2160898,2161026,2161090]),new Uint32Array([2175361,2175393,2175425,2175457,2175489,2175521,2175553,2175585,2175617,2175649,2175681,2175713,2175745,2175777,2175809,2175841]),new Uint32Array([2253858,2253921,2253954,2254018,2254082,2196737,2254145,2196865,2254177,2254209,2254241,2254273,2197025,2254306,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2202113,2204129,2188705,2204161]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953]),new Uint32Array([2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,0,2108417,0,2111713,2100897,2111905]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2175425,2175489,2175809,2175905,2175937,2175937,2176193,2176417,2180865,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,2143298,2143298,2143298,2143362,2143362,2143362,2143426,2143426,2143426,2171105,6291456,2171137]),new Uint32Array([2120162,2120258,2151618,2151682,2151746,2151810,2151874,2151938,2152002,2120035,2120131,2120227,2152066,2120323,2152130,2120419]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2195361,2142433,2236065,2236097,2236129,2236161,2118241,2117473,2236193,2236225,2236257,2236289,0,0,0,0]),new Uint32Array([2189281,6291456,2189313,6291456,2189345,6291456,2189377,6291456,2189409,6291456,2189441,6291456,2189473,6291456,2189505,6291456]),new Uint32Array([6291456,6291456,2145922,6291456,6291456,6291456,6291456,2145986,6291456,6291456,6291456,6291456,2146050,6291456,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10502113,10562017,10610401,10502177,10610433,10538049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,2186401,0,2186433,0,2186465,0,2186497]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,23068672,23068672]),new Uint32Array([0,0,2198241,2198273,2198305,2198337,2198369,2198401,0,0,2198433,2198465,2198497,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,0,23068672,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,2133281,2097505,2105889,0,2097697,2135777,2097633,2097441]),new Uint32Array([2197889,2197921,2197953,2197985,2198017,2198049,2198081,2198113,2198145,2198177,2198209,2198241,2198273,2198305,2198337,2198369]),new Uint32Array([2132514,2132610,2160386,2133090,2133186,2160450,2160514,2133282,2160578,2133570,2106178,2160642,2133858,2160706,2160770,2134146]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,6291456,23068672,23068672,6291456,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2184737,6291456,2184769,6291456,2184801,6291456,2184833,6291456,2184865,6291456,2184897,6291456,2184929,6291456,2184961,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,2186753,6291456,6291456,6291456,6291456,2186785,2186817,2186849,2173569,2186881,10496355,10495395,10575521]),new Uint32Array([0,0,2097729,0,0,0,0,2106017,0,2097505,0,2097185,0,2135777,2097633,2097441]),new Uint32Array([2189537,6291456,2189569,6291456,2189601,6291456,2189633,6291456,2189665,6291456,2189697,6291456,2189729,6291456,2189761,6291456]),new Uint32Array([2202497,6291456,2202529,6291456,2202561,6291456,2202593,6291456,2202625,6291456,2202657,6291456,2202689,6291456,2202721,6291456]),new Uint32Array([2245217,2218369,2245249,2245282,2245345,2245377,2245410,2245474,2245537,2245569,2245601,2245633,2245665,2245665,2245697,2245729]),new Uint32Array([6291456,0,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,23068672,6291456,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,2097377,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2176641,6291456,2176673,6291456,2176705,6291456,2176737,6291456,2176769,6291456,2176801,6291456,2176833,6291456,2176865,6291456]),new Uint32Array([2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2174369,2174369,0,0,2100833,2100737]),new Uint32Array([2116513,2190817,2190849,2190881,2190913,2190945,2116609,2190977,2191009,2191041,2191073,2117185,2191105,2191137,2191169,2191201]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2167617,2167649,2167681,2167713,2167745,2167777,2167809,6291456,2167841,2167873,2167905,2167937,2167969,2168001,2168033,4240130]),new Uint32Array([2165122,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122,2134562,2132162,2132834,2136866]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2186209,2186241,2186273,2186305,2186337,2186369,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,0,23068672,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([0,10537921,10610689,10610273,10610497,10610529,10610305,10610721,10489601,10489697,10610337,10575617,10554529,2221761,2197217,10496577]),new Uint32Array([2105473,2105569,2105601,2112289,0,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2125346,2153410,2153474,2127394,2153538,2153602,2153666,2153730,2105507,2105476,2153794,2153858,2153922,2153986,2154050,2105794]),new Uint32Array([2200449,2119681,2200481,2153313,2199873,2199905,2199937,2200513,2200545,2200577,2200609,2119105,2119201,2119297,2119393,2119489]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2175777,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2222273,2197217,2221473,2221505,2221089,2222305,2200865,2099681,2104481,2222337,2099905,2120737,2222369,2103713,2100225,2098785]),new Uint32Array([2201377,6291456,2201409,6291456,2201441,6291456,2201473,6291456,2201505,6291456,2201537,6291456,2201569,6291456,6291456,23068672]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([2200897,6291456,2200929,6291456,2200961,6291456,2200993,6291456,2201025,6291456,2180865,6291456,2201057,6291456,2201089,6291456]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2161154,2161410,2138658,2161474,2161538,2097666,2097186,2097474,2162946,2132450,2163010,2163074,2136162,2163138,2161666,2161730]),new Uint32Array([2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953]),new Uint32Array([0,0,0,0,0,0,23068672,23068672,0,0,0,0,2145410,2145474,0,6291456]),new Uint32Array([2244161,2216065,2212769,2244193,2244225,2244257,2244290,2244353,2244385,2244417,2244449,2218273,2244481,2244514,2244577,2244609]),new Uint32Array([2125730,2125699,2125795,2125891,2125987,2154114,2154178,2154242,2154306,2154370,2154434,2154498,2126082,2126178,2126274,2126083]),new Uint32Array([2237665,2237697,2237697,2237697,2237730,2237793,2237825,2237857,2237890,2237953,2237985,2238017,2238049,2238081,2238113,2238145]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150146,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2214369,2238593,2238625,2238657,2238689,2238721,2238753,2238785,2238817,2238850,2238913,2238945,2238977,2235457,2239009,2239041]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2252066,2252130,2252193,2252225,2252257,2252290,2252353,2252385,2252417,2252449,2252481,2252513,2252545,2252578,2252641,2252673]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,2197857]),new Uint32Array([2224866,2224930,2224994,2225058,2225122,2225186,2225250,2225314,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2219490,2219554,2219617,2219649,2219681,2219714,2219778,2219842,2219905,2219937,0,0,0,0,0,0]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665]),new Uint32Array([2220161,2220161,2220193,2220193,2220193,2220193,2220225,2220225,2220225,2220225,2220257,2220257,2220257,2220257,2220289,2220289]),new Uint32Array([2192673,2192705,2192737,2192769,2192801,2192833,2192865,2118049,2192897,2117473,2117761,2192929,2192961,2192993,2193025,2193057]),new Uint32Array([2179297,6291456,2179329,6291456,2179361,6291456,2179393,6291456,2179425,6291456,2179457,6291456,2179489,6291456,2179521,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2235745,2235777,2193633,2235809,2235841,2235873,2235905,2235937,2235969,2116513,2116705,2236001,2200513,2199905,2200545,2236033]),new Uint32Array([2113153,2108481,2113345,2113441,2232993,2233025,0,0,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761]),new Uint32Array([2170593,6291456,2170625,6291456,2170657,6291456,2170689,2170721,6291456,2170753,6291456,6291456,2170785,6291456,2170817,2170849]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2166786,2166850,0,0,0,0]),new Uint32Array([23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,0]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2134562,2132162,2132834,2136866,2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058]),new Uint32Array([6291456,6291456,2098337,2101441,10531458,2153473,6291456,6291456,10531522,2100737,2108193,6291456,2106499,2106595,2106691,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2233122,2233186,2233250,2233314,2233378,2233442,2233506,2233570,2233634,2233698,2233762,2233826,2233890,2233954,2234018,2234082]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2205217,2205249,2205281,2205313,2205345,2205377,2205409,2205441,2205473,2205505,2205537,2205569,2205601,2205633,2205665,2205697]),new Uint32Array([6291456,0,6291456,0,0,0,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([2173601,2173761,2174081,2173569,2174241,2174113,2173953,6291456,2174305,6291456,2174337,6291456,2174369,6291456,2174401,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2152450,2152514,2099653,2104452,2099813,2122243,2099973,2152578,2122339,2122435,2122531,2122627,2122723,2104580,2122819,2152642]),new Uint32Array([2236385,2236417,2236449,2236482,2236545,2215425,2236577,2236609,2236641,2236673,2215457,2236705,2236737,2236770,2215489,2236833]),new Uint32Array([2163394,2159746,2163458,2131362,2163522,2160130,2163778,2132226,2163842,2132898,2163906,2161410,2138658,2097666,2136162,2163650]),new Uint32Array([2218721,2246913,2246946,2216385,2247010,2247074,2215009,2247137,2247169,2216481,2247201,2247233,2247266,2247330,2247330,0]),new Uint32Array([2129730,2129762,2129858,2129731,2129827,2156482,2156482,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0,0,0,0,6291456,0,0]),new Uint32Array([2203969,2204001,2181377,2204033,2204065,6291456,2204097,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2169473,6291456,2169505,6291456,2169537,6291456,2169569,6291456,2169601,6291456,2169633,6291456,2169665,6291456,2169697,6291456]),new Uint32Array([2141542,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220801,2220801,2220801,2220801,2220833,2220833,2220865,2220865,2220865,2220865,2220897,2220897,2220897,2220897,2139873,2139873]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,0,0,0,0,0,0,6291456,0]),new Uint32Array([2214849,2218433,2218465,2218497,2218529,2218561,2214881,2218593,2218625,2218657,2218689,2218721,2218753,2216545,2218785,2218817]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058,2165122,2132802,2132706,2164866]),new Uint32Array([2207649,2207681,2207713,2207745,2207777,2207809,2207841,2207873,2207905,2207937,2207969,2208001,2208033,2208065,2208097,2208129]),new Uint32Array([2123683,2105092,2152706,2123779,2105220,2152770,2100453,2098755,2123906,2124002,2124098,2124194,2124290,2124386,2124482,2124578]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,0,0,0,0,0,0,0,10485857]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([10508163,10508259,10508355,10508451,2200129,2200161,2192737,2200193,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203553,6291456,2203585,6291456,6291456,6291456,2203617,6291456,2203649,6291456,2203681,6291456,2203713,6291456,2203745,6291456]),new Uint32Array([18884449,18884065,23068672,18884417,18884034,18921185,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18874368]),new Uint32Array([2247393,2247426,2247489,2247521,2247553,2247586,2247649,2247681,2247713,2247745,2247777,2247810,2247873,2247905,2247937,2247969]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,2160577,2133857,2235297,0,2235329,0]),new Uint32Array([2182593,6291456,2182625,6291456,2182657,6291456,2182689,6291456,2182721,6291456,2182753,6291456,2182785,6291456,2182817,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102402,2102403,6291456,2110050]),new Uint32Array([2149890,2108323,2149954,6291456,2113441,6291456,2149057,6291456,2113441,6291456,2105473,2167265,2111137,2105505,6291456,2108353]),new Uint32Array([2219105,2219137,2195233,2251554,2251617,2251649,2251681,2251713,2251746,2251810,2251873,2251905,2251937,2251970,2252033,2219169]),new Uint32Array([2203009,6291456,2203041,6291456,2203073,6291456,2203105,6291456,2203137,6291456,2203169,6291456,2203201,6291456,2203233,6291456]),new Uint32Array([2128195,2128291,2128387,2128483,2128579,2128675,2128771,2128867,2128963,2129059,2129155,2129251,2129347,2129443,2129539,2129635]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2140964,2141156,2140966,2141158,2141350]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2225378,2225442,2225506,2225570,2225634,2225698,2225762,2225826,2225890,2225954,2226018,2226082,2226146,2226210,2226274,2226338]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417]),new Uint32Array([2108353,2108417,0,2105601,2108193,2157121,2157313,2157377,2157441,2100897,6291456,2108419,2173953,2173633,2173633,2173953]),new Uint32Array([2111713,2173121,2111905,2098177,2173153,2173185,2173217,2113153,2113345,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2190753]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,2197249,6291456,2117377,2197281,2197313,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,23068672]),new Uint32Array([2173281,6291456,2173313,6291456,2173345,6291456,2173377,6291456,0,0,10532546,6291456,6291456,6291456,10562017,2173441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2159426,2159490,2159554,2159362,2159618,2159682,2139522,2136450,2159746,2159810,2159874,2130978,2131074,2131266,2131362,2159938]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203233,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2203265,6291456,2203297,6291456,2203329,2203361,6291456]),new Uint32Array([6291456,6291456,2148418,2148482,2148546,0,6291456,2148610,2186529,2186561,2148417,2148545,2148482,10495778,2143969,10495778]),new Uint32Array([2134146,2139426,2160962,2134242,2161218,2161282,2161346,2161410,2138658,2134722,2134434,2134818,2097666,2097346,2097698,2105986]),new Uint32Array([2198881,2198913,2198945,2198977,2199009,2199041,2199073,2199105,2199137,2199169,2199201,2199233,2199265,2199297,2199329,2199361]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([10610561,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2183873,6291456,2183905,6291456,2183937,6291456,2183969,6291456,2184001,6291456,2184033,6291456,2184065,6291456,2184097,6291456]),new Uint32Array([2244642,2244706,2244769,2244801,2218305,2244833,2244865,2244897,2244929,2244961,2244993,2245026,2245089,2245122,2245185,0]),new Uint32Array([6291456,6291456,2116513,2116609,2116705,2116801,2199873,2199905,2199937,2199969,2190913,2200001,2200033,2200065,2200097,2191009]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2180673,2180705,2180737,2180769,2180801,2180833,0,0]),new Uint32Array([2098081,2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150402]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,2145666,2145730,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665]),new Uint32Array([2187073,6291456,6291456,6291456,6291456,2098241,2098241,2108353,2100897,2111905,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102404,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2100612,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10485857]),new Uint32Array([2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([2217697,2217729,2217761,2217793,2217825,2217857,2217889,2217921,2217953,2215873,2217985,2215905,2218017,2218049,2218081,2218113]),new Uint32Array([2211233,2218849,2216673,2218881,2218913,2218945,2218977,2219009,2216833,2219041,2215137,2219073,2216865,2209505,2219105,2216897]),new Uint32Array([2240097,2240129,2240161,2240193,2240225,2240257,2240289,2240321,2240353,2240386,2240449,2240481,2240513,2240545,2207905,2240578]),new Uint32Array([6291456,6291456,2202273,6291456,2202305,6291456,2202337,6291456,2202369,6291456,2202401,6291456,2202433,6291456,2202465,6291456]),new Uint32Array([0,23068672,23068672,18923394,23068672,18923458,18923522,18884099,18923586,18884195,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2201121,6291456,2201153,6291456,2201185,6291456,2201217,6291456,2201249,6291456,2201281,6291456,2201313,6291456,2201345,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2211041,2211073,2211105,2211137,2211169,2211201,2211233,2211265,2211297,2211329,2211361,2211393,2211425,2211457,2211489,2211521]),new Uint32Array([2181825,6291456,2181857,6291456,2181889,6291456,2181921,6291456,2181953,6291456,2181985,6291456,2182017,6291456,2182049,6291456]),new Uint32Array([2162337,2097633,2097633,2097633,2097633,2132705,2132705,2132705,2132705,2097153,2097153,2097153,2097153,2133089,2133089,2133089]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,2148545,6291456,2173473,6291456,2148865,6291456,2173505,6291456,2173537,6291456,2173569,6291456,2149121,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2207137,2207169,2207201,2207233,2207265,2207297,2207329,2207361,2207393,2207425,2207457,2207489,2207521,2207553,2207585,2207617]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,23068672,23068672,0,0,0,0,0,0]),new Uint32Array([2198401,2198433,2198465,2198497,0,2198529,2198561,2198593,2198625,2198657,2198689,2198721,2198753,2198785,2198817,2198849]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2216385,2118721,2216417,2216449,2216481,2216513,2216545,2211233,2216577,2216609,2216641,2216673,2216705,2216737,2216737,2216769]),new Uint32Array([2216801,2216833,2216865,2216897,2216929,2216961,2216993,2215169,2217025,2217057,2217089,2217121,2217154,2217217,0,0]),new Uint32Array([2210593,2191809,2210625,2210657,2210689,2210721,2210753,2210785,2210817,2210849,2191297,2210881,2210913,2210945,2210977,2211009]),new Uint32Array([0,0,2105825,0,0,2111905,2105473,0,0,2112289,2108193,2112481,2112577,0,2098305,2108321]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,2097153,2134241,0,2132705,0,0,2131297,0,2133089,0,2133857,0,2220769,0,2235361]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,6291456,6291456,14680064]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2171873,6291456,2171905,6291456,2171937,6291456,2171969,6291456,2172001,6291456,2172033,6291456,2172065,6291456,2172097,6291456]),new Uint32Array([2220929,2220929,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2133857,2134145,2134145,2134145,2134145,2134241,2134241,2134241,2134241,2105889,2105889,2105889,2105889,2097185,2097185,2097185]),new Uint32Array([2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,10499619,10499715,10499811,10499907]),new Uint32Array([0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2144322,2144386,2144450,2144514,2144578,2144642,2144706,2144770]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0,0,2111905,2105473,2105569]),new Uint32Array([2236321,2236353,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2152194,2121283,2103684,2103812,2097986,2098533,2097990,2098693,2098595,2098853,2099013,2103940,2121379,2121475,2121571,2104068]),new Uint32Array([2206241,2206273,2206305,2206337,2206369,2206401,2206433,2206465,2206497,2206529,2206561,2206593,2206625,2206657,2206689,2206721]),new Uint32Array([6291456,6291456,6291456,6291456,16777216,16777216,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,10538818,10538882,6291456,6291456,2150338]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2214369,2214401,2214433,2214465,2214497,2214529,2214561,2214593,2194977,2214625,2195073,2214657,2214689,2214721,6291456,6291456]),new Uint32Array([2097152,2097152,2097152,2097152,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2182081,6291456,2182113,6291456,2182145,6291456,2182177,6291456,2182209,6291456,2182241,6291456,2182273,6291456,2182305,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146881,2146945,2147009,2147073,2147137,2147201,2147265,2147329]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672]),new Uint32Array([0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2122915,2123011,2123107,2104708,2123203,2123299,2123395,2100133,2104836,2100290,2100293,2104962,2104964,2098052,2123491,2123587]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,2171169,6291456,2171201,6291456,2171233,6291456,2171265,6291456,2171297,6291456,2171329,6291456,6291456,2171361,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2148994,2149058,2149122,0,6291456,2149186,2186945,2173537,2148993,2149121,2149058,10531458,10496066,0]),new Uint32Array([2195009,2195041,2195073,2195105,2195137,2195169,2195201,2195233,2195265,2195297,2195329,2195361,2195393,2195425,2195457,2195489]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,0,0,6291456,6291456]),new Uint32Array([2182849,6291456,2182881,6291456,2182913,6291456,2182945,6291456,2182977,6291456,2183009,6291456,2183041,6291456,2183073,6291456]),new Uint32Array([2211553,2210081,2211585,2211617,2211649,2211681,2211713,2211745,2211777,2211809,2209569,2211841,2211873,2211905,2211937,2211969]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2166594,2127298,2166658,2142978,2141827,2166722]),new Uint32Array([2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2185761,2185793,2185825,2185857,2185889,2185921,0,0]),new Uint32Array([6291456,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456]),new Uint32Array([0,0,0,2220961,2220961,2220961,2220961,2144193,2144193,2159201,2159201,2159265,2159265,2144194,2220993,2220993]),new Uint32Array([2192641,2235393,2235425,2152257,2116609,2235457,2235489,2200065,2235521,2235553,2235585,2212449,2235617,2235649,2235681,2235713]),new Uint32Array([2194049,2194081,2194113,2194145,2194177,2194209,2194241,2194273,2194305,2194337,2194369,2194401,2194433,2194465,2194497,2194529]),new Uint32Array([2196673,2208641,2208673,2208705,2208737,2208769,2208801,2208833,2208865,2208897,2208929,2208961,2208993,2209025,2209057,2209089]),new Uint32Array([2191681,2191713,2191745,2191777,2153281,2191809,2191841,2191873,2191905,2191937,2191969,2192001,2192033,2192065,2192097,2192129]),new Uint32Array([2230946,2231010,2231074,2231138,2231202,2231266,2231330,2231394,2231458,2231522,2231586,2231650,2231714,2231778,2231842,2231906]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2185953,2185985,2186017,2186049,2186081,2186113,2186145,2186177]),new Uint32Array([2139811,2139907,2097284,2105860,2105988,2106116,2106244,2097444,2097604,2097155,10485778,10486344,2106372,6291456,0,0]),new Uint32Array([2110051,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2172385,6291456,2172417,6291456,2172449,6291456,2172481,6291456,2172513,6291456,2172545,6291456,2172577,6291456,2172609,6291456]),new Uint32Array([0,0,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2249345,2249377,2249409,2249441,2249473,2249505,2249537,2249570,2210209,2249633,2249665,2249697,2249729,2249761,2249793,2216769]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2187169,2187201,2187233,2187265,2187297,2187329,2187361,2187393,2187425,2187457,2187489,2187521,2187553,2187585,2187617,2187649]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,6291456,6291456,0,0,0,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2182337,6291456,2182369,6291456,2182401,6291456,2182433,6291456,2182465,6291456,2182497,6291456,2182529,6291456,2182561,6291456]),new Uint32Array([2138179,2138275,2138371,2138467,2134243,2134435,2138563,2138659,2138755,2138851,2138947,2139043,2138947,2138755,2139139,2139235]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2250498,2250562,2250625,2250657,2208321,2250689,2250721,2250753,2250785,2250817,2250849,2218945,2250881,2250913,2250945,0]),new Uint32Array([2170369,2105569,2098305,2108481,2173249,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,0,2108193,0,0,0,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2100897,2100897,2105569,2105569,6291456,2112289,2149826,6291456,6291456,2112481,2112577,2098177,2098177,2098177,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,2169953,2169985,6291456,2170017,6291456,2170049,2170081,6291456,2170113,2170145,2170177,6291456,6291456,2170209,2170241]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220641,2220641,2220673,2220673,2220673,2220673,2220705,2220705,2220705,2220705,2220737,2220737,2220737,2220737,2220769,2220769]),new Uint32Array([2127650,2127746,2127842,2127938,2128034,2128130,2128226,2128322,2128418,2127523,2127619,2127715,2127811,2127907,2128003,2128099]),new Uint32Array([2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177]),new Uint32Array([0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2204705,2204737,2204769,2204801,2204833,2204865,2204897,2204929,2204961,2204993,2205025,2205057,2205089,2205121,2205153,2205185]),new Uint32Array([2176385,6291456,2176417,6291456,2176449,6291456,2176481,6291456,2176513,6291456,2176545,6291456,2176577,6291456,2176609,6291456]),new Uint32Array([2195521,2195553,2195585,2195617,2195649,2195681,2117857,2195713,2195745,2195777,2195809,2195841,2195873,2195905,2195937,2195969]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113]),new Uint32Array([2131586,2132450,2135970,2135778,2161602,2136162,2163650,2161794,2135586,2163714,2137186,2131810,2160290,2135170,2097506,2159554]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,0,0,0,0]),new Uint32Array([2116513,2116609,2116705,2116801,2116897,2116993,2117089,2117185,2117281,2117377,2117473,2117569,2117665,2117761,2117857,2117953]),new Uint32Array([2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100802,2101154,2101282,2101410,2101538,2101666,2101794]),new Uint32Array([2100289,2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2098977,2150241,2150305]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,2109955,6291456,6291456,0,0,0,0]),new Uint32Array([18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,0,0]),new Uint32Array([2130979,2131075,2131075,2131171,2131267,2131363,2131459,2131555,2131651,2131651,2131747,2131843,2131939,2132035,2132131,2132227]),new Uint32Array([0,2177793,6291456,2177825,6291456,2177857,6291456,2177889,6291456,2177921,6291456,2177953,6291456,2177985,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2113345,0,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2136643,2136739,2136835,2136931,2137027,2137123,2137219,2137315,2137411,2137507,2137603,2137699,2137795,2137891,2137987,2138083]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2174433,6291456,2174465,6291456,2174497,6291456,2174529,6291456,2174561,6291456,2174593,6291456,2174625,6291456,2174657,6291456]),new Uint32Array([0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([10496547,10496643,2105505,2149698,6291456,10496739,10496835,2170273,6291456,2149762,2105825,2111713,2111713,2111713,2111713,2168673]),new Uint32Array([6291456,2143490,2143490,2143490,2171649,6291456,2171681,2171713,2171745,6291456,2171777,6291456,2171809,6291456,2171841,6291456]),new Uint32Array([2159106,2159106,2159170,2159170,2159234,2159234,2159298,2159298,2159298,2159362,2159362,2159362,2106401,2106401,2106401,2106401]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137]),new Uint32Array([2108417,2181217,2181249,2181281,2170433,2170401,2181313,2181345,2181377,2181409,2181441,2181473,2181505,2181537,2170529,2181569]),new Uint32Array([2218433,2245761,2245793,2245825,2245857,2245890,2245953,2245986,2209665,2246050,2246113,2246146,2246210,2246274,2246337,2246369]),new Uint32Array([2230754,2230818,2230882,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184129,6291456,2184161,6291456,2184193,6291456,6291456,6291456,6291456,6291456,2146818,2183361,6291456,6291456,2142978,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2135170,2097506,2130691,2130787,2130883,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122]),new Uint32Array([2108515,2108611,2100740,2108707,2108803,2108899,2108995,2109091,2109187,2109283,2109379,2109475,2109571,2109667,2109763,2100738]),new Uint32Array([2102788,2102916,2103044,2120515,2103172,2120611,2120707,2098373,2103300,2120803,2120899,2120995,2103428,2103556,2121091,2121187]),new Uint32Array([2158082,2158146,0,2158210,2158274,0,2158338,2158402,2158466,2129922,2158530,2158594,2158658,2158722,2158786,2158850]),new Uint32Array([10499619,10499715,10499811,10499907,10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059]),new Uint32Array([2239585,2239618,2239681,2239713,0,2191969,2239745,2239777,2192033,2239809,2239841,2239874,2239937,2239970,2240033,2240065]),new Uint32Array([2252705,2252738,2252801,2252833,2252865,2252897,2252930,2252994,2253057,2253089,2253121,2253154,2253217,2253250,2219361,2219361]),new Uint32Array([2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,10538050,10538114,10538178,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2226402,2226466,2226530,2226594,2226658,2226722,2226786,2226850,2226914,2226978,2227042,2227106,2227170,2227234,2227298,2227362]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,2144066,2144130,2144194,2144258,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2124674,2124770,2123875,2123971,2124067,2124163,2124259,2124355,2124451,2124547,2124643,2124739,2124835,2124931,2125027,2125123]),new Uint32Array([2168065,6291456,2168097,6291456,2168129,6291456,2168161,6291456,2168193,6291456,2168225,6291456,2168257,6291456,2168289,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2100610,2100611,6291456,2107842,2107843,6291456,6291456,6291456,6291456,10537922,6291456,10537986,6291456]),new Uint32Array([2174849,2174881,2174913,2174945,2174977,2175009,2175041,2175073,2175105,2175137,2175169,2175201,2175233,2175265,2175297,2175329]),new Uint32Array([2154562,2154626,2154690,2154754,2141858,2154818,2154882,2127298,2154946,2127298,2155010,2155074,2155138,2155202,2155266,2155202]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0]),new Uint32Array([2200641,2150786,2150850,2150914,2150978,2151042,2106562,2151106,2150562,2151170,2151234,2151298,2151362,2151426,2151490,2151554]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456]),new Uint32Array([2220289,2220289,2220321,2220321,2220321,2220321,2220353,2220353,2220353,2220353,2220385,2220385,2220385,2220385,2220417,2220417]),new Uint32Array([2155330,2155394,0,2155458,2155522,2155586,2105732,0,2155650,2155714,2155778,2125314,2155842,2155906,2126274,2155970]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0]),new Uint32Array([2097729,2106017,2106017,2106017,2106017,2131297,2131297,2131297,2131297,2106081,2106081,2162049,2162049,2105953,2105953,2162337]),new Uint32Array([2097185,2097697,2097697,2097697,2097697,2135777,2135777,2135777,2135777,2097377,2097377,2097377,2097377,2097601,2097601,2097217]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([2139331,2139427,2139523,2139043,2133571,2132611,2139619,2139715,0,0,0,0,0,0,0,0]),new Uint32Array([2174113,2174145,2100897,2098177,2108289,2100865,2173601,2173633,2173985,2174113,2174145,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,23068672,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,18923778,23068672,23068672,23068672,23068672,18923842,23068672,23068672,23068672,23068672,18923906,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,0,2133857,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2177537,6291456,2177569,6291456,2177601,6291456,2177633,6291456,2177665,6291456,2177697,6291456,2177729,6291456,2177761,6291456]),new Uint32Array([2212481,2212513,2212545,2212577,2197121,2212609,2212641,2212673,2212705,2212737,2212769,2212801,2212833,2212865,2212897,2212929]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2098241,2108353,2170209,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,6291456,2108193,2172417,2112481,2098177]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456])],t=new Uint16Array([616,616,565,147,161,411,330,2,131,131,328,454,241,408,86,86,696,113,285,350,325,301,473,214,639,232,447,64,369,598,124,672,567,223,621,154,107,86,86,86,86,86,86,505,86,68,634,86,218,218,218,218,486,218,218,513,188,608,216,86,217,463,668,85,700,360,184,86,86,86,647,402,153,10,346,718,662,260,145,298,117,1,443,342,138,54,563,86,240,572,218,70,387,86,118,460,641,602,86,86,306,218,86,692,86,86,86,86,86,162,707,86,458,26,86,218,638,86,86,86,86,86,65,449,86,86,306,183,86,58,391,667,86,157,131,131,131,131,86,433,131,406,31,218,247,86,86,693,218,581,351,86,438,295,69,462,45,126,173,650,14,295,69,97,168,187,641,78,523,390,69,108,287,664,173,219,83,295,69,108,431,426,173,694,412,115,628,52,257,398,641,118,501,121,69,579,151,423,173,620,464,121,69,382,151,476,173,27,53,121,86,594,578,226,173,86,632,130,86,96,228,268,641,622,563,86,86,21,148,650,131,131,321,43,144,343,381,531,131,131,178,20,86,399,156,375,164,541,30,60,715,198,92,118,131,131,86,86,306,407,86,280,457,196,488,358,131,131,244,86,86,143,86,86,86,86,86,667,563,86,86,86,86,86,86,86,86,86,86,86,86,86,336,363,86,86,336,86,86,380,678,67,86,86,86,678,86,86,86,512,86,307,86,708,86,86,86,86,86,528,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,563,307,86,86,86,86,86,104,450,337,86,720,86,32,450,397,86,86,86,587,218,558,708,708,293,708,86,86,86,86,86,694,205,86,8,86,86,86,86,549,86,667,697,697,679,86,458,460,86,86,650,86,708,543,86,86,86,245,86,86,86,140,218,127,708,708,458,197,131,131,131,131,500,86,86,483,251,86,306,510,515,86,722,86,86,86,65,201,86,86,483,580,470,86,86,86,368,131,131,131,694,114,110,555,86,86,123,721,163,142,713,418,86,317,675,209,218,218,218,371,545,592,629,490,603,199,46,320,525,680,310,279,388,111,42,252,593,607,235,617,410,377,50,548,135,356,17,520,189,116,392,600,349,332,482,699,690,535,119,106,451,71,152,667,131,218,218,265,671,637,492,504,533,683,269,269,658,86,86,86,86,86,86,86,86,86,491,619,86,86,6,86,86,86,86,86,86,86,86,86,86,86,229,86,86,86,86,86,86,86,86,86,86,86,86,667,86,86,171,131,118,131,656,206,234,571,89,334,670,246,311,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,534,86,86,86,86,86,86,82,86,86,86,86,86,430,86,86,86,86,86,86,86,86,86,599,86,324,86,470,69,640,264,131,626,101,174,86,86,667,233,105,73,374,394,221,204,84,28,326,86,86,471,86,86,86,109,573,86,171,200,200,200,200,218,218,86,86,86,86,460,131,131,131,86,506,86,86,86,86,86,220,404,34,614,47,442,305,25,612,338,601,648,7,344,255,131,131,51,86,312,507,563,86,86,86,86,588,86,86,86,86,86,530,511,86,458,3,435,384,556,522,230,527,86,118,86,86,717,86,137,273,79,181,484,23,93,112,655,249,417,703,370,87,98,313,684,585,155,465,596,481,695,18,416,428,61,701,706,282,643,495,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,86,86,86,171,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,650,131,422,542,420,263,24,172,86,86,86,86,86,566,86,86,132,540,395,353,494,519,19,485,284,472,131,131,131,16,714,86,211,708,86,86,86,694,698,86,86,483,704,708,218,272,86,86,120,86,159,478,86,307,247,86,86,663,597,459,627,667,86,86,277,455,39,302,86,250,86,86,86,271,99,452,306,281,329,400,200,86,86,362,549,352,646,461,323,586,86,86,4,708,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,717,86,518,86,86,650,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,125,554,480,300,613,72,333,288,561,544,604,48,719,91,169,176,590,224,76,191,29,559,560,231,537,166,477,538,256,437,131,131,469,167,40,0,685,266,441,705,239,642,475,568,640,610,299,673,517,318,385,22,202,180,179,359,424,215,90,66,521,653,467,682,453,409,479,88,131,661,35,303,15,262,666,630,712,131,131,618,659,175,218,195,347,193,227,261,150,165,709,546,294,569,710,270,413,376,524,55,242,38,419,529,170,657,3,304,122,379,278,131,651,86,67,576,458,458,131,131,86,86,86,86,86,86,86,118,309,86,86,547,86,86,86,86,667,650,664,131,131,86,86,56,131,131,131,131,131,131,131,131,86,307,86,86,86,664,238,650,86,86,717,86,118,86,86,315,86,59,86,86,574,549,131,131,340,57,436,86,86,86,86,86,86,458,708,499,691,62,86,650,86,86,694,86,86,86,319,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,86,549,694,131,131,131,131,131,131,131,131,131,77,86,86,139,86,502,86,86,86,667,595,131,131,131,86,12,86,13,86,609,131,131,131,131,86,86,86,625,86,669,86,86,182,129,86,5,694,104,86,86,86,86,131,131,86,86,386,171,86,86,86,345,86,324,86,589,86,213,36,131,131,131,131,131,86,86,86,86,104,131,131,131,141,290,80,677,86,86,86,267,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,515,86,86,33,136,669,86,711,515,86,86,550,640,86,104,708,515,86,159,372,717,86,86,444,515,86,86,663,37,86,563,460,86,390,624,702,131,131,131,131,389,59,708,86,86,341,208,708,635,295,69,108,431,508,100,190,131,131,131,131,131,131,131,131,86,86,86,649,516,660,131,131,86,86,86,218,631,708,131,131,131,131,131,131,131,131,131,131,86,86,341,575,238,514,131,131,86,86,86,218,291,708,307,131,86,86,306,367,708,131,131,131,86,378,697,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,615,253,86,86,86,292,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,104,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,69,86,341,553,549,86,307,86,86,645,275,455,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,708,131,131,131,131,131,131,86,86,86,86,86,86,667,460,86,86,86,86,86,86,86,86,86,86,86,86,717,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,104,86,667,459,131,131,131,131,131,131,86,458,225,86,86,86,516,549,11,390,405,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,460,44,218,197,711,515,131,131,131,131,664,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,118,307,104,286,591,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,681,86,86,75,185,314,582,86,358,496,474,86,104,131,86,86,86,86,146,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,171,86,640,131,131,131,131,131,131,131,131,246,503,689,339,674,81,258,415,439,128,562,366,414,246,503,689,583,222,557,316,636,665,186,355,95,670,246,503,689,339,674,557,258,415,439,186,355,95,670,246,503,689,446,644,536,652,331,532,335,440,274,421,297,570,74,425,364,425,606,552,403,509,134,365,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,218,218,218,498,218,218,577,627,551,497,572,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,553,354,236,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,296,455,131,131,456,243,103,86,41,459,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,9,276,158,716,393,564,383,489,401,654,210,654,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,650,86,86,86,86,86,86,717,667,563,563,563,86,549,102,686,133,246,605,86,448,86,86,207,307,131,131,131,641,86,177,611,445,373,194,584,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,307,171,86,86,86,86,86,86,86,717,86,86,86,86,86,460,131,131,650,86,86,86,694,708,86,86,694,86,458,131,131,131,131,131,131,667,694,289,650,667,131,131,86,640,131,131,664,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,460,86,86,86,86,86,86,86,86,86,86,86,86,86,458,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,466,203,149,429,94,432,160,687,539,63,237,283,192,248,348,259,427,526,396,676,254,468,487,212,327,623,49,633,322,493,434,688,357,361,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]),{mapStr:"صلى الله عليه وسلمجل جلالهキロメートルrad∕s2エスクードキログラムキロワットグラムトンクルゼイロサンチームパーセントピアストルファラッドブッシェルヘクタールマンションミリバールレントゲン′′′′1⁄10viii(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)∫∫∫∫(오전)(오후)アパートアルファアンペアイニングエーカーカラットカロリーキュリーギルダークローネサイクルシリングバーレルフィートポイントマイクロミクロンメガトンリットルルーブル株式会社kcalm∕s2c∕kgاكبرمحمدصلعمرسولریال1⁄41⁄23⁄4 ̈́ྲཱྀླཱྀ ̈͂ ̓̀ ̓́ ̓͂ ̔̀ ̔́ ̔͂ ̈̀‵‵‵a/ca/sc/oc/utelfax1⁄71⁄91⁄32⁄31⁄52⁄53⁄54⁄51⁄65⁄61⁄83⁄85⁄87⁄8xii0⁄3∮∮∮(1)(2)(3)(4)(5)(6)(7)(8)(9)(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)::====(ᄀ)(ᄂ)(ᄃ)(ᄅ)(ᄆ)(ᄇ)(ᄉ)(ᄋ)(ᄌ)(ᄎ)(ᄏ)(ᄐ)(ᄑ)(ᄒ)(가)(나)(다)(라)(마)(바)(사)(아)(자)(차)(카)(타)(파)(하)(주)(一)(二)(三)(四)(五)(六)(七)(八)(九)(十)(月)(火)(水)(木)(金)(土)(日)(株)(有)(社)(名)(特)(財)(祝)(労)(代)(呼)(学)(監)(企)(資)(協)(祭)(休)(自)(至)pte10月11月12月ergltdアールインチウォンオンスオームカイリガロンガンマギニーケースコルナコーポセンチダースノットハイツパーツピクルフランペニヒヘルツペンスページベータボルトポンドホールホーンマイルマッハマルクヤードヤールユアンルピー10点11点12点13点14点15点16点17点18点19点20点21点22点23点24点hpabardm2dm3khzmhzghzthzmm2cm2km2mm3cm3km3kpampagpalogmilmolppmv∕ma∕m10日11日12日13日14日15日16日17日18日19日20日21日22日23日24日25日26日27日28日29日30日31日galffifflשּׁשּׂ ٌّ ٍّ َّ ُّ ِّ ّٰـَّـُّـِّتجمتحجتحمتخمتمجتمحتمخجمححميحمىسحجسجحسجىسمحسمجسممصححصممشحمشجيشمخشممضحىضخمطمحطممطميعجمعممعمىغممغميغمىفخمقمحقمملحملحيلحىلججلخملمحمحجمحيمجحمجممخممجخهمجهممنحمنحىنجمنجىنمينمىيممبخيتجيتجىتخيتخىتميتمىجميجحىجمىسخىصحيشحيضحيلجيلمييحييجييميمميقمينحيعميكمينجحمخيلجمكممجحيحجيمجيفميبحيسخينجيصلےقلے𝅘𝅥𝅮𝅘𝅥𝅯𝅘𝅥𝅰𝅘𝅥𝅱𝅘𝅥𝅲𝆹𝅥𝅮𝆺𝅥𝅮𝆹𝅥𝅯𝆺𝅥𝅯〔s〕ppv〔本〕〔三〕〔二〕〔安〕〔点〕〔打〕〔盗〕〔勝〕〔敗〕 ̄ ́ ̧ssi̇ijl·ʼndžljnjdz ̆ ̇ ̊ ̨ ̃ ̋ ιեւاٴوٴۇٴيٴक़ख़ग़ज़ड़ढ़फ़य़ড়ঢ়য়ਲ਼ਸ਼ਖ਼ਗ਼ਜ਼ਫ਼ଡ଼ଢ଼ําໍາຫນຫມགྷཌྷདྷབྷཛྷཀྵཱཱིུྲྀླྀྒྷྜྷྡྷྦྷྫྷྐྵaʾἀιἁιἂιἃιἄιἅιἆιἇιἠιἡιἢιἣιἤιἥιἦιἧιὠιὡιὢιὣιὤιὥιὦιὧιὰιαιάιᾶι ͂ὴιηιήιῆιὼιωιώιῶι ̳!! ̅???!!?rs°c°fnosmtmivix⫝̸ ゙ ゚よりコト333435참고주의363738394042444546474849503月4月5月6月7月8月9月hgevギガデシドルナノピコビルペソホンリラレムdaauovpciu平成昭和大正明治naμakakbmbgbpfnfμfμgmgμlmldlklfmnmμmpsnsμsmsnvμvkvpwnwμwmwkwkωmωbqcccddbgyhainkkktlnlxphprsrsvwbstմնմեմիվնմխיִײַשׁשׂאַאָאּבּגּדּהּוּזּטּיּךּכּלּמּנּסּףּפּצּקּרּתּוֹבֿכֿפֿאלئائەئوئۇئۆئۈئېئىئجئحئمئيبجبمبىبيتىتيثجثمثىثيخحضجضمطحظمغجفجفحفىفيقحقىقيكاكجكحكخكلكىكينخنىنيهجهىهييىذٰرٰىٰئرئزئنبزبنترتزتنثرثزثنمانرنزننيريزئخئهبهتهصخنههٰثهسهشهطىطيعىعيغىغيسىسيشىشيصىصيضىضيشخشرسرصرضراً ًـًـّ ْـْلآلألإ𝅗𝅥0,1,2,3,4,5,6,7,8,9,wzhvsdwcmcmddjほかココàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįĵķĺļľłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷÿźżɓƃƅɔƈɖɗƌǝəɛƒɠɣɩɨƙɯɲɵơƣƥʀƨʃƭʈưʊʋƴƶʒƹƽǎǐǒǔǖǘǚǜǟǡǣǥǧǩǫǭǯǵƕƿǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟƞȣȥȧȩȫȭȯȱȳⱥȼƚⱦɂƀʉʌɇɉɋɍɏɦɹɻʁʕͱͳʹͷ;ϳέίόύβγδεζθκλνξοπρστυφχψϊϋϗϙϛϝϟϡϣϥϧϩϫϭϯϸϻͻͼͽѐёђѓєѕіїјљњћќѝўџабвгдежзийклмнопрстуфхцчшщъыьэюяѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯաբգդզէըթժլծկհձղճյշոչպջռստրցփքօֆ་ⴧⴭნᏰᏱᏲᏳᏴᏵꙋɐɑᴂɜᴖᴗᴝᴥɒɕɟɡɥɪᵻʝɭᶅʟɱɰɳɴɸʂƫᴜʐʑḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿἐἑἒἓἔἕἰἱἲἳἴἵἶἷὀὁὂὃὄὅὑὓὕὗᾰᾱὲΐῐῑὶΰῠῡὺῥ`ὸ‐+−∑〈〉ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞⱡɫᵽɽⱨⱪⱬⱳⱶȿɀⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳬⳮⳳⵡ母龟丨丶丿乙亅亠人儿入冂冖冫几凵刀力勹匕匚匸卜卩厂厶又口囗士夂夊夕女子宀寸小尢尸屮山巛工己巾干幺广廴廾弋弓彐彡彳心戈戶手支攴文斗斤方无曰欠止歹殳毋比毛氏气爪父爻爿片牙牛犬玄玉瓜瓦甘生用田疋疒癶白皮皿目矛矢石示禸禾穴立竹米糸缶网羊羽老而耒耳聿肉臣臼舌舛舟艮色艸虍虫血行衣襾見角言谷豆豕豸貝赤走足身車辛辰辵邑酉釆里長門阜隶隹雨靑非面革韋韭音頁風飛食首香馬骨高髟鬥鬯鬲鬼魚鳥鹵鹿麥麻黃黍黑黹黽鼎鼓鼠鼻齊齒龍龜龠.〒卄卅ᄁᆪᆬᆭᄄᆰᆱᆲᆳᆴᆵᄚᄈᄡᄊ짜ᅢᅣᅤᅥᅦᅧᅨᅩᅪᅫᅬᅭᅮᅯᅰᅱᅲᅳᅴᅵᄔᄕᇇᇈᇌᇎᇓᇗᇙᄜᇝᇟᄝᄞᄠᄢᄣᄧᄩᄫᄬᄭᄮᄯᄲᄶᅀᅇᅌᇱᇲᅗᅘᅙᆄᆅᆈᆑᆒᆔᆞᆡ上中下甲丙丁天地問幼箏우秘男適優印注項写左右医宗夜テヌモヨヰヱヲꙁꙃꙅꙇꙉꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝺꝼᵹꝿꞁꞃꞅꞇꞌꞑꞓꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩɬʞʇꭓꞵꞷꬷꭒᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩᎪᎫᎬᎭᎮᎯᎰᎱᎲᎳᎴᎵᎶᎷᎸᎹᎺᎻᎼᎽᎾᎿᏀᏁᏂᏃᏄᏅᏆᏇᏈᏉᏊᏋᏌᏍᏎᏏᏐᏑᏒᏓᏔᏕᏖᏗᏘᏙᏚᏛᏜᏝᏞᏟᏠᏡᏢᏣᏤᏥᏦᏧᏨᏩᏪᏫᏬᏭᏮᏯ豈更賈滑串句契喇奈懶癩羅蘿螺裸邏樂洛烙珞落酪駱亂卵欄爛蘭鸞嵐濫藍襤拉臘蠟廊朗浪狼郎來冷勞擄櫓爐盧蘆虜路露魯鷺碌祿綠菉錄論壟弄籠聾牢磊賂雷壘屢樓淚漏累縷陋勒肋凜凌稜綾菱陵讀拏諾丹寧怒率異北磻便復不泌數索參塞省葉說殺沈拾若掠略亮兩凉梁糧良諒量勵呂廬旅濾礪閭驪麗黎曆歷轢年憐戀撚漣煉璉秊練聯輦蓮連鍊列劣咽烈裂廉念捻殮簾獵令囹嶺怜玲瑩羚聆鈴零靈領例禮醴隸惡了僚寮尿料燎療蓼遼暈阮劉杻柳流溜琉留硫紐類戮陸倫崙淪輪律慄栗隆利吏履易李梨泥理痢罹裏裡離匿溺吝燐璘藺隣鱗麟林淋臨笠粒狀炙識什茶刺切度拓糖宅洞暴輻降廓兀嗀塚晴凞猪益礼神祥福靖精蘒諸逸都飯飼館鶴郞隷侮僧免勉勤卑喝嘆器塀墨層悔慨憎懲敏既暑梅海渚漢煮爫琢碑祉祈祐祖禍禎穀突節縉繁署者臭艹著褐視謁謹賓贈辶難響頻恵𤋮舘並况全侀充冀勇勺啕喙嗢墳奄奔婢嬨廒廙彩徭惘慎愈慠戴揄搜摒敖望杖滛滋瀞瞧爵犯瑱甆画瘝瘟盛直睊着磌窱类絛缾荒華蝹襁覆調請諭變輸遲醙鉶陼韛頋鬒𢡊𢡄𣏕㮝䀘䀹𥉉𥳐𧻓齃龎עםٱٻپڀٺٿٹڤڦڄڃچڇڍڌڎڈژڑکگڳڱںڻۀہھۓڭۋۅۉ、〖〗—–_{}【】《》「」『』[]#&*-<>\\$%@ءؤة\"'^|~⦅⦆・ゥャ¢£¬¦¥₩│←↑→↓■○𐐨𐐩𐐪𐐫𐐬𐐭𐐮𐐯𐐰𐐱𐐲𐐳𐐴𐐵𐐶𐐷𐐸𐐹𐐺𐐻𐐼𐐽𐐾𐐿𐑀𐑁𐑂𐑃𐑄𐑅𐑆𐑇𐑈𐑉𐑊𐑋𐑌𐑍𐑎𐑏𐓘𐓙𐓚𐓛𐓜𐓝𐓞𐓟𐓠𐓡𐓢𐓣𐓤𐓥𐓦𐓧𐓨𐓩𐓪𐓫𐓬𐓭𐓮𐓯𐓰𐓱𐓲𐓳𐓴𐓵𐓶𐓷𐓸𐓹𐓺𐓻𐳀𐳁𐳂𐳃𐳄𐳅𐳆𐳇𐳈𐳉𐳊𐳋𐳌𐳍𐳎𐳏𐳐𐳑𐳒𐳓𐳔𐳕𐳖𐳗𐳘𐳙𐳚𐳛𐳜𐳝𐳞𐳟𐳠𐳡𐳢𐳣𐳤𐳥𐳦𐳧𐳨𐳩𐳪𐳫𐳬𐳭𐳮𐳯𐳰𐳱𐳲𑣀𑣁𑣂𑣃𑣄𑣅𑣆𑣇𑣈𑣉𑣊𑣋𑣌𑣍𑣎𑣏𑣐𑣑𑣒𑣓𑣔𑣕𑣖𑣗𑣘𑣙𑣚𑣛𑣜𑣝𑣞𑣟ıȷ∇∂𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃ٮڡٯ字双多解交映無前後再新初終販声吹演投捕遊指禁空合満申割営配得可丽丸乁𠄢你侻倂偺備像㒞𠘺兔兤具𠔜㒹內𠕋冗冤仌冬𩇟刃㓟刻剆剷㔕包匆卉博即卽卿𠨬灰及叟𠭣叫叱吆咞吸呈周咢哶唐啓啣善喫喳嗂圖圗噑噴壮城埴堍型堲報墬𡓤売壷夆夢奢𡚨𡛪姬娛娧姘婦㛮嬈嬾𡧈寃寘寳𡬘寿将㞁屠峀岍𡷤嵃𡷦嵮嵫嵼巡巢㠯巽帨帽幩㡢𢆃㡼庰庳庶𪎒𢌱舁弢㣇𣊸𦇚形彫㣣徚忍志忹悁㤺㤜𢛔惇慈慌慺憲憤憯懞戛扝抱拔捐𢬌挽拼捨掃揤𢯱搢揅掩㨮摩摾撝摷㩬敬𣀊旣書晉㬙㬈㫤冒冕最暜肭䏙朡杞杓𣏃㭉柺枅桒𣑭梎栟椔楂榣槪檨𣚣櫛㰘次𣢧歔㱎歲殟殻𣪍𡴋𣫺汎𣲼沿泍汧洖派浩浸涅𣴞洴港湮㴳滇𣻑淹潮𣽞𣾎濆瀹瀛㶖灊災灷炭𠔥煅𤉣熜爨牐𤘈犀犕𤜵𤠔獺王㺬玥㺸瑇瑜璅瓊㼛甤𤰶甾𤲒𢆟瘐𤾡𤾸𥁄㿼䀈𥃳𥃲𥄙𥄳眞真瞋䁆䂖𥐝硎䃣𥘦𥚚𥛅秫䄯穊穏𥥼𥪧䈂𥮫篆築䈧𥲀糒䊠糨糣紀𥾆絣䌁緇縂繅䌴𦈨𦉇䍙𦋙罺𦌾羕翺𦓚𦔣聠𦖨聰𣍟䏕育脃䐋脾媵𦞧𦞵𣎓𣎜舄辞䑫芑芋芝劳花芳芽苦𦬼茝荣莭茣莽菧荓菊菌菜𦰶𦵫𦳕䔫蓱蓳蔖𧏊蕤𦼬䕝䕡𦾱𧃒䕫虐虧虩蚩蚈蜎蛢蜨蝫螆蟡蠁䗹衠𧙧裗裞䘵裺㒻𧢮𧥦䚾䛇誠𧲨貫賁贛起𧼯𠠄跋趼跰𠣞軔𨗒𨗭邔郱鄑𨜮鄛鈸鋗鋘鉼鏹鐕𨯺開䦕閷𨵷䧦雃嶲霣𩅅𩈚䩮䩶韠𩐊䪲𩒖頩𩖶飢䬳餩馧駂駾䯎𩬰鱀鳽䳎䳭鵧𪃎䳸𪄅𪈎𪊑䵖黾鼅鼏鼖𪘀",mapChar:function(r){return r>=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}};var e,t}.apply(t,[]))||(e.exports=n)},94489:(e,t,r)=>{"use strict";var n=r(28847)(r(93106));function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function p(e){throw new RangeError(f[e])}function y(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]);var i=function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(l,".")).split("."),t).join(".");return n+i}function m(e){for(var t=[],r=0,n=e.length;r=55296&&i<=56319&&r>1,e+=d(e/t);e>455;n+=s)e=d(e/35);return d(n+36*e/(e+38))},v=function(e){var t,r=[],n=e.length,i=0,o=128,u=72,c=e.lastIndexOf("-");c<0&&(c=0);for(var l=0;l=128&&p("not-basic"),r.push(e.charCodeAt(l));for(var f=c>0?c+1:0;f=n&&p("invalid-input");var g=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:s;(g>=s||g>d((a-i)/y))&&p("overflow"),i+=g*y;var v=m<=u?1:m>=u+26?26:m-u;if(gd(a/w)&&p("overflow"),y*=w}var A=r.length+1;u=b(i-h,A,0==h),d(i/A)>a-o&&p("overflow"),o+=d(i/A),i%=A,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},w=function(e){var t,r=[],n=(e=m(e)).length,o=128,u=0,c=72,l=i(e);try{for(l.s();!(t=l.n()).done;){var f=t.value;f<128&&r.push(h(f))}}catch(e){l.e(e)}finally{l.f()}var y=r.length,v=y;for(y&&r.push("-");v=o&&Ed((a-u)/S)&&p("overflow"),u+=(A-o)*S,o=A;var x,_=i(e);try{for(_.s();!(x=_.n()).done;){var P=x.value;if(Pa&&p("overflow"),P==o){for(var T=u,I=s;;I+=s){var O=I<=c?1:I>=c+26?26:I-c;if(T{"use strict";var n,i;r(28847)(r(3355)),n=[r(94489),r(32996)],void 0===(i=function(e,t){return function(e,t){function r(r,n,i){for(var o=[],a=e.ucs2.decode(r),s=0;s>23,d=l>>21&3,h=l>>5&65535,p=31&l,y=t.mapStr.substr(h,p);if(0===d||n&&1&f)throw new Error("Illegal char "+c);1===d?o.push(y):2===d?o.push(i?y:c):3===d&&o.push(c)}return o.join("").normalize("NFC")}function n(t,n,o){void 0===o&&(o=!1);var a=r(t,o,n).split(".");return(a=a.map((function(t){return t.startsWith("xn--")?i(t=e.decode(t.substring(4)),o,!1):i(t,o,n),t}))).join(".")}function i(e,n,i){if("-"===e[2]&&"-"===e[3])throw new Error("Failed to validate "+e);if(e.startsWith("-")||e.endsWith("-"))throw new Error("Failed to validate "+e);if(e.includes("."))throw new Error("Failed to validate "+e);if(r(e,n,i)!==e)throw new Error("Failed to validate "+e);var o=e.codePointAt(0);if(t.mapChar(o)&2<<23)throw new Error("Label contains illegal character: "+o)}return{toUnicode:function(e,t){return void 0===t&&(t={}),n(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)},toAscii:function(t,r){void 0===r&&(r={});var i,o=!("transitional"in r)||r.transitional,a="useStd3ASCII"in r&&r.useStd3ASCII,s="verifyDnsLength"in r&&r.verifyDnsLength,u=n(t,o,a).split(".").map(e.toASCII),c=u.join(".");if(s){if(c.length<1||c.length>253)throw new Error("DNS name has wrong length: "+c);for(i=0;i63)throw new Error("DNS label has wrong length: "+l)}}return c}}}(e,t)}.apply(t,n))||(e.exports=i)},83226:(e,t)=>{"use strict";t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,l=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*y}},41736:e=>{"use strict";"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},69446:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(11191)(),o=r(80593)("Object.prototype.toString"),a=function(e){return!(i&&e&&"object"===(0,n.default)(e)&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},s=function(e){return!!a(e)||null!==e&&"object"===(0,n.default)(e)&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},u=function(){return a(arguments)}();a.isLegacyArguments=s,e.exports=u?a:s},41493:(e,t,r)=>{"use strict";var n,i,o=r(28847)(r(3355)),a=Function.prototype.toString,s="object"===("undefined"==typeof Reflect?"undefined":(0,o.default)(Reflect))&&null!==Reflect&&Reflect.apply;if("function"==typeof s&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw i}}),i={},s((function(){throw 42}),null,n)}catch(e){e!==i&&(s=null)}else s=null;var u=/^\s*class\b/,c=function(e){try{var t=a.call(e);return u.test(t)}catch(e){return!1}},l=function(e){try{return!c(e)&&(a.call(e),!0)}catch(e){return!1}},f=Object.prototype.toString,d="function"==typeof Symbol&&!!Symbol.toStringTag,h=!(0 in[,]),p=function(){return!1};if("object"===("undefined"==typeof document?"undefined":(0,o.default)(document))){var y=document.all;f.call(y)===f.call(document.all)&&(p=function(e){if((h||!e)&&(void 0===e||"object"===(0,o.default)(e)))try{var t=f.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=s?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!==(0,o.default)(e))return!1;try{s(e,null,n)}catch(e){if(e!==i)return!1}return!c(e)&&l(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!==(0,o.default)(e))return!1;if(d)return l(e);if(c(e))return!1;var t=f.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&l(e)}},27277:e=>{"use strict";e.exports=function(e){if(!e)return!1;var r=t.call(e);return"[object Function]"===r||"function"==typeof e&&"[object RegExp]"!==r||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},14477:(e,t,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(11191)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},8619:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+(0,n.default)(e)+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},28915:(e,t,r)=>{"use strict";var n=r(72337);e.exports=function(e){return!!n(e)}},39484:e=>{"use strict";var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},24858:(e,t,r)=>{"use strict";e=r.nmd(e);var n=r(19142),i=r(28847)(r(3355));!function(){var t="object"===("undefined"==typeof window?"undefined":(0,i.default)(window))?window:{};!t.JS_SHA3_NO_NODE_JS&&"object"===(void 0===n?"undefined":(0,i.default)(n))&&n.versions&&n.versions.node&&(t=r.g);for(var o=!t.JS_SHA3_NO_COMMON_JS&&"object"===(0,i.default)(e)&&e.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],u=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],c=[224,256,384,512],l=["hex","buffer","arrayBuffer","array"],f=function(e,t,r){return function(n){return new k(e,t,e).update(n)[r]()}},d=function(e,t,r){return function(n,i){return new k(e,t,i).update(n)[r]()}},h=function(e,t){var r=f(e,t,"hex");r.create=function(){return new k(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}k.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,o=this.blocks,a=this.byteCount,u=this.blockCount,c=0,l=this.s;c>2]|=e[c]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(o[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=a){for(this.start=r-a,this.block=o[u],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(E(r),o=0)}return i&&(e=r[o],i>0&&(u+=a[e>>4&15]+a[15&e]),i>1&&(u+=a[e>>12&15]+a[e>>8&15]),i>2&&(u+=a[e>>20&15]+a[e>>16&15])),u},k.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&E(n)}return o&&(e=s<<2,t=n[a],o>0&&(u[e]=255&t),o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u};var E=function(e){var t,r,n,i,o,a,s,c,l,f,d,h,p,y,m,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|l>>>31),r=o^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(f<<1|d>>>31),r=s^(d<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(h<<1|p>>>31),r=l^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,y=e[0],m=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=y^~g&v,e[1]=m^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&y,e[7]=k^~S&m,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~y&g,e[9]=S^~m&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=u[n],e[1]^=u[n+1]};if(o)e.exports=y;else for(g=0;g{"use strict";e.exports=r(22109)(r(80801))},22109:(e,t,r)=>{"use strict";var n=r(46543),i=r(40274);e.exports=function(e){var t=n(e),r=i(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+e)}}}},46543:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(69721)),a=i(r(58985)),s=i(r(15163)),u=i(r(34650)),c=i(r(21949)),l=r(86505).Transform;e.exports=function(e){return function(t){(0,s.default)(f,t);var r,i,l=(r=f,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,c.default)(r);if(i){var n=(0,c.default)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,u.default)(this,e)});function f(t,r,n,i,a){var s;return(0,o.default)(this,f),(s=l.call(this,a))._rate=t,s._capacity=r,s._delimitedSuffix=n,s._hashBitLength=i,s._options=a,s._state=new e,s._state.initialize(t,r),s._finalized=!1,s}return(0,a.default)(f,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)}},{key:"_flush",value:function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}},{key:"update",value:function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}},{key:"digest",value:function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new f(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),f}(l)}},40274:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(69721)),a=i(r(58985)),s=i(r(15163)),u=i(r(34650)),c=i(r(21949)),l=r(86505).Transform;e.exports=function(e){return function(t){(0,s.default)(f,t);var r,i,l=(r=f,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,c.default)(r);if(i){var n=(0,c.default)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,u.default)(this,e)});function f(t,r,n,i){var a;return(0,o.default)(this,f),(a=l.call(this,i))._rate=t,a._capacity=r,a._delimitedSuffix=n,a._options=i,a._state=new e,a._state.initialize(t,r),a._finalized=!1,a}return(0,a.default)(f,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)}},{key:"_flush",value:function(){}},{key:"_read",value:function(e){this.push(this.squeeze(e))}},{key:"update",value:function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}},{key:"squeeze",value:function(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new f(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),f}(l)}},25612:(e,t)=>{"use strict";var r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(var t=0;t<24;++t){var n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],f=e[8]^e[18]^e[28]^e[38]^e[48],d=e[9]^e[19]^e[29]^e[39]^e[49],h=f^(o<<1|a>>>31),p=d^(a<<1|o>>>31),y=e[0]^h,m=e[1]^p,g=e[10]^h,b=e[11]^p,v=e[20]^h,w=e[21]^p,A=e[30]^h,k=e[31]^p,E=e[40]^h,S=e[41]^p;h=n^(s<<1|u>>>31),p=i^(u<<1|s>>>31);var x=e[2]^h,_=e[3]^p,P=e[12]^h,T=e[13]^p,I=e[22]^h,O=e[23]^p,B=e[32]^h,C=e[33]^p,N=e[42]^h,R=e[43]^p;h=o^(c<<1|l>>>31),p=a^(l<<1|c>>>31);var M=e[4]^h,U=e[5]^p,L=e[14]^h,j=e[15]^p,F=e[24]^h,D=e[25]^p,H=e[34]^h,z=e[35]^p,q=e[44]^h,G=e[45]^p;h=s^(f<<1|d>>>31),p=u^(d<<1|f>>>31);var K=e[6]^h,V=e[7]^p,J=e[16]^h,W=e[17]^p,Q=e[26]^h,Z=e[27]^p,Y=e[36]^h,X=e[37]^p,$=e[46]^h,ee=e[47]^p;h=c^(n<<1|i>>>31),p=l^(i<<1|n>>>31);var te=e[8]^h,re=e[9]^p,ne=e[18]^h,ie=e[19]^p,oe=e[28]^h,ae=e[29]^p,se=e[38]^h,ue=e[39]^p,ce=e[48]^h,le=e[49]^p,fe=y,de=m,he=b<<4|g>>>28,pe=g<<4|b>>>28,ye=v<<3|w>>>29,me=w<<3|v>>>29,ge=k<<9|A>>>23,be=A<<9|k>>>23,ve=E<<18|S>>>14,we=S<<18|E>>>14,Ae=x<<1|_>>>31,ke=_<<1|x>>>31,Ee=T<<12|P>>>20,Se=P<<12|T>>>20,xe=I<<10|O>>>22,_e=O<<10|I>>>22,Pe=C<<13|B>>>19,Te=B<<13|C>>>19,Ie=N<<2|R>>>30,Oe=R<<2|N>>>30,Be=U<<30|M>>>2,Ce=M<<30|U>>>2,Ne=L<<6|j>>>26,Re=j<<6|L>>>26,Me=D<<11|F>>>21,Ue=F<<11|D>>>21,Le=H<<15|z>>>17,je=z<<15|H>>>17,Fe=G<<29|q>>>3,De=q<<29|G>>>3,He=K<<28|V>>>4,ze=V<<28|K>>>4,qe=W<<23|J>>>9,Ge=J<<23|W>>>9,Ke=Q<<25|Z>>>7,Ve=Z<<25|Q>>>7,Je=Y<<21|X>>>11,We=X<<21|Y>>>11,Qe=ee<<24|$>>>8,Ze=$<<24|ee>>>8,Ye=te<<27|re>>>5,Xe=re<<27|te>>>5,$e=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|ue>>>24,it=ue<<8|se>>>24,ot=ce<<14|le>>>18,at=le<<14|ce>>>18;e[0]=fe^~Ee&Me,e[1]=de^~Se&Ue,e[10]=He^~$e&ye,e[11]=ze^~et&me,e[20]=Ae^~Ne&Ke,e[21]=ke^~Re&Ve,e[30]=Ye^~he&xe,e[31]=Xe^~pe&_e,e[40]=Be^~qe&tt,e[41]=Ce^~Ge&rt,e[2]=Ee^~Me&Je,e[3]=Se^~Ue&We,e[12]=$e^~ye&Pe,e[13]=et^~me&Te,e[22]=Ne^~Ke&nt,e[23]=Re^~Ve&it,e[32]=he^~xe&Le,e[33]=pe^~_e&je,e[42]=qe^~tt&ge,e[43]=Ge^~rt&be,e[4]=Me^~Je&ot,e[5]=Ue^~We&at,e[14]=ye^~Pe&Fe,e[15]=me^~Te&De,e[24]=Ke^~nt&ve,e[25]=Ve^~it&we,e[34]=xe^~Le&Qe,e[35]=_e^~je&Ze,e[44]=tt^~ge&Ie,e[45]=rt^~be&Oe,e[6]=Je^~ot&fe,e[7]=We^~at&de,e[16]=Pe^~Fe&He,e[17]=Te^~De&ze,e[26]=nt^~ve&Ae,e[27]=it^~we&ke,e[36]=Le^~Qe&Ye,e[37]=je^~Ze&Xe,e[46]=ge^~Ie&Be,e[47]=be^~Oe&Ce,e[8]=ot^~fe&Ee,e[9]=at^~de&Se,e[18]=Fe^~He&$e,e[19]=De^~ze&et,e[28]=ve^~Ae&Ne,e[29]=we^~ke&Re,e[38]=Qe^~Ye&he,e[39]=Ze^~Xe&pe,e[48]=Ie^~Be&qe,e[49]=Oe^~Ce&Ge,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},80801:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(25612);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return t},o.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=o},50807:(e,t,r)=>{"use strict";var n=r(41736),i=r(22353),o=r(48850).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<>>32-t}function c(e,t,r,n,i,o,a){return u(e+(t&r|~t&n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return u(e+(t&n|r&~n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return u(e+(t^r^n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return u(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=l(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=l(o,r,n,i,e[6],3225465664,9),i=l(i,o,r,n,e[11],643717713,14),n=l(n,i,o,r,e[0],3921069994,20),r=l(r,n,i,o,e[5],3593408605,5),o=l(o,r,n,i,e[10],38016083,9),i=l(i,o,r,n,e[15],3634488961,14),n=l(n,i,o,r,e[4],3889429448,20),r=l(r,n,i,o,e[9],568446438,5),o=l(o,r,n,i,e[14],3275163606,9),i=l(i,o,r,n,e[3],4107603335,14),n=l(n,i,o,r,e[8],1163531501,20),r=l(r,n,i,o,e[13],2850285829,5),o=l(o,r,n,i,e[2],4243563512,9),i=l(i,o,r,n,e[7],1735328473,14),r=f(r,n=l(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=d(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,r,n,i,e[7],1126891415,10),i=d(i,o,r,n,e[14],2878612391,15),n=d(n,i,o,r,e[5],4237533241,21),r=d(r,n,i,o,e[12],1700485571,6),o=d(o,r,n,i,e[3],2399980690,10),i=d(i,o,r,n,e[10],4293915773,15),n=d(n,i,o,r,e[1],2240044497,21),r=d(r,n,i,o,e[8],1873313359,6),o=d(o,r,n,i,e[15],4264355552,10),i=d(i,o,r,n,e[6],2734768916,15),n=d(n,i,o,r,e[13],1309151649,21),r=d(r,n,i,o,e[4],4149444226,6),o=d(o,r,n,i,e[11],3174756917,10),i=d(i,o,r,n,e[2],718787259,15),n=d(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},37441:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(19142),o=r(28847),a=o(r(82247)),s=o(r(3355)),u=o(r(94571)),c=o(r(90775)),l=o(r(58985)),f=o(r(69721)),d=o(r(15163)),h=o(r(34650)),p=o(r(21949)),y=o(r(22940));function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t{"use strict";var n=r(31734),i=r(82202);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),l=s.toRed(o);t>0;t--){var f=this._randrange(new n(2),s);r&&r(f);var d=f.toRed(o).redPow(c);if(0!==d.cmp(a)&&0!==d.cmp(l)){for(var h=1;h0;t--){var l=this._randrange(new n(2),a),f=e.gcd(l);if(0!==f.cmpn(1))return f;var d=l.toRed(i).redPow(u);if(0!==d.cmp(o)&&0!==d.cmp(c)){for(var h=1;h{"use strict";function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},96580:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},36565:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.code=r,this.alphabet=o,n&&o&&(this.engine=n(o))}return(0,o.default)(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}();e.exports=a},52642:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base16 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"hex")}}}},96494:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(r){var n,i=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(r,e)}}}},76627:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?i.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var o=n.indexOf("=");return o>0&&!t&&(n=n.substring(0,o)),n},decode:function(t){var r,o=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"base64")}}}},7905:(e,t,r)=>{"use strict";var n=r(36565),i=r(27548),o=r(52642),a=r(96494),s=r(76627),u=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],c=u.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),l=u.reduce((function(e,t){return e[t[1]]=c[t[0]],e}),{});e.exports={names:c,codes:l}},6086:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(7905);(t=e.exports=a).encode=function(e,t){var r=s(e);return a(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=s(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return s(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));var o=new Error("Unsupported encoding");function a(e,t){if(!t)throw new Error("requires an encoded buffer");var r=s(e),i=n.from(r.code);return function(e,t){s(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function s(e){var t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw o;t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}},54093:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(24070),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(29033).Buffer,i=r(26657),o=r(7054),a=r(86002),s=r(55576);(t=e.exports).addPrefix=function(e,t){var r;if(n.isBuffer(e))r=s.varintBufferEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");r=a[e]}return n.concat([r,t])},t.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},t.getCodec=function(e){var t=i.decode(e),r=o.get(t);if(void 0===r)throw new Error("Code ".concat(t," not found"));return r},t.getName=function(e){return o.get(e)},t.getNumber=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return s.varintBufferDecode(t)[0]},t.getCode=function(e){return i.decode(e)},t.getCodeVarint=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=function(e){return i.encode(e)};var u=r(54093);Object.assign(t,u),t.print=r(11032)},7054:(e,t,r)=>{"use strict";var n=r(24070),i=new Map;for(var o in n){var a=n[o];i.set(a,o)}e.exports=Object.freeze(i)},11032:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(24070),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(29033).Buffer,i=r(26657);function o(e){return parseInt(e.toString("hex"),16)}function a(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),n.from(t,"hex")}e.exports={numberToBuffer:a,bufferToNumber:o,varintBufferEncode:function(e){return n.from(i.encode(o(e)))},varintBufferDecode:function(e){return a(i.decode(e))},varintEncode:function(e){return n.from(i.encode(e))}}},86002:(e,t,r)=>{"use strict";var n=r(24070),i=r(55576).varintEncode,o={};for(var a in n){var s=n[a];o[a]=i(s)}e.exports=Object.freeze(o)},71786:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.code=r,this.alphabet=o,n&&o&&(this.engine=n(o))}return(0,o.default)(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}();e.exports=a},37739:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base16 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"hex")}}}},70976:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(r){var n,i=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(r,e)}}}},88504:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?i.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var o=n.indexOf("=");return o>0&&!t&&(n=n.substring(0,o)),n},decode:function(t){var r,o=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"base64")}}}},12263:(e,t,r)=>{"use strict";var n=r(71786),i=r(27548),o=r(37739),a=r(70976),s=r(88504),u=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],c=u.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),l=u.reduce((function(e,t){return e[t[1]]=c[t[0]],e}),{});e.exports={names:c,codes:l}},2592:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(12263);function o(e,t){if(!t)throw new Error("requires an encoded buffer");var r=a(e),i=n.from(r.code);return function(e,t){a(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function a(e){var t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw new Error("Unsupported encoding");t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}(t=e.exports=o).encode=function(e,t){var r=a(e);return o(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=a(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return a(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes))},81269:(e,t)=>{"use strict";t.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),t.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),t.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},77748:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(2592),o=r(26657),a=r(81269);function s(e){t.decode(e)}t.names=a.names,t.codes=a.codes,t.defaultLengths=a.defaultLengths,t.toHexString=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},t.fromHexString=function(e){return n.from(e,"hex")},t.toB58String=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return i.encode("base58btc",e).toString().slice(1)},t.fromB58String=function(e){var t=e;return n.isBuffer(e)&&(t=e.toString()),i.decode("z"+t)},t.decode=function(e){if(!n.isBuffer(e))throw new Error("multihash must be a Buffer");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");var r=o.decode(e);if(!t.isValidCode(r))throw new Error("multihash unknown function code: 0x".concat(r.toString(16)));e=e.slice(o.decode.bytes);var i=o.decode(e);if(i<0)throw new Error("multihash invalid length: ".concat(i));if((e=e.slice(o.decode.bytes)).length!==i)throw new Error("multihash length inconsistent: 0x".concat(e.toString("hex")));return{code:r,name:a.codes[r],length:i,digest:e}},t.encode=function(e,r,i){if(!e||void 0===r)throw new Error("multihash encode requires at least two args: digest, code");var a=t.coerceCode(r);if(!n.isBuffer(e))throw new Error("digest should be a Buffer");if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.");return n.concat([n.from(o.encode(a)),n.from(o.encode(i)),e])},t.coerceCode=function(e){var r=e;if("string"==typeof e){if(void 0===a.names[e])throw new Error("Unrecognized hash function named: ".concat(e));r=a.names[e]}if("number"!=typeof r)throw new Error("Hash function code should be a number. Got: ".concat(r));if(void 0===a.codes[r]&&!t.isAppCode(r))throw new Error("Unrecognized function code: ".concat(r));return r},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!a.codes[e]},t.validate=s,t.prefix=function(e){return s(e),e.slice(0,2)}},77277:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(36931);e.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new i(1),r=String(e).toLowerCase().trim(),a="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),s=o(r);if("-"===s.substr(0,1)&&(s=o(s.slice(1)),t=new i(-1,10)),!(s=""===s?"0":s).match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||!0===a&&s.match(/^[0-9A-Fa-f]+$/))return new i(s,16).mul(t);if((s.match(/^-?[0-9]+$/)||""===s)&&!1===a)return new i(s,10).mul(t)}else if("object"===(0,n.default)(e)&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new i(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},33103:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u{"use strict";var n,i,o;e=r.nmd(e);var a,s=r(28847)(r(3355));"undefined"!=typeof self&&self,a=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}([function(e,t,r){r.d(t,"j",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"h",(function(){return s})),r.d(t,"b",(function(){return u})),r.d(t,"k",(function(){return c})),r.d(t,"e",(function(){return l})),r.d(t,"g",(function(){return f})),r.d(t,"i",(function(){return d})),r.d(t,"a",(function(){return h})),r.d(t,"f",(function(){return p}));var n=r(1),i=c((function(e,t){var r=t.length;return c((function(n){for(var i=0;i0&&(i=r),r=e[c++]);)switch(z++,"\n"===r?(G++,q=0):q++,L){case h:if("{"===r)L=y;else if("["===r)L=g;else if(!V(r))return K("Non-whitespace before {[.");continue;case w:case y:if(V(r))continue;if(L===w)j.push(A);else{if("}"===r){s({}),u(),L=j.pop()||p;continue}j.push(m)}if('"'!==r)return K('Malformed object key should start with " ');L=v;continue;case A:case m:if(V(r))continue;if(":"===r)L===m?(j.push(m),void 0!==o&&(s({}),a(o),o=void 0),H++):void 0!==o&&(a(o),o=void 0),L=p;else if("}"===r)void 0!==o&&(s(o),u(),o=void 0),u(),H--,L=j.pop()||p;else{if(","!==r)return K("Bad object");L===m&&j.push(m),void 0!==o&&(s(o),u(),o=void 0),L=w}continue;case g:case p:if(V(r))continue;if(L===g){if(s([]),H++,L=p,"]"===r){u(),H--,L=j.pop()||p;continue}j.push(b)}if('"'===r)L=v;else if("{"===r)L=y;else if("["===r)L=g;else if("t"===r)L=k;else if("f"===r)L=x;else if("n"===r)L=I;else if("-"===r)R+=r;else if("0"===r)R+=r,L=20;else{if(-1==="123456789".indexOf(r))return K("Bad value");R+=r,L=20}continue;case b:if(","===r)j.push(b),void 0!==o&&(s(o),u(),o=void 0),L=p;else{if("]"!==r){if(V(r))continue;return K("Bad array")}void 0!==o&&(s(o),u(),o=void 0),u(),H--,L=j.pop()||p}continue;case v:void 0===o&&(o="");var d=c-1;e:for(;;){for(;D>0;)if(F+=r,r=e.charAt(c++),4===D?(o+=String.fromCharCode(parseInt(F,16)),D=0,d=c-1):D++,!r)break e;if('"'===r&&!M){L=j.pop()||p,o+=e.substring(d,c-1);break}if(!("\\"!==r||M||(M=!0,o+=e.substring(d,c-1),r=e.charAt(c++))))break;if(M){if(M=!1,"n"===r?o+="\n":"r"===r?o+="\r":"t"===r?o+="\t":"f"===r?o+="\f":"b"===r?o+="\b":"u"===r?(D=1,F=""):o+=r,r=e.charAt(c++),d=c-1,r)continue;break}f.lastIndex=c;var J=f.exec(e);if(!J){c=e.length+1,o+=e.substring(d,c-1);break}if(c=J.index+1,!(r=e.charAt(J.index))){o+=e.substring(d,c-1);break}}continue;case k:if(!r)continue;if("r"!==r)return K("Invalid true started with t"+r);L=E;continue;case E:if(!r)continue;if("u"!==r)return K("Invalid true started with tr"+r);L=S;continue;case S:if(!r)continue;if("e"!==r)return K("Invalid true started with tru"+r);s(!0),u(),L=j.pop()||p;continue;case x:if(!r)continue;if("a"!==r)return K("Invalid false started with f"+r);L=_;continue;case _:if(!r)continue;if("l"!==r)return K("Invalid false started with fa"+r);L=P;continue;case P:if(!r)continue;if("s"!==r)return K("Invalid false started with fal"+r);L=T;continue;case T:if(!r)continue;if("e"!==r)return K("Invalid false started with fals"+r);s(!1),u(),L=j.pop()||p;continue;case I:if(!r)continue;if("u"!==r)return K("Invalid null started with n"+r);L=O;continue;case O:if(!r)continue;if("l"!==r)return K("Invalid null started with nu"+r);L=B;continue;case B:if(!r)continue;if("l"!==r)return K("Invalid null started with nul"+r);s(null),u(),L=j.pop()||p;continue;case C:if("."!==r)return K("Leading zero not followed by .");R+=r,L=20;continue;case 20:if(-1!=="0123456789".indexOf(r))R+=r;else if("."===r){if(-1!==R.indexOf("."))return K("Invalid number has two dots");R+=r}else if("e"===r||"E"===r){if(-1!==R.indexOf("e")||-1!==R.indexOf("E"))return K("Invalid number has two exponential");R+=r}else if("+"===r||"-"===r){if("e"!==i&&"E"!==i)return K("Invalid symbol in number");R+=r}else R&&(s(parseFloat(R)),u(),R=""),c--,L=j.pop()||p;continue;default:return K("Unknown state: "+L)}z>=N&&(n=0,void 0!==o&&o.length>l&&(K("Max buffer length exceeded: textNode"),n=Math.max(n,o.length)),R.length>l&&(K("Max buffer length exceeded: numberNode"),n=Math.max(n,R.length)),N=l-n+z)}})),e(n.n).on((function(){if(L===h)return s({}),u(),void(U=!0);L===p&&0===H||K("Unexpected end"),void 0!==o&&(s(o),u(),o=void 0),U=!0}))}},function(e,t,r){r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return c}));var n=r(19),i=r(3),o=r(2),a=r(20),s=r(0);function u(){return new XMLHttpRequest}function c(e,t,r,u,c,l,f){var d=e(i.m).emit,h=e(i.b).emit,p=0,y=!0;function m(){if("2"===String(t.status)[0]){var e=t.responseText,r=(" "+e.substr(p)).substr(1);r&&d(r),p=Object(o.e)(e)}}function g(t){try{y&&e(i.c).emit(t.status,Object(a.a)(t.getAllResponseHeaders())),y=!1}catch(e){}}e(i.a).on((function(){t.onreadystatechange=null,t.abort()})),"onprogress"in t&&(t.onprogress=m),t.onreadystatechange=function(){switch(t.readyState){case 2:case 3:return g(t);case 4:g(t),"2"===String(t.status)[0]?(m(),e(i.n).emit()):h(Object(i.o)(t.status,t.responseText))}};try{for(var b in t.open(r,u,!0),l)t.setRequestHeader(b,l[b]);Object(n.a)(window.location,Object(n.b)(u))||t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.withCredentials=f,t.send(c)}catch(e){window.setTimeout(Object(s.j)(h,Object(i.o)(void 0,void 0,e)),0)}}},function(e,t,r){function n(e,t){function r(t){return String(t.port||{"http:":80,"https:":443}[t.protocol||e.protocol])}return!!(t.protocol&&t.protocol!==e.protocol||t.host&&t.host!==e.host||t.host&&r(t)!==r(e))}function i(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[];return{protocol:t[1]||"",host:t[2]||"",port:t[3]||""}}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}))},function(e,t,r){function n(e){var t={};return e&&e.split("\r\n").forEach((function(e){var r=e.indexOf(": ");t[e.substring(0,r)]=e.substring(r+2)})),t}r.d(t,"a",(function(){return n}))}]).default},"object"===(0,s.default)(t)&&"object"===(0,s.default)(e)?e.exports=a():(i=[],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o))},21307:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!==(0,n.default)(r))throw new TypeError(r+"must be non-object");for(var i in r)o(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16}},29806:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},28548:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,a=i+n;e^=-1;for(var s=i;s>>8^o[255&(e^r[s])];return~e}},54151:(e,t,r)=>{"use strict";var n,i=r(21307),o=r(25280),a=r(57506),s=r(28548),u=r(78021),c=-2,l=258,f=262,d=103,h=113,p=666;function y(e,t){return e.msg=u[t],t}function m(e){return(e<<1)-(e>4?9:0)}function g(e){for(var t=e.length;--t>=0;)e[t]=0}function b(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function v(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,b(e.strm)}function w(e,t){e.pending_buf[e.pending++]=t}function A(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function k(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-f?e.strstart-(e.w_size-f):0,c=e.window,d=e.w_mask,h=e.prev,p=e.strstart+l,y=c[o+a-1],m=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+a]===m&&c[r+a-1]===y&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(e.match_start=t,a=n,n>=s)break;y=c[o+a-1],m=c[o+a]}}}while((t=h[t&d])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function E(e){var t,r,n,o,u,c,l,d,h,p,y=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=y+(y-f)){i.arraySet(e.window,e.window,y,y,0),e.match_start-=y,e.strstart-=y,e.block_start-=y,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=y?n-y:0}while(--r);t=r=y;do{n=e.prev[--t],e.prev[t]=n>=y?n-y:0}while(--r);o+=y}if(0===e.strm.avail_in)break;if(c=e.strm,l=e.window,d=e.strstart+e.lookahead,h=o,p=void 0,(p=c.avail_in)>h&&(p=h),r=0===p?0:(c.avail_in-=p,i.arraySet(l,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=a(c.adler,l,p,d):2===c.state.wrap&&(c.adler=s(c.adler,l,p,d)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=3)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(s=2,n-=16),o<1||o>9||8!==r||n<8||n>15||t<0||t>9||a<0||a>4)return y(e,c);8===n&&(n=9);var u=new P;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(E(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,v(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-f&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(v(e,!1),e.strm.avail_out),1)})),new _(4,4,8,4,S),new _(4,5,16,8,S),new _(4,6,32,32,S),new _(4,4,16,16,x),new _(8,16,32,32,x),new _(8,16,128,128,x),new _(8,32,128,256,x),new _(32,128,258,1024,x),new _(32,258,258,4096,x)],t.deflateInit=function(e,t){return O(e,t,8,15,8,0)},t.deflateInit2=O,t.deflateReset=I,t.deflateResetKeep=T,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},t.deflate=function(e,t){var r,i,a,u;if(!e||!e.state||t>5||t<0)return e?y(e,c):c;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===p&&4!==t)return y(e,0===e.avail_out?-5:c);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,w(i,31),w(i,139),w(i,8),i.gzhead?(w(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),w(i,255&i.gzhead.time),w(i,i.gzhead.time>>8&255),w(i,i.gzhead.time>>16&255),w(i,i.gzhead.time>>24&255),w(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),w(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(w(i,255&i.gzhead.extra.length),w(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(w(i,0),w(i,0),w(i,0),w(i,0),w(i,0),w(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),w(i,3),i.status=h);else{var f=8+(i.w_bits-8<<4)<<8;f|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=h,A(i,f),0!==i.strstart&&(A(i,e.adler>>>16),A(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending!==i.pending_buf_size));)w(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=d)}else i.status=d;if(i.status===d&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&b(e),i.pending+2<=i.pending_buf_size&&(w(i,255&e.adler),w(i,e.adler>>8&255),e.adler=0,i.status=h)):i.status=h),0!==i.pending){if(b(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&m(t)<=m(r)&&4!==t)return y(e,-5);if(i.status===p&&0!==e.avail_in)return y(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==p){var k=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(E(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead<=l){if(E(e),e.lookahead<=l&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=e.strstart+l;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==k&&4!==k||(i.status=p),1===k||3===k)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===k&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(g(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),b(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(w(i,255&e.adler),w(i,e.adler>>8&255),w(i,e.adler>>16&255),w(i,e.adler>>24&255),w(i,255&e.total_in),w(i,e.total_in>>8&255),w(i,e.total_in>>16&255),w(i,e.total_in>>24&255)):(A(i,e.adler>>>16),A(i,65535&e.adler)),b(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==d&&t!==h&&t!==p?y(e,c):(e.state=null,t===h?y(e,-3):0):c},t.deflateSetDictionary=function(e,t){var r,n,o,s,u,l,f,d,h=t.length;if(!e||!e.state)return c;if(2===(s=(r=e.state).wrap)||1===s&&42!==r.status||r.lookahead)return c;for(1===s&&(e.adler=a(e.adler,t,h,0)),r.wrap=0,h>=r.w_size&&(0===s&&(g(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,t,h-r.w_size,r.w_size,0),t=d,h=r.w_size),u=e.avail_in,l=e.next_in,f=e.input,e.avail_in=h,e.next_in=0,e.input=t,E(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<{"use strict";e.exports=function(e,t){var r,n,i,o,a,s,u,c,l,f,d,h,p,y,m,g,b,v,w,A,k,E,S,x,_;r=e.state,n=e.next_in,x=e.input,i=n+(e.avail_in-5),o=e.next_out,_=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,f=r.wnext,d=r.window,h=r.hold,p=r.bits,y=r.lencode,m=r.distcode,g=(1<>>=w=v>>>24,p-=w,0==(w=v>>>16&255))_[o++]=65535&v;else{if(!(16&w)){if(!(64&w)){v=y[(65535&v)+(h&(1<>>=w,p-=w),p<15&&(h+=x[n++]<>>=w=v>>>24,p-=w,!(16&(w=v>>>16&255))){if(!(64&w)){v=m[(65535&v)+(h&(1<u){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=w,p-=w,k>(w=o-a)){if((w=k-w)>l&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(E=0,S=d,0===f){if(E+=c-w,w2;)_[o++]=S[E++],_[o++]=S[E++],_[o++]=S[E++],A-=3;A&&(_[o++]=S[E++],A>1&&(_[o++]=S[E++]))}else{E=o-k;do{_[o++]=_[E++],_[o++]=_[E++],_[o++]=_[E++],A-=3}while(A>2);A&&(_[o++]=_[E++],A>1&&(_[o++]=_[E++]))}break}}break}}while(n>3,h&=(1<<(p-=A<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n{"use strict";var n=r(21307),i=r(57506),o=r(28548),a=r(52399),s=r(51721),u=-2,c=12,l=30;function f(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):u}function p(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,h(e)):u}function y(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,p(e))):u}function m(e,t){var r,n;return e?(n=new d,e.state=n,n.window=null,0!==(r=y(e,t))&&(e.state=null),r):u}var g,b,v=!0;function w(e){if(v){var t;for(g=new n.Buf32(512),b=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,b,0,e.work,{bits:5}),v=!1}e.lencode=g,e.lenbits=9,e.distcode=b,e.distbits=5}function A(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,j,2,0),b=0,v=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg="incorrect header check",r.mode=l;break}if(8!=(15&b)){e.msg="unknown compression method",r.mode=l;break}if(v-=4,N=8+(15&(b>>>=4)),0===r.wbits)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=l;break}r.dmax=1<>8&1),512&r.flags&&(j[0]=255&b,j[1]=b>>>8&255,r.check=o(r.check,j,2,0)),b=0,v=0,r.mode=3;case 3:for(;v<32;){if(0===m)break e;m--,b+=d[p++]<>>8&255,j[2]=b>>>16&255,j[3]=b>>>24&255,r.check=o(r.check,j,4,0)),b=0,v=0,r.mode=4;case 4:for(;v<16;){if(0===m)break e;m--,b+=d[p++]<>8),512&r.flags&&(j[0]=255&b,j[1]=b>>>8&255,r.check=o(r.check,j,2,0)),b=0,v=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===m)break e;m--,b+=d[p++]<>>8&255,r.check=o(r.check,j,2,0)),b=0,v=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((S=r.length)>m&&(S=m),S&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,p,S,N)),512&r.flags&&(r.check=o(r.check,d,S,p)),m-=S,p+=S,r.length-=S),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===m)break e;S=0;do{N=d[p+S++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N))}while(N&&S>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=c;break;case 10:for(;v<32;){if(0===m)break e;m--,b+=d[p++]<>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===m)break e;m--,b+=d[p++]<>>=1)){case 0:r.mode=14;break;case 1:if(w(r),r.mode=20,6===t){b>>>=2,v-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=l}b>>>=2,v-=2;break;case 14:for(b>>>=7&v,v-=7&v;v<32;){if(0===m)break e;m--,b+=d[p++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=l;break}if(r.length=65535&b,b=0,v=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(S=r.length){if(S>m&&(S=m),S>g&&(S=g),0===S)break e;n.arraySet(h,d,p,S,y),m-=S,p+=S,g-=S,y+=S,r.length-=S;break}r.mode=c;break;case 17:for(;v<14;){if(0===m)break e;m--,b+=d[p++]<>>=5,v-=5,r.ndist=1+(31&b),b>>>=5,v-=5,r.ncode=4+(15&b),b>>>=4,v-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=l;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,v-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},R=s(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid code lengths set",r.mode=l;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,I=65535&L,!((P=L>>>24)<=v);){if(0===m)break e;m--,b+=d[p++]<>>=P,v-=P,r.lens[r.have++]=I;else{if(16===I){for(U=P+2;v>>=P,v-=P,0===r.have){e.msg="invalid bit length repeat",r.mode=l;break}N=r.lens[r.have-1],S=3+(3&b),b>>>=2,v-=2}else if(17===I){for(U=P+3;v>>=P)),b>>>=3,v-=3}else{for(U=P+7;v>>=P)),b>>>=7,v-=7}if(r.have+S>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=l;break}for(;S--;)r.lens[r.have++]=N}}if(r.mode===l)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=l;break}if(r.lenbits=9,M={bits:r.lenbits},R=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid literal/lengths set",r.mode=l;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},R=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,R){e.msg="invalid distances set",r.mode=l;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(m>=6&&g>=258){e.next_out=y,e.avail_out=g,e.next_in=p,e.avail_in=m,r.hold=b,r.bits=v,a(e,E),y=e.next_out,h=e.output,g=e.avail_out,p=e.next_in,d=e.input,m=e.avail_in,b=r.hold,v=r.bits,r.mode===c&&(r.back=-1);break}for(r.back=0;T=(L=r.lencode[b&(1<>>16&255,I=65535&L,!((P=L>>>24)<=v);){if(0===m)break e;m--,b+=d[p++]<>O)])>>>16&255,I=65535&L,!(O+(P=L>>>24)<=v);){if(0===m)break e;m--,b+=d[p++]<>>=O,v-=O,r.back+=O}if(b>>>=P,v-=P,r.back+=P,r.length=I,0===T){r.mode=26;break}if(32&T){r.back=-1,r.mode=c;break}if(64&T){e.msg="invalid literal/length code",r.mode=l;break}r.extra=15&T,r.mode=22;case 22:if(r.extra){for(U=r.extra;v>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;T=(L=r.distcode[b&(1<>>16&255,I=65535&L,!((P=L>>>24)<=v);){if(0===m)break e;m--,b+=d[p++]<>O)])>>>16&255,I=65535&L,!(O+(P=L>>>24)<=v);){if(0===m)break e;m--,b+=d[p++]<>>=O,v-=O,r.back+=O}if(b>>>=P,v-=P,r.back+=P,64&T){e.msg="invalid distance code",r.mode=l;break}r.offset=I,r.extra=15&T,r.mode=24;case 24:if(r.extra){for(U=r.extra;v>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=l;break}r.mode=25;case 25:if(0===g)break e;if(S=E-g,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=l;break}S>r.wnext?(S-=r.wnext,x=r.wsize-S):x=r.wnext-S,S>r.length&&(S=r.length),_=r.window}else _=h,x=y-r.offset,S=r.length;S>g&&(S=g),g-=S,r.length-=S;do{h[y++]=_[x++]}while(--S);0===r.length&&(r.mode=21);break;case 26:if(0===g)break e;h[y++]=r.length,g--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===m)break e;m--,b|=d[p++]<{"use strict";var n=r(21307),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,u,c,l,f,d){var h,p,y,m,g,b,v,w,A,k=d.bits,E=0,S=0,x=0,_=0,P=0,T=0,I=0,O=0,B=0,C=0,N=null,R=0,M=new n.Buf16(16),U=new n.Buf16(16),L=null,j=0;for(E=0;E<=15;E++)M[E]=0;for(S=0;S=1&&0===M[_];_--);if(P>_&&(P=_),0===_)return c[l++]=20971520,c[l++]=20971520,d.bits=1,0;for(x=1;x<_&&0===M[x];x++);for(P0&&(0===e||1!==_))return-1;for(U[1]=0,E=1;E<15;E++)U[E+1]=U[E]+M[E];for(S=0;S852||2===e&&B>592)return 1;for(;;){v=E-I,f[S]b?(w=L[j+f[S]],A=N[R+f[S]]):(w=96,A=0),h=1<>I)+(p-=h)]=v<<24|w<<16|A}while(0!==p);for(h=1<>=1;if(0!==h?(C&=h-1,C+=h):C=0,S++,0==--M[E]){if(E===_)break;E=t[r+f[S]]}if(E>P&&(C&m)!==y){for(0===I&&(I=P),g+=x,O=1<<(T=E-I);T+I<_&&!((O-=M[T+I])<=0);)T++,O<<=1;if(B+=1<852||2===e&&B>592)return 1;c[y=C&m]=P<<24|T<<16|g-l}}return 0!==C&&(c[g+C]=E-I<<24|64<<16),d.bits=P,0}},78021:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},25280:(e,t,r)=>{"use strict";var n=r(21307);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,a=286,s=30,u=15,c=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],l=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],h=new Array(576);i(h);var p=new Array(60);i(p);var y=new Array(512);i(y);var m=new Array(256);i(m);var g=new Array(29);i(g);var b,v,w,A=new Array(s);function k(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function S(e){return e<256?y[e]:y[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function _(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function I(e,t,r){var n,i,o=new Array(16),a=0;for(n=1;n<=u;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=T(o[s]++,s))}}function O(e){var t;for(t=0;t8?x(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function C(e,t,r,n){var i=2*t,o=2*r;return e[i]>1;r>=1;r--)N(e,o,r);i=c;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,N(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,a,s,c=t.dyn_tree,l=t.max_code,f=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,y=t.stat_desc.max_length,m=0;for(o=0;o<=u;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=c[2*c[2*(n=e.heap[r])+1]+1]+1)>y&&(o=y,m++),c[2*n+1]=o,n>l||(e.bl_count[o]++,a=0,n>=p&&(a=h[n-p]),s=c[2*n],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(f[2*n+1]+a)));if(0!==m){do{for(o=y-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[y]--,m-=2}while(m>0);for(o=y;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>l||(c[2*i+1]!==o&&(e.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),n--)}}(e,t),I(o,l,e.bl_count)}function U(e,t,r){var n,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++s>=7;n0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t=3&&0===e.bl_tree[2*d[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?F(e,t,r,n):4===e.strategy||a===i?(_(e,2+(n?1:0),3),R(e,h,p)):(_(e,4+(n?1:0),3),function(e,t,r,n){var i;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(m[r]+o+1)]++,e.dyn_dtree[2*S(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){_(e,2,3),P(e,256,h),function(e){16===e.bi_valid?(x(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},47563:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},81823:(e,t,r)=>{"use strict";var n=r(68357);t.certificate=r(41320);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var l=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=l,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var f=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=f;var d=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},41320:(e,t,r)=>{"use strict";var n=r(68357),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),l=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),f=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),d=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(l),this.key("validity").use(f),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},64988:(e,t,r)=>{"use strict";var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=r(27085),s=r(98073),u=r(48850).Buffer;e.exports=function(e,t){var r,c=e.toString(),l=c.match(n);if(l){var f="aes"+l[1],d=u.from(l[2],"hex"),h=u.from(l[3].replace(/[\r\n]/g,""),"base64"),p=a(t,d.slice(0,8),parseInt(l[1],10)).key,y=[],m=s.createDecipheriv(f,p,d);y.push(m.update(h)),y.push(m.final()),r=u.concat(y)}else{var g=c.match(o);r=u.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},27552:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(81823),o=r(22562),a=r(64988),s=r(98073),u=r(54192),c=r(48850).Buffer;function l(e){var t;"object"!==(0,n.default)(e)||c.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=c.from(e));var r,l,f=a(e,t),d=f.tag,h=f.data;switch(d){case"CERTIFICATE":l=i.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(l||(l=i.PublicKey.decode(h,"der")),r=l.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(l.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return l.subjectPrivateKey=l.subjectPublicKey,{type:"ec",data:l};case"1.2.840.10040.4.1":return l.algorithm.params.pub_key=i.DSAparam.decode(l.subjectPublicKey.data,"der"),{type:"dsa",data:l.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=o[e.algorithm.decrypt.cipher.algo.join(".")],a=e.algorithm.decrypt.cipher.iv,l=e.subjectPrivateKey,f=parseInt(i.split("-")[1],10)/8,d=u.pbkdf2Sync(t,r,n,f,"sha1"),h=s.createDecipheriv(i,d,a),p=[];return p.push(h.update(l)),p.push(h.final()),c.concat(p)}(h=i.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(r=(l=i.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(l.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:l.algorithm.curve,privateKey:i.ECPrivateKey.decode(l.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return l.algorithm.params.priv_key=i.DSAparam.decode(l.subjectPrivateKey,"der"),{type:"dsa",params:l.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=i.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+d)}}e.exports=l,l.signature=i.signature},48209:e=>{"use strict";var t=function(e){return e.replace(/^\s+|\s+$/g,"")};e.exports=function(e){if(!e)return{};for(var r,n={},i=t(e).split("\n"),o=0;o{"use strict";t.pbkdf2=r(1882),t.pbkdf2Sync=r(1658)},1882:(e,t,r)=>{"use strict";var n,i,o=r(48850).Buffer,a=r(63127),s=r(77401),u=r(1658),c=r(98398),l=r.g.crypto&&r.g.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function h(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(e,t,r,n,i){return l.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return l.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,t,i,y,m,g){"function"==typeof m&&(g=m,m=void 0);var b=f[(m=m||"sha1").toLowerCase()];if(b&&"function"==typeof r.g.Promise){if(a(i,y),e=c(e,s,"Password"),t=c(t,s,"Salt"),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){h()((function(){t(null,e)}))}),(function(e){h()((function(){t(e)}))}))}(function(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var t=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=t,t}(b).then((function(r){return r?p(e,t,i,y,b):u(e,t,i,y,m)})),g)}else h()((function(){var r;try{r=u(e,t,i,y,m)}catch(e){return g(e)}g(null,r)}))}},77401:(e,t,r)=>{"use strict";var n,i=r(19142);n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},63127:e=>{"use strict";var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},1658:(e,t,r)=>{"use strict";var n=r(55349),i=r(26707),o=r(51708),a=r(48850).Buffer,s=r(63127),u=r(77401),c=r(98398),l=a.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,r){var s=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=s(t):t.length{"use strict";var n=r(48850).Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},19142:e=>{"use strict";var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&d())}function d(){if(!c){var e=a(f);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l1)for(var r=1;r{"use strict";t.publicEncrypt=r(82466),t.privateDecrypt=r(53144),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},26873:(e,t,r)=>{"use strict";var n=r(35866),i=r(48850).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,a=i.alloc(0),s=0;a.length{"use strict";var n=r(27552),i=r(26873),o=r(27223),a=r(31734),s=r(99782),u=r(35866),c=r(2561),l=r(48850).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var d,h=n(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");d=r?c(new a(t),h):s(t,h);var y=l.alloc(p-d.length);if(d=l.concat([y,d],p),4===f)return function(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(l.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),c=t.slice(a+1),f=o(s,i(c,a)),d=o(c,i(f,r-a-1));if(function(e,t){e=l.from(e),t=l.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i=t.length){o++;break}var a=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,d,r);if(3===f)return d;throw new Error("unknown padding")}},82466:(e,t,r)=>{"use strict";var n=r(27552),i=r(75010),o=r(35866),a=r(26873),s=r(27223),u=r(31734),c=r(2561),l=r(99782),f=r(48850).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var h,p=n(e);if(4===d)h=function(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(f.alloc(0)).digest(),l=c.length,d=2*l;if(n>r-d-2)throw new Error("message too long");var h=f.alloc(r-n-d-2),p=r-l-1,y=i(l),m=s(f.concat([c,h,f.alloc(1,1),t],p),a(y,p)),g=s(y,a(m,l));return new u(f.concat([f.alloc(1),g,m],r))}(p,t);else if(1===d)h=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");return n=r?f.alloc(a-o-3,255):function(e){for(var t,r=f.allocUnsafe(e),n=0,o=i(2*e),a=0;n=0)throw new Error("data too long for modulus")}return r?l(h,p):c(h,p)}},2561:(e,t,r)=>{"use strict";var n=r(31734),i=r(48850).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},27223:e=>{"use strict";e.exports=function(e,t){for(var r=e.length,n=-1;++n{"use strict";var n=r(28847)(r(3355)),i=r(22028),o=r(33103),a=r(80034);function s(e,t){return t.encode?t.strict?i(e):encodeURIComponent(e):e}function u(e){return Array.isArray(e)?e.sort():"object"===(0,n.default)(e)?u(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function c(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function l(e,t){var r=function(e){var t;switch(e.arrayFormat){case"index":return function(e,r,n){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return function(e,r,n){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};default:return function(e,t,r){void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t=o({arrayFormat:"none"},t)),i=Object.create(null);return"string"!=typeof e?i:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),n=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:a(o),r(a(n),o,i)})),Object.keys(i).sort().reduce((function(e,t){var r=i[t];return Boolean(r)&&"object"===(0,n.default)(r)&&!Array.isArray(r)?e[t]=u(r):e[t]=r,e}),Object.create(null))):i}t.extract=c,t.parse=l,t.stringify=function(e,t){!1===(t=o({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var r=function(e){switch(e.arrayFormat){case"index":return function(t,r,n){return null===r?[s(t,e),"[",n,"]"].join(""):[s(t,e),"[",s(n,e),"]=",s(r,e)].join("")};case"bracket":return function(t,r){return null===r?s(t,e):[s(t,e),"[]=",s(r,e)].join("")};default:return function(t,r){return null===r?s(t,e):[s(t,e),"=",s(r,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map((function(n){var i=e[n];if(void 0===i)return"";if(null===i)return s(n,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(r(n,e,o.length))})),o.join("&")}return s(n,t)+"="+s(i,t)})).filter((function(e){return e.length>0})).join("&"):""},t.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:l(c(e),t)}}},75010:(e,t,r)=>{"use strict";var n=r(19142),i=65536,o=r(48850).Buffer,a=r.g.crypto||r.g.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>i)for(var s=0;s{"use strict";var n=r(19142);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(48850),a=r(75010),s=o.Buffer,u=o.kMaxLength,c=r.g.crypto||r.g.msCrypto,l=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>l||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>l||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function h(e,t,r,i){if(n.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return c.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return a(r).copy(e,t),e;a(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}c&&c.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,i){if(!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(t,e.length),d(n,t,e.length),h(e,t,n,i)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return f(t,e.length),void 0===n&&(n=e.length-t),d(n,t,e.length),h(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},79024:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i={};function o(e,t,r){r||(r=Error);var n=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function a(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,u,c;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var l=("number"!=typeof c&&(c=0),c+1>(u=e).length||-1===u.indexOf(".",c)?"argument":"property");s='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(a(t,"type"))}return s+". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=i},76884:(e,t,r)=>{"use strict";var n=r(19142),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(6297),a=r(71471);r(41736)(l,o);for(var s=i(a.prototype),u=0;u{"use strict";e.exports=i;var n=r(99154);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(41736)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},6297:(e,t,r)=>{"use strict";var n,i=r(19142);e.exports=x,x.ReadableState=S,r(38291).EventEmitter;var o,a=function(e,t){return e.listeners(t).length},s=r(37144),u=r(29033).Buffer,c=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(94616);o=l&&l.debuglog?l.debuglog("stream"):function(){};var f,d,h,p=r(25392),y=r(57572),m=r(6756).getHighWaterMark,g=r(79024).q,b=g.ERR_INVALID_ARG_TYPE,v=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,A=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(41736)(x,s);var k=y.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(76884),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(23462).s),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function x(e){if(n=n||r(76884),!(this instanceof x))return new x(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function _(e,t,r,n,i){o("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,B(e)))}}(e,s);else if(i||(a=function(e,t){var r,n;return n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),a)k(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?k(e,new A):P(e,s,t,!0);else if(s.ended)k(e,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?P(e,s,t,!1):C(e,s)):P(e,s,t,!1)}else n||(s.reading=!1,C(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(B,e))}function B(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){o("readable nexttick read 0"),e.read(0)}function U(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(D,t,e))}function D(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function H(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):O(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},x.prototype._read=function(e){k(this,new w("_read()"))},x.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===i.stdout||e===i.stderr?y:u;function u(){o("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",(function t(i,a){o("onunpipe"),i===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",f),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",c);var l=!1;function f(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==H(n.pipes,e))&&!l&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){o("onerror",t),y(),e.removeListener("error",d),0===a(e,"error")&&k(e,t)}function h(){e.removeListener("finish",p),y()}function p(){o("onfinish"),e.removeListener("close",h),y()}function y(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",h),e.once("finish",p),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?O(this):n.reading||i.nextTick(M,this))),r},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r},x.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t},x.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(U,e,t))}(this,e)),e.paused=!1,this},x.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a{"use strict";e.exports=l;var n=r(79024).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(76884);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";var n,i=r(19142);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=x,x.WritableState=S;var a,s={deprecate:r(96219)},u=r(37144),c=r(29033).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(57572),d=r(6756).getHighWaterMark,h=r(79024).q,p=h.ERR_INVALID_ARG_TYPE,y=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_MULTIPLE_CALLBACK,g=h.ERR_STREAM_CANNOT_PIPE,b=h.ERR_STREAM_DESTROYED,v=h.ERR_STREAM_NULL_VALUES,w=h.ERR_STREAM_WRITE_AFTER_END,A=h.ERR_UNKNOWN_ENCODING,k=f.errorOrDestroy;function E(){}function S(e,t,a){n=n||r(76884),e=e||{},"boolean"!=typeof a&&(a=t instanceof n),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(B,e,t),e._writableState.errorEmitted=!0,k(e,n)):(o(n),e._writableState.errorEmitted=!0,k(e,n),B(e,t))}(e,r,n,t,o);else{var a=I(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),n?i.nextTick(P,e,r,a,o):P(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function x(e){var t=this instanceof(n=n||r(76884));if(!t&&!a.call(x,this))return new x(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function _(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function P(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),B(e,t)}function T(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,_(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(_(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(r){t.pendingcb--,r&&k(e,r),t.prefinished=!0,e.emit("prefinish"),B(e,t)}))}function B(e,t){var r=I(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(41736)(x,u),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===x&&e&&e._writableState instanceof S}})):a=function(e){return e instanceof this},x.prototype.pipe=function(){k(this,new g)},x.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,c.isBuffer(n)||n instanceof l);return s&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(e,t){var r=new w;k(e,r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o;return null===r?o=new v:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(k(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length-1))throw new A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,r){r(new y("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,B(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=f.destroy,x.prototype._undestroy=f.undestroy,x.prototype._destroy=function(e,t){t(e)}},32317:(e,t,r)=>{"use strict";var n,i=r(19142),o=r(28847)(r(3355));function a(e,t,r){return(t=function(e){var t=function(e){if("object"!==(0,o.default)(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==(0,o.default)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,o.default)(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(5831),u=Symbol("lastResolve"),c=Symbol("lastReject"),l=Symbol("error"),f=Symbol("ended"),d=Symbol("lastPromise"),h=Symbol("handlePromise"),p=Symbol("stream");function y(e,t){return{value:e,done:t}}function m(e){var t=e[u];if(null!==t){var r=e[p].read();null!==r&&(e[d]=null,e[u]=null,e[c]=null,t(y(r,!1)))}}function g(e){i.nextTick(m,e)}var b=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((a(n={get stream(){return this[p]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(y(void 0,!0));if(this[p].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[l]?r(e[l]):t(y(void 0,!0))}))}));var r,n=this[d];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[f]?r(y(void 0,!0)):t[h](r,n)}),n)}}(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(y(o,!1));r=new Promise(this[h])}return this[d]=r,r}},Symbol.asyncIterator,(function(){return this})),a(n,"return",(function(){var e=this;return new Promise((function(t,r){e[p].destroy(null,(function(e){e?r(e):t(y(void 0,!0))}))}))})),n),b);e.exports=function(e){var t,r=Object.create(v,(a(t={},p,{value:e,writable:!0}),a(t,u,{value:null,writable:!0}),a(t,c,{value:null,writable:!0}),a(t,l,{value:null,writable:!0}),a(t,f,{value:e._readableState.endEmitted,writable:!0}),a(t,h,{value:function(e,t){var n=r[p].read();n?(r[d]=null,r[u]=null,r[c]=null,e(y(n,!1))):(r[u]=e,r[c]=t)},writable:!0}),t));return r[d]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];return null!==t&&(r[d]=null,r[u]=null,r[c]=null,t(e)),void(r[l]=e)}var n=r[u];null!==n&&(r[d]=null,r[u]=null,r[c]=null,n(y(void 0,!0))),r[f]=!0})),e.on("readable",g.bind(null,r)),r}},25392:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,u.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return c(this,o(o({},t),{},{depth:0,customInspect:!1}))}}])&&function(e,t){for(var r=0;r{"use strict";var n=r(19142);function i(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},5831:(e,t,r)=>{"use strict";var n=r(79024).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";e.exports=function(){throw new Error("Readable.from is not available in the browser")}},60384:(e,t,r)=>{"use strict";var n,i=r(79024).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i0,(function(e){l||(l=e),e&&d.forEach(u),o||(d.forEach(u),f(l))}))}));return t.reduce(c)}},6756:(e,t,r)=>{"use strict";var n=r(79024).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},37144:(e,t,r)=>{"use strict";e.exports=r(38291).EventEmitter},86505:(e,t,r)=>{"use strict";(t=e.exports=r(6297)).Stream=t,t.Readable=t,t.Writable=r(71471),t.Duplex=r(76884),t.Transform=r(99154),t.PassThrough=r(53582),t.finished=r(5831),t.pipeline=r(60384)},26707:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(41736),o=r(22353),a=new Array(16),s=[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],u=[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],c=[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],l=[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],f=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function y(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,A=0|this._b,k=0|this._c,E=0|this._d,S=0|this._e,x=0;x<80;x+=1){var _,P;x<16?(_=y(r,n,i,o,h,e[s[x]],f[0],c[x]),P=v(w,A,k,E,S,e[u[x]],d[0],l[x])):x<32?(_=m(r,n,i,o,h,e[s[x]],f[1],c[x]),P=b(w,A,k,E,S,e[u[x]],d[1],l[x])):x<48?(_=g(r,n,i,o,h,e[s[x]],f[2],c[x]),P=g(w,A,k,E,S,e[u[x]],d[2],l[x])):x<64?(_=b(r,n,i,o,h,e[s[x]],f[3],c[x]),P=m(w,A,k,E,S,e[u[x]],d[3],l[x])):(_=v(r,n,i,o,h,e[s[x]],f[4],c[x]),P=y(w,A,k,E,S,e[u[x]],d[4],l[x])),r=h,h=o,o=p(i,10),i=n,n=_,w=S,S=E,E=p(k,10),k=A,A=P}var T=this._b+i+E|0;this._b=this._c+o+S|0,this._c=this._d+h+w|0,this._d=this._e+r+A|0,this._e=this._a+n+k|0,this._a=T},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},6905:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var i,o=(i=r(31734))&&i.__esModule?i:{default:i};function a(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function s(e,t){if(e<56)return n.from([e+t]);var r=l(e),i=l(t+55+r.length/2);return n.from(i+r,"hex")}function u(e){var t,r,i,o,s,c=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?n.from([]):e.slice(1,t),2===t&&i[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:i,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1e.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(o=e.slice(r,f)).length)throw new Error("invalid rlp, List has a invalid length");for(;o.length;)s=u(o),c.push(s.data),o=s.remainder;return{data:c,remainder:e.slice(f)}}function c(e){return"0x"===e.slice(0,2)}function l(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function f(e){if(!n.isBuffer(e)){if("string"==typeof e)return c(e)?n.from((r="string"!=typeof(i=e)?i:c(i)?i.slice(2):i).length%2?"0"+r:r,"hex"):n.from(e);if("number"==typeof e||"bigint"==typeof e)return e?(t=l(e),n.from(t,"hex")):n.from([]);if(null==e)return n.from([]);if(e instanceof Uint8Array)return n.from(e);if(o.default.isBN(e))return n.from(e.toArray());throw new Error("invalid type")}var t,r,i;return e}t.encode=function e(t){if(Array.isArray(t)){for(var r=[],i=0;i{"use strict";var n=r(29033),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},11755:(e,t,r)=>{"use strict";var n,i=r(19142),o=r(28847)(r(3355)),a=r(29033),s=a.Buffer,u={};for(n in a)a.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(u[n]=a[n]);var c=u.Buffer={};for(n in s)s.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(c[n]=s[n]);if(u.Buffer.prototype=s.prototype,c.from&&c.from!==Uint8Array.from||(c.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+(0,o.default)(e));if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,o.default)(e));return s(e,t,r)}),c.alloc||(c.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+(0,o.default)(e));if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=s(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!u.kStringMaxLength)try{u.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}u.constants||(u.constants={MAX_LENGTH:u.kMaxLength},u.kStringMaxLength&&(u.constants.MAX_STRING_LENGTH=u.kStringMaxLength)),e.exports=u},67799:e=>{"use strict";!function(){var t=2147483647;function r(e){var t=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]),r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225,l=new Uint32Array(64);function f(e){for(var f=0,d=e.length;d>=64;){var h=r,p=n,y=i,m=o,g=a,b=s,v=u,w=c,A=void 0,k=void 0,E=void 0,S=void 0,x=void 0;for(k=0;k<16;k++)E=f+4*k,l[k]=(255&e[E])<<24|(255&e[E+1])<<16|(255&e[E+2])<<8|255&e[E+3];for(k=16;k<64;k++)S=((A=l[k-2])>>>17|A<<15)^(A>>>19|A<<13)^A>>>10,x=((A=l[k-15])>>>7|A<<25)^(A>>>18|A<<14)^A>>>3,l[k]=(S+l[k-7]|0)+(x+l[k-16]|0)|0;for(k=0;k<64;k++)S=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&b^~g&v)|0)+(w+(t[k]+l[k]|0)|0)|0,x=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&p^h&y^p&y)|0,w=v,v=b,b=g,g=m+S|0,m=y,y=p,p=h,h=S+x|0;r=r+h|0,n=n+p|0,i=i+y|0,o=o+m|0,a=a+g|0,s=s+b|0,u=u+v|0,c=c+w|0,f+=64,d-=64}}f(e);var d,h=e.length%64,p=e.length/536870912|0,y=e.length<<3,m=h<56?56:120,g=e.slice(e.length-h,e.length);for(g.push(128),d=h+1;d>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(y>>>24&255),g.push(y>>>16&255),g.push(y>>>8&255),g.push(y>>>0&255),f(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function n(e,t,n){e=e.length<=64?e:r(e);var i,o=64+t.length+4,a=new Array(o),s=new Array(64),u=[];for(i=0;i<64;i++)a[i]=54;for(i=0;i=o-4;e--){if(a[e]++,a[e]<=255)return;a[e]=0}}for(;n>=32;)c(),u=u.concat(r(s.concat(r(a)))),n-=32;return n>0&&(c(),u=u.concat(r(s.concat(r(a))).slice(0,n))),u}function i(e,t,r,n,i){var o;for(u(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)s(e,16*o,i,16),a(i,n),u(i,0,e,t+16*o,16);for(o=0;o>>32-t}function a(e,t){u(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=o(t[0]+t[12],7),t[8]^=o(t[4]+t[0],9),t[12]^=o(t[8]+t[4],13),t[0]^=o(t[12]+t[8],18),t[9]^=o(t[5]+t[1],7),t[13]^=o(t[9]+t[5],9),t[1]^=o(t[13]+t[9],13),t[5]^=o(t[1]+t[13],18),t[14]^=o(t[10]+t[6],7),t[2]^=o(t[14]+t[10],9),t[6]^=o(t[2]+t[14],13),t[10]^=o(t[6]+t[2],18),t[3]^=o(t[15]+t[11],7),t[7]^=o(t[3]+t[15],9),t[11]^=o(t[7]+t[3],13),t[15]^=o(t[11]+t[7],18),t[1]^=o(t[0]+t[3],7),t[2]^=o(t[1]+t[0],9),t[3]^=o(t[2]+t[1],13),t[0]^=o(t[3]+t[2],18),t[6]^=o(t[5]+t[4],7),t[7]^=o(t[6]+t[5],9),t[4]^=o(t[7]+t[6],13),t[5]^=o(t[4]+t[7],18),t[11]^=o(t[10]+t[9],7),t[8]^=o(t[11]+t[10],9),t[9]^=o(t[8]+t[11],13),t[10]^=o(t[9]+t[8],18),t[12]^=o(t[15]+t[14],7),t[13]^=o(t[12]+t[15],9),t[14]^=o(t[13]+t[12],13),t[15]^=o(t[14]+t[13],18);for(var n=0;n<16;++n)e[n]+=t[n]}function s(e,t,r,n){for(var i=0;i=256)return!1}return!0}function l(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function f(e,r,o,a,f,d,h){if(o=l(o,"N"),a=l(a,"r"),f=l(f,"p"),d=l(d,"dkLen"),0===o||o&o-1)throw new Error("N must be power of 2");if(o>t/128/a)throw new Error("N too large");if(a>t/128/f)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var p=n(e,r,128*f*a),y=new Uint32Array(32*f*a),m=0;mB&&(r=B);for(var c=0;cB&&(r=B);for(var m=0;m>8&255),p.push(y[R]>>16&255),p.push(y[R]>>24&255);var M=n(e,p,d);return h&&h(null,1,M),M}h&&C(t)};if(!h)for(;;){var R=N();if(null!=R)return R}N()}var d={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(s,u){var c=0;a&&a(0),f(e,t,r,n,i,o,(function(e,t,r){if(e)u(e);else if(r)a&&1!==c&&a(1),s(new Uint8Array(r));else if(a&&t!==c)return c=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(f(e,t,r,n,i,o))}};e.exports=d}()},57902:(e,t,r)=>{"use strict";e.exports=r(36922)(r(38123))},38123:(e,t,r)=>{"use strict";var n=new(0,r(36597).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var a=new o(t),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var u=a.redSqr().redIMul(a);return s.redSqr().redISub(u.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===a(e)?1:0},publicKeyCreate:function(e,t){var r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=a(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n=0)return 2;var u=n.getPublic().add(i.g.mul(r));return u.isInfinity()?2:(s(e,u),0)},publicKeyTweakMul:function(e,t,r){var n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;var a=e.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var u=33,c=0;u>1&&0===s[c]&&!(128&s[c+1]);--u,++c);if(128&(s=s.subarray(c))[0])return 1;if(u>1&&0===s[0]&&!(128&s[1]))return 1;var l=a.subarray(39,72);l[0]=0,l.set(n,1);for(var f=33,d=0;f>1&&0===l[d]&&!(128&l[d+1]);--f,++d);return 128&(l=l.subarray(d))[0]||f>1&&0===l[0]&&!(128&l[1])?1:(e.outputlen=6+u+f,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+u]=2,a[5+u]=l.length,a.set(l,6+u),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var u=new o(a);u.cmp(i.n)>=0&&(u=new o(0));var c=new o(t.subarray(6+r));return c.cmp(i.n)>=0&&(c=new o(0)),e.set(u.toArrayLike(Uint8Array,"be",32),0),e.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,a,s){if(s){var u=s;s=function(e){var n=u(t,r,null,a,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var c,l=new o(r);if(l.cmp(i.n)>=0||l.isZero())return 1;try{c=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(e){return 1}return e.signature.set(c.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(c.s.toArrayLike(Uint8Array,"be",32),32),e.recid=c.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},u=new o(s.r),c=new o(s.s);if(u.cmp(i.n)>=0||c.cmp(i.n)>=0)return 1;if(1===c.cmp(n.nh)||u.isZero()||c.isZero())return 3;var l=a(r);if(null===l)return 2;var f=l.getPublic();return n.verify(t,s,f)?0:3},ecdsaRecover:function(e,t,r,a){var u,c={r:t.slice(0,32),s:t.slice(32,64)},l=new o(c.r),f=new o(c.s);if(l.cmp(i.n)>=0||f.cmp(i.n)>=0)return 1;if(l.isZero()||f.isZero())return 2;try{u=n.recoverPubKey(a,c,r)}catch(e){return 2}return s(e,u),0},ecdh:function(e,t,r,s,u,c,l){var f=a(t);if(null===f)return 1;var d=new o(r);if(d.cmp(i.n)>=0||d.isZero())return 2;var h=f.getPublic().mul(d);if(void 0===u)for(var p=h.encode(null,!0),y=n.hash().update(p).digest(),m=0;m<32;++m)e[m]=y[m];else{c||(c=new Uint8Array(32));for(var g=h.getX().toArray("be",32),b=0;b<32;++b)c[b]=g[b];l||(l=new Uint8Array(32));for(var v=h.getY().toArray("be",32),w=0;w<32;++w)l[w]=v[w];var A=u(c,l,s);if(!(A instanceof Uint8Array&&A.length===e.length))return 2;e.set(A)}return 0}}},36922:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),c("output",e,t),e}function d(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){if(u(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&c("seed",t,32),1===e.contextRandomize(t))throw new Error("Unknow error on context randomization")},privateKeyVerify:function(t){return c("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(c("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(r)}},privateKeyTweakAdd:function(t,r){switch(c("private key",t,32),c("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(n)}},privateKeyTweakMul:function(t,r){switch(c("private key",t,32),c("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(i)}},publicKeyVerify:function(t){return c("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(c("private key",t,32),l(r),n=f(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(a)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(c("public key",t,[33,65]),l(r),n=f(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(o);case 2:throw new Error(a)}},publicKeyNegate:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;switch(c("public key",t,[33,65]),l(n),i=f(i,n?33:65),e.publicKeyNegate(i,t)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error(r);case 3:throw new Error(a)}},publicKeyCombine:function(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;u(Array.isArray(r),"Expected public keys to be an Array"),u(r.length>0,"Expected public keys array will have more than zero items");var s,d=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(r);try{for(d.s();!(s=d.n()).done;)c("public key",s.value,[33,65])}catch(e){d.e(e)}finally{d.f()}switch(l(n),i=f(i,n?33:65),e.publicKeyCombine(i,r)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(a)}},publicKeyTweakAdd:function(t,r){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(c("public key",t,[33,65]),c("tweak",r,32),l(i),a=f(a,i?33:65),e.publicKeyTweakAdd(a,t,r)){case 0:return a;case 1:throw new Error(o);case 2:throw new Error(n)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(c("public key",t,[33,65]),c("tweak",r,32),l(n),a=f(a,n?33:65),e.publicKeyTweakMul(a,t,r)){case 0:return a;case 1:throw new Error(o);case 2:throw new Error(i)}},signatureNormalize:function(t){switch(c("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(s)}},signatureExport:function(t,n){c("signature",t,64);var i={output:n=f(n,72),outputlen:72};switch(e.signatureExport(i,t)){case 0:return n.slice(0,i.outputlen);case 1:throw new Error(s);case 2:throw new Error(r)}},signatureImport:function(t,n){switch(c("signature",t),n=f(n,64),e.signatureImport(n,t)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(r)}},ecdsaSign:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;c("message",t,32),c("private key",n,32),u("Object"===d(i),"Expected options to be an Object"),void 0!==i.data&&c("options.data",i.data),void 0!==i.noncefn&&u("Function"===d(i.noncefn),"Expected options.noncefn to be a Function");var a={signature:o=f(o,64),recid:null};switch(e.ecdsaSign(a,t,n,i.data,i.noncefn)){case 0:return a;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(r)}},ecdsaVerify:function(t,r,n){switch(c("signature",t,64),c("message",r,32),c("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(s);case 2:throw new Error(o)}},ecdsaRecover:function(t,n,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(c("signature",t,64),u("Number"===d(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),c("message",i,32),l(o),a=f(a,o?33:65),e.ecdsaRecover(a,t,n,i)){case 0:return a;case 1:throw new Error(s);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(r)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(c("public key",t,[33,65]),c("private key",r,32),u("Object"===d(n),"Expected options to be an Object"),void 0!==n.data&&c("options.data",n.data),void 0!==n.hashfn?(u("Function"===d(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&c("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&c("options.ybuf",n.ybuf,32),c("output",i)):i=f(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}}}},77990:(e,t,r)=>{"use strict";var n=r(57701),i=r(94919),o=r(1020)(),a=r(53820),s=n("%TypeError%"),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},76003:(e,t,r)=>{"use strict";var n=r(48850).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},51708:(e,t,r)=>{"use strict";var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(8210),n.sha1=r(10544),n.sha224=r(66288),n.sha256=r(34571),n.sha384=r(46959),n.sha512=r(14515)},8210:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=n)<<5|t>>>27)+l(h,i,o,s)+u+r[d]+a[h];u=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},10544:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),y=c(n)+f(p,i,o,s)+u+r[h]+a[p]|0;u=s,s=o,o=l(i),i=n,n=y}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},66288:(e,t,r)=>{"use strict";var n=r(41736),i=r(34571),o=r(76003),a=r(48850).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},34571:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,y=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+h(r[g-15])+r[g-16];for(var b=0;b<64;++b){var v=m+d(u)+c(u,p,y)+a[b]+r[b]|0,w=f(n)+l(n,i,o)|0;m=y,y=p,p=u,u=s+v|0,s=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=y+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},46959:(e,t,r)=>{"use strict";var n=r(41736),i=r(14515),o=r(76003),a=r(48850).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},14515:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,A=0|this._bl,k=0|this._cl,E=0|this._dl,S=0|this._el,x=0|this._fl,_=0|this._gl,P=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var I=t[T-30],O=t[T-30+1],B=h(I,O),C=p(O,I),N=y(I=t[T-4],O=t[T-4+1]),R=m(O,I),M=t[T-14],U=t[T-14+1],L=t[T-32],j=t[T-32+1],F=C+U|0,D=B+M+g(F,C)|0;D=(D=D+N+g(F=F+R|0,R)|0)+L+g(F=F+j|0,j)|0,t[T]=D,t[T+1]=F}for(var H=0;H<160;H+=2){D=t[H],F=t[H+1];var z=l(r,n,i),q=l(w,A,k),G=f(r,w),K=f(w,r),V=d(s,S),J=d(S,s),W=a[H],Q=a[H+1],Z=c(s,u,b),Y=c(S,x,_),X=P+J|0,$=v+V+g(X,P)|0;$=($=($=$+Z+g(X=X+Y|0,Y)|0)+W+g(X=X+Q|0,Q)|0)+D+g(X=X+F|0,F)|0;var ee=K+q|0,te=G+z+g(ee,K)|0;v=b,P=_,b=u,_=x,u=s,x=S,s=o+$+g(S=E+X|0,E)|0,o=i,E=k,i=n,k=A,n=r,A=w,r=$+te+g(w=X+ee|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+A|0,this._cl=this._cl+k|0,this._dl=this._dl+E|0,this._el=this._el+S|0,this._fl=this._fl+x|0,this._gl=this._gl+_|0,this._hl=this._hl+P|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,A)|0,this._ch=this._ch+i+g(this._cl,k)|0,this._dh=this._dh+o+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,S)|0,this._fh=this._fh+u+g(this._fl,x)|0,this._gh=this._gh+b+g(this._gl,_)|0,this._hh=this._hh+v+g(this._hl,P)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},57245:(e,t,r)=>{"use strict";e.exports=i;var n=r(38291).EventEmitter;function i(){n.call(this)}r(41736)(i,n),i.Readable=r(6297),i.Writable=r(71471),i.Duplex=r(76884),i.Transform=r(99154),i.PassThrough=r(53582),i.finished=r(5831),i.pipeline=r(60384),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",c),e.on("error",c),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},29519:(e,t,r)=>{"use strict";var n=r(38844),i=r(53319),o=r(87705),a=r(83675),s=r(51143),u=t;u.request=function(e,t){e="string"==typeof e?s.parse(e):o(e);var i=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return t&&f.on("response",t),f},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},23928:(e,t,r)=>{"use strict";var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),t.writableStream=a(r.g.WritableStream),t.abortController=a(r.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&a(i().overrideMimeType),n=null},38844:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(19142),o=r(23928),a=r(41736),s=r(53319),u=r(86505),c=s.IncomingMessage,l=s.readyStates,f=e.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+n.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};a(f,u.Writable),f.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===e._mode){var u=null;if(o.abortController){var c=new AbortController;u=c.signal,e._fetchAbortController=c,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var f=e._xhr=new r.g.XMLHttpRequest;try{f.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in f&&(f.responseType=e._mode),"withCredentials"in f&&(f.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(f.timeout=t.requestTimeout,f.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){f.setRequestHeader(e[0],e[1])})),e._response=null,f.onreadystatechange=function(){switch(f.readyState){case l.LOADING:case l.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(f.onprogress=function(){e._onXHRProgress()}),f.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{f.send(a)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},f.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},f.prototype._write=function(e,t,r){this._body.push(e),r()},f.prototype._resetTimers=function(e){var t=this;r.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(r.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=r.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},f.prototype.abort=f.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},f.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},f.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},53319:(e,t,r)=>{"use strict";var n=r(19142),i=r(29033).Buffer,o=r(23928),a=r(41736),s=r(86505),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(e,t,r,a){var u=this;if(s.Readable.call(u),u._mode=r,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){n.nextTick((function(){u.emit("close")}))})),"fetch"===r){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),o.writableStream){var c=new WritableStream({write:function(e){return a(!1),new Promise((function(t,r){u._destroyed?r():u.push(i.from(e))?t():u._resumeFetch=t}))},close:function(){a(!0),u._destroyed||u.push(null)},abort:function(e){a(!0),u._destroyed||u.emit("error",e)}});try{return void t.body.pipeTo(c).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var l=t.body.getReader();!function e(){l.read().then((function(t){u._destroyed||(a(t.done),t.done?u.push(null):(u.push(i.from(t.value)),e()))})).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var f=u.rawHeaders["mime-type"];if(f){var d=f.match(/;\s*charset=([^;])(;|$)/);d&&(u._charset=d[1].toLowerCase())}u._charset||(u._charset="utf-8")}};a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,o=null;switch(t._mode){case"text":if((o=n.responseText).length>t._pos){var a=o.substr(t._pos);if("x-user-defined"===t._charset){for(var s=i.alloc(a.length),c=0;ct._pos&&(t.push(i.from(new Uint8Array(l.result.slice(t._pos)))),t._pos=l.result.byteLength)},l.onload=function(){e(!0),t.push(null)},l.readAsArrayBuffer(o)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},22028:e=>{"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}},23462:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},36931:(e,t,r)=>{"use strict";var n=r(8619);e.exports=function(e){return"string"!=typeof e?e:n(e)?e.slice(2):e}},26427:(e,t,r)=>{"use strict";var n=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:n},o={download:n,safeDownloadArchived:n,directoryTree:n},a={platform:n,arch:n},s={join:n,slice:n},u={spawn:n},c={lookup:n},l=r(31357),f=r(40631),d=r(42733),h=r(52510),p=r(13094);e.exports=p({fs:i,files:o,os:a,path:s,child_process:u,defaultArchives:{},mimetype:c,request:l,downloadUrl:null,bytes:f,hash:d,pick:h})},52510:e=>{"use strict";var t=function(e){return function(){return new Promise((function(t,r){var n,i=function(r){var n={},i=r.target.files.length,o=0;[].map.call(r.target.files,(function(r){var a=new FileReader;a.onload=function(a){var s=new Uint8Array(a.target.result);if("directory"===e){var u=r.webkitRelativePath;n[u.slice(u.indexOf("/")+1)]={type:"text/plain",data:s},++o===i&&t(n)}else if("file"===e){var c=r.webkitRelativePath;t({type:mimetype.lookup(c),data:s})}else t(s)},a.readAsArrayBuffer(r)}))};"directory"===e?((n=document.createElement("input")).addEventListener("change",i),n.type="file",n.webkitdirectory=!0,n.mozdirectory=!0,n.msdirectory=!0,n.odirectory=!0,n.directory=!0):((n=document.createElement("input")).addEventListener("change",i),n.type="file");var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),n.dispatchEvent(o)}))}};e.exports={data:t("data"),file:t("file"),directory:t("directory")}},42733:(e,t,r)=>{"use strict";var n=r(49574).keccak256,i=r(40631),o=function(e,t){var r=i.reverse(i.pad(6,i.fromNumber(e))),o=i.flatten([r,"0x0000",t]);return n(o).slice(2)};e.exports=function e(t){"string"==typeof t&&"0x"!==t.slice(0,2)?t=i.fromString(t):"string"!=typeof t&&void 0!==t.length&&(t=i.fromUint8Array(t));var r=i.length(t);if(r<=4096)return o(r,t);for(var n=4096;128*n{"use strict";e.exports=function(e){var t=e.fs,r=e.files,n=e.os,i=e.path,o=e.child_process,a=e.mimetype,s=e.defaultArchives,u=e.request,c=e.downloadUrl,l=e.bytes,f=e.hash,d=e.pick,h=function(e){return function(t){for(var r={},n=0,i=e.length;n=400?n(new Error("Error ".concat(i.statusCode,"."))):r(new Uint8Array(t))}))}))}},m=function(e){return function(t){return function t(r){return function(n){return function(i){var o=function(e){return void 0===e.path?Promise.resolve():"application/bzz-manifest+json"===e.contentType?t(e.hash)(n+e.path)(i):Promise.resolve((r=n+e.path,function(e){return function(t){return t[r]=e,t}})(function(e){return{type:e.contentType,hash:e.hash}}(e))(i));var r};return y(e)(r).then((function(e){return JSON.parse(U(e)).entries})).then((function(e){return Promise.all(e.map(o))})).then((function(){return i}))}}}(t)("")({})}},g=function(e){return function(t){return m(e)(t).then((function(e){return h(Object.keys(e))(Object.keys(e).map((function(t){return e[t].hash})))}))}},b=function(e){return function(t){return m(e)(t).then((function(t){var r=Object.keys(t),n=r.map((function(e){return t[e].hash})),i=r.map((function(e){return t[e].type})),o=n.map(y(e));return Promise.all(o).then((function(e){return h(r)(function(e){return e.map((function(e,t){return{type:i[t],data:e}}))}(e))}))}))}},v=function(e){return function(t){return function(n){return r.download(p(e)(t))(n)}}},w=function(e){return function(t){return function(r){return g(e)(t).then((function(t){var n=[];for(var o in t)if(o.length>0){var a=i.join(r,o);n.push(v(e)(t[o])(a))}return Promise.all(n).then((function(){return r}))}))}}},A=function(e){return function(t){return new Promise((function(r,n){var i={body:"string"==typeof t?L(t):t,method:"POST"};u("".concat(e,"/bzz-raw:/"),i,(function(e,t){return e?n(e):r(t)}))}))}},k=function(e){return function(t){return function(r){return function(n){return function i(o){var a="/"===r[0]?r:"/"+r,s="".concat(e,"/bzz:/").concat(t).concat(a),c={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return new Promise((function(e,t){u(s,c,(function(r,n){return r?t(r):-1!==n.indexOf("error")?t(n):e(n)}))})).catch((function(e){return o>0&&i(o-1)}))}(3)}}}},E=function(e){return function(t){return x(e)({"":t})}},S=function(e){return function(r){return t.readFile(r).then((function(t){return E(e)({type:a.lookup(r),data:t})}))}},x=function(e){return function(t){return A(e)("{}").then((function(r){return Object.keys(t).reduce((function(r,n){return r.then(function(r){return function(n){return k(e)(n)(r)(t[r])}}(n))}),Promise.resolve(r))}))}},_=function(e){return function(r){return t.readFile(r).then(A(e))}},P=function(e){return function(n){return function(i){return r.directoryTree(i).then((function(e){return Promise.all(e.map((function(e){return t.readFile(e)}))).then((function(t){var r=e.map((function(e){return e.slice(i.length)})),n=e.map((function(e){return a.lookup(e)||"text/plain"}));return h(r)(t.map((function(e,t){return{type:n[t],data:e}})))}))})).then((function(e){return(t=n?{"":e[n]}:{},function(e){var r={};for(var n in t)r[n]=t[n];for(var i in e)r[i]=e[i];return r})(e);var t})).then(x(e))}}},T=function(e){return function(t){if("data"===t.pick)return d.data().then(A(e));if("file"===t.pick)return d.file().then(E(e));if("directory"===t.pick)return d.directory().then(x(e));if(t.path)switch(t.kind){case"data":return _(e)(t.path);case"file":return S(e)(t.path);case"directory":return P(e)(t.defaultFile)(t.path)}else{if(t.length||"string"==typeof t)return A(e)(t);if(t instanceof Object)return x(e)(t)}return Promise.reject(new Error("Bad arguments"))}},I=function(e){return function(t){return function(r){return R(e)(t).then((function(n){return n?r?w(e)(t)(r):b(e)(t):r?v(e)(t)(r):y(e)(t)}))}}},O=function(e,t){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(t||s)[i],a=c+o.archive+".tar.gz",u=o.archiveMD5,l=o.binaryMD5;return r.safeDownloadArchived(a)(u)(l)(e)},B=function(e){return new Promise((function(t,r){var n=o.spawn,i=function(e){return function(t){return-1!==(""+t).indexOf(e)}},a=e.account,s=e.password,u=e.dataDir,c=e.ensApi,l=e.privateKey,f=0,d=n(e.binPath,["--bzzaccount",a||l,"--datadir",u,"--ens-api",c]),h=function(e){0===f&&i("Passphrase")(e)?setTimeout((function(){f=1,d.stdin.write(s+"\n")}),500):i("Swarm http proxy started")(e)&&(f=2,clearTimeout(p),t(d))};d.stdout.on("data",h),d.stderr.on("data",h);var p=setTimeout((function(){return r(new Error("Couldn't start swarm process."))}),2e4)}))},C=function(e){return new Promise((function(t,r){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var n=setTimeout((function(){return e.kill("SIGKILL")}),8e3);e.once("close",(function(){clearTimeout(n),t()}))}))},N=function(e){return A(e)("test").then((function(e){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===e})).catch((function(){return!1}))},R=function(e){return function(t){return y(e)(t).then((function(e){try{return!!JSON.parse(U(e)).entries}catch(e){return!1}}))}},M=function(e){return function(t,r,n,i,o){var a;return void 0!==t&&(a=e(t)),void 0!==r&&(a=e(r)),void 0!==n&&(a=e(n)),void 0!==i&&(a=e(i)),void 0!==o&&(a=e(o)),a}},U=function(e){return l.toString(l.fromUint8Array(e))},L=function(e){return l.toUint8Array(l.fromString(e))},j=function(e){return{download:function(t,r){return I(e)(t)(r)},downloadData:M(y(e)),downloadDataToDisk:M(v(e)),downloadDirectory:M(b(e)),downloadDirectoryToDisk:M(w(e)),downloadEntries:M(m(e)),downloadRoutes:M(g(e)),isAvailable:function(){return N(e)},upload:function(t){return T(e)(t)},uploadData:M(A(e)),uploadFile:M(E(e)),uploadFileFromDisk:M(E(e)),uploadDataFromDisk:M(_(e)),uploadDirectory:M(x(e)),uploadDirectoryFromDisk:M(P(e)),uploadToManifest:M(k(e)),pick:d,hash:f,fromString:L,toString:U}};return{at:j,local:function(e){return function(t){return N("http://localhost:8500").then((function(r){return r?t(j("http://localhost:8500")).then((function(){})):O(e.binPath,e.archives).onData((function(t){return(e.onProgress||function(){})(t.length)})).then((function(){return B(e)})).then((function(e){return t(j("http://localhost:8500")).then((function(){return e}))})).then(C)}))}},download:I,downloadBinary:O,downloadData:y,downloadDataToDisk:v,downloadDirectory:b,downloadDirectoryToDisk:w,downloadEntries:m,downloadRoutes:g,isAvailable:N,startProcess:B,stopProcess:C,upload:T,uploadData:A,uploadDataFromDisk:_,uploadFile:E,uploadFileFromDisk:S,uploadDirectory:x,uploadDirectoryFromDisk:P,uploadToManifest:k,pick:d,hash:f,fromString:L,toString:U}}},16873:e=>{"use strict";var t=function(e,t){for(var r=[],n=0;n{"use strict";r(16873);var n=function(e,t){return parseInt(e.slice(2*t+2,2*t+4),16)},i=function(e){return(e.length-2)/2},o=function(e){for(var t=[],r=2,n=e.length;r>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},49574:e=>{"use strict";var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],i=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],o=function(e){var t,r,n,o,a,s,u,c,l,f,d,h,p,y,m,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(c<<1|l>>>31),r=a^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(f<<1|d>>>31),r=u^(d<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(h<<1|p>>>31),r=l^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(o<<1|a>>>31),r=d^(a<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,y=e[0],m=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=y^~g&v,e[1]=m^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&y,e[7]=k^~S&m,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~y&g,e[9]=S^~m&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=i[n],e[1]^=i[n+1]},a=function(e){return function(i){var a;if("0x"===i.slice(0,2)){a=[];for(var s=2,u=i.length;s>2]|=i[h]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(u[m>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=c){for(e.start=m-c,e.block=u[l],m=0;m>2]|=r[3&m],e.lastByteIndex===c)for(u[0]=u[l],m=1;m>4&15]+t[15&p]+t[p>>12&15]+t[p>>8&15]+t[p>>20&15]+t[p>>16&15]+t[p>>28&15]+t[p>>24&15];g%l==0&&(o(d),m=0)}return"0x"+y}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),a)}};e.exports={keccak256:a(256),keccak512:a(512),keccak256s:a(256),keccak512s:a(512)}},68419:e=>{"use strict";e.exports=function(e,t){if(t){t=(t=t.trim().replace(/^(\?|#|&)/,""))?"?"+t:t;var r=e.split(/[\?\#]/)[0];t&&/\:\/\/[^\/]*$/.test(r)&&(r+="/");var n=e.match(/(\#.*)$/);e=r+t,n&&(e+=n[0])}return e}},78677:(e,t,r)=>{"use strict";var n;e=r.nmd(e);var i=r(28847)(r(3355));!function(o){var a="object"==(0,i.default)(t)&&t&&!t.nodeType&&t,s="object"==(0,i.default)(e)&&e&&!e.nodeType&&e,u="object"==(void 0===r.g?"undefined":(0,i.default)(r.g))&&r.g;u.global!==u&&u.window!==u&&u.self!==u||(o=u);var c,l,f=2147483647,d=36,h=/^xn--/,p=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,b=String.fromCharCode;function v(e){throw RangeError(m[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function A(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(y,".")).split("."),t).join(".")}function k(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+b(e)})).join("")}function S(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,r){var n=0;for(e=r?g(e/700):e>>1,e+=g(e/t);e>455;n+=d)e=g(e/35);return g(n+36*e/(e+38))}function _(e){var t,r,n,i,o,a,s,u,c,l,h,p=[],y=e.length,m=0,b=128,w=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&v("not-basic"),p.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=y&&v("invalid-input"),((u=(h=e.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:d)>=d||u>g((f-m)/a))&&v("overflow"),m+=u*a,!(u<(c=s<=w?1:s>=w+26?26:s-w));s+=d)a>g(f/(l=d-c))&&v("overflow"),a*=l;w=x(m-o,t=p.length+1,0==o),g(m/t)>f-b&&v("overflow"),b+=g(m/t),m%=t,p.splice(m++,0,b)}return E(p)}function P(e){var t,r,n,i,o,a,s,u,c,l,h,p,y,m,w,A=[];for(p=(e=k(e)).length,t=128,r=0,o=72,a=0;a=t&&hg((f-r)/(y=n+1))&&v("overflow"),r+=(s-t)*y,t=s,a=0;af&&v("overflow"),h==t){for(u=r,c=d;!(u<(l=c<=o?1:c>=o+26?26:c-o));c+=d)w=u-l,m=d-l,A.push(b(S(l+w%m,0))),u=g(w/m);A.push(b(S(u,0))),o=x(r,y,n==i),r=0,++n}++r,++t}return A.join("")}if(c={version:"1.3.2",ucs2:{decode:k,encode:E},decode:_,encode:P,toASCII:function(e){return A(e,(function(e){return p.test(e)?"xn--"+P(e):e}))},toUnicode:function(e){return A(e,(function(e){return h.test(e)?_(e.slice(4).toLowerCase()):e}))}},"object"==(0,i.default)(r.amdO)&&r.amdO)void 0===(n=function(){return c}.call(t,r,t,e))||(e.exports=n);else if(a&&s)if(e.exports==a)s.exports=c;else for(l in c)c.hasOwnProperty(l)&&(a[l]=c[l]);else o.punycode=c}(void 0)},98983:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var c=0;c=0?(l=p.substr(0,y),f=p.substr(y+1)):(l=p,f=""),d=decodeURIComponent(l),h=decodeURIComponent(f),t(o,d)?Array.isArray(o[d])?o[d].push(h):o[d]=[o[d],h]:o[d]=h}return o}},84031:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=function(e){switch((0,n.default)(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,o){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===(0,n.default)(e)?Object.keys(e).map((function(n){var o=encodeURIComponent(i(n))+r;return Array.isArray(e[n])?e[n].map((function(e){return o+encodeURIComponent(i(e))})).join(t):o+encodeURIComponent(i(e[n]))})).join(t):o?encodeURIComponent(i(o))+r+encodeURIComponent(i(e)):""}},845:(e,t,r)=>{"use strict";t.decode=t.parse=r(98983),t.encode=t.stringify=r(84031)},51143:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(78677),o=r(95751);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=w,t.resolve=function(e,t){return w(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?w(e,!1,!0).resolveObject(t):t},t.format=function(e){return o.isString(e)&&(e=w(e)),e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var s=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(l),d=["%","/","?",";","#"].concat(f),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(845);function w(e,t,r){if(e&&o.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}a.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(0,n.default)(e));var a=e.indexOf("?"),u=-1!==a&&a127?R+="x":R+=N[M];if(!R.match(p)){var L=B.slice(0,T),j=B.slice(T+1),F=N.match(y);F&&(L.push(F[1]),j.unshift(F[2])),j.length&&(w="/"+j.join(".")+w),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=i.toASCII(this.hostname));var D=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+D,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!m[E])for(T=0,C=f.length;T0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=E.slice(-1)[0],_=(r.host||e.host||E.length>1)&&("."===x||".."===x)||""===x,P=0,T=E.length;T>=0;T--)"."===(x=E[T])?E.splice(T,1):".."===x?(E.splice(T,1),P++):P&&(E.splice(T,1),P--);if(!A&&!k)for(;P--;P)E.unshift("..");!A||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),_&&"/"!==E.join("/").substr(-1)&&E.push("");var I,O=""===E[0]||E[0]&&"/"===E[0].charAt(0);return S&&(r.hostname=r.host=O?"":E.length?E.shift():"",(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),(A=A||r.host&&E.length)&&!O&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=u.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},95751:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===(0,n.default)(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},88632:(e,t)=>{"use strict";!function(e){var t,r,n,i=String.fromCharCode;function o(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return i(e>>t&63|128)}function u(e){if(!(4294967168&e))return i(e);var t="";return 4294965248&e?4294901760&e?!(4292870144&e)&&(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)):(a(e),t=i(e>>12&15|224),t+=s(e,6)):t=i(e>>6&31|192),t+i(63&e|128)}function c(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,!(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|c())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|c()<<6|c())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|c()<<12|c()<<6|c())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i="";++n65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(s)}}(t)},96219:(e,t,r)=>{"use strict";function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},16248:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},17092:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(69446),o=r(14477),a=r(72337),s=r(28915);function u(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,f=u(Object.prototype.toString),d=u(Number.prototype.valueOf),h=u(String.prototype.valueOf),p=u(Boolean.prototype.valueOf);if(c)var y=u(BigInt.prototype.valueOf);if(l)var m=u(Symbol.prototype.valueOf);function g(e,t){if("object"!==(0,n.default)(e))return!1;try{return t(e),!0}catch(e){return!1}}function b(e){return"[object Map]"===f(e)}function v(e){return"[object Set]"===f(e)}function w(e){return"[object WeakMap]"===f(e)}function A(e){return"[object WeakSet]"===f(e)}function k(e){return"[object ArrayBuffer]"===f(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(k.working?k(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===f(e)}function x(e){return"undefined"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}t.isArgumentsObject=i,t.isGeneratorFunction=o,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"===(0,n.default)(e)&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||x(e)},t.isUint8Array=function(e){return"Uint8Array"===a(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===a(e)},t.isUint16Array=function(e){return"Uint16Array"===a(e)},t.isUint32Array=function(e){return"Uint32Array"===a(e)},t.isInt8Array=function(e){return"Int8Array"===a(e)},t.isInt16Array=function(e){return"Int16Array"===a(e)},t.isInt32Array=function(e){return"Int32Array"===a(e)},t.isFloat32Array=function(e){return"Float32Array"===a(e)},t.isFloat64Array=function(e){return"Float64Array"===a(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===a(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===a(e)},b.working="undefined"!=typeof Map&&b(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(b.working?b(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(w.working?w(e):e instanceof WeakMap)},A.working="undefined"!=typeof WeakSet&&A(new WeakSet),t.isWeakSet=function(e){return A(e)},k.working="undefined"!=typeof ArrayBuffer&&k(new ArrayBuffer),t.isArrayBuffer=E,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=x;var _="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function P(e){return"[object SharedArrayBuffer]"===f(e)}function T(e){return void 0!==_&&(void 0===P.working&&(P.working=P(new _)),P.working?P(e):e instanceof _)}function I(e){return g(e,d)}function O(e){return g(e,h)}function B(e){return g(e,p)}function C(e){return c&&g(e,y)}function N(e){return l&&g(e,m)}t.isSharedArrayBuffer=T,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===f(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===f(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===f(e)},t.isGeneratorObject=function(e){return"[object Generator]"===f(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===f(e)},t.isNumberObject=I,t.isStringObject=O,t.isBooleanObject=B,t.isBigIntObject=C,t.isSymbolObject=N,t.isBoxedPrimitive=function(e){return I(e)||O(e)||B(e)||C(e)||N(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||T(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},45058:(e,t,r)=>{"use strict";var n=r(19142),i=r(28847)(r(3355)),o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),A(n.showHidden)&&(n.showHidden=!1),A(n.depth)&&(n.depth=2),A(n.colors)&&(n.colors=!1),A(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),h(n,e,n.depth)}function f(e,t){var r=l.styles[t];return r?"["+l.colors[r][0]+"m"+e+"["+l.colors[r][1]+"m":e}function d(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&_(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return w(i)||(i=h(e,i,n)),i}var o=function(e,t){if(A(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return v(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):b(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),x(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(r);if(0===a.length){if(_(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(k(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return p(r)}var c,l="",f=!1,d=["{","}"];return m(r)&&(f=!0,d=["[","]"]),_(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),k(r)&&(l=" "+RegExp.prototype.toString.call(r)),S(r)&&(l=" "+Date.prototype.toUTCString.call(r)),x(r)&&(l=" "+p(r)),0!==a.length||f&&0!=r.length?n<0?k(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,d)):d[0]+l+d[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function y(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),O(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=b(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),A(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function b(e){return null===e}function v(e){return"number"==typeof e}function w(e){return"string"==typeof e}function A(e){return void 0===e}function k(e){return E(e)&&"[object RegExp]"===P(e)}function E(e){return"object"===(0,i.default)(e)&&null!==e}function S(e){return E(e)&&"[object Date]"===P(e)}function x(e){return E(e)&&("[object Error]"===P(e)||e instanceof Error)}function _(e){return"function"==typeof e}function P(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(u.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(17092),t.isArray=m,t.isBoolean=g,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=w,t.isSymbol=function(e){return"symbol"===(0,i.default)(e)},t.isUndefined=A,t.isRegExp=k,t.types.isRegExp=k,t.isObject=E,t.isDate=S,t.types.isDate=S,t.isError=x,t.types.isNativeError=x,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,i.default)(e)||void 0===e},t.isBuffer=r(16248);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[T((e=new Date).getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(41736),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var B="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(B&&e[B]){var t;if("function"!=typeof(t=e[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return u.default}});var n=d(r(55999)),i=d(r(28231)),o=d(r(78647)),a=d(r(65025)),s=d(r(55996)),u=d(r(8928)),c=d(r(76163)),l=d(r(22982)),f=d(r(91729));function d(e){return e&&e.__esModule?e:{default:e}}},86792:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,i,o,a){return n((s=n(n(t,e),n(i,a)))<<(u=o)|s>>>32-u,r);var s,u}function o(e,t,r,n,o,a,s){return i(t&r|~t&n,e,t,o,a,s)}function a(e,t,r,n,o,a,s){return i(t&n|r&~n,e,t,o,a,s)}function s(e,t,r,n,o,a,s){return i(t^r^n,e,t,o,a,s)}function u(e,t,r,n,o,a,s){return i(r^(t|~n),e,t,o,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var i=0;i>5]>>>i%32&255,a=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[i/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},55996:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default="00000000-0000-0000-0000-000000000000"},91729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(76163))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},77300:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},14402:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};var n=new Uint8Array(16)},42702:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=[];for(var a=0;a>>0;A=w,w=v,v=n(b,30)>>>0,b=g,g=S}i[0]=i[0]+g>>>0,i[1]=i[1]+b>>>0,i[2]=i[2]+v>>>0,i[3]=i[3]+w>>>0,i[4]=i[4]+A>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},22982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=s;for(var n,i=(n=r(76163))&&n.__esModule?n:{default:n},o=[],a=0;a<256;++a)o.push((a+256).toString(16).slice(1));function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]}t.default=function(e){var t=s(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0);if(!(0,i.default)(t))throw TypeError("Stringified UUID is invalid");return t}},55999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,o,a=(n=r(14402))&&n.__esModule?n:{default:n},s=r(22982),u=0,c=0;t.default=function(e,t,r){var n=t&&r||0,l=t||new Array(16),f=(e=e||{}).node||i,d=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==d){var h=e.random||(e.rng||a.default)();null==f&&(f=i=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=o=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:Date.now(),y=void 0!==e.nsecs?e.nsecs:c+1,m=p-u+(y-c)/1e4;if(m<0&&void 0===e.clockseq&&(d=d+1&16383),(m<0||p>u)&&void 0===e.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=p,c=y,o=d;var g=(1e4*(268435455&(p+=122192928e5))+y)%4294967296;l[n++]=g>>>24&255,l[n++]=g>>>16&255,l[n++]=g>>>8&255,l[n++]=255&g;var b=p/4294967296*1e4&268435455;l[n++]=b>>>8&255,l[n++]=255&b,l[n++]=b>>>24&15|16,l[n++]=b>>>16&255,l[n++]=d>>>8|128,l[n++]=255&d;for(var v=0;v<6;++v)l[n+v]=f[v];return t||(0,s.unsafeStringify)(l)}},28231:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(36125)),i=o(r(86792));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v3",48,i.default);t.default=a},36125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,a,s){var u;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(11788)),i=a(r(14402)),o=r(22982);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();var a=(e=e||{}).random||(e.rng||i.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=a[s];return t}return(0,o.unsafeStringify)(a)}},65025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(36125)),i=o(r(42702));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v5",80,i.default);t.default=a},76163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(77300))&&n.__esModule?n:{default:n};t.default=function(e){return"string"==typeof e&&i.default.test(e)}},8928:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(76163))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},38325:e=>{"use strict";e.exports=function e(n,i){var o,a=0,s=0,u=i=i||0,c=n.length;do{if(u>=c)throw e.bytes=0,new RangeError("Could not decode varint");o=n[u++],a+=s<28?(o&r)<=t);return e.bytes=u-i,a};var t=128,r=127},92699:e=>{"use strict";e.exports=function e(i,o,a){o=o||[];for(var s=a=a||0;i>=n;)o[a++]=255&i|t,i/=128;for(;i&r;)o[a++]=255&i|t,i>>>=7;return o[a]=0|i,e.bytes=a-s+1,o};var t=128,r=-128,n=Math.pow(2,31)},26657:(e,t,r)=>{"use strict";e.exports={encode:r(92699),decode:r(38325),encodingLength:r(57490)}},57490:e=>{"use strict";var t=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),a=Math.pow(2,42),s=Math.pow(2,49),u=Math.pow(2,56),c=Math.pow(2,63);e.exports=function(e){return e{"use strict";var n,i=r(28847)(r(3355));if("object"===("undefined"==typeof globalThis?"undefined":(0,i.default)(globalThis)))n=globalThis;else try{n=r(26464)}catch(e){}finally{if(n||"undefined"==typeof window||(n=window),!n)throw new Error("Could not determine global this")}var o=n.WebSocket||n.MozWebSocket,a=r(75735);function s(e,t){return t?new o(e,t):new o(e)}o&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return o[e]}})})),e.exports={w3cwebsocket:o?s:null,version:a}},75735:(e,t,r)=>{"use strict";e.exports=r(19794).version},72337:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(48184),o=r(43604),a=r(24373),s=r(80593),u=r(53820),c=s("Object.prototype.toString"),l=r(11191)(),f="undefined"==typeof globalThis?r.g:globalThis,d=o(),h=s("String.prototype.slice"),p=Object.getPrototypeOf,y=s("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?t:"Object"===t&&function(e){var t=!1;return i(m,(function(r,n){if(!t)try{r(e),t=h(n,1)}catch(e){}})),t}(e)}return u?function(e){var t=!1;return i(m,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=h(n,1))}catch(e){}})),t}(e):null}},31357:(e,t,r)=>{"use strict";var n=r(31296),i=r(68419),o=r(33103),a=r(39122),s=r(17321),u="application/json",c=function(){};e.exports=function(e,t,r){if(!e||"string"!=typeof e)throw new TypeError("must specify a URL");if("function"==typeof t&&(r=t,t={}),r&&"function"!=typeof r)throw new TypeError("expected cb to be undefined or a function");r=r||c;var l=(t=t||{}).json?"json":"text",f=(t=o({responseType:l},t)).headers||{},d=(t.method||"GET").toUpperCase(),h=t.query;return h&&("string"!=typeof h&&(h=n.stringify(h)),e=i(e,h)),"json"===t.responseType&&a(f,"Accept",u),t.json&&"GET"!==d&&"HEAD"!==d&&(a(f,"Content-Type",u),t.body=JSON.stringify(t.body)),t.method=d,t.url=e,t.headers=f,delete t.query,delete t.json,s(t,r)}},39122:e=>{"use strict";e.exports=function(e,t,r){var n=t.toLowerCase();e[t]||e[n]||(e[t]=r)}},49800:e=>{"use strict";e.exports=function(e,t){return t?{statusCode:t.statusCode,headers:t.headers,method:e.method,url:e.url,rawRequest:t.rawRequest?t.rawRequest:t}:null}},17321:(e,t,r)=>{"use strict";var n=r(30346),i=r(49800),o=function(){};e.exports=function(e,t){delete e.uri;var r=!1;"json"===e.responseType&&(e.responseType="text",r=!0);var a=n(e,(function(n,a,s){if(r&&!n)try{var u=a.rawRequest.responseText;s=JSON.parse(u)}catch(e){n=e}a=i(e,a),t(n,n?null:s,a),t=o})),s=a.onabort;return a.onabort=function(){var e=s.apply(a,Array.prototype.slice.call(arguments));return t(new Error("XHR Aborted")),t=o,e},a}},30346:(e,t,r)=>{"use strict";var n=r(92948),i=r(27277),o=r(48209),a=r(87705);function s(e,t,r){var n=e;return i(t)?(r=t,"string"==typeof e&&(n={uri:e})):n=a(t,{uri:e}),n.callback=r,n}function u(e,t,r){return c(t=s(e,t,r))}function c(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,r=function(r,n,i){t||(t=!0,e.callback(r,n,i))};function n(){var e=void 0;if(e=l.response?l.response:l.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(l),g)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(f),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,b)}function a(){if(!c){var t;clearTimeout(f),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=b,a=null;return 0!==t?(i={body:n(),statusCode:t,method:h,headers:{},url:d,rawRequest:l},l.getAllResponseHeaders&&(i.headers=o(l.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),r(a,i,i.body)}}var s,c,l=e.xhr||null;l||(l=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var f,d=l.url=e.uri||e.url,h=l.method=e.method||"GET",p=e.body||e.data,y=l.headers=e.headers||{},m=!!e.sync,g=!1,b={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:l};if("json"in e&&!1!==e.json&&(g=!0,y.accept||y.Accept||(y.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(y["content-type"]||y["Content-Type"]||(y["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(a,0)},l.onload=a,l.onerror=i,l.onprogress=function(){},l.onabort=function(){c=!0},l.ontimeout=i,l.open(h,d,!m,e.username,e.password),m||(l.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(f=setTimeout((function(){if(!c){c=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),l.setRequestHeader)for(s in y)y.hasOwnProperty(s)&&l.setRequestHeader(s,y[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(p||null),l}e.exports=u,e.exports.default=u,u.XMLHttpRequest=n.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var r=0;r{"use strict";e.exports=function(){for(var e={},r=0;r{"use strict";var n=r(28847)(r(3355)),i=r(26427),o=function e(t){this.givenProvider=e.givenProvider,t&&t._requestManager&&(t=t.currentProvider),"undefined"!=typeof document&&(this.pick=i.pick),this.setProvider(t)};o.givenProvider=null,"undefined"!=typeof ethereum&ðereum.bzz&&(o.givenProvider=ethereum.bzz),o.prototype.setProvider=function(e){if(e&&"object"===(0,n.default)(e)&&"string"==typeof e.bzz&&(e=e.bzz),"string"!=typeof e){this.currentProvider=null;var t=new Error("No provider set, please set one using bzz.setProvider().");return this.download=this.upload=this.isAvailable=function(){throw t},!1}return this.currentProvider=e,this.download=i.at(e).download,this.upload=i.at(e).upload,this.isAvailable=i.at(e).isAvailable,!0},e.exports=o},94246:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports={ErrorResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:JSON.stringify(e),r=e.error&&e.error.data?e.error.data:null,n=new Error("Returned error: "+t);return n.data=r,n},InvalidNumberOfParams:function(e,t,r){return new Error('Invalid number of parameters for "'+r+'". Got '+e+" expected "+t+"!")},InvalidConnection:function(e,t){return this.ConnectionError("CONNECTION ERROR: Couldn't connect to node "+e+".",t)},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:"Invalid JSON RPC response: "+JSON.stringify(e);return new Error(t)},ConnectionTimeout:function(e){return new Error("CONNECTION TIMEOUT: timeout of "+e+" ms achived")},ConnectionNotOpenError:function(e){return this.ConnectionError("connection not open on send()",e)},ConnectionCloseError:function(e){return"object"===(0,n.default)(e)&&e.code&&e.reason?this.ConnectionError("CONNECTION ERROR: The connection got closed with the close code `"+e.code+"` and the following reason string `"+e.reason+"`",e):new Error("CONNECTION ERROR: The connection closed unexpectedly")},MaxAttemptsReachedOnReconnectingError:function(){return new Error("Maximum number of reconnect attempts reached!")},PendingRequestsOnReconnectingError:function(){return new Error("CONNECTION ERROR: Provider started to reconnect before the response got received!")},ConnectionError:function(e,t){var r=new Error(e);return t&&(r.code=t.code,r.reason=t.reason,t.description&&(r.description=t.description)),r},RevertInstructionError:function(e,t){var r=new Error("Your request got reverted with the following reason string: "+e);return r.reason=e,r.signature=t,r},TransactionRevertInstructionError:function(e,t,r){var n=new Error("Transaction has been reverted by the EVM:\n"+JSON.stringify(r,null,2));return n.reason=e,n.signature=t,n.receipt=r,n},TransactionError:function(e,t){var r=new Error(e);return r.receipt=t,r},NoContractAddressFoundError:function(e){return this.TransactionError("The transaction receipt didn't contain a contract address.",e)},ContractCodeNotStoredError:function(e){return this.TransactionError("The contract code couldn't be stored, please check your gas limit.",e)},TransactionRevertedWithoutReasonError:function(e){return this.TransactionError("Transaction has been reverted by the EVM:\n"+JSON.stringify(e,null,2),e)},TransactionOutOfGasError:function(e){return this.TransactionError("Transaction ran out of gas. Please provide more gas:\n"+JSON.stringify(e,null,2),e)},ResolverMethodMissingError:function(e,t){return new Error("The resolver at "+e+'does not implement requested method: "'+t+'".')},ContractMissingABIError:function(){return new Error("You must provide the json interface of the contract when instantiating a contract object.")},ContractOnceRequiresCallbackError:function(){return new Error("Once requires a callback as the second parameter.")},ContractEventDoesNotExistError:function(e){return new Error('Event "'+e+"\" doesn't exist in this contract.")},ContractReservedEventError:function(e){return new Error('The event "'+e+"\" is a reserved event name, you can't use it.")},ContractMissingDeployDataError:function(){return new Error('No "data" specified in neither the given options, nor the default options.')},ContractNoAddressDefinedError:function(){return new Error("This contract object doesn't have address set yet, please set an address first.")},ContractNoFromAddressDefinedError:function(){return new Error('No "from" address specified in neither the given options, nor the default options.')}}},32084:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(90775)),o=n(r(3355));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t{"use strict";var n=r(94246),i=r(32084);e.exports={errors:n,formatters:i}},53349:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(74519)),a=n(r(90775)),s=n(r(94571)),u=n(r(3355));function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},g.prototype.getCall=function(e){return"function"==typeof this.call?this.call(e):this.call},g.prototype.extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},g.prototype.validateArgs=function(e){if(e.length!==this.params)throw f.InvalidNumberOfParams(e.length,this.params,this.name)},g.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map((function(r,n){return r?r.call(t,e[n]):e[n]})):e},g.prototype.formatOutput=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.outputFormatter&&e?t.outputFormatter(e,null==this?void 0:this.hexFormat):e})):this.outputFormatter&&e?this.outputFormatter(e,null==this?void 0:this.hexFormat):e},g.prototype.toPayload=function(e){var t=this.getCall(e),r=this.extractCallback(e),n=this.formatInput(e);this.validateArgs(n);var i={method:t,params:n,callback:r};return this.transformPayload&&(i=this.transformPayload(i)),i},g.prototype._confirmTransaction=function(e,t,r){var n=this,o=!1,a=!0,c=0,l=0,b=null,v=null,w=null,A=r.params[0]&&"object"===(0,u.default)(r.params[0])&&r.params[0].gas?r.params[0].gas:null,k=!!r.params[0]&&"object"===(0,u.default)(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,E=k&&r.params[0].data.length>2,S=[new g({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[d.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:d.outputBlockFormatter}),new g({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:d.outputTransactionReceiptFormatter}),new g({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[d.inputAddressFormatter,d.inputDefaultBlockNumberFormatter]}),new g({name:"getTransactionByHash",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:d.outputTransactionFormatter}),new y({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:d.outputBlockFormatter}}})],x={};S.forEach((function(e){e.attachToObject(x),e.requestManager=n.requestManager}));var _=function(u,y,g,S,_){if(!g)return _||(_={unsubscribe:function(){clearInterval(b),clearTimeout(v)}}),(u?p.resolve(u):x.getTransactionReceipt(t)).catch((function(t){_.unsubscribe(),o=!0,h._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)})).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var o,s,c;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r&&r.blockHash){t.next=2;break}throw new Error("Receipt missing or blockHash null");case 2:if(n.extraFormatters&&n.extraFormatters.receiptFormatter&&(r=n.extraFormatters.receiptFormatter(r)),!(e.eventEmitter.listeners("confirmation").length>0)){t.next=28;break}if(void 0!==u&&0===l){t.next=25;break}return t.next=7,x.getBlockByNumber("latest");case 7:if(s=t.sent,c=s?s.hash:null,!y){t.next=24;break}if(!w){t.next=17;break}return t.next=13,x.getBlockByNumber(w.number+1);case 13:(o=t.sent)&&(w=o,e.eventEmitter.emit("confirmation",l,r,c)),t.next=22;break;case 17:return t.next=19,x.getBlockByNumber(r.blockNumber);case 19:o=t.sent,w=o,e.eventEmitter.emit("confirmation",l,r,c);case 22:t.next=25;break;case 24:e.eventEmitter.emit("confirmation",l,r,c);case 25:(y&&o||!y)&&l++,a=!1,l===n.transactionConfirmationBlocks+1&&(_.unsubscribe(),e.eventEmitter.removeAllListeners());case 28:return t.abrupt("return",r);case 29:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!k||o){t.next=19;break}if(r.contractAddress){t.next=5;break}return a&&(_.unsubscribe(),o=!0),h._fireError(f.NoContractAddressFoundError(r),e.eventEmitter,e.reject,null,r),t.abrupt("return");case 5:return t.prev=5,t.next=8,x.getCode(r.contractAddress);case 8:s=t.sent,t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:if(s){t.next=15;break}return t.abrupt("return");case 15:!0===r.status&&E||s.length>2?(e.eventEmitter.emit("receipt",r),n.extraFormatters&&n.extraFormatters.contractDeployFormatter?e.resolve(n.extraFormatters.contractDeployFormatter(r)):e.resolve(r),a&&e.eventEmitter.removeAllListeners()):h._fireError(f.ContractCodeNotStoredError(r),e.eventEmitter,e.reject,null,r),a&&_.unsubscribe(),o=!0;case 19:return t.abrupt("return",r);case 20:case"end":return t.stop()}}),t,null,[[5,11]])})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(s){var u,c,l,p;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k||o){t.next=35;break}if(s.outOfGas||A&&A===s.gasUsed||!0!==s.status&&"0x1"!==s.status&&void 0!==s.status){t.next=7;break}e.eventEmitter.emit("receipt",s),e.resolve(s),a&&e.eventEmitter.removeAllListeners(),t.next=33;break;case 7:if(JSON.stringify(s,null,2),!1!==s.status&&"0x0"!==s.status){t.next=32;break}if(t.prev=9,u=null,!n.handleRevert||"eth_sendTransaction"!==n.call&&"eth_sendRawTransaction"!==n.call){t.next=24;break}return c=r.params[0],"eth_sendRawTransaction"===n.call&&(l=r.params[0],p=m.parse(l),c=d.inputTransactionFormatter({data:p.data,to:p.to,from:p.from,gas:p.gasLimit.toHexString(),gasPrice:p.gasPrice?p.gasPrice.toHexString():void 0,value:p.value.toHexString()})),t.next=16,n.getRevertReason(c,s.blockNumber);case 16:if(!(u=t.sent)){t.next=21;break}h._fireError(f.TransactionRevertInstructionError(u.reason,u.signature,s),e.eventEmitter,e.reject,null,s),t.next=22;break;case 21:throw!1;case 22:t.next=25;break;case 24:throw!1;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(9),h._fireError(f.TransactionRevertedWithoutReasonError(s),e.eventEmitter,e.reject,null,s);case 30:t.next=33;break;case 32:h._fireError(f.TransactionOutOfGasError(s),e.eventEmitter,e.reject,null,s);case 33:a&&_.unsubscribe(),o=!0;case 35:case"end":return t.stop()}}),t,null,[[9,27]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(){c++,y?c-1>=n.transactionPollingTimeout&&(_.unsubscribe(),o=!0,h._fireError(f.TransactionError("Transaction was not mined within "+n.transactionPollingTimeout+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject)):c-1>=n.transactionBlockTimeout&&(_.unsubscribe(),o=!0,h._fireError(f.TransactionError("Transaction was not mined within "+n.transactionBlockTimeout+" blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject))}));_.unsubscribe(),o=!0,h._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:g},e.eventEmitter,e.reject)},P=function(e){var t=!1,r=function(){b=setInterval(_.bind(null,e,!0),n.transactionPollingInterval)};if(!this.requestManager.provider.on)return r();x.subscribe("newBlockHeaders",(function(n,i,o){if(t=!0,n||!i)return r();_(e,!1,n,0,o)})),v=setTimeout((function(){t||r()}),1e3*this.blockHeaderTimeout)}.bind(this);x.getTransactionReceipt(t).then((function(t){t&&t.blockHash?(e.eventEmitter.listeners("confirmation").length>0&&P(t),_(t,!1)):o||P()})).catch((function(){o||P()}))};var b=function(e,t){return"number"==typeof e?t.wallet[e]:e&&"object"===(0,u.default)(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};g.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,r="eth_call"===e.call,n=function(){var n=Array.prototype.slice.call(arguments),i=p(!t),a=e.toPayload(n);e.hexFormat=!1,"eth_getTransactionReceipt"!==e.call&&"eth_getTransactionByHash"!==e.call&&"getBlock"!==e.name||(e.hexFormat=a.params.length{"use strict";var n=r(98008),i=function(e){var t,r,i=new Promise((function(){t=arguments[0],r=arguments[1]}));if(e)return{resolve:t,reject:r,eventEmitter:i};var o=new n;return i._events=o._events,i.emit=o.emit,i.on=o.on,i.once=o.once,i.off=o.off,i.listeners=o.listeners,i.addListener=o.addListener,i.removeListener=o.removeListener,i.removeAllListeners=o.removeAllListeners,{resolve:t,reject:r,eventEmitter:i}};i.resolve=function(e){var t=i(!0);return t.resolve(e),t.eventEmitter},e.exports=i},35229:(e,t,r)=>{"use strict";var n=r(48155),i=r(11314).errors,o=function(e){this.requestManager=e,this.requests=[]};o.prototype.add=function(e){this.requests.push(e)},o.prototype.execute=function(){var e=this.requests,t=this._sortResponses.bind(this);this.requestManager.sendBatch(e,(function(r,o){o=t(o),e.map((function(e,t){return o[t]||{}})).forEach((function(t,r){if(e[r].callback){if(t&&t.error)return e[r].callback(i.ErrorResponse(t));if(!n.isValidResponse(t))return e[r].callback(i.InvalidResponse(t));try{e[r].callback(null,e[r].format?e[r].format(t.result):t.result)}catch(t){e[r].callback(t)}}}))}))},o.prototype._sortResponses=function(e){return(e||[]).sort((function(e,t){return e.id-t.id}))},e.exports=o},99764:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=null,o="object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))?globalThis:void 0;if(!o)try{o=Function("return this")()}catch(e){o=self}void 0!==o.ethereum?i=o.ethereum:void 0!==o.web3&&o.web3.currentProvider&&(o.web3.currentProvider.sendAsync&&(o.web3.currentProvider.send=o.web3.currentProvider.sendAsync,delete o.web3.currentProvider.sendAsync),!o.web3.currentProvider.on&&o.web3.currentProvider.connection&&"ipcProviderWrapper"===o.web3.currentProvider.connection.constructor.name&&(o.web3.currentProvider.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");"data"===e?this.connection.on("data",(function(e){var r="";e=e.toString();try{r=JSON.parse(e)}catch(r){return t(new Error("Couldn't parse response data"+e))}r.id||-1===r.method.indexOf("_subscription")||t(null,r)})):this.connection.on(e,t)}),i=o.web3.currentProvider),e.exports=i},92033:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(45058).callbackify,o=r(11314).errors,a=r(48155),s=r(35229),u=r(99764),c=function e(t,r){this.provider=null,this.providers=e.providers,this.setProvider(t,r),this.subscriptions=new Map};c.givenProvider=u,c.providers={WebsocketProvider:r(77651),HttpProvider:r(14565),IpcProvider:r(52683)},c.prototype.setProvider=function(e,t){var r=this;if(e&&"string"==typeof e&&this.providers)if(/^http(s)?:\/\//i.test(e))e=new this.providers.HttpProvider(e);else if(/^ws(s)?:\/\//i.test(e))e=new this.providers.WebsocketProvider(e);else if(e&&"object"===(0,n.default)(t)&&"function"==typeof t.connect)e=new this.providers.IpcProvider(e,t);else if(e)throw new Error("Can't autodetect provider for \""+e+'"');this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=e||null,this.provider&&this.provider.on&&("function"==typeof e.request?this.provider.on("message",(function(e){if(e&&"eth_subscription"===e.type&&e.data){var t=e.data;t.subscription&&r.subscriptions.has(t.subscription)&&r.subscriptions.get(t.subscription).callback(null,t.result)}})):this.provider.on("data",(function(e,t){(e=e||t).method&&e.params&&e.params.subscription&&r.subscriptions.has(e.params.subscription)&&r.subscriptions.get(e.params.subscription).callback(null,e.params.result)})),this.provider.on("connect",(function(){r.subscriptions.forEach((function(e){e.subscription.resubscribe()}))})),this.provider.on("error",(function(e){r.subscriptions.forEach((function(t){t.callback(e)}))})),this.provider.on("disconnect",(function(e){r._isCleanCloseEvent(e)&&!r._isIpcCloseError(e)||(r.subscriptions.forEach((function(t){t.callback(o.ConnectionCloseError(e)),r.subscriptions.delete(t.subscription.id)})),r.provider&&r.provider.emit&&r.provider.emit("error",o.ConnectionCloseError(e))),r.provider&&r.provider.emit&&r.provider.emit("end",e)})))},c.prototype.send=function(e,t){if(t=t||function(){},!this.provider)return t(o.InvalidProvider());var r=e.method,n=e.params,s=a.toPayload(r,n),u=this._jsonrpcResultCallback(t,s);if(this.provider.request)i(this.provider.request.bind(this.provider))({method:r,params:n},t);else if(this.provider.sendAsync)this.provider.sendAsync(s,u);else{if(!this.provider.send)throw new Error("Provider does not have a request or send method to use.");this.provider.send(s,u)}},c.prototype.sendBatch=function(e,t){if(!this.provider)return t(o.InvalidProvider());var r=a.toBatchPayload(e);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,(function(e,r){return e?t(e):Array.isArray(r)?void t(null,r):t(o.InvalidResponse(r))}))},c.prototype.addSubscription=function(e,t){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions.set(e.id,{callback:t,subscription:e})},c.prototype.removeSubscription=function(e,t){if(this.subscriptions.has(e)){var r=this.subscriptions.get(e).subscription.options.type;return this.subscriptions.delete(e),void this.send({method:r+"_unsubscribe",params:[e]},t)}"function"==typeof t&&t(null)},c.prototype.clearSubscriptions=function(e){try{var t=this;return this.subscriptions.size>0&&this.subscriptions.forEach((function(r,n){e&&"syncing"===r.name||t.removeSubscription(n)})),this.provider.reset&&this.provider.reset(),!0}catch(e){throw new Error("Error while clearing subscriptions: ".concat(e))}},c.prototype._isCleanCloseEvent=function(e){return"object"===(0,n.default)(e)&&([1e3].includes(e.code)||!0===e.wasClean)},c.prototype._isIpcCloseError=function(e){return"boolean"==typeof e&&e},c.prototype._jsonrpcResultCallback=function(e,t){return function(r,n){return n&&n.id&&t.id!==n.id?e(new Error("Wrong response id ".concat(n.id," (expected: ").concat(t.id,") in ").concat(JSON.stringify(t)))):r?e(r):n&&n.error?e(o.ErrorResponse(n)):a.isValidResponse(n)?void e(null,n.result):e(o.InvalidResponse(n))}},e.exports={Manager:c,BatchManager:s}},48155:e=>{"use strict";var t={messageId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),toPayload:function(e,r){if(!e)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(r)+'"!');return t.messageId===Number.MAX_SAFE_INTEGER?t.messageId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER):t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:e,params:r||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!(!e||e.error||"2.0"!==e.jsonrpc||"number"!=typeof e.id&&"string"!=typeof e.id||void 0===e.result)}},toBatchPayload:function(e){return e.map((function(e){return t.toPayload(e.method,e.params)}))}};e.exports=t},34178:(e,t,r)=>{"use strict";var n=r(42929),i=function(e){this.name=e.name,this.type=e.type,this.subscriptions=e.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.attachToObject=function(e){var t=this.buildCall(),r=this.name.split(".");r.length>1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},i.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new n({subscription:e.subscriptions[arguments[0]]||{},requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},e.exports={subscriptions:i,subscription:n}},42929:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(11314).errors,o=r(98008),a=r(11314).formatters;function s(e){return e}function u(e){o.call(this),this.id=null,this.callback=s,this.arguments=null,this.lastBlock=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}u.prototype=Object.create(o.prototype),u.prototype.constructor=u,u.prototype._extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},u.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw i.InvalidNumberOfParams(e.length,t.params,t.subscriptionName)},u.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map((function(t,r){return t?t(e[r]):e[r]})):e},u.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},u.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e)||s,this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},u.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.lastBlock=null,this.removeAllListeners()},u.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),r=this._toPayload(t);if(!r)return this;if(!this.options.requestManager.provider)return setTimeout((function(){var t=new Error("No provider set.");e.callback(t,null,e),e.emit("error",t)}),0),this;if(!this.options.requestManager.provider.on)return setTimeout((function(){var t=new Error("The current provider doesn't support subscriptions: "+e.options.requestManager.provider.constructor.name);e.callback(t,null,e),e.emit("error",t)}),0),this;if(this.lastBlock&&this.options.params&&"object"===(0,n.default)(this.options.params)&&(r.params[1]=this.options.params,r.params[1].fromBlock=a.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&r.params[1]&&"object"===(0,n.default)(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)){var i=Object.assign({},r.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[i]},(function(t,r){t?setTimeout((function(){e.callback(t,null,e),e.emit("error",t)}),0):r.forEach((function(t){var r=e._formatOutput(t);e.callback(null,r,e),e.emit("data",r)}))}))}return"object"===(0,n.default)(r.params[1])&&delete r.params[1].fromBlock,this.options.requestManager.send(r,(function(t,i){!t&&i?(e.id=i,e.method=r.params[0],e.options.requestManager.addSubscription(e,(function(t,r){t?(e.callback(t,!1,e),e.emit("error",t)):(Array.isArray(r)||(r=[r]),r.forEach((function(t){var r=e._formatOutput(t);if(e.lastBlock=r&&"object"===(0,n.default)(r)?r.blockNumber:null,"function"==typeof e.options.subscription.subscriptionHandler)return e.options.subscription.subscriptionHandler.call(e,r);e.emit("data",r),e.callback(null,r,e)})))})),e.emit("connected",i)):setTimeout((function(){e.callback(t,!1,e),e.emit("error",t)}),0)})),this},u.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},e.exports=u},1949:(e,t,r)=>{"use strict";var n=r(11314).formatters,i=r(53349),o=r(48161);e.exports=function(e){var t=function(t){var r;return t.property?(e[t.property]||(e[t.property]={}),r=e[t.property]):r=e,t.methods&&t.methods.forEach((function(t){t instanceof i||(t=new i(t)),t.attachToObject(r),t.setRequestManager(e._requestManager)})),e};return t.formatters=n,t.utils=o,t.Method=i,t}},80606:(e,t,r)=>{"use strict";var n=r(92033),i=r(1949);e.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=t[0]._requestManager:e._requestManager=new n.Manager(t[0],t[1]),e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,r){return e._requestManager.setProvider(t,r),e._provider=e._requestManager.provider,!0}),e.setRequestManager=function(t){e._requestManager=t,e._provider=t.provider},e.BatchRequest=n.BatchManager.bind(null,e._requestManager),e.extend=i(e)},addProviders:function(e){e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers}}},79901:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(29033).Buffer,o=r(48161),a=r(62914).RQ,s=r(62914)._R,u=new a((function(e,t){return!e.match(/^u?int/)||Array.isArray(t)||t&&"object"===(0,n.default)(t)&&"BN"===t.constructor.name?t:t.toString()}));function c(){}var l=function(){};l.prototype.encodeFunctionSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e).slice(0,10)},l.prototype.encodeEventSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e)},l.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},l.prototype.encodeParameters=function(e,t){var r=this;return e=r.mapTypes(e),t=t.map((function(t,i){var o=e[i];return"object"===(0,n.default)(o)&&o.type&&(o=o.type),t=r.formatParam(o,t),"string"==typeof o&&o.includes("tuple")&&function e(t,n){if("array"===t.name){if(!t.type.match(/\[(\d+)\]/))return n.map((function(r){return e(u._getCoder(s.from(t.type.replace("[]",""))),r)}));var i=parseInt(t.type.match(/\[(\d+)\]/)[1]);if(n.length!==i)throw new Error("Array length does not matches with the given input");return n.map((function(r){return e(u._getCoder(s.from(t.type.replace(/\[\d+\]/,""))),r)}))}t.coders.forEach((function(t,i){"tuple"===t.name?e(t,n[i]):n[i]=r.formatParam(t.name,n[i])}))}(u._getCoder(s.from(o)),t),t})),u.encode(e,t)},l.prototype.mapTypes=function(e){var t=this,r=[];return e.forEach((function(e){if("object"===(0,n.default)(e)&&"function"===e.type&&(e=Object.assign({},e,{type:"bytes24"})),t.isSimplifiedStructFormat(e)){var i=Object.keys(e)[0];r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))}else r.push(e)})),r},l.prototype.isSimplifiedStructFormat=function(e){return"object"===(0,n.default)(e)&&void 0===e.components&&void 0===e.name},l.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},l.prototype.mapStructToCoderFormat=function(e){var t=this,r=[];return Object.keys(e).forEach((function(i){"object"!==(0,n.default)(e[i])?r.push({name:i,type:e[i]}):r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))})),r},l.prototype.formatParam=function(e,t){var r=this,n=new RegExp(/^bytes([0-9]*)$/),a=new RegExp(/^bytes([0-9]*)\[\]$/),s=new RegExp(/^(u?int)([0-9]*)$/),u=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(o.isBN(t)||o.isBigNumber(t))return t.toString(10);if(e.match(a)||e.match(u))return t.map((function(t){return r.formatParam(e.replace("[]",""),t)}));var c=e.match(s);if(c){var l=parseInt(c[2]||"256");l/80&&(!t||"0x"===t||"0X"===t))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var i=u.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,""),r),o=new c;return o.__length__=0,e.forEach((function(e,t){var r=i[o.__length__],a="object"===(0,n.default)(e)&&e.type&&"string"===e.type;r="0x"!==r||a||"string"==typeof e&&"string"===e?r:null,o[t]=r,("function"==typeof e||e&&"object"===(0,n.default)(e))&&e.name&&(o[e.name]=r),o.__length__++})),o},l.prototype.decodeLog=function(e,t,r){var n=this;r=Array.isArray(r)?r:[r],t=t||"";var i=[],o=[],a=0;e.forEach((function(e,t){e.indexed?(o[t]=["bool","int","uint","address","fixed","ufixed"].find((function(t){return-1!==e.type.indexOf(t)}))?n.decodeParameter(e.type,r[a]):r[a],a++):i[t]=e}));var s=t,u=s?this.decodeParametersWith(i,s,!0):[],l=new c;return l.__length__=0,e.forEach((function(e,t){l[t]="string"===e.type?"":null,void 0!==u[t]&&(l[t]=u[t]),void 0!==o[t]&&(l[t]=o[t]),e.name&&(l[e.name]=l[t]),l.__length__++})),l};var f=new l;e.exports=f},99819:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(93106)),a=i(r(3355)),s=i(r(90775)),u=i(r(74519));function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var l,d="Signer Error: ",h=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(c);try{for(h.s();!(l=h.n()).done;){var p=l.value;d+="".concat(d," ").concat(p,".")}}catch(e){h.e(e)}finally{h.f()}throw new Error(d)}var y="0x"+u.serialize().toString("hex"),m=b.keccak256(y),g={messageHash:"0x"+n.from(u.getMessageToSign(!0)).toString("hex"),v:"0x"+u.v.toString("hex"),r:"0x"+u.r.toString("hex"),s:"0x"+u.s.toString("hex"),rawTransaction:y,transactionHash:m};return r(null,g),g}catch(e){return r(e),Promise.reject(e)}}return e.type=function(e){var t,r=void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas;if(void 0!==e.type?t=b.toHex(e.type):void 0===e.type&&r&&(t="0x2"),void 0!==e.gasPrice&&("0x2"===t||r))throw Error("eip-1559 transactions don't support gasPrice");if(("0x1"===t||"0x0"===t)&&r)throw Error("pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas");return r||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===k.London||e.hardfork&&e.hardfork.toLowerCase()===k.London?t="0x2":(e.accessList||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===k.Berlin||e.hardfork&&e.hardfork.toLowerCase()===k.Berlin)&&(t="0x1"),t}(e),void 0!==e.nonce&&void 0!==e.chainId&&(void 0!==e.gasPrice||void 0!==e.maxFeePerGas&&void 0!==e.maxPriorityFeePerGas)&&s?Promise.resolve(c(e)):Promise.all([S(e.common)||S(e.common.customChain.chainId)?S(e.chainId)?i._ethereumCall.getChainId():e.chainId:void 0,S(e.nonce)?i._ethereumCall.getTransactionCount(i.privateKeyToAccount(t).address):e.nonce,S(s)?i._ethereumCall.getNetworkId():1,P(i,e)]).then((function(t){var r=(0,u.default)(t,4),n=r[0],i=r[1],o=r[2],a=r[3];if(S(n)&&S(e.common)&&S(e.common.customChain.chainId)||S(i)||S(o)||S(a))throw new Error('One of the values "chainId", "networkId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(t));return c(l(l(l({},e),S(e.common)||S(e.common.customChain.chainId)?{chainId:n}:{}),{},{nonce:i,networkId:o},a))}))},_.prototype.recoverTransaction=function(e){var t=n.from(e.slice(2),"hex"),r=w.fromSerializedData(t);return b.toChecksumAddress(r.getSenderAddress().toString("hex"))},_.prototype.hashMessage=function(e){var t=b.isHexStrict(e)?e:b.utf8ToHex(e),r=b.hexToBytes(t),i=n.from(r),o="Ethereum Signed Message:\n"+r.length,a=n.from(o),s=n.concat([a,i]);return E.bufferToHex(b.keccak256(s))},_.prototype.sign=function(e,t){if(t.startsWith("0x")||(t="0x"+t),66!==t.length)throw new Error("Private key must be 32 bytes long");var r=this.hashMessage(e),n=p.sign(r,t),i=p.decodeSignature(n);return{message:e,messageHash:r,v:i[0],r:i[1],s:i[2],signature:n}},_.prototype.recover=function(e,t,r){var n=[].slice.apply(arguments);return e&&"object"===(0,a.default)(e)?this.recover(e.messageHash,p.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),n.length>=4?(r="boolean"==typeof(r=n.slice(-1)[0])&&!!r,this.recover(e,p.encodeSignature(n.slice(1,4)),r)):p.recover(e,t))},_.prototype.decrypt=function(e,t,r){if("string"!=typeof t)throw new Error("No password given.");var i,s,u=e&&"object"===(0,a.default)(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==u.version)throw new Error("Not a valid V3 wallet");if("scrypt"===u.crypto.kdf)s=u.crypto.kdfparams,i=m.syncScrypt(n.from(t),n.from(s.salt,"hex"),s.n,s.r,s.p,s.dklen);else{if("pbkdf2"!==u.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(s=u.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");i=y.pbkdf2Sync(n.from(t),n.from(s.salt,"hex"),s.c,s.dklen,"sha256")}var c=n.from(u.crypto.ciphertext,"hex");if(b.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(c)))).replace("0x","")!==u.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var l=y.createDecipheriv(u.crypto.cipher,i.slice(0,16),n.from(u.crypto.cipherparams.iv,"hex")),f="0x"+n.from([].concat((0,o.default)(l.update(c)),(0,o.default)(l.final()))).toString("hex");return this.privateKeyToAccount(f,!0)},_.prototype.encrypt=function(e,t,r){var i,a=this.privateKeyToAccount(e,!0),s=(r=r||{}).salt||y.randomBytes(32),u=r.iv||y.randomBytes(16),c=r.kdf||"scrypt",l={dklen:r.dklen||32,salt:s.toString("hex")};if("pbkdf2"===c)l.c=r.c||262144,l.prf="hmac-sha256",i=y.pbkdf2Sync(n.from(t),n.from(l.salt,"hex"),l.c,l.dklen,"sha256");else{if("scrypt"!==c)throw new Error("Unsupported kdf");l.n=r.n||8192,l.r=r.r||8,l.p=r.p||1,i=m.syncScrypt(n.from(t),n.from(l.salt,"hex"),l.n,l.r,l.p,l.dklen)}var f=y.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),u);if(!f)throw new Error("Unsupported cipher");var d=n.from([].concat((0,o.default)(f.update(n.from(a.privateKey.replace("0x",""),"hex"))),(0,o.default)(f.final()))),h=b.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(d)))).replace("0x","");return{version:3,id:g.v4({random:r.uuid||y.randomBytes(16)}),address:a.address.toLowerCase().replace("0x",""),crypto:{ciphertext:d.toString("hex"),cipherparams:{iv:u.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:c,kdfparams:l,mac:h.toString("hex")}}},T.prototype._findSafeIndex=function(e){return e=e||0,this.hasOwnProperty(e)?this._findSafeIndex(e+1):e},T.prototype._currentIndexes=function(){return Object.keys(this).map((function(e){return parseInt(e)})).filter((function(e){return e<9e20}))},T.prototype.create=function(e,t){for(var r=0;r{"use strict";var n=r(28847),i=n(r(93106)),o=n(r(90775)),a=n(r(3355));function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e.inputs);try{var c=function(){var e=a.value;if(!e.indexed)return"continue";var t=r[e.name];if(!t)return o.push(null),"continue";Array.isArray(t)?o.push(t.map((function(t){return g.encodeParameter(e.type,t)}))):o.push(g.encodeParameter(e.type,t))};for(u.s();!(a=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}return o.length&&(n.topics=o),this.options.address&&(n.address=this.options.address.toLowerCase()),n},b.prototype._decodeEventABI=function(e){var t=this;e.data=e.data||"",e.topics=e.topics||[];var r=p.outputLogFormatter(e);if("ALLEVENTS"===t.name&&(t=t.jsonInterface.find((function(t){return t.signature===e.topics[0]}))||{anonymous:!0}),t.inputs=t.inputs||[],!t.anonymous){var n=0;t.inputs.forEach((function(e){return e.indexed?n++:null})),n>0&&e.topics.length!==n+1&&(t={anonymous:!0,inputs:[]})}var i=t.anonymous?e.topics:e.topics.slice(1);return r.returnValues=g.decodeLog(t.inputs,e.data,i),delete r.returnValues.__length__,r.event=t.name,r.signature=t.anonymous||!e.topics[0]?null:e.topics[0],r.raw={data:r.data,topics:r.topics},delete r.data,delete r.topics,r},b.prototype._encodeMethodABI=function(){var e=this._method.signature,t=this.arguments||[],r=!1,n=this._parent.options.jsonInterface.filter((function(t){return"constructor"===e&&t.type===e||(t.signature===e||t.signature===e.replace("0x","")||t.name===e)&&"function"===t.type})).map((function(e){var n=Array.isArray(e.inputs)?e.inputs.length:0;if(n!==t.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+n+" arguments.");return"function"===e.type&&(r=e.signature),Array.isArray(e.inputs)?e.inputs:[]})).map((function(e){return g.encodeParameters(e,t).replace("0x","")}))[0]||"";if("constructor"===e){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData.startsWith("0x")||(this._deployData="0x"+this._deployData),this._deployData+n}var i=r?r+n:n;if(!i)throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".');return i},b.prototype._decodeMethodReturn=function(e,t){if(!t)return null;t=t.length>=2?t.slice(2):t;var r=g.decodeParameters(e,t);return 1===r.__length__?r[0]:(delete r.__length__,r)},b.prototype.deploy=function(e,t){if((e=e||{}).arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data){if("function"==typeof t)return t(y.ContractMissingDeployDataError());throw y.ContractMissingDeployDataError()}var r=this.options.jsonInterface.find((function(e){return"constructor"===e.type}))||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:e.data,_ethAccounts:this.constructor._ethAccounts},e.arguments)},b.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),r="object"===(!!e[e.length-1]&&(0,a.default)(e[e.length-1]))?e.pop():{},n="string"==typeof e[0]?e[0]:"allevents",i="allevents"===n.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find((function(e){return"event"===e.type&&(e.name===n||e.signature==="0x"+n.replace("0x",""))}));if(!i)throw y.ContractEventDoesNotExistError(n);if(!d.isAddress(this.options.address))throw y.ContractNoAddressDefinedError();return{params:this._encodeEventABI(i,r),event:i,filter:r.filter||{},callback:t}},b.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},b.prototype.once=function(e,t,r){var n=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(n)))throw y.ContractOnceRequiresCallbackError();t&&delete t.fromBlock,this._on(e,t,(function(e,t,n){n.unsubscribe(),"function"==typeof r&&r(e,t,n)}))},b.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);e.params&&e.params.toBlock&&(delete e.params.toBlock,console.warn("Invalid option: toBlock. Use getPastEvents for specific range.")),this._checkListener("newListener",e.event.name),this._checkListener("removeListener",e.event.name);var t=new h({subscription:{params:1,inputFormatter:[p.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t};var v=function(e,t){if(e.event&&"ALLEVENTS"===e.event.name&&Array.isArray(t)){var r=e.filter||{},n=Object.keys(r);return n.length>0?t.filter((function(e){return"string"==typeof e||n.every((function(t){return Array.isArray(r[t])?r[t].some((function(r){return String(e.returnValues[t]).toUpperCase()===String(r).toUpperCase()})):String(e.returnValues[t]).toUpperCase()===String(r[t]).toUpperCase()}))})):t}return t};b.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new f({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[p.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var r=t.buildCall();return t=null,r(e.params,(function(t,r){"function"==typeof e.callback&&e.callback(t,v(e,r))})).then(v.bind(this,e))},b.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),t.createAccessList=this.parent._executeMethod.bind(t,"createAccessList"),e&&this.method.inputs&&e.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,e);throw y.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name)}return t.arguments=e||[],t._method=this.method,t._parent=this.parent,t._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(t._deployData=this.deployData),t},b.prototype._processExecuteArguments=function(e,t){var r={};if(r.type=e.shift(),r.callback=this._parent._getCallback(e),"call"!==r.type||!0===e[e.length-1]||"string"!=typeof e[e.length-1]&&!isFinite(e[e.length-1])||(r.defaultBlock=e.pop()),r.options="object"===(!!e[e.length-1]&&(0,a.default)(e[e.length-1]))?e.pop():{},r.generateRequest=!0===e[e.length-1]&&e.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!d.isAddress(this._parent.options.address))throw y.ContractNoAddressDefinedError();return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:d._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,r.callback)},b.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=m("send"!==t.type),n=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){var i={params:[p.inputCallFormatter.call(this._parent,t.options)],callback:t.callback};return"call"===t.type?(i.params.push(p.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),i.method="eth_call",i.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):i.method="eth_sendTransaction",i}switch(t.type){case"createAccessList":return d.isAddress(t.options.from)?new f({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[p.inputTransactionFormatter,p.inputDefaultBlockNumberFormatter],requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback):d._fireError(y.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);case"estimate":return new f({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[p.inputCallFormatter],outputFormatter:d.hexToNumber,requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback);case"call":return new f({name:"call",call:"eth_call",params:2,inputFormatter:[p.inputCallFormatter,p.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,handleRevert:e._parent.handleRevert,abiCoder:g}).createFunction()(t.options,t.defaultBlock,t.callback);case"send":if(!d.isAddress(t.options.from))return d._fireError(y.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);if("boolean"==typeof this._method.payable&&!this._method.payable&&t.options.value&&t.options.value>0)return d._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,t.callback);var o={receiptFormatter:function(t){if(Array.isArray(t.logs)){var r=t.logs.map((function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)}));t.events={};var n=0;r.forEach((function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[n]=e,n++)})),delete t.logs}return t},contractDeployFormatter:function(t){var r=e._parent.clone();return r.options.address=t.contractAddress,r}};return new f({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[p.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:e.constructor._ethAccounts||e._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,transactionBlockTimeout:e._parent.transactionBlockTimeout,transactionConfirmationBlocks:e._parent.transactionConfirmationBlocks,transactionPollingTimeout:e._parent.transactionPollingTimeout,transactionPollingInterval:e._parent.transactionPollingInterval,defaultCommon:e._parent.defaultCommon,defaultChain:e._parent.defaultChain,defaultHardfork:e._parent.defaultHardfork,handleRevert:e._parent.handleRevert,extraFormatters:o,abiCoder:g}).createFunction()(t.options,t.callback);default:throw new Error('Method "'+t.type+'" not implemented.')}},e.exports=b},46764:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571)),a=r(55160),s=r(11314).formatters,u=r(48161),c=r(11841),l=r(62867),f=r(22689);function d(e){this.eth=e;var t=null;this._detectedAddress=null,this._lastSyncCheck=null,Object.defineProperty(this,"registry",{get:function(){return new c(this)},enumerable:!0}),Object.defineProperty(this,"resolverMethodHandler",{get:function(){return new l(this.registry)},enumerable:!0}),Object.defineProperty(this,"registryAddress",{get:function(){return t},set:function(e){t=null!==e?s.inputAddressFormatter(e):e},enumerable:!0})}d.prototype.supportsInterface=function(e,t,r){return this.getResolver(e).then((function(e){return u.isHexStrict(t)||(t=u.sha3(t).slice(0,10)),e.methods.supportsInterface(t).call(r)})).catch((function(e){if("function"!=typeof r)throw e;r(e,null)}))},d.prototype.resolver=function(e,t){return this.registry.resolver(e,t)},d.prototype.getResolver=function(e,t){return this.registry.getResolver(e,t)},d.prototype.setResolver=function(e,t,r,n){return this.registry.setResolver(e,t,r,n)},d.prototype.setRecord=function(e,t,r,n,i,o){return this.registry.setRecord(e,t,r,n,i,o)},d.prototype.setSubnodeRecord=function(e,t,r,n,i,o,a){return this.registry.setSubnodeRecord(e,t,r,n,i,o,a)},d.prototype.setApprovalForAll=function(e,t,r,n){return this.registry.setApprovalForAll(e,t,r,n)},d.prototype.isApprovedForAll=function(e,t,r){return this.registry.isApprovedForAll(e,t,r)},d.prototype.recordExists=function(e,t){return this.registry.recordExists(e,t)},d.prototype.setSubnodeOwner=function(e,t,r,n,i){return this.registry.setSubnodeOwner(e,t,r,n,i)},d.prototype.getTTL=function(e,t){return this.registry.getTTL(e,t)},d.prototype.setTTL=function(e,t,r,n){return this.registry.setTTL(e,t,r,n)},d.prototype.getOwner=function(e,t){return this.registry.getOwner(e,t)},d.prototype.setOwner=function(e,t,r,n){return this.registry.setOwner(e,t,r,n)},d.prototype.getAddress=function(e,t){return this.resolverMethodHandler.method(e,"addr",[]).call(t)},d.prototype.setAddress=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setAddr",[t]).send(r,n)},d.prototype.getPubkey=function(e,t){return this.resolverMethodHandler.method(e,"pubkey",[],null,t).call(t)},d.prototype.setPubkey=function(e,t,r,n,i){return this.resolverMethodHandler.method(e,"setPubkey",[t,r]).send(n,i)},d.prototype.getContent=function(e,t){return this.resolverMethodHandler.method(e,"content",[]).call(t)},d.prototype.setContent=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setContent",[t]).send(r,n)},d.prototype.getContenthash=function(e,t){return this.resolverMethodHandler.method(e,"contenthash",[],f.decode).call(t)},d.prototype.setContenthash=function(e,t,r,n){var i;try{i=f.encode(t)}catch(e){var o=new Error("Could not encode "+t+". See docs for supported hash protocols.");if("function"==typeof n)return void n(o,null);throw o}return this.resolverMethodHandler.method(e,"setContenthash",[i]).send(r,n)},d.prototype.getMultihash=function(e,t){return this.resolverMethodHandler.method(e,"multihash",[]).call(t)},d.prototype.setMultihash=function(e,t,r,n){return this.resolverMethodHandler.method(e,"multihash",[t]).send(r,n)},d.prototype.checkNetwork=(0,o.default)(i.default.mark((function e(){var t,r,n,o,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=new Date/1e3,this._lastSyncCheck&&!(t-this._lastSyncCheck>3600)){e.next=9;break}return e.next=4,this.eth.getBlock("latest");case 4:if(r=e.sent,!((n=t-r.timestamp)>3600)){e.next=8;break}throw new Error("Network not synced; last block was "+n+" seconds ago");case 8:this._lastSyncCheck=t;case 9:if(!this.registryAddress){e.next=11;break}return e.abrupt("return",this.registryAddress);case 11:if(this._detectedAddress){e.next=20;break}return e.next=14,this.eth.net.getNetworkType();case 14:if(o=e.sent,void 0!==(s=a.addresses[o])){e.next=18;break}throw new Error("ENS is not supported on network "+o);case 18:return this._detectedAddress=s,e.abrupt("return",this._detectedAddress);case 20:return e.abrupt("return",this._detectedAddress);case 21:case"end":return e.stop()}}),e,this)}))),e.exports=d},55160:e=>{"use strict";e.exports={addresses:{main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",ropsten:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",rinkeby:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},interfaceIds:{addr:"0x3b3b57de",setAddr:"0x3b3b57de",pubkey:"0xc8690233",setPubkey:"0xc8690233",contenthash:"0xbc1c58d1",setContenthash:"0xbc1c58d1",content:"0xd8389dc5",setContent:"0xd8389dc5"}}},11841:(e,t,r)=>{"use strict";var n=r(58164),i=r(21006),o=r(90282),a=r(11314).formatters,s=r(48161),u=r(43205),c=r(48384);function l(e){var t=this;this.ens=e,this.contract=e.checkNetwork().then((function(e){var r=new n(u,e);return r.setProvider(t.ens.eth.currentProvider),r}))}l.prototype.owner=function(e,t){return console.warn('Deprecated: Please use the "getOwner" method instead of "owner".'),this.getOwner(e,t)},l.prototype.getOwner=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.owner(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},l.prototype.setOwner=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setOwner(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},l.prototype.getTTL=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.ttl(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},l.prototype.setTTL=function(e,t,r,n){var a=new o(!0);return this.contract.then((function(n){return n.methods.setTTL(i.hash(e),t).send(r)})).then((function(e){"function"!=typeof n?a.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?a.reject(e):n(e,null)})),a.eventEmitter},l.prototype.setSubnodeOwner=function(e,t,r,n,u){var c=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeOwner(i.hash(e),t,a.inputAddressFormatter(r)).send(n)})).then((function(e){"function"!=typeof u?c.resolve(e):u(e,e)})).catch((function(e){"function"!=typeof u?c.reject(e):u(e,null)})),c.eventEmitter},l.prototype.setRecord=function(e,t,r,n,s,u){var c=new o(!0);return this.contract.then((function(o){return o.methods.setRecord(i.hash(e),a.inputAddressFormatter(t),a.inputAddressFormatter(r),n).send(s)})).then((function(e){"function"!=typeof u?c.resolve(e):u(e,e)})).catch((function(e){"function"!=typeof u?c.reject(e):u(e,null)})),c.eventEmitter},l.prototype.setSubnodeRecord=function(e,t,r,n,u,c,l){var f=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeRecord(i.hash(e),t,a.inputAddressFormatter(r),a.inputAddressFormatter(n),u).send(c)})).then((function(e){"function"!=typeof l?f.resolve(e):l(e,e)})).catch((function(e){"function"!=typeof l?f.reject(e):l(e,null)})),f.eventEmitter},l.prototype.setApprovalForAll=function(e,t,r,n){var i=new o(!0);return this.contract.then((function(n){return n.methods.setApprovalForAll(a.inputAddressFormatter(e),t).send(r)})).then((function(e){"function"!=typeof n?i.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?i.reject(e):n(e,null)})),i.eventEmitter},l.prototype.isApprovedForAll=function(e,t,r){var n=new o(!0);return this.contract.then((function(r){return r.methods.isApprovedForAll(a.inputAddressFormatter(e),a.inputAddressFormatter(t)).call()})).then((function(e){"function"!=typeof r?n.resolve(e):r(e,e)})).catch((function(e){"function"!=typeof r?n.reject(e):r(e,null)})),n.eventEmitter},l.prototype.recordExists=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.recordExists(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},l.prototype.resolver=function(e,t){return console.warn('Deprecated: Please use the "getResolver" method instead of "resolver".'),this.getResolver(e,t)},l.prototype.getResolver=function(e,t){var r=this;return this.contract.then((function(t){return t.methods.resolver(i.hash(e)).call()})).then((function(e){var i=new n(c,e);if(i.setProvider(r.ens.eth.currentProvider),"function"!=typeof t)return i;t(i,i)})).catch((function(e){if("function"!=typeof t)throw e;t(e,null)}))},l.prototype.setResolver=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setResolver(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},e.exports=l},30715:(e,t,r)=>{"use strict";var n=r(46764);e.exports=n},62867:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571)),a=r(90282),s=r(21006),u=r(11314).errors,c=r(55160).interfaceIds;function l(e){this.registry=e}l.prototype.method=function(e,t,r,n,i){return{call:this.call.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this,outputFormatter:n}),send:this.send.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this})}},l.prototype.call=function(e){var t=this,r=new a,n=this.parent.prepareArguments(this.ensName,this.methodArguments),s=this.outputFormatter||null;return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,t.parent.checkInterfaceSupport(a,t.methodName);case 2:t.parent.handleCall(r,a.methods[t.methodName],n,s,e);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(t){"function"!=typeof e?r.reject(t):e(t,null)})),r.eventEmitter},l.prototype.send=function(e,t){var r=this,n=new a,s=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.parent.checkInterfaceSupport(a,r.methodName);case 2:r.parent.handleSend(n,a.methods[r.methodName],s,e,t);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(e){"function"!=typeof t?n.reject(e):t(e,null)})),n.eventEmitter},l.prototype.handleCall=function(e,t,r,n,i){return t.apply(this,r).call().then((function(t){n&&(t=n(t)),"function"!=typeof i?e.resolve(t):i(t,t)})).catch((function(t){"function"!=typeof i?e.reject(t):i(t,null)})),e},l.prototype.handleSend=function(e,t,r,n,i){return t.apply(this,r).send(n).on("sending",(function(){e.eventEmitter.emit("sending")})).on("sent",(function(){e.eventEmitter.emit("sent")})).on("transactionHash",(function(t){e.eventEmitter.emit("transactionHash",t)})).on("confirmation",(function(t,r){e.eventEmitter.emit("confirmation",t,r)})).on("receipt",(function(t){e.eventEmitter.emit("receipt",t),e.resolve(t),"function"==typeof i&&i(t,t)})).on("error",(function(t){e.eventEmitter.emit("error",t),"function"!=typeof i?e.reject(t):i(t,null)})),e},l.prototype.prepareArguments=function(e,t){var r=s.hash(e);return t.length>0?(t.unshift(r),t):[r]},l.prototype.checkInterfaceSupport=function(){var e=(0,o.default)(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c[r]){e.next=2;break}return e.abrupt("return");case 2:return n=!1,e.prev=3,e.next=6,t.methods.supportsInterface(c[r]).call();case 6:n=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.warn('Could not verify interface of resolver contract at "'+t.options.address+'". ');case 12:if(n){e.next=14;break}throw u.ResolverMethodMissingError(t.options.address,r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,r){return e.apply(this,arguments)}}(),e.exports=l},22689:(e,t,r)=>{"use strict";var n=r(94308);e.exports={decode:function(e){var t=null,r=null,i=null;if(e&&e.error)return{protocolType:null,decoded:e.error};if(e)try{t=n.decode(e);var o=n.getCodec(e);"ipfs-ns"===o?r="ipfs":"swarm-ns"===o?r="bzz":"onion"===o?r="onion":"onion3"===o?r="onion3":t=e}catch(e){i=e.message}return{protocolType:r,decoded:t,error:i}},encode:function(e){var t,r,i=!1;if(e){var o=e.match(/^(ipfs|bzz|onion|onion3):\/\/(.*)/)||e.match(/\/(ipfs)\/(.*)/);o&&(r=o[1],t=o[2]);try{if("ipfs"===r)t.length>=4&&(i="0x"+n.fromIpfs(t));else if("bzz"===r)t.length>=4&&(i="0x"+n.fromSwarm(t));else if("onion"===r)16===t.length&&(i="0x"+n.encode("onion",t));else{if("onion3"!==r)throw new Error("Could not encode content hash: unsupported content type");56===t.length&&(i="0x"+n.encode("onion3",t))}}catch(e){throw e}}return i}}},43205:e=>{"use strict";e.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},48384:e=>{"use strict";e.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"contenthash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},30006:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=r(48161),s=r(31734),u=function(e){var t="A".charCodeAt(0),r="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).slice(4)+e.slice(0,4)).split("").map((function(e){var n=e.charCodeAt(0);return n>=t&&n<=r?n-t+10:e})).join("")},c=function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97},l=function(){function e(t){(0,i.default)(this,e),this._iban=t}return(0,o.default)(e,[{key:"isValid",value:function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===c(u(this._iban))}},{key:"isDirect",value:function(){return 34===this._iban.length||35===this._iban.length}},{key:"isIndirect",value:function(){return 20===this._iban.length}},{key:"checksum",value:function(){return this._iban.slice(2,4)}},{key:"institution",value:function(){return this.isIndirect()?this._iban.slice(7,11):""}},{key:"client",value:function(){return this.isIndirect()?this._iban.slice(11):""}},{key:"toAddress",value:function(){if(this.isDirect()){var e=this._iban.slice(4),t=new s(e,36);return a.toChecksumAddress(t.toString(16,20))}return""}},{key:"toString",value:function(){return this._iban}}],[{key:"toAddress",value:function(t){if(!(t=new e(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()}},{key:"toIban",value:function(t){return e.fromAddress(t).toString()}},{key:"fromAddress",value:function(t){if(!a.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var r=function(e){for(var t=e;t.length<30;)t="0"+t;return t}(new s(t,16).toString(36));return e.fromBban(r.toUpperCase())}},{key:"fromBban",value:function(t){return new e("XE"+("0"+(98-c(u("XE00"+t)))).slice(-2)+t)}},{key:"createIndirect",value:function(t){return e.fromBban("ETH"+t.institution+t.identifier)}},{key:"isValid",value:function(t){return new e(t).isValid()}}]),e}();e.exports=l},96306:(e,t,r)=>{"use strict";var n=r(80606),i=r(53349),o=r(48161),a=r(473),s=r(11314).formatters,u=function(){var e=this;n.packageInit(this,arguments),this.net=new a(this);var t=null,r="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return t},set:function(e){return e&&(t=o.toChecksumAddress(s.inputAddressFormatter(e))),u.forEach((function(e){e.defaultAccount=t})),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return r},set:function(e){return r=e,u.forEach((function(e){e.defaultBlock=r})),e},enumerable:!0});var u=[new i({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:o.toChecksumAddress}),new i({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:o.toChecksumAddress}),new i({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[s.inputAddressFormatter,null,null]}),new i({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[s.inputAddressFormatter]}),new i({name:"importRawKey",call:"personal_importRawKey",params:2}),new i({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"sign",call:"personal_sign",params:3,inputFormatter:[s.inputSignFormatter,s.inputAddressFormatter,null]}),new i({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[s.inputSignFormatter,null]})];u.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount}))};n.addProviders(u),e.exports=u},28130:e=>{"use strict";e.exports=function(e){var t,r=this;return this.net.getId().then((function(e){return t=e,r.getBlock(0)})).then((function(r){var n="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===t&&(n="main"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===t&&(n="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===t&&(n="rinkeby"),"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a"===r.hash&&5===t&&(n="goerli"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===t&&(n="kovan"),"function"==typeof e&&e(null,n),n})).catch((function(t){if("function"!=typeof e)throw t;e(t)}))}},66748:(e,t,r)=>{"use strict";var n=r(80606),i=r(11314),o=r(34178).subscriptions,a=r(53349),s=r(48161),u=r(473),c=r(30715),l=r(96306),f=r(58164),d=r(30006),h=r(99819),p=r(79901),y=r(28130),m=i.formatters,g=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},b=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},v=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},w=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},A=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},k=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),e.personal.setRequestManager(r),e.accounts.setRequestManager(r),e.Contract._requestManager=e._requestManager,e.Contract.currentProvider=e._provider,!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager),e.ens._detectedAddress=null,e.ens._lastSyncCheck=null};var i,k,E,S=!1,x=null,_="latest",P=50,T=24,I=750,O=1e3,B=10,C=100;Object.defineProperty(this,"handleRevert",{get:function(){return S},set:function(t){S=t,e.Contract.handleRevert=S,M.forEach((function(e){e.handleRevert=S}))},enumerable:!0}),Object.defineProperty(this,"defaultCommon",{get:function(){return E},set:function(t){E=t,e.Contract.defaultCommon=E,M.forEach((function(e){e.defaultCommon=E}))},enumerable:!0}),Object.defineProperty(this,"defaultHardfork",{get:function(){return k},set:function(t){k=t,e.Contract.defaultHardfork=k,M.forEach((function(e){e.defaultHardfork=k}))},enumerable:!0}),Object.defineProperty(this,"defaultChain",{get:function(){return i},set:function(t){i=t,e.Contract.defaultChain=i,M.forEach((function(e){e.defaultChain=i}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingTimeout",{get:function(){return I},set:function(t){I=t,e.Contract.transactionPollingTimeout=I,M.forEach((function(e){e.transactionPollingTimeout=I}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingInterval",{get:function(){return O},set:function(t){O=t,e.Contract.transactionPollingInterval=O,M.forEach((function(e){e.transactionPollingInterval=O}))},enumerable:!0}),Object.defineProperty(this,"transactionConfirmationBlocks",{get:function(){return T},set:function(t){T=t,e.Contract.transactionConfirmationBlocks=T,M.forEach((function(e){e.transactionConfirmationBlocks=T}))},enumerable:!0}),Object.defineProperty(this,"transactionBlockTimeout",{get:function(){return P},set:function(t){P=t,e.Contract.transactionBlockTimeout=P,M.forEach((function(e){e.transactionBlockTimeout=P}))},enumerable:!0}),Object.defineProperty(this,"blockHeaderTimeout",{get:function(){return B},set:function(t){B=t,e.Contract.blockHeaderTimeout=B,M.forEach((function(e){e.blockHeaderTimeout=B}))},enumerable:!0}),Object.defineProperty(this,"defaultAccount",{get:function(){return x},set:function(t){return t&&(x=s.toChecksumAddress(m.inputAddressFormatter(t))),e.Contract.defaultAccount=x,e.personal.defaultAccount=x,M.forEach((function(e){e.defaultAccount=x})),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return _},set:function(t){return _=t,e.Contract.defaultBlock=_,e.personal.defaultBlock=_,M.forEach((function(e){e.defaultBlock=_})),t},enumerable:!0}),Object.defineProperty(this,"maxListenersWarningThreshold",{get:function(){return C},set:function(t){e.currentProvider&&e.currentProvider.setMaxListeners&&(C=t,e.currentProvider.setMaxListeners(t))},enumerable:!0}),this.clearSubscriptions=e._requestManager.clearSubscriptions.bind(e._requestManager),this.removeSubscriptionById=e._requestManager.removeSubscription.bind(e._requestManager),this.net=new u(this),this.net.getNetworkType=y.bind(this),this.accounts=new h(this),this.personal=new l(this),this.personal.defaultAccount=this.defaultAccount,this.maxListenersWarningThreshold=C;var N=this,R=function(){f.apply(this,arguments);var e=this,t=N.setProvider;N.setProvider=function(){t.apply(N,arguments),n.packageInit(e,[N])}};R.setProvider=function(){f.setProvider.apply(this,arguments)},(R.prototype=Object.create(f.prototype)).constructor=R,this.Contract=R,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.transactionBlockTimeout=this.transactionBlockTimeout,this.Contract.transactionConfirmationBlocks=this.transactionConfirmationBlocks,this.Contract.transactionPollingTimeout=this.transactionPollingTimeout,this.Contract.transactionPollingInterval=this.transactionPollingInterval,this.Contract.blockHeaderTimeout=this.blockHeaderTimeout,this.Contract.handleRevert=this.handleRevert,this.Contract._requestManager=this._requestManager,this.Contract._ethAccounts=this.accounts,this.Contract.currentProvider=this._requestManager.provider,this.Iban=d,this.abi=p,this.ens=new c(this);var M=[new a({name:"getNodeInfo",call:"web3_clientVersion"}),new a({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new a({name:"getCoinbase",call:"eth_coinbase",params:0}),new a({name:"isMining",call:"eth_mining",params:0}),new a({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:s.hexToNumber}),new a({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:m.outputSyncingFormatter}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:m.outputBigNumberFormatter}),new a({name:"getFeeHistory",call:"eth_feeHistory",params:3,inputFormatter:[s.numberToHex,m.inputBlockNumberFormatter,null]}),new a({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:s.hexToNumber}),new a({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputBigNumberFormatter}),new a({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[m.inputAddressFormatter,s.numberToHex,m.inputDefaultBlockNumberFormatter]}),new a({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter]}),new a({name:"getBlock",call:g,params:2,inputFormatter:[m.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:m.outputBlockFormatter}),new a({name:"getUncle",call:v,params:2,inputFormatter:[m.inputBlockNumberFormatter,s.numberToHex],outputFormatter:m.outputBlockFormatter}),new a({name:"getBlockTransactionCount",call:w,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getBlockUncleCount",call:A,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionFormatter}),new a({name:"getTransactionFromBlock",call:b,params:2,inputFormatter:[m.inputBlockNumberFormatter,s.numberToHex],outputFormatter:m.outputTransactionFormatter}),new a({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionReceiptFormatter}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null],abiCoder:p}),new a({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new a({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[m.inputTransactionFormatter],abiCoder:p}),new a({name:"sign",call:"eth_sign",params:2,inputFormatter:[m.inputSignFormatter,m.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}}),new a({name:"call",call:"eth_call",params:2,inputFormatter:[m.inputCallFormatter,m.inputDefaultBlockNumberFormatter],abiCoder:p}),new a({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[m.inputCallFormatter],outputFormatter:s.hexToNumber}),new a({name:"submitWork",call:"eth_submitWork",params:3}),new a({name:"getWork",call:"eth_getWork",params:0}),new a({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter}),new a({name:"getChainId",call:"eth_chainId",params:0,outputFormatter:s.hexToNumber}),new a({name:"requestAccounts",call:"eth_requestAccounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getProof",call:"eth_getProof",params:3,inputFormatter:[m.inputAddressFormatter,m.inputStorageKeysFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputProofFormatter}),new a({name:"getPendingTransactions",call:"eth_pendingTransactions",params:0,outputFormatter:m.outputTransactionFormatter}),new a({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[m.inputTransactionFormatter,m.inputDefaultBlockNumberFormatter]}),new o({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:m.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter,subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},syncing:{params:0,outputFormatter:m.outputSyncingFormatter,subscriptionHandler:function(e){var t=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",t._isSyncing),"function"==typeof this.callback&&this.callback(null,t._isSyncing,this),setTimeout((function(){t.emit("data",e),"function"==typeof t.callback&&t.callback(null,e,t)}),0)):(this.emit("data",e),"function"==typeof t.callback&&this.callback(null,e,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout((function(){e.currentBlock>e.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),"function"==typeof t.callback&&t.callback(null,t._isSyncing,t))}),500))}}}})];M.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount,t.transactionBlockTimeout=e.transactionBlockTimeout,t.transactionConfirmationBlocks=e.transactionConfirmationBlocks,t.transactionPollingTimeout=e.transactionPollingTimeout,t.transactionPollingInterval=e.transactionPollingInterval,t.handleRevert=e.handleRevert}))};n.addProviders(k),e.exports=k},473:(e,t,r)=>{"use strict";var n=r(80606),i=r(53349),o=r(48161),a=function(){var e=this;n.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:parseInt}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};n.addProviders(a),e.exports=a},14565:(e,t,r)=>{"use strict";var n=r(11314).errors,i=r(33768),o=r(29519),a=r(90912);r(54258).polyfill(),void 0===r.g||r.g.AbortController||r(53368);var s=function(e,t){t=t||{},this.withCredentials=t.withCredentials,this.timeout=t.timeout||0,this.headers=t.headers,this.agent=t.agent,this.forceGlobalFetch=t.forceGlobalFetch||!1,this.connected=!1;var r=!1!==t.keepAlive;this.host=e||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new a.Agent({keepAlive:r}):this.httpAgent=new o.Agent({keepAlive:r}))};s.prototype.send=function(e,t){var r,o={method:"POST",body:JSON.stringify(e)},a={},s=this.forceGlobalFetch?globalThis.fetch:i;if("undefined"!=typeof AbortController?r=new AbortController:"undefined"!=typeof window&&void 0!==window.AbortController&&(r=new window.AbortController),void 0!==r&&(o.signal=r.signal),"undefined"==typeof XMLHttpRequest){var u={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent};this.agent&&(u.httpsAgent=this.agent.https,u.httpAgent=this.agent.http),"https"===this.host.substring(0,5)?o.agent=u.httpsAgent:o.agent=u.httpAgent}this.headers&&this.headers.forEach((function(e){a[e.name]=e.value})),a["Content-Type"]||(a["Content-Type"]="application/json"),this.withCredentials?o.credentials="include":o.credentials="omit",o.headers=a,this.timeout>0&&void 0!==r&&(this.timeoutId=setTimeout((function(){r.abort()}),this.timeout)),s(this.host,o).then(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),e.json().then((function(e){t(null,e)}),(function(){e.text().then((function(e){t(n.InvalidResponse(e))}),(function(){t(n.InvalidResponse(""))}))}))}.bind(this),function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),"AbortError"!==e.name?t(n.InvalidConnection(this.host,e)):t(n.ConnectionTimeout(this.timeout))}.bind(this))},s.prototype.disconnect=function(){},s.prototype.supportsSubscriptions=function(){return!1},e.exports=s},52683:(e,t,r)=>{"use strict";var n=r(11314).errors,i=r(83150),o=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=e,this.connected=!1,this.connection=t.connect({path:this.path}),this.addDefaultEvents();var n=function(e){var t=null;Array.isArray(e)?e.forEach((function(e){r.responseCallbacks[e.id]&&(t=e.id)})):t=e.id,t||-1===e.method.indexOf("_subscription")?r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t]):r.notificationCallbacks.forEach((function(t){"function"==typeof t&&t(e)}))};"Socket"===t.constructor.name?i(this.connection).done(n):this.connection.on("data",(function(e){r._parseResponse(e.toString()).forEach(n)}))};o.prototype.addDefaultEvents=function(){var e=this;this.connection.on("connect",(function(){e.connected=!0})),this.connection.on("close",(function(){e.connected=!1})),this.connection.on("error",(function(){e._timeout()})),this.connection.on("end",(function(){e._timeout()})),this.connection.on("timeout",(function(){e._timeout()}))},o.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var i=null;try{i=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){throw t._timeout(),n.InvalidResponse(e)}),15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,i&&r.push(i)})),r},o.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,n=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=n},o.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](n.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},o.prototype.reconnect=function(){this.connection.connect({path:this.path})},o.prototype.send=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},o.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");"data"===e?this.notificationCallbacks.push(t):this.connection.on(e,t)},o.prototype.once=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");this.connection.once(e,t)},o.prototype.removeListener=function(e,t){var r=this;"data"===e?this.notificationCallbacks.forEach((function(e,n){e===t&&r.notificationCallbacks.splice(n,1)})):this.connection.removeListener(e,t)},o.prototype.removeAllListeners=function(e){"data"===e?this.notificationCallbacks=[]:this.connection.removeAllListeners(e)},o.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},o.prototype.supportsSubscriptions=function(){return!0},e.exports=o},40360:(e,t,r)=>{"use strict";var n=r(19142),i=r(29033).Buffer,o=r(28847)(r(3355)),a="[object process]"===Object.prototype.toString.call(void 0!==n?n:0),s="undefined"!=typeof navigator&&"ReactNative"===navigator.product,u=null,c=null;if(a||s){u=function(e){return i.from(e).toString("base64")};var l=r(51143);if(l.URL){var f=l.URL;c=function(e){return new f(e)}}else c=r(51143).parse}else u=btoa.bind("object"===("undefined"==typeof globalThis?"undefined":(0,o.default)(globalThis))?globalThis:self),c=function(e){return new URL(e)};e.exports={parseURL:c,btoa:u}},77651:(e,t,r)=>{"use strict";var n=r(98008),i=r(40360),o=r(11314).errors,a=r(1158).w3cwebsocket,s=function(e,t){n.call(this),t=t||{},this.url=e,this._customTimeout=t.timeout||15e3,this.headers=t.headers||{},this.protocol=t.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},t.reconnect),this.clientConfig=t.clientConfig||void 0,this.requestOptions=t.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1,this.connectFailedDescription=null;var r=i.parseURL(e);r.username&&r.password&&(this.headers.authorization="Basic "+i.btoa(r.username+":"+r.password)),r.auth&&(this.headers.authorization="Basic "+i.btoa(r.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.connect=function(){this.connection=new a(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},s.prototype._onMessage=function(e){var t=this;this._parseResponse("string"==typeof e.data?e.data:"").forEach((function(e){if(e.method&&-1!==e.method.indexOf("_subscription"))t.emit(t.DATA,e);else{var r=e.id;Array.isArray(e)&&(r=e[0].id),t.responseQueue.has(r)&&(void 0!==t.responseQueue.get(r).callback&&t.responseQueue.get(r).callback(!1,e),t.responseQueue.delete(r))}}))},s.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var e=this;this.requestQueue.forEach((function(t,r){e.send(t.payload,t.callback),e.requestQueue.delete(r)}))}},s.prototype._onConnectFailed=function(e){this.connectFailedDescription=e.toString().split("\n")[0];var t=this;this.connectFailedDescription&&(e.description=this.connectFailedDescription,this.connectFailedDescription=null),e.code=1006,e.reason="connection failed",!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.ERROR,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this.connection._connection&&this.connection._connection.removeAllListeners(),this.connection._client.removeAllListeners(),this.connection._readyState=3,this.emit(this.CLOSE,e)):this.reconnect()},s.prototype._onClose=function(e){var t=this;!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.CLOSE,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},s.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this)),this.connection._client&&(this.connection._client.removeAllListeners("connectFailed"),this.connection._client.on("connectFailed",this._onConnectFailed.bind(this)))},s.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose),this.connection._connection&&this.connection._client.removeListener("connectFailed",this._onConnectFailed)},s.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){t.reconnectOptions.auto&&t.reconnectOptions.onTimeout?t.reconnect():(t.emit(t.ERROR,o.ConnectionTimeout(t._customTimeout)),t.requestQueue.size>0&&t.requestQueue.forEach((function(e,r){e.callback(o.ConnectionTimeout(t._customTimeout)),t.requestQueue.delete(r)})))}),t._customTimeout))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)})),r},s.prototype.send=function(e,t){var r=e.id,n={payload:e,callback:t};if(Array.isArray(e)&&(r=e[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(r,n);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(r),this.emit(this.ERROR,o.ConnectionNotOpenError()),void n.callback(o.ConnectionNotOpenError());this.responseQueue.set(r,n),this.requestQueue.delete(r);try{this.connection.send(JSON.stringify(n.payload))}catch(e){n.callback(e),this.responseQueue.delete(r)}}},s.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},s.prototype.disconnect=function(e,t){this._removeSocketListeners(),this.connection.close(e||1e3,t)},s.prototype.supportsSubscriptions=function(){return!0},s.prototype.reconnect=function(){var e=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach((function(t,r){try{e.responseQueue.delete(r),t.callback(o.PendingRequestsOnReconnectingError())}catch(e){console.error("Error encountered in reconnect: ",e)}})),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach((function(t,r){t.callback(o.MaxAttemptsReachedOnReconnectingError()),e.requestQueue.delete(r)})))},e.exports=s},92565:(e,t,r)=>{"use strict";var n=r(80606),i=r(34178).subscriptions,o=r(53349),a=r(473),s=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager)},this.net=new a(this),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new o({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};s.prototype.clearSubscriptions=function(){this._requestManager.clearSubscriptions()},n.addProviders(s),e.exports=s},48161:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(17130),o=r(90323),a=r(747),s=r(75010),u=r(31734),c=function e(t,r){var i=[];return r.forEach((function(r){if("object"===(0,n.default)(r.components)){if("tuple"!==r.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var o="",a=r.type.indexOf("[");a>=0&&(o=r.type.substring(a));var s=e(t,r.components);Array.isArray(s)&&t?i.push("tuple("+s.join(",")+")"+o):t?i.push("("+s+")"):i.push("("+s.join(",")+")"+o)}else i.push(r.type)})),i},l=function(e){if(!o.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,stripHexPrefix:o.stripHexPrefix,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:l,toAscii:l,asciiToHex:f,fromAscii:f,unitMap:i.unitMap,toWei:function(e,t){if(t=d(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.toWei(e,t):i.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=d(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.fromWei(e,t):i.fromWei(e,t).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement,isBloom:o.isBloom,isUserEthereumAddressInBloom:o.isUserEthereumAddressInBloom,isContractAddressInBloom:o.isContractAddressInBloom,isTopic:o.isTopic,isTopicInBloom:o.isTopicInBloom,isInBloom:o.isInBloom,compareBlockNumbers:function(e,t){if(e===t)return 0;if("genesis"!==e&&"earliest"!==e&&0!==e||"genesis"!==t&&"earliest"!==t&&0!==t){if("genesis"===e||"earliest"===e||0===e)return-1;if("genesis"===t||"earliest"===t||0===t)return 1;if("latest"===e||"finalized"===e)return"pending"===t?-1:1;if("latest"===t||"finalized"===t)return"pending"===e?1:-1;if("pending"===e)return 1;if("pending"===t)return-1;if("safe"===e||"safe"===t)return;var r=new u(e),n=new u(t);return r.lt(n)?-1:r.eq(n)?0:1}return 0},toNumber:o.toNumber}},747:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(90323),a=function(e){var t=(0,n.default)(e);if("string"===t)return o.isHexStrict(e)?new i(e.replace(/0x/i,""),16):new i(e,10);if("number"===t)return new i(e);if(o.isBigNumber(e))return new i(e.toString(10));if(o.isBN(e))return e;throw new Error(e+" is not a number")},s=function(e,t,r){var n,s;if("bytes"===(e=function(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}(e))){if(t.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+t.length);return t}if("string"===e)return o.utf8ToHex(t);if("bool"===e)return t?"01":"00";if(e.startsWith("address")){if(n=r?64:40,!o.isAddress(t))throw new Error(t+" is not a valid address, or the checksum is invalid.");return o.leftPad(t.toLowerCase(),n)}if(n=function(e){var t=/^\D+(\d+).*$/.exec(e);return t?parseInt(t[1],10):null}(e),e.startsWith("bytes")){if(!n)throw new Error("bytes[] not yet supported in solidity");if(r&&(n=32),n<1||n>32||n256)throw new Error("Invalid uint"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?o.leftPad(s.toString("hex"),n/8*2):s}if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(n).toString("hex"):n?o.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+e)},u=function(e){if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,a="";if(e&&"object"===(0,n.default)(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,a=e.hasOwnProperty("v")?e.v:e.value):(t=o.toHex(e,!0),a=o.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new i(a)),Array.isArray(a)){if(r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null}(t),r&&a.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(a));r=a.length}return Array.isArray(a)?a.map((function(e){return s(t,e,r).toString("hex").replace("0x","")})).join(""):s(t,a,r).toString("hex").replace("0x","")};e.exports={soliditySha3:function(){var e=Array.prototype.slice.call(arguments).map(u);return o.sha3("0x"+e.join(""))},soliditySha3Raw:function(){return o.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(u).join(""))},encodePacked:function(){return"0x"+Array.prototype.slice.call(arguments).map(u).join("").toLowerCase()}}},90323:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(74519)),a=i(r(3355)),s=r(31734),u=r(77277),c=r(88632),l=r(65907),f=r(19313),d=r(1243).keccak256,h=function(e){return s.isBN(e)},p=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},y=function(e){try{return u.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},m=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(e)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(e))||g(e))},g=function(e){e=e.replace(/^0x/i,"");for(var t=x(e.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(t[r],16)>7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},b=function(e){var t="";e=(e=(e=(e=(e=c.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];if(!e)return e;if("string"==typeof e&&!k(e))throw new Error('Given value "'+e+'" is not a valid hex string.');var r=y(e);return t&&(r>Number.MAX_SAFE_INTEGER||r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:E,isHexStrict:k,stripHexPrefix:function(e){return 0!==e&&E(e)?e.replace(/^(-)?0x/i,"$1"):e},leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(i).join(r||"0")},toTwosComplement:function(e){return"0x"+y(e).toTwos(256).toString(16,64)},sha3:x,sha3Raw:function(e){return null===(e=x(e))?S:e},toNumber:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"number"==typeof e?e:v(A(e),t)}}},17001:(e,t,r)=>{"use strict";var n=r(78920).i8,i=r(80606),o=r(66748),a=r(473),s=r(96306),u=r(92565),c=r(42463),l=r(48161),f=function(){var e=this;i.packageInit(this,arguments),this.version=n,this.utils=l,this.eth=new o(this),this.shh=new u(this),this.bzz=new c(this);var t=this.setProvider;this.setProvider=function(r,n){return t.apply(e,arguments),e.eth.setRequestManager(e._requestManager),e.shh.setRequestManager(e._requestManager),e.bzz.setProvider(r),!0}};f.version=n,f.utils=l,f.modules={Eth:o,Net:a,Personal:s,Shh:u,Bzz:c},i.addProviders(f),e.exports=f},89214:()=>{},52361:()=>{},94616:()=>{},38768:e=>{"use strict";e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},77907:(e,t,r)=>{"use strict";var n=r(38768);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},58975:e=>{"use strict";e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},94571:e=>{"use strict";function t(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=e.apply(r,n);function s(e){t(a,i,o,s,u,"next",e)}function u(e){t(a,i,o,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},69721:e=>{"use strict";e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},14727:(e,t,r)=>{"use strict";var n=r(38746),i=r(36923);function o(t,r,a){return i()?(e.exports=o=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=o=function(e,t,r){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return r&&n(o,r.prototype),o},e.exports.__esModule=!0,e.exports.default=e.exports),o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},58985:(e,t,r)=>{"use strict";var n=r(32310);function i(e,t){for(var r=0;r{"use strict";var n=r(32310);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},119:(e,t,r)=>{"use strict";var n=r(47460);function i(){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=i=Reflect.get.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,r){var i=n(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},21949:e=>{"use strict";function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},15163:(e,t,r)=>{"use strict";var n=r(38746);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},28847:e=>{"use strict";e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},78958:e=>{"use strict";e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},36923:e=>{"use strict";e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},41642:e=>{"use strict";e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},91436:e=>{"use strict";e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},82966:e=>{"use strict";e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},22344:e=>{"use strict";e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},34650:(e,t,r)=>{"use strict";var n=r(3355).default,i=r(58975);e.exports=function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},82028:(e,t,r)=>{"use strict";var n=r(3355).default;function i(){e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),s=new T(n||[]);return a(o,"_invoke",{value:S(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p={};function y(){}function m(){}function g(){}var b={};f(b,u,(function(){return this}));var v=Object.getPrototypeOf,w=v&&v(v(I([])));w&&w!==r&&o.call(w,u)&&(b=w);var A=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}})}function S(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var i=h(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},38746:e=>{"use strict";function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},74519:(e,t,r)=>{"use strict";var n=r(12338),i=r(91436),o=r(46906),a=r(82966);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},47460:(e,t,r)=>{"use strict";var n=r(21949);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},93106:(e,t,r)=>{"use strict";var n=r(77907),i=r(41642),o=r(46906),a=r(22344);e.exports=function(e){return n(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},79662:(e,t,r)=>{"use strict";var n=r(3355).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},32310:(e,t,r)=>{"use strict";var n=r(3355).default,i=r(79662);e.exports=function(e){var t=i(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},3355:e=>{"use strict";function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},46906:(e,t,r)=>{"use strict";var n=r(38768);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},22940:(e,t,r)=>{"use strict";var n=r(21949),i=r(38746),o=r(78958),a=r(14727);function s(t){var r="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return a(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},82247:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(82028)();e.exports=i;try{regeneratorRuntime=i}catch(e){"object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},43604:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t{"use strict";e.exports=JSON.parse('{"name":"goerli","chainId":5,"networkId":5,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"Cross-client PoA test network","url":"https://github.com/goerli/testnet","genesis":{"hash":"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a","timestamp":"0x5c51a607","gasLimit":10485760,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xa3f5ab08"},{"name":"homestead","block":0,"forkHash":"0xa3f5ab08"},{"name":"tangerineWhistle","block":0,"forkHash":"0xa3f5ab08"},{"name":"spuriousDragon","block":0,"forkHash":"0xa3f5ab08"},{"name":"byzantium","block":0,"forkHash":"0xa3f5ab08"},{"name":"constantinople","block":0,"forkHash":"0xa3f5ab08"},{"name":"petersburg","block":0,"forkHash":"0xa3f5ab08"},{"name":"istanbul","block":1561651,"forkHash":"0xc25efa5c"},{"name":"berlin","block":4460644,"forkHash":"0x757a1c47"},{"name":"london","block":5062605,"forkHash":"0xb8c6299d"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"51.141.78.53","port":30303,"id":"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a","location":"","comment":"Upstream bootnode 1"},{"ip":"13.93.54.137","port":30303,"id":"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b","location":"","comment":"Upstream bootnode 2"},{"ip":"94.237.54.114","port":30313,"id":"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291","location":"","comment":"Upstream bootnode 3"},{"ip":"18.218.250.66","port":30313,"id":"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949","location":"","comment":"Upstream bootnode 4"},{"ip":"3.11.147.67","port":30303,"id":"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91","location":"","comment":"Ethereum Foundation bootnode"},{"ip":"51.15.116.226","port":30303,"id":"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":30303,"id":"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":40303,"id":"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd","location":"","comment":"Goerli Initiative bootnode"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]}')},37098:e=>{"use strict";e.exports=JSON.parse('{"name":"kovan","chainId":42,"networkId":42,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"aura","aura":{}},"comment":"Parity PoA test network","url":"https://kovan-testnet.github.io/website/","genesis":{"hash":"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9","timestamp":null,"gasLimit":6000000,"difficulty":131072,"nonce":"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","extraData":"0x","stateRoot":"0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x010ffe56"},{"name":"homestead","block":0,"forkHash":"0x010ffe56"},{"name":"tangerineWhistle","block":0,"forkHash":"0x010ffe56"},{"name":"spuriousDragon","block":0,"forkHash":"0x010ffe56"},{"name":"byzantium","block":5067000,"forkHash":"0x7f83c620"},{"name":"constantinople","block":9200000,"forkHash":"0xa94e3dc4"},{"name":"petersburg","block":10255201,"forkHash":"0x186874aa"},{"name":"istanbul","block":14111141,"forkHash":"0x7f6599a6"},{"name":"berlin","block":24770900,"forkHash":"0x1a0f10d9"},{"name":"london","block":26741100,"forkHash":"0x1ed20b71"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"116.203.116.241","port":30303,"id":"16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45","location":"","comment":"1"},{"ip":"3.217.96.11","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"2"},{"ip":"108.61.170.124","port":30303,"id":"740e1c8ea64e71762c71a463a04e2046070a0c9394fcab5891d41301dc473c0cff00ebab5a9bc87fbcb610ab98ac18225ff897bc8b7b38def5975d5ceb0a7d7c","location":"","comment":"3"},{"ip":"157.230.31.163","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"4"}]}')},87295:e=>{"use strict";e.exports=JSON.parse('{"name":"mainnet","chainId":1,"networkId":1,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"The Ethereum main chain","url":"https://ethstats.net/","genesis":{"hash":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","timestamp":null,"gasLimit":5000,"difficulty":17179869184,"nonce":"0x0000000000000042","extraData":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","stateRoot":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfc64ec04"},{"name":"homestead","block":1150000,"forkHash":"0x97c2c34c"},{"name":"dao","block":1920000,"forkHash":"0x91d1f948"},{"name":"tangerineWhistle","block":2463000,"forkHash":"0x7a64da13"},{"name":"spuriousDragon","block":2675000,"forkHash":"0x3edd5b10"},{"name":"byzantium","block":4370000,"forkHash":"0xa00bc324"},{"name":"constantinople","block":7280000,"forkHash":"0x668db0af"},{"name":"petersburg","block":7280000,"forkHash":"0x668db0af"},{"name":"istanbul","block":9069000,"forkHash":"0x879d6e30"},{"name":"muirGlacier","block":9200000,"forkHash":"0xe029e991"},{"name":"berlin","block":12244000,"forkHash":"0x0eb440f6"},{"name":"london","block":12965000,"forkHash":"0xb715077d"},{"name":"arrowGlacier","block":13773000,"forkHash":"0x20c327fc"},{"name":"grayGlacier","block":15050000,"forkHash":"0xf0afd0e3"},{"name":"mergeForkIdTransition","block":null,"forkHash":null},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"18.138.108.67","port":30303,"id":"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666","location":"ap-southeast-1-001","comment":"bootnode-aws-ap-southeast-1-001"},{"ip":"3.209.45.79","port":30303,"id":"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de","location":"us-east-1-001","comment":"bootnode-aws-us-east-1-001"},{"ip":"34.255.23.113","port":30303,"id":"ca6de62fce278f96aea6ec5a2daadb877e51651247cb96ee310a318def462913b653963c155a0ef6c7d50048bba6e6cea881130857413d9f50a621546b590758","location":"eu-west-1-001","comment":"bootnode-aws-eu-west-1-001"},{"ip":"35.158.244.151","port":30303,"id":"279944d8dcd428dffaa7436f25ca0ca43ae19e7bcf94a8fb7d1641651f92d121e972ac2e8f381414b80cc8e5555811c2ec6e1a99bb009b3f53c4c69923e11bd8","location":"eu-central-1-001","comment":"bootnode-aws-eu-central-1-001"},{"ip":"52.187.207.27","port":30303,"id":"8499da03c47d637b20eee24eec3c356c9a2e6148d6fe25ca195c7949ab8ec2c03e3556126b0d7ed644675e78c4318b08691b7b57de10e5f0d40d05b09238fa0a","location":"australiaeast-001","comment":"bootnode-azure-australiaeast-001"},{"ip":"191.234.162.198","port":30303,"id":"103858bdb88756c71f15e9b5e09b56dc1be52f0a5021d46301dbbfb7e130029cc9d0d6f73f693bc29b665770fff7da4d34f3c6379fe12721b5d7a0bcb5ca1fc1","location":"brazilsouth-001","comment":"bootnode-azure-brazilsouth-001"},{"ip":"52.231.165.108","port":30303,"id":"715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8","location":"koreasouth-001","comment":"bootnode-azure-koreasouth-001"},{"ip":"104.42.217.25","port":30303,"id":"5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f","location":"westus-001","comment":"bootnode-azure-westus-001"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]}')},40439:e=>{"use strict";e.exports=JSON.parse('{"name":"rinkeby","chainId":4,"networkId":4,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"PoA test network","url":"https://www.rinkeby.io","genesis":{"hash":"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177","timestamp":"0x58ee40ba","gasLimit":4700000,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x3b8e0691"},{"name":"homestead","block":1,"forkHash":"0x60949295"},{"name":"tangerineWhistle","block":2,"forkHash":"0x8bde40dd"},{"name":"spuriousDragon","block":3,"forkHash":"0xcb3a64bb"},{"name":"byzantium","block":1035301,"forkHash":"0x8d748b57"},{"name":"constantinople","block":3660663,"forkHash":"0xe49cab14"},{"name":"petersburg","block":4321234,"forkHash":"0xafec6b27"},{"name":"istanbul","block":5435345,"forkHash":"0xcbdb8838"},{"name":"berlin","block":8290928,"forkHash":"0x6910c8bd"},{"name":"london","block":8897988,"forkHash":"0x8e29f2f3"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"52.169.42.101","port":30303,"id":"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf","location":"","comment":"IE"},{"ip":"52.3.158.184","port":30303,"id":"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8","location":"","comment":"INFURA"},{"ip":"159.89.28.211","port":30303,"id":"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6","location":"","comment":"AKASHA"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"]}')},31227:e=>{"use strict";e.exports=JSON.parse('{"name":"ropsten","chainId":3,"networkId":3,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network","url":"https://github.com/ethereum/ropsten","genesis":{"hash":"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d","timestamp":null,"gasLimit":16777216,"difficulty":1048576,"nonce":"0x0000000000000042","extraData":"0x3535353535353535353535353535353535353535353535353535353535353535","stateRoot":"0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x30c7ddbc"},{"name":"homestead","block":0,"forkHash":"0x30c7ddbc"},{"name":"tangerineWhistle","block":0,"forkHash":"0x30c7ddbc"},{"name":"spuriousDragon","block":10,"forkHash":"0x63760190"},{"name":"byzantium","block":1700000,"forkHash":"0x3ea159c7"},{"name":"constantinople","block":4230000,"forkHash":"0x97b544f3"},{"name":"petersburg","block":4939394,"forkHash":"0xd6e2149b"},{"name":"istanbul","block":6485846,"forkHash":"0x4bc66396"},{"name":"muirGlacier","block":7117117,"forkHash":"0x6727ef90"},{"name":"berlin","block":9812189,"forkHash":"0xa157d377"},{"name":"london","block":10499401,"forkHash":"0x7119b6b3"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"52.176.7.10","port":30303,"id":"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606","location":"","comment":"US-Azure geth"},{"ip":"52.176.100.77","port":30303,"id":"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c","location":"","comment":"US-Azure parity"},{"ip":"52.232.243.152","port":30303,"id":"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f","location":"","comment":"Parity"},{"ip":"192.81.208.223","port":30303,"id":"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09","location":"","comment":"@gpip"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net"]}')},49422:e=>{"use strict";e.exports=JSON.parse('{"name":"sepolia","chainId":11155111,"networkId":11155111,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network to replace Ropsten","url":"https://github.com/ethereum/go-ethereum/pull/23730","genesis":{"hash":"0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9","timestamp":"0x6159af19","gasLimit":30000000,"difficulty":131072,"nonce":"0x0000000000000000","extraData":"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521","stateRoot":"0x5eb6e371a698b8d68f665192350ffcecbbbf322916f4b51bd79bb6887da3f494"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfe3366e7"},{"name":"homestead","block":0,"forkHash":"0xfe3366e7"},{"name":"tangerineWhistle","block":0,"forkHash":"0xfe3366e7"},{"name":"spuriousDragon","block":0,"forkHash":"0xfe3366e7"},{"name":"byzantium","block":0,"forkHash":"0xfe3366e7"},{"name":"constantinople","block":0,"forkHash":"0xfe3366e7"},{"name":"petersburg","block":0,"forkHash":"0xfe3366e7"},{"name":"istanbul","block":0,"forkHash":"0xfe3366e7"},{"name":"muirGlacier","block":0,"forkHash":"0xfe3366e7"},{"name":"berlin","block":0,"forkHash":"0xfe3366e7"},{"name":"london","block":0,"forkHash":"0xfe3366e7"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"18.168.182.86","port":30303,"id":"9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066","location":"","comment":"geth"},{"ip":"52.14.151.177","port":30303,"id":"ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7","location":"","comment":"besu"}],"dnsNetworks":[]}')},96561:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-1153","number":1153,"comment":"Transient Storage","url":"https://eips.ethereum.org/EIPS/eip-1153","status":"Review","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{"tstore":{"v":100,"d":"Base fee of the TSTORE opcode"},"tload":{"v":100,"d":"Base fee of the TLOAD opcode"}},"vm":{},"pow":{}}')},77523:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-1559","number":1559,"comment":"Fee market change for ETH 1.0 chain","url":"https://eips.ethereum.org/EIPS/eip-1559","status":"Final","minimumHardfork":"berlin","requiredEIPs":[2930],"gasConfig":{"baseFeeMaxChangeDenominator":{"v":8,"d":"Maximum base fee change denominator"},"elasticityMultiplier":{"v":2,"d":"Maximum block gas target elasticity"},"initialBaseFee":{"v":1000000000,"d":"Initial base fee on first EIP1559 block"}},"gasPrices":{},"vm":{},"pow":{}}')},83339:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2315","number":2315,"comment":"Simple subroutines for the EVM","url":"https://eips.ethereum.org/EIPS/eip-2315","status":"Draft","minimumHardfork":"istanbul","gasConfig":{},"gasPrices":{"beginsub":{"v":2,"d":"Base fee of the BEGINSUB opcode"},"returnsub":{"v":5,"d":"Base fee of the RETURNSUB opcode"},"jumpsub":{"v":10,"d":"Base fee of the JUMPSUB opcode"}},"vm":{},"pow":{}}')},26769:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2537","number":2537,"comment":"BLS12-381 precompiles","url":"https://eips.ethereum.org/EIPS/eip-2537","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"Bls12381G1AddGas":{"v":600,"d":"Gas cost of a single BLS12-381 G1 addition precompile-call"},"Bls12381G1MulGas":{"v":12000,"d":"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},"Bls12381G2AddGas":{"v":4500,"d":"Gas cost of a single BLS12-381 G2 addition precompile-call"},"Bls12381G2MulGas":{"v":55000,"d":"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},"Bls12381PairingBaseGas":{"v":115000,"d":"Base gas cost of BLS12-381 pairing check"},"Bls12381PairingPerPairGas":{"v":23000,"d":"Per-pair gas cost of BLS12-381 pairing check"},"Bls12381MapG1Gas":{"v":5500,"d":"Gas cost of BLS12-381 map field element to G1"},"Bls12381MapG2Gas":{"v":110000,"d":"Gas cost of BLS12-381 map field element to G2"},"Bls12381MultiExpGasDiscount":{"v":[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],"d":"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},"vm":{},"pow":{}}')},17897:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2565","number":2565,"comment":"ModExp gas cost","url":"https://eips.ethereum.org/EIPS/eip-2565","status":"Final","minimumHardfork":"byzantium","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":3,"d":"Gquaddivisor from modexp precompile for gas calculation"}},"vm":{},"pow":{}}')},62170:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2718","comment":"Typed Transaction Envelope","url":"https://eips.ethereum.org/EIPS/eip-2718","status":"Final","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},88436:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2929","comment":"Gas cost increases for state access opcodes","url":"https://eips.ethereum.org/EIPS/eip-2929","status":"Final","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"coldsload":{"v":2100,"d":"Gas cost of the first read of storage from a given location (per transaction)"},"coldaccountaccess":{"v":2600,"d":"Gas cost of the first read of a given address (per transaction)"},"warmstorageread":{"v":100,"d":"Gas cost of reading storage locations which have already loaded \'cold\'"},"sstoreCleanGasEIP2200":{"v":2900,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreNoopGasEIP2200":{"v":100,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":100,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitRefundEIP2200":{"v":19900,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanRefundEIP2200":{"v":4900,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"call":{"v":0,"d":"Base fee of the CALL opcode"},"callcode":{"v":0,"d":"Base fee of the CALLCODE opcode"},"delegatecall":{"v":0,"d":"Base fee of the DELEGATECALL opcode"},"staticcall":{"v":0,"d":"Base fee of the STATICCALL opcode"},"balance":{"v":0,"d":"Base fee of the BALANCE opcode"},"extcodesize":{"v":0,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":0,"d":"Base fee of the EXTCODECOPY opcode"},"extcodehash":{"v":0,"d":"Base fee of the EXTCODEHASH opcode"},"sload":{"v":0,"d":"Base fee of the SLOAD opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"}},"vm":{},"pow":{}}')},96213:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2930","comment":"Optional access lists","url":"https://eips.ethereum.org/EIPS/eip-2930","status":"Final","minimumHardfork":"istanbul","requiredEIPs":[2718,2929],"gasConfig":{},"gasPrices":{"accessListStorageKeyCost":{"v":1900,"d":"Gas cost per storage key in an Access List transaction"},"accessListAddressCost":{"v":2400,"d":"Gas cost per storage key in an Access List transaction"}},"vm":{},"pow":{}}')},25491:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3198","number":3198,"comment":"BASEFEE opcode","url":"https://eips.ethereum.org/EIPS/eip-3198","status":"Final","minimumHardfork":"london","gasConfig":{},"gasPrices":{"basefee":{"v":2,"d":"Gas cost of the BASEFEE opcode"}},"vm":{},"pow":{}}')},20070:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3529","comment":"Reduction in refunds","url":"https://eips.ethereum.org/EIPS/eip-3529","status":"Final","minimumHardfork":"berlin","requiredEIPs":[2929],"gasConfig":{"maxRefundQuotient":{"v":5,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"selfdestructRefund":{"v":0,"d":"Refunded following a selfdestruct operation"},"sstoreClearRefundEIP2200":{"v":4800,"d":"Once per SSTORE operation for clearing an originally existing storage slot"}},"vm":{},"pow":{}}')},52256:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3540","number":3540,"comment":"EVM Object Format (EOF) v1","url":"https://eips.ethereum.org/EIPS/eip-3540","status":"Review","minimumHardfork":"london","requiredEIPs":[3541],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},21871:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3541","comment":"Reject new contracts starting with the 0xEF byte","url":"https://eips.ethereum.org/EIPS/eip-3541","status":"Final","minimumHardfork":"berlin","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},47225:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3554","comment":"Reduction in refunds","url":"Difficulty Bomb Delay to December 1st 2021","status":"Final","minimumHardfork":"muirGlacier","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9500000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},3968:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3607","number":3607,"comment":"Reject transactions from senders with deployed code","url":"https://eips.ethereum.org/EIPS/eip-3607","status":"Final","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},29496:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3651","number":3198,"comment":"Warm COINBASE","url":"https://eips.ethereum.org/EIPS/eip-3651","status":"Review","minimumHardfork":"london","requiredEIPs":[2929],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},74290:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3670","number":3670,"comment":"EOF - Code Validation","url":"https://eips.ethereum.org/EIPS/eip-3670","status":"Review","minimumHardfork":"london","requiredEIPs":[3540],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},98571:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3675","number":3675,"comment":"Upgrade consensus to Proof-of-Stake","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Review","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},64551:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3855","number":3855,"comment":"PUSH0 instruction","url":"https://eips.ethereum.org/EIPS/eip-3855","status":"Review","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{"push0":{"v":2,"d":"Base fee of the PUSH0 opcode"}},"vm":{},"pow":{}}')},94300:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3860","number":3860,"comment":"Limit and meter initcode","url":"https://eips.ethereum.org/EIPS/eip-3860","status":"Review","minimumHardfork":"spuriousDragon","requiredEIPs":[],"gasConfig":{},"gasPrices":{"initCodeWordCost":{"v":2,"d":"Gas to pay for each word (32 bytes) of initcode when creating a contract"}},"vm":{"maxInitCodeSize":{"v":49152,"d":"Maximum length of initialization code when creating a contract"}},"pow":{}}')},74818:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-4345","number":4345,"comment":"Difficulty Bomb Delay to June 2022","url":"https://eips.ethereum.org/EIPS/eip-4345","status":"Final","minimumHardfork":"london","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":10700000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},68372:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-4399","number":4399,"comment":"Supplant DIFFICULTY opcode with PREVRANDAO","url":"https://eips.ethereum.org/EIPS/eip-4399","status":"Review","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},4759:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-5133","number":5133,"comment":"Delaying Difficulty Bomb to mid-September 2022","url":"https://eips.ethereum.org/EIPS/eip-5133","status":"Draft","minimumHardfork":"grayGlacier","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":11400000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},51971:e=>{"use strict";e.exports=JSON.parse('{"name":"arrowGlacier","comment":"HF to delay the difficulty bomb","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md","status":"Final","eips":[4345],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},20015:e=>{"use strict";e.exports=JSON.parse('{"name":"berlin","comment":"HF targeted for July 2020 following the Muir Glacier HF","url":"https://eips.ethereum.org/EIPS/eip-2070","status":"Final","eips":[2565,2929,2718,2930]}')},26985:e=>{"use strict";e.exports=JSON.parse('{"name":"byzantium","comment":"Hardfork with new precompiles, instructions and other protocol changes","url":"https://eips.ethereum.org/EIPS/eip-609","status":"Final","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":20,"d":"Gquaddivisor from modexp precompile for gas calculation"},"ecAdd":{"v":500,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":40000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":100000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":80000,"d":"Gas costs regarding curve pairing precompile input length"},"revert":{"v":0,"d":"Base fee of the REVERT opcode"},"staticcall":{"v":700,"d":"Base fee of the STATICCALL opcode"},"returndatasize":{"v":2,"d":"Base fee of the RETURNDATASIZE opcode"},"returndatacopy":{"v":3,"d":"Base fee of the RETURNDATACOPY opcode"}},"vm":{},"pow":{"minerReward":{"v":"3000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":3000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},60114:e=>{"use strict";e.exports=JSON.parse('{"name":"chainstart","comment":"Start of the Ethereum main chain","url":"","status":"","gasConfig":{"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be"},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations"},"maxRefundQuotient":{"v":2,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"base":{"v":2,"d":"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},"tierStep":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them"},"exp":{"v":10,"d":"Base fee of the EXP opcode"},"expByte":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction"},"sha3":{"v":30,"d":"Base fee of the SHA3 opcode"},"sha3Word":{"v":6,"d":"Once per word of the SHA3 operation\'s data"},"sload":{"v":50,"d":"Base fee of the SLOAD opcode"},"sstoreSet":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero"},"sstoreReset":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero"},"sstoreRefund":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero"},"jumpdest":{"v":1,"d":"Base fee of the JUMPDEST opcode"},"log":{"v":375,"d":"Base fee of the LOG opcode"},"logData":{"v":8,"d":"Per byte in a LOG* operation\'s data"},"logTopic":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},"create":{"v":32000,"d":"Base fee of the CREATE opcode"},"call":{"v":40,"d":"Base fee of the CALL opcode"},"callStipend":{"v":2300,"d":"Free gas given at beginning of call"},"callValueTransfer":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero"},"callNewAccount":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior"},"selfdestructRefund":{"v":24000,"d":"Refunded following a selfdestruct operation"},"memory":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation"},"createData":{"v":200,"d":""},"tx":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions"},"txCreation":{"v":32000,"d":"The cost of creating a contract via tx"},"txDataZero":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},"txDataNonZero":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"copy":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},"ecRecover":{"v":3000,"d":""},"sha256":{"v":60,"d":""},"sha256Word":{"v":12,"d":""},"ripemd160":{"v":600,"d":""},"ripemd160Word":{"v":120,"d":""},"identity":{"v":15,"d":""},"identityWord":{"v":3,"d":""},"stop":{"v":0,"d":"Base fee of the STOP opcode"},"add":{"v":3,"d":"Base fee of the ADD opcode"},"mul":{"v":5,"d":"Base fee of the MUL opcode"},"sub":{"v":3,"d":"Base fee of the SUB opcode"},"div":{"v":5,"d":"Base fee of the DIV opcode"},"sdiv":{"v":5,"d":"Base fee of the SDIV opcode"},"mod":{"v":5,"d":"Base fee of the MOD opcode"},"smod":{"v":5,"d":"Base fee of the SMOD opcode"},"addmod":{"v":8,"d":"Base fee of the ADDMOD opcode"},"mulmod":{"v":8,"d":"Base fee of the MULMOD opcode"},"signextend":{"v":5,"d":"Base fee of the SIGNEXTEND opcode"},"lt":{"v":3,"d":"Base fee of the LT opcode"},"gt":{"v":3,"d":"Base fee of the GT opcode"},"slt":{"v":3,"d":"Base fee of the SLT opcode"},"sgt":{"v":3,"d":"Base fee of the SGT opcode"},"eq":{"v":3,"d":"Base fee of the EQ opcode"},"iszero":{"v":3,"d":"Base fee of the ISZERO opcode"},"and":{"v":3,"d":"Base fee of the AND opcode"},"or":{"v":3,"d":"Base fee of the OR opcode"},"xor":{"v":3,"d":"Base fee of the XOR opcode"},"not":{"v":3,"d":"Base fee of the NOT opcode"},"byte":{"v":3,"d":"Base fee of the BYTE opcode"},"address":{"v":2,"d":"Base fee of the ADDRESS opcode"},"balance":{"v":20,"d":"Base fee of the BALANCE opcode"},"origin":{"v":2,"d":"Base fee of the ORIGIN opcode"},"caller":{"v":2,"d":"Base fee of the CALLER opcode"},"callvalue":{"v":2,"d":"Base fee of the CALLVALUE opcode"},"calldataload":{"v":3,"d":"Base fee of the CALLDATALOAD opcode"},"calldatasize":{"v":2,"d":"Base fee of the CALLDATASIZE opcode"},"calldatacopy":{"v":3,"d":"Base fee of the CALLDATACOPY opcode"},"codesize":{"v":2,"d":"Base fee of the CODESIZE opcode"},"codecopy":{"v":3,"d":"Base fee of the CODECOPY opcode"},"gasprice":{"v":2,"d":"Base fee of the GASPRICE opcode"},"extcodesize":{"v":20,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":20,"d":"Base fee of the EXTCODECOPY opcode"},"blockhash":{"v":20,"d":"Base fee of the BLOCKHASH opcode"},"coinbase":{"v":2,"d":"Base fee of the COINBASE opcode"},"timestamp":{"v":2,"d":"Base fee of the TIMESTAMP opcode"},"number":{"v":2,"d":"Base fee of the NUMBER opcode"},"difficulty":{"v":2,"d":"Base fee of the DIFFICULTY opcode"},"gaslimit":{"v":2,"d":"Base fee of the GASLIMIT opcode"},"pop":{"v":2,"d":"Base fee of the POP opcode"},"mload":{"v":3,"d":"Base fee of the MLOAD opcode"},"mstore":{"v":3,"d":"Base fee of the MSTORE opcode"},"mstore8":{"v":3,"d":"Base fee of the MSTORE8 opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"},"jump":{"v":8,"d":"Base fee of the JUMP opcode"},"jumpi":{"v":10,"d":"Base fee of the JUMPI opcode"},"pc":{"v":2,"d":"Base fee of the PC opcode"},"msize":{"v":2,"d":"Base fee of the MSIZE opcode"},"gas":{"v":2,"d":"Base fee of the GAS opcode"},"push":{"v":3,"d":"Base fee of the PUSH opcode"},"dup":{"v":3,"d":"Base fee of the DUP opcode"},"swap":{"v":3,"d":"Base fee of the SWAP opcode"},"callcode":{"v":40,"d":"Base fee of the CALLCODE opcode"},"return":{"v":0,"d":"Base fee of the RETURN opcode"},"invalid":{"v":0,"d":"Base fee of the INVALID opcode"},"selfdestruct":{"v":0,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed"},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack"},"maxExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis"}},"pow":{"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be"},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations"},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":0,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},35993:e=>{"use strict";e.exports=JSON.parse('{"name":"constantinople","comment":"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)","url":"https://eips.ethereum.org/EIPS/eip-1013","status":"Final","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":200,"d":"Once per SSTORE operation if the value doesn\'t change"},"netSstoreInitGas":{"v":20000,"d":"Once per SSTORE operation from clean zero"},"netSstoreCleanGas":{"v":5000,"d":"Once per SSTORE operation from clean non-zero"},"netSstoreDirtyGas":{"v":200,"d":"Once per SSTORE operation from dirty"},"netSstoreClearRefund":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"netSstoreResetRefund":{"v":4800,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"netSstoreResetClearRefund":{"v":19800,"d":"Once per SSTORE operation for resetting to the original zero value"},"shl":{"v":3,"d":"Base fee of the SHL opcode"},"shr":{"v":3,"d":"Base fee of the SHR opcode"},"sar":{"v":3,"d":"Base fee of the SAR opcode"},"extcodehash":{"v":400,"d":"Base fee of the EXTCODEHASH opcode"},"create2":{"v":32000,"d":"Base fee of the CREATE2 opcode"}},"vm":{},"pow":{"minerReward":{"v":"2000000000000000000","d":"The amount a miner gets rewarded for mining a block"},"difficultyBombDelay":{"v":5000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},7197:e=>{"use strict";e.exports=JSON.parse('{"name":"dao","comment":"DAO rescue hardfork","url":"https://eips.ethereum.org/EIPS/eip-779","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},31088:e=>{"use strict";e.exports=JSON.parse('{"name":"grayGlacier","comment":"Delaying the difficulty bomb to Mid September 2022","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md","status":"Draft","eips":[5133],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},62800:e=>{"use strict";e.exports=JSON.parse('{"name":"homestead","comment":"Homestead hardfork with protocol and network changes","url":"https://eips.ethereum.org/EIPS/eip-606","status":"Final","gasConfig":{},"gasPrices":{"delegatecall":{"v":40,"d":"Base fee of the DELEGATECALL opcode"}},"vm":{},"pow":{}}')},83166:e=>{"use strict";e.exports=JSON.parse('{"name":"istanbul","comment":"HF targeted for December 2019 following the Constantinople/Petersburg HF","url":"https://eips.ethereum.org/EIPS/eip-1679","status":"Final","gasConfig":{},"gasPrices":{"blake2Round":{"v":1,"d":"Gas cost per round for the Blake2 F precompile"},"ecAdd":{"v":150,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":6000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":45000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":34000,"d":"Gas costs regarding curve pairing precompile input length"},"txDataNonZero":{"v":16,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"sstoreSentryGasEIP2200":{"v":2300,"d":"Minimum gas required to be present for an SSTORE call, not consumed"},"sstoreNoopGasEIP2200":{"v":800,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":800,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitGasEIP2200":{"v":20000,"d":"Once per SSTORE operation from clean zero to non-zero"},"sstoreInitRefundEIP2200":{"v":19200,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanGasEIP2200":{"v":5000,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreCleanRefundEIP2200":{"v":4200,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"sstoreClearRefundEIP2200":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"balance":{"v":700,"d":"Base fee of the BALANCE opcode"},"extcodehash":{"v":700,"d":"Base fee of the EXTCODEHASH opcode"},"chainid":{"v":2,"d":"Base fee of the CHAINID opcode"},"selfbalance":{"v":5,"d":"Base fee of the SELFBALANCE opcode"},"sload":{"v":800,"d":"Base fee of the SLOAD opcode"}},"vm":{},"pow":{}}')},61250:e=>{"use strict";e.exports=JSON.parse('{"name":"london","comment":"HF targeted for July 2021 following the Berlin fork","url":"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md","status":"Final","eips":[1559,3198,3529,3541]}')},88648:e=>{"use strict";e.exports=JSON.parse('{"name":"merge","comment":"Hardfork to upgrade the consensus mechanism to Proof-of-Stake","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md","status":"Draft","consensus":{"type":"pos","algorithm":"casper","casper":{}},"eips":[3675,4399]}')},49347:e=>{"use strict";e.exports=JSON.parse('{"name":"mergeForkIdTransition","comment":"Pre-merge hardfork to fork off non-upgraded clients","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Draft","eips":[]}')},42946:e=>{"use strict";e.exports=JSON.parse('{"name":"muirGlacier","comment":"HF to delay the difficulty bomb","url":"https://eips.ethereum.org/EIPS/eip-2384","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},4064:e=>{"use strict";e.exports=JSON.parse('{"name":"petersburg","comment":"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople","url":"https://eips.ethereum.org/EIPS/eip-1716","status":"Final","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreInitGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreCleanGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreDirtyGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreClearRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetClearRefund":{"v":null,"d":"Removed along EIP-1283"}},"vm":{},"pow":{}}')},5553:e=>{"use strict";e.exports=JSON.parse('{"name":"shanghai","comment":"Next feature hardfork after the merge hardfork","url":"https://github.com/ethereum/pm/issues/356","status":"Pre-Draft","eips":[]}')},90716:e=>{"use strict";e.exports=JSON.parse('{"name":"spuriousDragon","comment":"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit","url":"https://eips.ethereum.org/EIPS/eip-607","status":"Final","gasConfig":{},"gasPrices":{"expByte":{"v":50,"d":"Times ceil(log256(exponent)) for the EXP instruction"}},"vm":{"maxCodeSize":{"v":24576,"d":"Maximum length of contract code"}},"pow":{}}')},22302:e=>{"use strict";e.exports=JSON.parse('{"name":"tangerineWhistle","comment":"Hardfork with gas cost changes for IO-heavy operations","url":"https://eips.ethereum.org/EIPS/eip-608","status":"Final","gasConfig":{},"gasPrices":{"sload":{"v":200,"d":"Once per SLOAD operation"},"call":{"v":700,"d":"Once per CALL operation & message call transaction"},"extcodesize":{"v":700,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":700,"d":"Base fee of the EXTCODECOPY opcode"},"balance":{"v":400,"d":"Base fee of the BALANCE opcode"},"delegatecall":{"v":700,"d":"Base fee of the DELEGATECALL opcode"},"callcode":{"v":700,"d":"Base fee of the CALLCODE opcode"},"selfdestruct":{"v":5000,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{},"pow":{}}')},44946:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},75207:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},83630:e=>{"use strict";e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"blake3":30,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"libp2p-peer-record":769,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,"x11":4352,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},29799:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},18597:e=>{"use strict";e.exports={i8:"6.5.4"}},24070:e=>{"use strict";e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"x11":4352,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},22562:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},19794:e=>{"use strict";e.exports={version:"1.0.34"}},78920:e=>{"use strict";e.exports={i8:"1.10.4"}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n](o,o.exports,r),o.loaded=!0,o.exports}return r.amdO={},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r(17001)})(),e.exports=t()},2640:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8799:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(tthis.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n{const n=r(8341),i=r(135),o=r(4941),a=r(6458),s=r(5099),{BLOCKCHAINS_RENAME_PAIRS:u}=r(9660);e.exports=class{constructor(e){const t=e.blockchain?.name,r=e;t&&Object.keys(u).includes(t)&&(r.blockchain.name=u[t]),this.initializeServices(r)}initializeServices(e){this.blockchainService=this.initializeBlockchainService(e),this.nodeApiService=this.initializeNodeApiService(e),this.inputService=new s(e),this.validationService=new o}getServices(){return{blockchainService:this.blockchainService,nodeApiService:this.nodeApiService,validationService:this.validationService,inputService:this.inputService}}initializeNodeApiService(e){return e.communicationType&&n[e.communicationType]?new n[e.communicationType](e):new n.Default(e)}initializeBlockchainService(e){return a.nodeSupported()?new i.Node(e):a.nodeSupported()||window.ethereum||!e.blockchain?.privateKey?new i.Browser(e):new i.Node(e)}}},135:(e,t,r)=>{const n=r(7480),i=r(6268);e.exports={Browser:n,Node:i}},2913:(e,t,r)=>{const n=r(6450),i=r(2505),o=r(9784),a=r(7184),s=r(9033),u=r(6347),c=r(7247),l=r(3738),f=r(3582),d=r(2914),h=r(2566),p=r(684),y=r(568),m=r(5165),g=r(8469),b=r(4),{OPERATIONS_STEP_STATUS:v,DEFAULT_GAS_PRICE:w}=r(9660),A=r(2974),{sleepForMilliseconds:k}=r(6458);e.exports=class{constructor(e={}){this.config=e,this.events={},this.abis={},this.abis.AssertionStorage=o,this.abis.Hub=a,this.abis.ServiceAgreementV1=s,this.abis.ServiceAgreementStorageProxy=u,this.abis.ContentAssetStorage=c,this.abis.UnfinalizedStateStorage=l,this.abis.ContentAsset=f,this.abis.Token=d,this.abis.Paranet=h,this.abis.ParanetsRegistry=p,this.abis.ParanetIncentivesPoolFactory=y,this.abis.ParanetNeuroIncentivesPool=m,this.abis.ParanetKnowledgeMinersRegistry=g,this.abis.IdentityStorage=b,this.abis.ContentAsset.filter((e=>"event"===e.type)).forEach((e=>{const t=e.inputs.map((e=>e.internalType));this.events[e.name]={hash:n.utils.keccak256(`${e.name}(${t})`),inputs:e.inputs}}))}initializeWeb3(){return{}}async decodeEventLogs(){}async getPublicKey(){}async ensureBlockchainInfo(e){if(!this[e.name]){this[e.name]={contracts:{[e.hubContract]:{}},contractAddresses:{[e.hubContract]:{Hub:e.hubContract}}};const t=await this.getWeb3Instance(e);this[e.name].contracts[e.hubContract].Hub=new t.eth.Contract(this.abis.Hub,e.hubContract,{from:e.publicKey})}}async getWeb3Instance(e){if(!this[e.name].web3){const t={transactionPollingTimeout:e.transactionPollingTimeout};await this.initializeWeb3(e.name,e.rpc,t)}return this[e.name].web3}async getNetworkGasPrice(e){await this.ensureBlockchainInfo(e);const t=await this.getWeb3Instance(e);try{let r;if(e.name.startsWith("otp"))r=await t.eth.getGasPrice();else if(e.name.startsWith("base"))r=await t.eth.getGasPrice();else if(e.name.startsWith("gnosis")){const t=await i.get(e.gasPriceOracleLink);"100"===e.name.split(":")[1]?r=Number(t.data.result,10):"10200"===e.name.split(":")[1]&&(r=Math.round(1e9*t.data.average))}else r=n.utils.toWei(e.name.startsWith("otp")?w.OTP:w.GNOSIS,"Gwei");return r}catch(t){return console.warn(`Failed to fetch the gas price from the network: ${t}. Using default value: 2 Gwei.`),n.utils.toWei(e.name.startsWith("otp")?w.OTP:w.GNOSIS,"Gwei")}}async callContractFunction(e,t,r,n){await this.ensureBlockchainInfo(n);let i=await this.getContractInstance(e,n);try{return await i.methods[t](...r).call()}catch(o){if(/revert|VM Exception/i.test(o.message)){let o;try{o=await i.methods.status().call()}catch(e){o=!1}if(!o&&"ParanetNeuroIncentivesPool"!==e)return await this.updateContractInstance(e,n,!0),i=await this.getContractInstance(e,n),i.methods[t](...r).call()}throw o}}async prepareTransaction(e,t,r,n){await this.ensureBlockchainInfo(n);const i=await this.getWeb3Instance(n),o=await this.getPublicKey(n),a=await e.methods[t](...r).encodeABI();let s,u=Number(await e.methods[t](...r).estimateGas({from:o}));if(u=Math.round(u*n.gasLimitMultiplier),n.previousTxGasPrice&&n.retryTx)s=Math.round(1.2*n.previousTxGasPrice);else if(n.forceReplaceTxs){const e=await i.eth.getTransactionCount(o,"pending"),t=await i.eth.getTransactionCount(o,"latest");if(e>t){const e=await i.eth.getBlock("pending",!0),r=Object.values(e.transactions).find((e=>e.from.toLowerCase()===o.toLowerCase()&&e.nonce===t));s=r?Math.round(1.2*Number(r.gasPrice)):Math.round(1.2*(n.gasPrice||await this.getNetworkGasPrice(n)))}}else s=n.gasPrice||await this.getNetworkGasPrice(n);return n.simulateTxs&&await i.eth.call({to:e.options.address,data:a,from:o,gasPrice:s,gas:u}),{from:o,to:e.options.address,data:a,gasPrice:s,gas:u}}async waitForTransactionFinalization(e,t){await this.ensureBlockchainInfo(t);const r=await this.getWeb3Instance(t),n=Date.now();let i=0,o=e,a=!1;try{for(;!a&&Date.now()-n+i=o.blockNumber){a=!0;break}{let e=await r.eth.getTransactionReceipt(o.transactionHash);if(e&&e.blockNumber===o.blockNumber);else if(e&&e.blockNumber!==o.blockNumber)o=e;else{const n=Date.now();for(;!e&&Date.now()-n0?(await this.executeContractFunction("Token","increaseAllowance",[t,o],n),{allowanceIncreased:!0,allowanceGap:o}):{allowanceIncreased:!1,allowanceGap:o}}async createAsset(e,t,r,n,i=A){const o=await this.getPublicKey(n);let a,s=!1,u=0;try{let c;a=await this.getContractAddress("ServiceAgreementV1",n),({allowanceIncreased:s,allowanceGap:u}=await this.increaseServiceAgreementV1Allowance(o,a,e.tokenAmount,n)),i.afterHook({status:v.INCREASE_ALLOWANCE_COMPLETED}),c=null==t&&null==r?await this.executeContractFunction("ContentAsset","createAsset",[Object.values(e)],n):await this.executeContractFunction("Paranet","mintKnowledgeAsset",[t,r,Object.values(e)],n);let{tokenId:l}=await this.decodeEventLogs(c,"AssetMinted",n);return l=parseInt(l,10),i.afterHook({status:v.CREATE_ASSET_COMPLETED,data:{tokenId:l}}),{tokenId:l,receipt:c}}catch(e){throw s&&await this.executeContractFunction("Token","decreaseAllowance",[a,u],n),e}}async hasPendingUpdate(e,t){return this.callContractFunction("UnfinalizedStateStorage","hasPendingUpdate",[e],t)}async cancelAssetUpdate(e,t){return this.executeContractFunction("ContentAsset","cancelAssetStateUpdate",[e],t)}async getLatestAssertionId(e,t){return this.callContractFunction("ContentAssetStorage","getLatestAssertionId",[e],t)}async getUnfinalizedState(e,t){return this.callContractFunction("UnfinalizedStateStorage","getUnfinalizedState",[e],t)}async getAssetOwner(e,t){return this.callContractFunction("ContentAssetStorage","ownerOf",[e],t)}async burnAsset(e,t){return this.executeContractFunction("ContentAsset","burnAsset",[e],t)}async extendAssetStoringPeriod(e,t,r,n){const i=await this.getPublicKey(n);let o,a=!1,s=0;try{return o=await this.getContractAddress("ServiceAgreementV1",n),({allowanceIncreased:a,allowanceGap:s}=await this.increaseServiceAgreementV1Allowance(i,o,r,n)),this.executeContractFunction("ContentAsset","extendAssetStoringPeriod",[e,t,r],n)}catch(e){throw a&&await this.executeContractFunction("Token","decreaseAllowance",[o,s],n),e}}async addTokens(e,t,r){const n=await this.getPublicKey(r);let i,o=!1,a=0;try{return i=await this.getContractAddress("ServiceAgreementV1",r),({allowanceIncreased:o,allowanceGap:a}=await this.increaseServiceAgreementV1Allowance(n,i,t,r)),this.executeContractFunction("ContentAsset","increaseAssetTokenAmount",[e,t],r)}catch(e){throw o&&await this.executeContractFunction("Token","decreaseAllowance",[i,a],r),e}}async addUpdateTokens(e,t,r){const n=await this.getPublicKey(r);let i,o=!1,a=0;try{return i=await this.getContractAddress("ServiceAgreementV1",r),({allowanceIncreased:o,allowanceGap:a}=await this.increaseServiceAgreementV1Allowance(n,i,t,r)),this.executeContractFunction("ContentAsset","increaseAssetUpdateTokenAmount",[e,t],r)}catch(e){throw o&&await this.executeContractFunction("Token","decreaseAllowance",[i,a],r),e}}async getAssertionIdByIndex(e,t,r){return this.callContractFunction("ContentAssetStorage","getAssertionIdByIndex",[e,t],r)}async getAssertionIds(e,t){return this.callContractFunction("ContentAssetStorage","getAssertionIds",[e],t)}async getAssertionIssuer(e,t,r,n){return this.callContractFunction("ContentAssetStorage","getAssertionIssuer",[e,t,r],n)}async getAgreementData(e,t){const r=await this.callContractFunction("ServiceAgreementStorageProxy","getAgreementData",[e],t);return{startTime:Number(r[0]),epochsNumber:Number(r[1]),epochLength:Number(r[2]),tokenAmount:r[3][0],addedTokenAmount:r[3][1],scoreFunctionId:r[4][0],proofWindowOffsetPerc:r[4][1]}}async getAssertionSize(e,t){return this.callContractFunction("AssertionStorage","getAssertionSize",[e],t)}async registerParanet(e,t){return this.executeContractFunction("Paranet","registerParanet",Object.values(e),t)}async addParanetCuratedNodes(e,t){return this.executeContractFunction("Paranet","addParanetCuratedNodes",Object.values(e),t)}async removeParanetCuratedNodes(e,t){return this.executeContractFunction("Paranet","removeParanetCuratedNodes",Object.values(e),t)}async requestParanetCuratedNodeAccess(e,t){return this.executeContractFunction("Paranet","requestParanetCuratedNodeAccess",Object.values(e),t)}async approveCuratedNode(e,t){return this.executeContractFunction("Paranet","approveCuratedNode",Object.values(e),t)}async rejectCuratedNode(e,t){return this.executeContractFunction("Paranet","rejectCuratedNode",Object.values(e),t)}async getCuratedNodes(e,t){return this.callContractFunction("ParanetsRegistry","getCuratedNodes",Object.values(e),t)}async getKnowledgeMiners(e,t){return this.callContractFunction("ParanetsRegistry","getKnowledgeMiners",Object.values(e),t)}async addParanetCuratedMiners(e,t){return this.executeContractFunction("Paranet","addParanetCuratedMiners",Object.values(e),t)}async removeParanetCuratedMiners(e,t){return this.executeContractFunction("Paranet","removeParanetCuratedMiners",Object.values(e),t)}async requestParanetCuratedMinerAccess(e,t){return this.executeContractFunction("Paranet","requestParanetCuratedMinerAccess",Object.values(e),t)}async approveCuratedMiner(e,t){return this.executeContractFunction("Paranet","approveCuratedMiner",Object.values(e),t)}async rejectCuratedMiner(e,t){return this.executeContractFunction("Paranet","rejectCuratedMiner",Object.values(e),t)}async deployNeuroIncentivesPool(e,t){return this.executeContractFunction("ParanetIncentivesPoolFactory","deployNeuroIncentivesPool",Object.values(e),t)}async registerParanetService(e,t){return this.executeContractFunction("Paranet","registerParanetService",Object.values(e),t)}async addParanetServices(e,t){return this.executeContractFunction("Paranet","addParanetServices",Object.values(e),t)}async submitToParanet(e,t){return this.executeContractFunction("Paranet","submitKnowledgeAsset",Object.values(e),t)}async getUpdatingKnowledgeAssetStates(e,t){return this.callContractFunction("ParanetKnowledgeMinersRegistry","getUpdatingKnowledgeAssetStates",Object.values(e),t)}async updateClaimableRewards(e,t){return this.executeContractFunction("Paranet","processUpdatedKnowledgeAssetStatesMetadata",Object.values(e),t)}async getIncentivesPoolAddress(e,t){return this.callContractFunction("ParanetsRegistry","getIncentivesPoolAddress",Object.values(e),t)}async getNeuroIncentivesPoolAddress(e,t){return this.getIncentivesPoolAddress({paranetId:e,incentivesPoolType:"Neuroweb"},t)}async setIncentivesPool(e,t){if(await this.ensureBlockchainInfo(t),this[t.name].contractAddresses[t.hubContract].ParanetNeuroIncentivesPool!==e){this[t.name].contractAddresses[t.hubContract].ParanetNeuroIncentivesPool=e;const r=await this.getWeb3Instance(t);this[t.name].contracts[t.hubContract].ParanetNeuroIncentivesPool=await new r.eth.Contract(this.abis.ParanetNeuroIncentivesPool,this[t.name].contractAddresses[t.hubContract].ParanetNeuroIncentivesPool,{from:t.publicKey})}}async claimKnowledgeMinerReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.executeContractFunction("ParanetNeuroIncentivesPool","claimKnowledgeMinerReward",[],t)}async claimVoterReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.executeContractFunction("ParanetNeuroIncentivesPool","claimIncentivizationProposalVoterReward",[],t)}async claimOperatorReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.executeContractFunction("ParanetNeuroIncentivesPool","claimParanetOperatorReward",[],t)}async getClaimableKnowledgeMinerReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.callContractFunction("ParanetNeuroIncentivesPool","getClaimableKnowledgeMinerRewardAmount",[],t)}async getClaimableAllKnowledgeMinersReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.callContractFunction("ParanetNeuroIncentivesPool","getClaimableAllKnowledgeMinersRewardAmount",[],t)}async getClaimableVoterReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.callContractFunction("ParanetNeuroIncentivesPool","getClaimableProposalVoterRewardAmount",[],t)}async getClaimableAllVotersReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.callContractFunction("ParanetNeuroIncentivesPool","getClaimableAllProposalVotersRewardAmount",[],t)}async getClaimableOperatorReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.callContractFunction("ParanetNeuroIncentivesPool","getClaimableParanetOperatorRewardAmount",[],t)}async isParanetKnowledgeMiner(e,t,r){const n=await this.getNeuroIncentivesPoolAddress(t,r);return await this.setIncentivesPool(n,r),this.callContractFunction("ParanetNeuroIncentivesPool","isKnowledgeMiner",[e],r)}async isParanetOperator(e,t,r){const n=await this.getNeuroIncentivesPoolAddress(t,r);return await this.setIncentivesPool(n,r),this.callContractFunction("ParanetNeuroIncentivesPool","isParanetOperator",[e],r)}async isParanetProposalVoter(e,t,r){const n=await this.getNeuroIncentivesPoolAddress(t,r);return await this.setIncentivesPool(n,r),this.callContractFunction("ParanetNeuroIncentivesPool","isProposalVoter",[e],r)}async getIdentityId(e,t){return this.callContractFunction("IdentityStorage","getIdentityId",[e],t)}async getChainId(e){await this.ensureBlockchainInfo(e);return(await this.getWeb3Instance(e)).eth.getChainId()}async getBlockchainTimestamp(e){if(!e.name.startsWith("hardhat"))return Math.floor(Date.now()/1e3);return(await this.getLatestBlock(e)).timestamp}async getGasPrice(e){await this.ensureBlockchainInfo(e);const t=await this.getWeb3Instance(e);try{let r;if(e.name.startsWith("otp")||e.name.startsWith("base"))r=await t.eth.getGasPrice();else if(e.name.startsWith("gnosis")){const t=await i.get(e.gasPriceOracleLink);"100"===e.name.split(":")[1]?r=Number(t.result,10):"10200"===e.name.split(":")[1]&&(r=Math.round(1e9*t.data.average))}else r=n.utils.toWei(e.name.startsWith("otp")?w.OTP:w.GNOSIS,"Gwei");return r}catch(t){return console.warn(`Failed to fetch the gas price from the network: ${t}. Using default value: 2 Gwei.`),n.utils.toWei(e.name.startsWith("otp")?w.OTP:w.GNOSIS,"Gwei")}}async getWalletBalances(e){await this.ensureBlockchainInfo(e);const t=await this.getWeb3Instance(e),r=await this.getPublicKey(e);return{blockchainToken:await t.eth.getBalance(r),trac:await this.callContractFunction("Token","balanceOf",[await this.getPublicKey(e)],e)}}async getLatestBlock(e){await this.ensureBlockchainInfo(e);const t=await this.getWeb3Instance(e),r=await t.eth.getBlockNumber();return t.eth.getBlock(r)}convertToWei(e){return n.utils.toWei(e.toString(),"ether")}}},7480:(e,t,r)=>{const n=r(6450),i=r(2913),{WEBSOCKET_PROVIDER_OPTIONS:o}=r(9660);e.exports=class extends i{constructor(e={}){super(e),this.config=e}async initializeWeb3(e,t){if(void 0!==window.web3&&window.web3||console.error("No web3 implementation injected, please inject your own Web3 implementation."),window.ethereum){this[e].web3=new n(window.ethereum);try{await window.ethereum.enable()}catch(e){console.error(e)}}else if(t.startsWith("ws")){const r=(new n).providers.WebsocketProvider(t,o);this[e].web3=new n(r)}else this[e].web3=new n(t)}async decodeEventLogs(e,t,r){await this.ensureBlockchainInfo(r);const n=await this.getWeb3Instance(r);let i;const{hash:o,inputs:a}=this.events[t],s=Object.values(e.events);for(const e of s)if(e.raw.topics&&e.raw.topics.length>0&&e.raw.topics[0]===o){i=n.eth.abi.decodeLog(a,e.raw.data,e.raw.topics.slice(1));break}return i}async executeContractFunction(e,t,r,n){await this.ensureBlockchainInfo(n);let i,o=await this.getContractInstance(e,n);try{i=await this.prepareTransaction(o,t,r,n);let e=await o.methods[t](...r).send(i);return n.name.startsWith("otp")&&n.waitNeurowebTxFinalization&&(e=await this.waitForTransactionFinalization(e,n)),e}catch(a){if(/revert|VM Exception/i.test(a.message)){let a;try{a=await o.methods.status().call()}catch(e){a=!1}if(!a){await this.updateContractInstance(e,n,!0),o=await this.getContractInstance(e,n);const a=await this.getWeb3Instance(n);return await a.eth.call({to:o.options.address,data:i.data,from:i.from}),o.methods[t](...r).send(i)}}throw a}}async getPublicKey(){return this.getAccount()}async getAccount(){if(!this.account){if(!window.ethereum)throw Error("This operation can be performed only by using Metamask accounts.");const e=await window.ethereum.request({method:"eth_requestAccounts"}).catch((()=>console.error("There was an error fetching your accounts")));[this.account]=e}return this.account}async transferAsset(e,t,r){return this.executeContractFunction("ContentAssetStorage","transferFrom",[await this.getAccount(),t,e],r)}}},6268:(e,t,r)=>{const n=r(6450),{TRANSACTION_RETRY_ERRORS:i,WEBSOCKET_PROVIDER_OPTIONS:o}=r(9660),a=r(2913);e.exports=class extends a{constructor(e={}){super(e),this.config=e,this.events={},this.abis.ContentAsset.filter((e=>"event"===e.type)).forEach((e=>{const t=e.inputs.map((e=>e.internalType));this.events[e.name]={hash:n.utils.keccak256(`${e.name}(${t})`),inputs:e.inputs}}))}initializeWeb3(e,t,r){if(t.startsWith("ws")){const r=new n.providers.WebsocketProvider(t,o);this[e].web3=new n(r)}else this[e].web3=new n(t);r.transactionPollingTimeout&&(this[e].web3.eth.transactionPollingTimeout=r.transactionPollingTimeout)}async decodeEventLogs(e,t,r){await this.ensureBlockchainInfo(r);const n=await this.getWeb3Instance(r);let i;const{hash:o,inputs:a}=this.events[t];for(const t of e.logs)if(t.topics&&t.topics.length>0&&t.topics[0]===o){i=n.eth.abi.decodeLog(a,t.data,t.topics.slice(1));break}return i}async getPublicKey(e){return e?.publicKey}async executeContractFunction(e,t,r,n){await this.ensureBlockchainInfo(n);const o=await this.getWeb3Instance(n);let a,s,u=await this.getContractInstance(e,n),c=!1,l=!1;for(;void 0===a;)try{const e=await this.prepareTransaction(u,t,r,n);s=e.gasPrice,c=!0;const i=await o.eth.accounts.signTransaction(e,n.privateKey);a=await o.eth.sendSignedTransaction(i.rawTransaction),n.name.startsWith("otp")&&n.waitNeurowebTxFinalization&&(a=await this.waitForTransactionFinalization(a,n))}catch(t){if(c&&!l&&n.handleNotMinedError&&i.some((e=>t.message.toLowerCase().includes(e))))l=!0,n.retryTx=!0,n.previousTxGasPrice=s;else{if(l||!/revert|VM Exception/i.test(t.message))throw t;{let r;try{r=await u.methods.status().call()}catch(e){r=!1}if(r||"ParanetNeuroIncentivesPool"===e)throw t;await this.updateContractInstance(e,n,!0),u=await this.getContractInstance(e,n),l=!0,n.retryTx=!0}}}return a}async transferAsset(e,t,r){return this.executeContractFunction("ContentAssetStorage","transferFrom",[r.publicKey,t,e],r)}}},5099:(e,t,r)=>{const{DEFAULT_NEUROWEB_FINALITY_PARAMETERS:n,DEFAULT_PARAMETERS:i,DEFAULT_PROXIMITY_SCORE_FUNCTIONS_PAIR_IDS:o,BLOCKCHAINS:a,LOW_BID_SUGGESTION:s,PARANET_NODES_ACCESS_POLICY:u,PARANET_MINERS_ACCESS_POLICY:c}=r(9660);e.exports=class{constructor(e={}){this.config=e}getBidSuggestionArguments(e){return{blockchain:this.getBlockchain(e),endpoint:this.getEndpoint(e),port:this.getPort(e),epochsNum:this.getEpochsNum(e),hashFunctionId:this.getHashFunctionId(e),authToken:this.getAuthToken(e),bidSuggestionRange:this.getBidSuggestionRange(e)}}getAssetCreateArguments(e){return{blockchain:this.getBlockchain(e),endpoint:this.getEndpoint(e),port:this.getPort(e),maxNumberOfRetries:this.getMaxNumberOfRetries(e),frequency:this.getFrequency(e),epochsNum:this.getEpochsNum(e),hashFunctionId:this.getHashFunctionId(e),scoreFunctionId:this.getScoreFunctionId(e),immutable:this.getImmutable(e),tokenAmount:this.getTokenAmount(e),authToken:this.getAuthToken(e),paranetUAL:this.getParanetUAL(e)}}getAssetGetArguments(e){return{blockchain:this.getBlockchain(e),endpoint:this.getEndpoint(e),port:this.getPort(e),maxNumberOfRetries:this.getMaxNumberOfRetries(e),frequency:this.getFrequency(e),state:this.getState(e),contentType:this.getContentType(e),validate:this.getValidate(e),outputFormat:this.getOutputFormat(e),authToken:this.getAuthToken(e),hashFunctionId:this.getHashFunctionId(e),paranetUAL:this.getParanetUAL(e)}}getQueryArguments(e){return{graphLocation:this.getGraphLocation(e),graphState:this.getGraphState(e),endpoint:this.getEndpoint(e),port:this.getPort(e),maxNumberOfRetries:this.getMaxNumberOfRetries(e),frequency:this.getFrequency(e),authToken:this.getAuthToken(e),paranetUAL:this.getParanetUAL(e)}}getParanetCreateArguments(e){return{blockchain:this.getBlockchain(e),paranetName:this.getParanetName(e),paranetDescription:this.getParanetDescription(e),paranetNodesAccessPolicy:this.getParanetNodesAccessPolicy(e),paranetMinersAccessPolicy:this.getParanetMinersAccessPolicy(e)}}getParanetDeployIncentivesContractArguments(e){return{blockchain:this.getBlockchain(e),incentiveType:this.getIncentiveType(e),tracToNeuroEmissionMultiplier:this.getTracToNeuroEmissionMultiplier(e),operatorRewardPercentage:this.getOperatorRewardPercentage(e),incentivizationProposalVotersRewardPercentage:this.getIncentivizationProposalVotersRewardPercentage(e)}}getParanetCreateServiceArguments(e){return{blockchain:this.getBlockchain(e),paranetServiceName:this.getParanetServiceName(e),paranetServiceDescription:this.getParanetServiceDescription(e),paranetServiceAddresses:this.getParanetServiceAddresses(e)}}getParanetRoleCheckArguments(e){return{blockchain:this.getBlockchain(e),roleAddress:this.getRoleAddress(e)}}getBlockchain(e){const t=e.environment??this.config.environment??i.ENVIRONMENT,r=e.blockchain?.name??this.config.blockchain?.name??null,o=e.blockchain?.rpc??this.config.blockchain?.rpc??a[t][r]?.rpc,s=e.blockchain?.hubContract??this.config.blockchain?.hubContract??a[t][r]?.hubContract,u=e.blockchain?.publicKey??this.config.blockchain?.publicKey??null,c=e.blockchain?.privateKey??this.config.blockchain?.privateKey??null,l=e.blockchain?.handleNotMinedError??this.config.blockchain?.handleNotMinedError??i.HANDLE_NOT_MINED_ERROR,f={name:r,rpc:o,hubContract:s,publicKey:u,privateKey:c,gasLimitMultiplier:e.blockchain?.gasLimitMultiplier??this.config.blockchain?.gasLimitMultiplier??i.GAS_LIMIT_MULTIPLIER,gasPrice:e.blockchain?.gasPrice??this.config.blockchain?.gasPrice??void 0,transactionPollingTimeout:e.blockchain?.transactionPollingTimeout??this.config.blockchain?.transactionPollingTimeout??null,handleNotMinedError:l,simulateTxs:e.blockchain?.simulateTxs??this.config.blockchain?.simulateTxs??i.SIMULATE_TXS,forceReplaceTxs:e.blockchain?.forceReplaceTxs??this.config.blockchain?.forceReplaceTxs??i.FORCE_REPLACE_TXS,gasPriceOracleLink:e.blockchain?.gasPriceOracleLink??this.config.blockchain?.gasPriceOracleLink??a[t][r]?.gasPriceOracleLink??void 0};return r&&r.startsWith("otp")&&(f.waitNeurowebTxFinalization=e.blockchain?.waitNeurowebTxFinalization??this.config.blockchain?.waitNeurowebTxFinalization??n.WAIT_NEUROWEB_TX_FINALIZATION,f.transactionFinalityPollingInterval=e.blockchain?.transactionFinalityPollingInterval??this.config.blockchain?.transactionFinalityPollingInterval??n.TX_FINALITY_POLLING_INTERVAL,f.transactionFinalityMaxWaitTime=e.blockchain?.transactionFinalityMaxWaitTime??this.config.blockchain?.transactionFinalityMaxWaitTime??n.TX_FINALITY_MAX_WAIT_TIME,f.transactionReminingPollingInterval=e.blockchain?.transactionReminingPollingInterval??this.config.blockchain?.transactionReminingPollingInterval??n.TX_REMINING_POLLING_INTERVAL,f.transactionReminingMaxWaitTime=e.blockchain?.transactionReminingMaxWaitTime??this.config.blockchain?.transactionReminingMaxWaitTime??n.TX_REMINING_MAX_WAIT_TIME),f}getGraphLocation(e){return e.graphLocation??e.paranetUAL??this.config.graphLocation??i.GRAPH_LOCATION}getGraphState(e){return e.graphState??this.config.graphState??i.GRAPH_STATE}getEndpoint(e){return e.endpoint??this.config.endpoint??null}getPort(e){return e.port??this.config.port??i.PORT}getFrequency(e){return e.frequency??this.config.frequency??i.FREQUENCY}getHashFunctionId(e){return e.hashFunctionId??this.config.hashFunctionId??i.HASH_FUNCTION_ID}getScoreFunctionId(e){const t=e.environment??this.config.environment??i.ENVIRONMENT,r=this.getBlockchain(e).name;return o[t][r]}getEpochsNum(e){return e.epochsNum??this.config.epochsNum??null}getImmutable(e){return e.immutable??this.config.immutable??i.IMMUTABLE}getTokenAmount(e){return e.tokenAmount??this.config.tokenAmount??null}getState(e){return e.state??this.config.state??i.STATE}getContentType(e){return e.contentType??this.config.contentType??i.CONTENT_TYPE}getValidate(e){return e.validate??this.config.validate??i.VALIDATE}getOutputFormat(e){return e.outputFormat??this.config.outputFormat??i.OUTPUT_FORMAT}getMaxNumberOfRetries(e){return e.maxNumberOfRetries??this.config.maxNumberOfRetries??i.MAX_NUMBER_OF_RETRIES}getAuthToken(e){return e.auth?.token??this.config?.auth?.token??null}getBidSuggestionRange(e){return e.bidSuggestionRange??s}getParanetUAL(e){return e.paranetUAL??this.config.paranetUAL??null}getParanetName(e){return e.paranetName??null}getParanetDescription(e){return e.paranetDescription??null}getParanetNodesPolicy(e){return e.nodesAccessPolicy??u.OPEN}getParanetMinersPolicy(e){return e.minersAccessPolicy??c.OPEN}getParanetNodesAccessPolicy(e){return e.paranetNodesAccessPolicy??u.OPEN}getParanetMinersAccessPolicy(e){return e.paranetMinersAccessPolicy??c.OPEN}getTracToNeuroEmissionMultiplier(e){return e.tracToNeuroEmissionMultiplier??null}getIncentivizationProposalVotersRewardPercentage(e){return 100*e.incentivizationProposalVotersRewardPercentage??null}getOperatorRewardPercentage(e){return 100*e.operatorRewardPercentage??null}getIncentiveType(e){return e.incentiveType??null}getParanetServiceName(e){return e.paranetServiceName??null}getParanetServiceDescription(e){return e.paranetServiceDescription??null}getParanetServiceAddresses(e){return e.paranetServiceAddresses??[]}getRoleAddress(e){return e.roleAddress??null}}},560:(e,t,r)=>{const n=r(2505),{OPERATION_STATUSES:i}=r(9660),{sleepForMilliseconds:o}=r(6458);e.exports=class{constructor(e={}){this.config=e}async info(e,t,r){try{return await n({method:"get",url:`${e}:${t}/info`,headers:this.prepareRequestConfig(r)})}catch(e){throw Error(`Unable to get node info: ${e.message}`)}}async getBidSuggestion(e,t,r,i,o,a,s,u,c,l){try{const f={blockchain:i,epochsNumber:o,assertionSize:a,contentAssetStorageAddress:s,firstAssertionId:u,hashFunctionId:c};null!=l&&(f.bidSuggestionRange=l);return(await n({method:"get",url:`${e}:${t}/bid-suggestion`,params:f,headers:this.prepareRequestConfig(r)})).data.bidSuggestion}catch(e){throw Error(`Unable to get bid suggestion: ${e.message}`)}}async localStore(e,t,r,i){try{return(await n({method:"post",url:`${e}:${t}/local-store`,data:i,headers:this.prepareRequestConfig(r)})).data.operationId}catch(e){throw Error(`Unable to store locally: ${e.message}`)}}async publish(e,t,r,i,o,a,s,u,c){try{return(await n({method:"post",url:`${e}:${t}/publish`,data:{assertionId:i,assertion:o,blockchain:a,contract:s,tokenId:u,hashFunctionId:c},headers:this.prepareRequestConfig(r)})).data.operationId}catch(e){throw Error(`Unable to publish: ${e.message}`)}}async publishParanet(e,t,r,i,o,a,s,u,c,l,f){try{return(await n({method:"post",url:`${e}:${t}/publish-paranet`,data:{assertions:i,blockchain:o,contract:a,tokenId:s,hashFunctionId:u,paranetUAL:c,sender:l,txHash:f},headers:this.prepareRequestConfig(r)})).data.operationId}catch(e){throw Error(`Unable to publish: ${e.message}`)}}async get(e,t,r,i,o,a,s){try{return(await n({method:"post",url:`${e}:${t}/get`,data:{id:i,state:o,hashFunctionId:a,paranetUAL:s},headers:this.prepareRequestConfig(r)})).data.operationId}catch(e){throw Error(`Unable to get assertion: ${e.message}`)}}async query(e,t,r,i,o,a){try{return(await n({method:"post",url:`${e}:${t}/query`,data:{query:i,type:o,repository:a},headers:this.prepareRequestConfig(r)})).data.operationId}catch(e){throw Error(`Unable to query: ${e.message}`)}}async getOperationResult(e,t,r,a,s,u,c){await o(500);let l={status:i.PENDING},f=0;const d={method:"get",url:`${e}:${t}/${a}/${c}`,headers:this.prepareRequestConfig(r)};do{if(f>s){l.data={...l.data,data:{errorType:"DKG_CLIENT_ERROR",errorMessage:"Unable to get results. Max number of retries reached."}};break}f+=1,await o(1e3*u),l=await n(d)}while(l.data.status!==i.COMPLETED&&l.data.status!==i.FAILED);return l.data}prepareRequestConfig(e){return e?{Authorization:`Bearer ${e}`}:{}}}},2569:e=>{e.exports=class{publish(){}getOperationResult(){}}},8341:(e,t,r)=>{const n=r(2569),i=r(560);e.exports={Sockets:n,Https:i,Http:i,Default:i}},6458:(e,t,r)=>{const n=r(4841),{GRAPH_LOCATIONS:i,GRAPH_STATES:o,OT_NODE_TRIPLE_STORE_REPOSITORIES:a}=r(9660);e.exports={nodeSupported:()=>"undefined"==typeof window,isEmptyObject:function(e){return 0===Object.keys(e).length&&e.constructor===Object},toNumber:e=>parseInt(e.slice(2),16),deriveUAL:(e,t,r)=>`did:dkg:${e.toLowerCase()}/${t.toLowerCase()}/${r}`,resolveUAL(e){const t=e.split(":"),r=(3===t.length?t[2]:`${t[2]}:${t[3]}`).split("/");if(3!==r.length)throw new Error(`UAL doesn't have correct format: ${e}`);return{blockchain:r[0],contract:r[1],tokenId:parseInt(r[2],10)}},deriveRepository(e,t){switch(e+t){case i.PUBLIC_KG+o.CURRENT:return a.PUBLIC_CURRENT;case i.PUBLIC_KG+o.HISTORICAL:return a.PUBLIC_HISTORY;case i.LOCAL_KG+o.CURRENT:return a.PRIVATE_CURRENT;case i.LOCAL_KG+o.HISTORICAL:return a.PRIVATE_HISTORY;default:return e}},async sleepForMilliseconds(e){await new Promise((t=>setTimeout(t,e)))},capitalizeFirstLetter:e=>e[0].toUpperCase()+e.slice(1),getOperationStatusObject:(e,t)=>({operationId:t,...e.data?.errorType?{status:e.status,...e.data}:{status:e.status}}),async toNQuads(e,t){const r={algorithm:"URDNA2015",format:"application/n-quads"};t&&(r.inputFormat=t);return(await n.canonize(e,r)).split("\n").filter((e=>""!==e))},toJSONLD:async e=>n.fromRDF(e,{algorithm:"URDNA2015",format:"application/n-quads"})}},4941:(e,t,r)=>{const{isAddress:n}=r(4193),{ASSET_STATES:i,CONTENT_TYPES:o,GRAPH_LOCATIONS:a,GRAPH_STATES:s,MAX_FILE_SIZE:u,OPERATIONS:c,GET_OUTPUT_FORMATS:l,QUERY_TYPES:f,BID_SUGGESTION_RANGE_ENUM:d,PARANET_NODES_ACCESS_POLICY:h,PARANET_MINERS_ACCESS_POLICY:p}=r(9660),{nodeSupported:y}=r(6458);e.exports=class{validateNodeInfo(e,t,r){this.validateEndpoint(e),this.validatePort(t),this.validateAuthToken(r)}validateGraphQuery(e,t,r,n,i,o,a,s,u){this.validateQueryString(e),this.validateQueryType(t),this.validateGraphLocation(r),this.validateGraphState(n),this.validateEndpoint(i),this.validatePort(o),this.validateMaxNumberOfRetries(a),this.validateFrequency(s),this.validateAuthToken(u)}validateIsValidUAL(e){this.validateBlockchain(e)}validateSetAllowance(e){this.validateBlockchain(e)}validateIncreaseAllowance(e){this.validateBlockchain(e)}validateDecreaseAllowance(e){this.validateBlockchain(e)}validateAssetCreate(e,t,r,n,i,o,a,s,u,l,f,d,h){this.validateContent(e),this.validateBlockchain(t,c.PUBLISH),this.validateEndpoint(r),this.validatePort(n),this.validateMaxNumberOfRetries(i),this.validateFrequency(o),this.validateEpochsNum(a),this.validateHashFunctionId(s),this.validateScoreFunctionId(u),this.validateImmutable(l),this.validateTokenAmount(f),this.validateAuthToken(d),this.validateParanetUAL(h)}validateAssetGet(e,t,r,n,i,o,a,s,u,l,f,d){this.validateUAL(e),this.validateBlockchain(t,c.GET),this.validateEndpoint(r),this.validatePort(n),this.validateMaxNumberOfRetries(i),this.validateFrequency(o),this.validateState(a),this.validateContentType(s),this.validateHashFunctionId(u),this.validateValidate(l),this.validateOutputFormat(f),this.validateAuthToken(d)}validateAssetTransfer(e,t,r){this.validateUAL(e),this.validateNewOwner(t),this.validateBlockchain(r)}validateAssetGetOwner(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateAssetGetStateIssuer(e,t,r){this.validateUAL(e),this.validateStateIndex(t),this.validateBlockchain(r)}validateAssetGetStates(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateAssetGetLatestStateIssuer(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateAssetBurn(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateExtendAssetStoringPeriod(e,t,r,n){this.validateUAL(e),this.validateEpochsNum(t),this.validateTokenAmount(r),this.validateBlockchain(n)}validateAddTokens(e,t,r){this.validateUAL(e),this.validateTokenAmount(t),this.validateBlockchain(r)}validateGetIdentityId(e,t){this.validateAddress(e),this.validateBlockchain(t)}validateParanetCreate(e,t,r,n,i,o){this.validateUAL(e),this.validateBlockchain(t),this.validateParanetName(r),this.validateParanetDescription(n),this.validateParanetNodesAccessPolicy(i),this.validateParanetMinersAccessPolicy(o)}validateParanetAddCuratedNodes(e,t,r){this.validateUAL(e),this.validateBlockchain(t);for(const e of r)this.validateIdentityId(e)}validateParanetRemoveCuratedNodes(e,t,r){this.validateUAL(e),this.validateBlockchain(t);for(const e of r)this.validateIdentityId(e)}validateRequestParanetCuratedNodeAccess(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateApproveCuratedNode(e,t,r){this.validateUAL(e),this.validateBlockchain(t),this.validateIdentityId(r)}validateRejectCuratedNode(e,t,r){this.validateUAL(e),this.validateBlockchain(t),this.validateIdentityId(r)}validateGetCuratedNodes(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateGetParanetKnowledgeMiners(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateParanetAddCuratedMiners(e,t,r){this.validateUAL(e),this.validateBlockchain(t);for(const e of r)this.validateAddress(e)}validateParanetRemoveCuratedMiners(e,t,r){this.validateUAL(e),this.validateBlockchain(t);for(const e of r)this.validateAddress(e)}validateRequestParanetCuratedMinerAccess(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateApproveCuratedMiner(e,t,r){this.validateUAL(e),this.validateBlockchain(t),this.validateAddress(r)}validateRejectCuratedMiner(e,t,r){this.validateUAL(e),this.validateBlockchain(t),this.validateAddress(r)}validateDeployIncentivesContract(e,t,r,n,i){this.validateUAL(e),this.validateBlockchain(t),this.validateTracToNeuroEmissionMultiplier(r),this.validateOperatorRewardPercentage(n),this.validateIncentivizationProposalVotersRewardPercentage(i)}validateParanetRewardArguments(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateParanetRoleCheckArguments(e,t,r){this.validateAddress(e),this.validateUAL(t),this.validateBlockchain(r)}validateParanetCreateServiceArguments(e,t,r,n,i){this.validateUAL(e),this.validateBlockchain(i),this.validateParanetServiceName(t),this.validateParanetServiceDescription(r),this.validateParanetServiceAddresses(n)}validateParanetAddServicesArguments(e,t,r){this.validateUAL(e),this.validateBlockchain(r);for(const e of t)this.validateUAL(e)}validateSubmitToParanet(e,t,r){this.validateUAL(e),this.validateUAL(t),this.validateBlockchain(r)}validateRequiredParam(e,t){if(null==t)throw Error(`${e} is missing.`)}validateParamType(e,t,r){const n=Array.isArray(r);let i=t;if(n&&r.includes("number")){const e=parseInt(t,10);i=Number.isNaN(e)?t:e}else"number"===r&&(i=parseInt(t,10));const o=n?r:[r];if(!o.some((e=>typeof i===e)))throw new Error(`${e} must be of type ${o.join(" or ")}.`)}validateQueryString(e){this.validateRequiredParam("queryString",e),this.validateParamType("queryString",e,"string")}validateQueryType(e){this.validateRequiredParam("queryType",e);const t=Object.values(f);if(!t.includes(e))throw Error(`Invalid query Type: available query types: ${t}`)}validateGraphLocation(e){this.validateRequiredParam("graphLocation",e);const t=Object.keys(a);if(!t.includes(e)&&!this.validateUAL(e))throw Error(`Invalid graph location: available locations are valid Paranet UAL or: ${t}`)}validateGraphState(e){this.validateRequiredParam("graphState",e);const t=Object.keys(s);if(!t.includes(e))throw Error(`Invalid graph state: available states: ${t}`)}validateUAL(e){this.validateRequiredParam("UAL",e),this.validateParamType("UAL",e,"string");const t=e.split(":"),r=(3===t.length?t[2]:`${t[2]}:${t[3]}`).split("/");if(3!==r?.length)throw Error("Invalid UAL.");return!0}validateStateIndex(e){if(this.validateRequiredParam("stateIndex",e),this.validateParamType("stateIndex",e,"number"),e<0)throw Error("Invalid state index.")}validateObjectType(e){if(!e||"object"!=typeof e)throw Error("Content must be an object")}validateContent(e){this.validateRequiredParam("content",e);const t=Object.keys(e);if(!(1===t.length&&(t.includes("public")||t.includes("private"))||2===t.length&&(t.includes("public")||t.includes("private"))))throw Error('content keys can only be "public", "private" or both.');if(!e.public&&!e.private)throw Error("Public or private content must be defined")}validateAssertionSizeInBytes(e){if(e>u)throw Error(`File size limit is ${u/1048576}MB.`)}validateEndpoint(e){if(this.validateRequiredParam("endpoint",e),this.validateParamType("endpoint",e,"string"),!e.startsWith("http")&&!e.startsWith("ws"))throw Error('Endpoint should start with either "http" or "ws"')}validatePort(e){this.validateRequiredParam("port",e),this.validateParamType("port",e,"number")}validateMaxNumberOfRetries(e){this.validateRequiredParam("maxNumberOfRetries",e),this.validateParamType("maxNumberOfRetries",e,"number")}validateFrequency(e){this.validateRequiredParam("frequency",e),this.validateParamType("frequency",e,"number")}validateState(e){this.validateRequiredParam("state",e),this.validateParamType("state",e,["number","string"]);const t=Object.values(i);if("string"==typeof e&&!t.includes(e.toUpperCase())&&"number"!=typeof e&&!/^0x[a-fA-F0-9]{64}$/.test(e))throw Error(`Invalid state, available states: ${t},numerical or hash.`)}validateContentType(e){this.validateRequiredParam("contentType",e);const t=Object.values(o);if(!t.includes(e))throw Error(`Invalid content visibility! Available parameters: ${t}`)}validateEpochsNum(e){this.validateRequiredParam("epochsNum",e),this.validateParamType("epochsNum",e,"number")}validateHashFunctionId(e){this.validateRequiredParam("hashFunctionId",e),this.validateParamType("hashFunctionId",e,"number")}validateScoreFunctionId(e){this.validateRequiredParam("scoreFunctionId",e),this.validateParamType("scoreFunctionId",e,"number")}validateImmutable(e){this.validateRequiredParam("immutable",e),this.validateParamType("immutable",e,"boolean")}validateTokenAmount(e){null!=e&&this.validateParamType("tokenAmount",e,"number")}validateGasPrice(e){null!=e&&this.validateParamType("gasPrice",e,"number")}validateTransactionPollingTimeout(e){null!=e&&this.validateParamType("tokenAmount",e,"number")}validateAuthToken(e){null!=e&&this.validateParamType("authToken",e,"string")}validateParanetUAL(e){null!=e&&this.validateUAL(e)}validateValidate(e){this.validateRequiredParam("validate",e),this.validateParamType("validate",e,"boolean")}validateOutputFormat(e){this.validateRequiredParam("outputFormat",e);const t=Object.values(l);if(!t.includes(e))throw Error(`Invalid query Type: available query types: ${t}`)}validateBlockchain(e,t){this.validateRequiredParam("blockchain",e),this.validateRequiredParam("blockchain name",e.name),this.validateRequiredParam("blockchain hub contract",e.hubContract),this.validateGasPrice(e.gasPrice),this.validateTransactionPollingTimeout(e.transactionPollingTimeout),y()&&(this.validateRequiredParam("blockchain rpc",e.rpc),t!==c.GET&&(this.validateRequiredParam("blockchain public key",e.publicKey),this.validateRequiredParam("blockchain private key",e.privateKey)))}validateNewOwner(e){this.validateRequiredParam("newOwner",e),this.validateParamType("newOwner",e,"string")}validateGetBidSuggestion(e){this.validateBidSuggestionRange(e)}validateBidSuggestionRange(e){if(!d.includes(e))throw Error(`Invalid bidSuggestionRange parametar: supported parametars ${d}`)}validateParanetName(e){this.validateRequiredParam("paranetName",e),this.validateParamType("paranetName",e,"string")}validateParanetDescription(e){this.validateRequiredParam("paranetDescription",e),this.validateParamType("paranetDescription",e,"string")}validateParanetNodesAccessPolicy(e){if(this.validateRequiredParam("paranetNodesAccessPolicy",e),this.validateParamType("paranetNodesAccessPolicy",e,"number"),!Object.values(h).includes(e))throw Error(`Invalid nodes access policy: ${e}. Should be 0 for OPEN or 1 for CURATED`)}validateParanetMinersAccessPolicy(e){if(this.validateRequiredParam("paranetMinersAccessPolicy",e),this.validateParamType("paranetMinersAccessPolicy",e,"number"),!Object.values(p).includes(e))throw Error(`Invalid miners access policy: ${e}. Should be 0 for OPEN or 1 for CURATED`)}validateTracToNeuroEmissionMultiplier(e){this.validateRequiredParam("tracToNeuroEmissionMultiplier",e),this.validateParamType("tracToNeuroEmissionMultiplier",e,"number")}validateIncentivizationProposalVotersRewardPercentage(e){if(this.validateRequiredParam("incentivizationProposalVotersRewardPercentage",e),this.validateParamType("incentivizationProposalVotersRewardPercentage",e,"number"),e>1e4||e<0)throw Error("Invalid percentage value for incentivization proposal voters reward.")}validateOperatorRewardPercentage(e){if(this.validateRequiredParam("operatorRewardPercentage",e),this.validateParamType("operatorRewardPercentage",e,"number"),e>1e4||e<0)throw Error("Invalid percentage value for operator reward.")}validateParanetServiceName(e){this.validateRequiredParam("paranetServiceName",e),this.validateParamType("paranetServiceName",e,"string")}validateParanetServiceDescription(e){this.validateRequiredParam("paranetServiceDescription",e),this.validateParamType("paranetServiceDescription",e,"string")}validateParanetServiceAddresses(e){if(0!==e.length)for(const t of e)this.validateAddress(t)}validateAddress(e){if(this.validateRequiredParam("address",e),this.validateParamType("address",e,"string"),!n(e))throw Error(`Wrong address format. Given address: ${e}`)}validateIdentityId(e){this.validateRequiredParam("identityId",e),this.validateParamType("identityId",e,"number")}}},2974:e=>{e.exports={afterHook:()=>{}}},7790:()=>{},477:()=>{},7789:()=>{},3514:(e,t)=>{"use strict";const r=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function n(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e>--u&1}const f=2**31,d=f>>>1,h=d>>1,p=f-1;let y=0;for(let e=0;e<31;e++)y=y<<1|l();let m=[],g=0,b=f;for(;;){let e=Math.floor(((y-g+1)*i-1)/b),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|l(),a=a<<1^d,s=(s^d)<<1|d|1;g=a,b=1+s-a}let v=n-4;return m.map((t=>{switch(t-v){case 3:return v+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return v+256+(e[s++]<<8|e[s++]);case 1:return v+e[s++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,r)=>t[e.charCodeAt(0)]=r));let r=e.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,a=0,s=0;i=8&&(n[o++]=s>>(a-=8));return n}(e)))}function i(e){return 1&e?~e>>1:e>>1}function o(e,t){let r=Array(e);for(let n=0,o=0;n{let t=a(e);if(t.length)return t}))}function u(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(f(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(d(r,e))}return t.flat()}function c(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function l(e,t,r){let n=Array(e).fill().map((()=>[]));for(let i=0;in[t].push(e)));return n}function f(e,t){let r=1+t(),n=t(),i=c(t);return l(i.length,1+e,t).flatMap(((e,t)=>{let[o,...a]=e;return Array(i[t]).fill().map(((e,t)=>{let i=t*n;return[o+t*r,a.map((e=>e+i))]}))}))}function d(e,t){return l(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}function h(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function p(e){let t=[];for(let r=0,n=e.length;r>24&255}function S(e){return 16777215&e}let x,_,P,T;function I(e){return e>=g&&e<55204}function O(e,t){if(e>=b&&e<4371&&t>=v&&t<4470)return g+(e-b)*k+(t-v)*A;if(I(e)&&t>w&&t<4547&&(e-g)%A==0)return e+(t-w);{let r=T.get(e);return r&&(r=r.get(t),r)?r:-1}}function B(e){x||function(){let e=n("AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g");x=new Map(s(e).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),_=new Set(a(e)),P=new Map,T=new Map;for(let[t,r]of u(e)){if(!_.has(t)&&2==r.length){let[e,n]=r,i=T.get(e);i||(i=new Map,T.set(e,i)),i.set(n,t)}P.set(t,r.reverse())}}();let t=[],r=[],i=!1;function o(e){let r=x.get(e);r&&(i=!0,e|=r),t.push(e)}for(let n of e)for(;;){if(n<128)t.push(n);else if(I(n)){let e=n-g,t=e%k/A|0,r=e%A;o(b+(e/k|0)),o(v+t),r>0&&o(w+r)}else{let e=P.get(n);e?r.push(...e):o(n)}if(!r.length)break;n=r.pop()}if(i&&t.length>1){let e=E(t[0]);for(let r=1;r0&&i>=e)0==e?(t.push(n,...r),r.length=0,n=a):r.push(a),i=e;else{let o=O(n,a);o>=0?n=o:0==i&&0==e?(t.push(n),n=a):(r.push(a),i=e)}}return n>=0&&t.push(n,...r),t}(B(e))}const R=".",M=e=>Array.from(e);function U(e,t){return e.P.has(t)||e.Q.has(t)}class L extends Array{get is_emoji(){return!0}}let j,F,D,H,z,q,G,K,V,J,W,Q;function Z(){if(j)return;let e=n("AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI");const t=()=>a(e),r=()=>new Set(t()),i=(e,t)=>t.forEach((t=>e.add(t)));j=new Map(u(e)),F=r(),D=t(),H=new Set(t().map((e=>D[e]))),D=new Set(D),z=r(),q=r();let o=s(e),l=e();const f=()=>{let e=new Set;return t().forEach((t=>i(e,o[t]))),i(e,t()),e};G=c((t=>{let r=c(e).map((e=>e+96));if(r.length){let n=t>=l;return r[0]-=32,r=y(r),n&&(r=`Restricted[${r}]`),{N:r,P:f(),Q:f(),M:!e(),R:n}}})),K=r(),V=new Map;let d=t().concat(M(K)).sort(((e,t)=>e-t));d.forEach(((t,r)=>{let n=e(),i=d[r]=n?d[r-n]:{V:[],M:new Map};i.V.push(t),K.has(t)||V.set(t,i)}));for(let{V:e,M:t}of new Set(V.values())){let r=[];for(let t of e){let e=G.filter((e=>U(e,t))),n=r.find((({G:t})=>e.some((e=>t.has(e)))));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(t),i(n.G,e)}let n=r.flatMap((e=>M(e.G)));for(let{G:e,V:i}of r){let r=new Set(n.filter((t=>!e.has(t))));for(let e of i)t.set(e,r)}}J=new Set;let h=new Set;const p=e=>J.has(e)?h.add(e):J.add(e);for(let e of G){for(let t of e.P)p(t);for(let t of e.Q)p(t)}for(let e of J)V.has(e)||h.has(e)||V.set(e,1);i(J,C(J)),W=function(e){let t=[],r=a(e);return function e({S:r,B:n},i,o){if(!(4&r&&o===i[i.length-1])){2&r&&(o=i[i.length-1]),1&r&&t.push(i);for(let t of n)for(let r of t.Q)e(t,[...i,r],o)}}(function t(n){return{S:e(),B:c((()=>{let n=a(e).map((e=>r[e]));if(n.length)return t(n)})),Q:n}}([]),[]),t}(e).map((e=>L.from(e))).sort(m),Q=new Map;for(let e of W){let t=[Q];for(let r of e){let e=t.map((e=>{let t=e.get(r);return t||(t=new Map,e.set(r,t)),t}));65039===r?t.push(...e):t=e}for(let r of t)r.V=e}}function Y(e){return(te(e)?"":`${X($([e]))} `)+h(e)}function X(e){return`"${e}"‎`}function $(e,t=1/0,r=h){let n=[];ee(e[0])&&n.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let i=0,o=e.length;for(let t=0;t{let o=p(e),a={input:o,offset:i};i+=o.length+1;try{let e,i=a.tokens=ue(o,t,n),s=i.length;if(!s)throw new Error("empty label");let u=a.output=i.flat();if(function(e){for(let t=e.lastIndexOf(95);t>0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}(u),!(a.emoji=s>1||i[0].is_emoji)&&u.every((e=>e<128)))!function(e){if(e.length>=4&&45==e[2]&&45==e[3])throw new Error(`invalid label extension: "${y(e.slice(0,4))}"`)}(u),e="ASCII";else{let t=i.flatMap((e=>e.is_emoji?[]:e));if(t.length){if(D.has(u[0]))throw se("leading combining mark");for(let e=1;eU(e,r)));if(!e.length)throw G.some((e=>U(e,r)))?ae(t[0],r):oe(r);if(t=e,1==e.length)break}return t}(n);!function(e,t){for(let r of t)if(!U(e,r))throw ae(e,r);if(e.M){let e=C(t);for(let t=1,r=e.length;t4)throw new Error(`excessive non-spacing marks: ${X($(e.slice(t-1,n)))} (${n-t}/4)`);t=n}}}(o,t),function(e,t){let r,n=[];for(let e of t){let t=V.get(e);if(1===t)return;if(t){let n=t.M.get(e);if(r=r?r.filter((e=>n.has(e))):M(n),!r.length)return}else n.push(e)}if(r)for(let t of r)if(n.every((e=>U(t,e))))throw new Error(`whole-script confusable: ${e.N}/${t.N}`)}(o,n),e=o.N}else e="Emoji"}a.type=e}catch(e){a.error=e}return a}))}function ie(e){return e.map((({input:t,error:r,output:n})=>{if(r){let n=r.message;throw new Error(1==e.length?n:`Invalid label ${X($(t,63))}: ${n}`)}return y(n)})).join(R)}function oe(e){return new Error(`disallowed character: ${Y(e)}`)}function ae(e,t){let r=Y(t),n=G.find((e=>e.P.has(t)));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${e.N} + ${r}`)}function se(e){return new Error(`illegal placement: ${e}`)}function ue(e,t,r){let n=[],i=[];for(e=e.slice().reverse();e.length;){let o=le(e);if(o)i.length&&(n.push(t(i)),i=[]),n.push(r(o));else{let t=e.pop();if(J.has(t))i.push(t);else{let e=j.get(t);if(e)i.push(...e);else if(!F.has(t))throw oe(t)}}}return i.length&&n.push(t(i)),n}function ce(e){return e.filter((e=>65039!=e))}function le(e,t){let r,n=Q,i=e.length;for(;i&&(n=n.get(e[--i]),n);){let{V:o}=n;o&&(r=o,t&&t.push(...e.slice(i).reverse()),e.length=i)}return r}const fe="valid",de="mapped",he="ignored";function pe(e){return e==fe||e==de}function ye(e){return e.some((e=>q.has(e)))}function me(e){for(let t=0;te.cps))})}return e}t.ens_beautify=function(e){let t=ne(e,N,(e=>e));for(let{type:e,output:r,error:n}of t){if(n)break;"Greek"!==e&&re(r,958,926)}return ie(t)},t.ens_emoji=function(){return Z(),W.map((e=>e.slice()))},t.ens_normalize=function(e){return ie(ne(e,N,ce))},t.ens_normalize_fragment=function(e,t){Z();let r=t?C:N;return e.split(R).map((e=>y(ue(p(e),r,ce).flat()))).join(R)},t.ens_split=function(e,t){return ne(e,N,t?e=>e.slice():ce)},t.ens_tokenize=function e(t,{nf:r=!0}={}){Z();let n=p(t).reverse(),i=[],o=[];for(;n.length;){let e=le(n,i);if(e)o.push({type:"emoji",emoji:e.slice(),input:i,cps:ce(e)}),i=[];else{let e=n.pop();if(46==e)o.push({type:"stop",cp:e});else if(J.has(e))o.push({type:fe,cps:[e]});else if(F.has(e))o.push({type:he,cp:e});else{let t=j.get(e);t?o.push({type:de,cp:e,cps:t.slice()}):o.push({type:"disallowed",cp:e})}}}if(r)for(let t=0,r=-1;tpe(e.type)?e.cps:[])),s=N(a);m(s,a)?(o.splice(r,n-r,{type:"nfc",input:a,cps:s,tokens0:me(i),tokens:e(y(s),{nf:!1})}),t=r):t=n-1,r=-1}else r=t;else n.type!==he&&(r=-1)}return me(o)},t.is_combining_mark=ee,t.nfc=N,t.nfd=C,t.safe_str_from_cps=$,t.should_escape=te},6013:function(e,t){"use strict";var r,n,i,o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},a=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.AES=void 0;const s={16:10,24:12,32:14},u=[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],c=[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],l=[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],f=[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],d=[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],h=[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],p=[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],y=[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],m=[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],g=[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],b=[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],v=[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],w=[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],A=[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],k=[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 E(e){const t=[];for(let r=0;r>2,o(this,i,"f")[h][e%4]=d[e],o(this,n,"f")[t-h][e%4]=d[e];let p,y=0,m=f;for(;m>16&255]<<24^c[p>>8&255]<<16^c[255&p]<<8^c[p>>24&255]^u[y]<<24,y+=1,8!=f)for(let e=1;e>8&255]<<8^c[p>>16&255]<<16^c[p>>24&255]<<24;for(let e=f/2+1;e>2,r=m%4,o(this,i,"f")[e][r]=d[a],o(this,n,"f")[t-e][r]=d[a++],m++}for(let e=1;e>24&255]^w[p>>16&255]^A[p>>8&255]^k[255&p]}encrypt(e){if(16!=e.length)throw new TypeError("invalid plaintext size (must be 16 bytes)");const t=o(this,i,"f").length-1,r=[0,0,0,0];let n=E(e);for(let e=0;e<4;e++)n[e]^=o(this,i,"f")[0][e];for(let e=1;e>24&255]^d[n[(t+1)%4]>>16&255]^h[n[(t+2)%4]>>8&255]^p[255&n[(t+3)%4]]^o(this,i,"f")[e][t];n=r.slice()}const a=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=o(this,i,"f")[t][e],a[4*e]=255&(c[n[e]>>24&255]^s>>24),a[4*e+1]=255&(c[n[(e+1)%4]>>16&255]^s>>16),a[4*e+2]=255&(c[n[(e+2)%4]>>8&255]^s>>8),a[4*e+3]=255&(c[255&n[(e+3)%4]]^s);return a}decrypt(e){if(16!=e.length)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const t=o(this,n,"f").length-1,r=[0,0,0,0];let i=E(e);for(let e=0;e<4;e++)i[e]^=o(this,n,"f")[0][e];for(let e=1;e>24&255]^m[i[(t+3)%4]>>16&255]^g[i[(t+2)%4]>>8&255]^b[255&i[(t+1)%4]]^o(this,n,"f")[e][t];i=r.slice()}const a=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=o(this,n,"f")[t][e],a[4*e]=255&(l[i[e]>>24&255]^s>>24),a[4*e+1]=255&(l[i[(e+3)%4]>>16&255]^s>>16),a[4*e+2]=255&(l[i[(e+2)%4]>>8&255]^s>>8),a[4*e+3]=255&(l[255&i[(e+1)%4]]^s);return a}}t.AES=S,r=new WeakMap,n=new WeakMap,i=new WeakMap},8165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=t.OFB=t.ECB=t.CTR=t.CFB=t.CBC=t.ModeOfOperation=t.AES=void 0;var n=r(6013);Object.defineProperty(t,"AES",{enumerable:!0,get:function(){return n.AES}});var i=r(6342);Object.defineProperty(t,"ModeOfOperation",{enumerable:!0,get:function(){return i.ModeOfOperation}});var o=r(2977);Object.defineProperty(t,"CBC",{enumerable:!0,get:function(){return o.CBC}});var a=r(9990);Object.defineProperty(t,"CFB",{enumerable:!0,get:function(){return a.CFB}});var s=r(4164);Object.defineProperty(t,"CTR",{enumerable:!0,get:function(){return s.CTR}});var u=r(1485);Object.defineProperty(t,"ECB",{enumerable:!0,get:function(){return u.ECB}});var c=r(226);Object.defineProperty(t,"OFB",{enumerable:!0,get:function(){return c.OFB}});var l=r(8420);Object.defineProperty(t,"pkcs7Pad",{enumerable:!0,get:function(){return l.pkcs7Pad}}),Object.defineProperty(t,"pkcs7Strip",{enumerable:!0,get:function(){return l.pkcs7Strip}})},2977:function(e,t,r){"use strict";var n,i,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CBC=void 0;const s=r(6342);class u extends s.ModeOfOperation{constructor(e,t){if(super("ECC",e,u),n.set(this,void 0),i.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");o(this,n,new Uint8Array(t),"f")}else o(this,n,new Uint8Array(16),"f");o(this,i,this.iv,"f")}get iv(){return new Uint8Array(a(this,n,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;rNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let t=15;t>=0;--t)s(this,o,"f")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError("invalid counter initial Uint8Array value length");s(this,o,"f").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==s(this,o,"f")[e]){s(this,o,"f")[e]++;break}s(this,o,"f")[e]=0}}encrypt(e){var t,r;const u=new Uint8Array(e);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ECB=void 0;const n=r(6342);class i extends n.ModeOfOperation{constructor(e){super("ECB",e,i)}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModeOfOperation=void 0;const n=r(6013);t.ModeOfOperation=class{constructor(e,t,r){if(r&&!(this instanceof r))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new n.AES(t)},name:{enumerable:!0,value:e}})}}},8420:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=void 0,t.pkcs7Pad=function(e){const t=16-e.length%16,r=new Uint8Array(e.length+t);r.set(e);for(let n=e.length;n16)throw new TypeError("PKCS#7 padding byte out of range");const r=e.length-t;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="6.13.2"},954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbiCoder=void 0;const n=r(5347),i=r(8869),o=r(1355),a=r(3178),s=r(8719),u=r(2348),c=r(9095),l=r(8026),f=r(7398),d=r(8766),h=r(1693),p=r(189),y=r(646),m=r(5347),g=new Map;g.set(0,"GENERIC_PANIC"),g.set(1,"ASSERT_FALSE"),g.set(17,"OVERFLOW"),g.set(18,"DIVIDE_BY_ZERO"),g.set(33,"ENUM_RANGE_ERROR"),g.set(34,"BAD_STORAGE_DATA"),g.set(49,"STACK_UNDERFLOW"),g.set(50,"ARRAY_RANGE_ERROR"),g.set(65,"OUT_OF_MEMORY"),g.set(81,"UNINITIALIZED_FUNCTION_CALL");const b=new RegExp(/^bytes([0-9]*)$/),v=new RegExp(/^(u?int)([0-9]*)$/);let w=null,A=1024;class k{#e(e){if(e.isArray())return new a.ArrayCoder(this.#e(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new h.TupleCoder(e.components.map((e=>this.#e(e))),e.name);switch(e.baseType){case"address":return new o.AddressCoder(e.name);case"bool":return new s.BooleanCoder(e.name);case"string":return new d.StringCoder(e.name);case"bytes":return new u.BytesCoder(e.name);case"":return new l.NullCoder(e.name)}let t=e.type.match(v);if(t){let r=parseInt(t[2]||"256");return(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid "+t[1]+" bit length","param",e),new f.NumberCoder(r/8,"int"===t[1],e.name)}if(t=e.type.match(b),t){let r=parseInt(t[1]);return(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","param",e),new c.FixedBytesCoder(r,e.name)}(0,n.assertArgument)(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#e(p.ParamType.from(e))));return new h.TupleCoder(t,"_").defaultValue()}encode(e,t){(0,n.assertArgumentCount)(t.length,e.length,"types/values length mismatch");const r=e.map((e=>this.#e(p.ParamType.from(e)))),o=new h.TupleCoder(r,"_"),a=new i.Writer;return o.encode(a,t),a.data}decode(e,t,r){const n=e.map((e=>this.#e(p.ParamType.from(e))));return new h.TupleCoder(n,"_").decode(new i.Reader(t,r,A))}static _setDefaultMaxInflation(e){(0,n.assertArgument)("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),A=e}static defaultAbiCoder(){return null==w&&(w=new k),w}static getBuiltinCallException(e,t,r){return function(e,t,r,n){let i="missing revert data",o=null,a=null;if(r){i="execution reverted";const e=(0,m.getBytes)(r);if(r=(0,m.hexlify)(r),0===e.length)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(e.length%32!=4)i+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,m.hexlify)(e.slice(0,4)))try{o=n.decode(["string"],e.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch(e){i+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,m.hexlify)(e.slice(0,4)))try{const t=Number(n.decode(["uint256"],e.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[t]},o=`Panic due to ${g.get(t)||"UNKNOWN"}(${t})`,i+=`: ${o}`}catch(e){i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const s={to:t.to?(0,y.getAddress)(t.to):null,data:t.data||"0x"};return t.from&&(s.from=(0,y.getAddress)(t.from)),(0,m.makeError)(i,"CALL_EXCEPTION",{action:e,data:r,reason:o,transaction:s,invocation:null,revert:a})}(e,t,r,k.defaultAbiCoder())}}t.AbiCoder=k},9414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBytes32String=t.encodeBytes32String=void 0;const n=r(5347);t.encodeBytes32String=function(e){const t=(0,n.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,n.zeroPadBytes)(t,32)},t.decodeBytes32String=function(e){const t=(0,n.getBytes)(e,"bytes");if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,n.toUtf8String)(t.slice(0,r))}},8869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reader=t.Writer=t.Coder=t.checkResultErrors=t.Result=t.WordSize=void 0;const n=r(5347);t.WordSize=32;const i=new Uint8Array(t.WordSize),o=["then"],a={},s=new WeakMap;function u(e){return s.get(e)}function c(e,t){s.set(e,t)}function l(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}function f(e,t,r){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof d?f(u(e),e,r):e)):e.reduce(((e,n,i)=>{let o=t.getValue(n);return n in e||(r&&o instanceof d&&(o=f(u(o),o,r)),e[n]=o),e}),{})}class d extends Array{#t;constructor(...e){const t=e[0];let r=e[1],i=(e[2]||[]).slice(),s=!0;t!==a&&(r=e,i=[],s=!1),super(r.length),r.forEach(((e,t)=>{this[t]=e}));const f=i.reduce(((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(c(this,Object.freeze(r.map(((e,t)=>{const r=i[t];return null!=r&&1===f.get(r)?r:null})))),this.#t=[],null==this.#t&&this.#t,!s)return;Object.freeze(this);const d=new Proxy(this,{get:(e,t,r)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){const r=(0,n.getNumber)(t,"%index");if(r<0||r>=this.length)throw new RangeError("out of result range");const i=e[r];return i instanceof Error&&l(`index ${r}`,i),i}if(o.indexOf(t)>=0)return Reflect.get(e,t,r);const i=e[t];if(i instanceof Function)return function(...t){return i.apply(this===r?e:this,t)};if(!(t in e))return e.getValue.apply(this===r?e:this,[t])}return Reflect.get(e,t,r)}});return c(d,u(this)),d}toArray(e){const t=[];return this.forEach(((r,n)=>{r instanceof Error&&l(`index ${n}`,r),e&&r instanceof d&&(r=r.toArray(e)),t.push(r)})),t}toObject(e){const t=u(this);return t.reduce(((r,i,o)=>((0,n.assert)(null!=i,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),f(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const r=u(this),n=[],i=[];for(let o=e;o{this.#r[e]=h(t)}}};class p{allowLoose;#r;#o;#a;#s;#u;constructor(e,t,r){(0,n.defineProperties)(this,{allowLoose:!!t}),this.#r=(0,n.getBytesCopy)(e),this.#a=0,this.#s=null,this.#u=null!=r?r:1024,this.#o=0}get data(){return(0,n.hexlify)(this.#r)}get dataLength(){return this.#r.length}get consumed(){return this.#o}get bytes(){return new Uint8Array(this.#r)}#c(e){if(this.#s)return this.#s.#c(e);this.#a+=e,(0,n.assert)(this.#u<1||this.#a<=this.#u*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#u} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#r),offset:this.#o,length:e,info:{bytesRead:this.#a,dataLength:this.dataLength}})}#l(e,r,i){let o=Math.ceil(r/t.WordSize)*t.WordSize;return this.#o+o>this.#r.length&&(this.allowLoose&&i&&this.#o+r<=this.#r.length?o=r:(0,n.assert)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#r),length:this.#r.length,offset:this.#o+o})),this.#r.slice(this.#o,this.#o+o)}subReader(e){const t=new p(this.#r.slice(this.#o+e),this.allowLoose,this.#u);return t.#s=this,t}readBytes(e,t){let r=this.#l(0,e,!!t);return this.#c(e),this.#o+=r.length,r.slice(0,e)}readValue(){return(0,n.toBigInt)(this.readBytes(t.WordSize))}readIndex(){return(0,n.toNumber)(this.readBytes(t.WordSize))}}t.Reader=p},1355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;const n=r(646),i=r(6508),o=r(9976),a=r(8869);class s extends a.Coder{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let r=o.Typed.dereference(t,"string");try{r=(0,n.getAddress)(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return(0,n.getAddress)((0,i.toBeHex)(e.readValue(),20))}}t.AddressCoder=s},5754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;const n=r(8869);class i extends n.Coder{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}t.AnonymousCoder=i},3178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=t.unpack=t.pack=void 0;const n=r(5347),i=r(9976),o=r(8869),a=r(5754);function s(e,t,r){let i=[];if(Array.isArray(r))i=r;else if(r&&"object"==typeof r){let e={};i=t.map((t=>{const i=t.localName;return(0,n.assert)(i,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),(0,n.assert)(!e[i],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),e[i]=!0,r[i]}))}else(0,n.assertArgument)(!1,"invalid tuple value","tuple",r);(0,n.assertArgument)(t.length===i.length,"types/value length mismatch","tuple",r);let a=new o.Writer,s=new o.Writer,u=[];t.forEach(((e,t)=>{let r=i[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=a.writeUpdatableValue();u.push((e=>{n(e+t)}))}else e.encode(a,r)})),u.forEach((e=>{e(a.length)}));let c=e.appendWriter(a);return c+=e.appendWriter(s),c}function u(e,t){let r=[],i=[],a=e.subReader(0);return t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readIndex(),i=a.subReader(r);try{o=t.decode(i)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}if(null==o)throw new Error("investigate");r.push(o),i.push(t.localName||null)})),o.Result.fromItems(r,i)}t.pack=s,t.unpack=u;class c extends o.Coder{coder;length;constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),(0,n.defineProperties)(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;const n=r(9976),i=r(8869);class o extends i.Coder{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){const r=n.Typed.dereference(t,"bool");return e.writeValue(r?1:0)}decode(e){return!!e.readValue()}}t.BooleanCoder=o},2348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesCoder=t.DynamicBytesCoder=void 0;const n=r(5347),i=r(8869);class o extends i.Coder{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=(0,n.getBytesCopy)(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readIndex(),!0)}}t.DynamicBytesCoder=o;t.BytesCoder=class extends o{constructor(e){super("bytes",e)}decode(e){return(0,n.hexlify)(super.decode(e))}}},9095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;const n=r(5347),i=r(9976),o=r(8869);class a extends o.Coder{size;constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),(0,n.defineProperties)(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,n.getBytesCopy)(i.Typed.dereference(t,this.type));return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return(0,n.hexlify)(e.readBytes(this.size))}}t.FixedBytesCoder=a},8026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;const n=r(8869),i=new Uint8Array([]);class o extends n.Coder{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes(i)}decode(e){return e.readBytes(0),null}}t.NullCoder=o},7398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;const n=r(5347),i=r(9976),o=r(8869),a=BigInt(0),s=BigInt(1),u=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class c extends o.Coder{size;signed;constructor(e,t,r){const i=(t?"int":"uint")+8*e;super(i,i,r,!1),(0,n.defineProperties)(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let r=(0,n.getBigInt)(i.Typed.dereference(t,this.type)),c=(0,n.mask)(u,8*o.WordSize);if(this.signed){let e=(0,n.mask)(c,8*this.size-1);(r>e||r<-(e+s))&&this._throwError("value out-of-bounds",t),r=(0,n.toTwos)(r,8*o.WordSize)}else(r(0,n.mask)(c,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(r)}decode(e){let t=(0,n.mask)(e.readValue(),8*this.size);return this.signed&&(t=(0,n.fromTwos)(t,8*this.size)),t}}t.NumberCoder=c},8766:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;const n=r(3948),i=r(9976),o=r(2348);class a extends o.DynamicBytesCoder{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,n.toUtf8Bytes)(i.Typed.dereference(t,"string")))}decode(e){return(0,n.toUtf8String)(super.decode(e))}}t.StringCoder=a},1693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TupleCoder=void 0;const n=r(8166),i=r(9976),o=r(8869),a=r(3178);class s extends o.Coder{coders;constructor(e,t){let r=!1;const i=[];e.forEach((e=>{e.dynamic&&(r=!0),i.push(e.type)}));super("tuple","tuple("+i.join(",")+")",t,r),(0,n.defineProperties)(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){const r=i.Typed.dereference(t,"tuple");return(0,a.pack)(e,this.coders,r)}decode(e){return(0,a.unpack)(e,this.coders)}}t.TupleCoder=s},189:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructFragment=t.FunctionFragment=t.FallbackFragment=t.ConstructorFragment=t.EventFragment=t.ErrorFragment=t.NamedFragment=t.Fragment=t.ParamType=void 0;const n=r(5347),i=r(3562);function o(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const a=o("external public payable override".split(" ")),s="constant external internal payable private public pure view override",u=o(s.split(" ")),c="constructor error event fallback function receive struct",l=o(c.split(" ")),f="calldata memory storage payable indexed",d=o(f.split(" ")),h=o([c,f,"tuple returns",s].join(" ").split(" ")),p={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},y=new RegExp("^(\\s*)"),m=new RegExp("^([0-9]+)"),g=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),b=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),v=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class w{#o;#f;get offset(){return this.#o}get length(){return this.#f.length-this.#o}constructor(e){this.#o=0,this.#f=e.slice()}clone(){return new w(this.#f)}reset(){this.#o=0}#d(e=0,t=0){return new w(this.#f.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#d(this.#o+1,e.match+1);return this.#o=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#o=this.#f.length)throw new Error("out-of-bounds");return this.#f[this.#o]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#o++,e}toString(){const e=[];for(let t=this.#o;t`}}function A(e){const t=[],r=t=>{const r=a0&&"NUMBER"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=(0,n.getNumber)(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(u=s.match(g),u){if(c.text=u[1],a+=c.text.length,h.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(v)){c.type="TYPE";continue}c.type="ID"}else{if(u=s.match(m),!u)throw new Error(`unexpected token ${JSON.stringify(s[0])} at position ${a}`);c.text=u[1],c.type="NUMBER",a+=c.text.length}}return new w(t.map((e=>Object.freeze(e))))}function k(e,t){let r=[];for(const n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function E(e,t){if(t.peekKeyword(l)){const r=t.pop().text;if(r!==e)throw new Error(`expected ${e}, got ${r}`)}return t.popType("ID")}function S(e,t){const r=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function x(e){let t=S(e,u);return k(t,o("constant payable nonpayable".split(" "))),k(t,o("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function _(e,t){return e.popParams().map((e=>D.from(e,t)))}function P(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return(0,n.getBigInt)(e.pop().text);throw new Error("invalid gas")}return null}function T(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const I=new RegExp(/^(.*)\[([0-9]*)\]$/);function O(e){const t=e.match(v);if((0,n.assertArgument)(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const r=parseInt(t[2]);(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){const r=parseInt(t[3]);(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}const B={},C=Symbol.for("_ethers_internal"),N="_ParamTypeInternal",R="_ErrorInternal",M="_EventInternal",U="_ConstructorInternal",L="_FallbackInternal",j="_FunctionInternal",F="_StructInternal";class D{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,i,o,a,s,u){if((0,n.assertPrivate)(e,B,"ParamType"),Object.defineProperty(this,C,{value:N}),a&&(a=Object.freeze(a.slice())),"array"===i){if(null==s||null==u)throw new Error("")}else if(null!=s||null!=u)throw new Error("");if("tuple"===i){if(null==a)throw new Error("")}else if(null!=a)throw new Error("");(0,n.defineProperties)(this,{name:t,type:r,baseType:i,indexed:o,components:a,arrayLength:s,arrayChildren:u})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const r={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(r)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map((e=>r.arrayChildren.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map(((e,n)=>r.components[n].walk(e,t)))}return t(this.type,e)}#h(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const i=this.arrayChildren,o=t.slice();return o.forEach(((t,n)=>{i.#h(e,t,r,(e=>{o[n]=e}))})),void n(o)}if(this.isTuple()){const i=this.components;let o;if(Array.isArray(t))o=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");o=i.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(o.length!==this.components.length)throw new Error("array is wrong length");return o.forEach(((t,n)=>{i[n].#h(e,t,r,(e=>{o[n]=e}))})),void n(o)}const i=r(this.type,t);i.then?e.push(async function(){n(await i)}()):n(i)}async walkAsync(e,t){const r=[],n=[e];return this.#h(r,e,t,(e=>{n[0]=e})),r.length&&await Promise.all(r),n[0]}static from(e,t){if(D.isParamType(e))return e;if("string"==typeof e)try{return D.from(A(e),t)}catch(t){(0,n.assertArgument)(!1,"invalid param type","obj",e)}else if(e instanceof w){let r="",n="",i=null;S(e,o(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",i=e.popParams().map((e=>D.from(e))),r=`tuple(${i.map((e=>e.format())).join(",")})`):(r=O(e.popType("TYPE")),n=r);let a=null,s=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();a=new D(B,"",r,n,null,i,s,a),s=t.value,r+=t.text,n="array",i=null}let u=null;if(S(e,d).has("indexed")){if(!t)throw new Error("");u=!0}const c=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new D(B,c,r,n,u,i,s,a)}const r=e.name;(0,n.assertArgument)(!r||"string"==typeof r&&r.match(b),"invalid name","obj.name",r);let i=e.indexed;null!=i&&((0,n.assertArgument)(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let a=e.type,s=a.match(I);if(s){const t=parseInt(s[2]||"-1"),n=D.from({type:s[1],components:e.components});return new D(B,r||"",a,"array",i,null,t,n)}if("tuple"===a||a.startsWith("tuple(")||a.startsWith("(")){const t=null!=e.components?e.components.map((e=>D.from(e))):null;return new D(B,r||"",a,"tuple",i,t,null,null)}return a=O(e.type),new D(B,r||"",a,a,i,null,null,null)}static isParamType(e){return e&&e[C]===N}}t.ParamType=D;class H{type;inputs;constructor(e,t,r){(0,n.assertPrivate)(e,B,"Fragment"),r=Object.freeze(r.slice()),(0,n.defineProperties)(this,{type:t,inputs:r})}static from(e){if("string"==typeof e){try{H.from(JSON.parse(e))}catch(e){}return H.from(A(e))}if(e instanceof w){switch(e.peekKeyword(l)){case"constructor":return V.from(e);case"error":return G.from(e);case"event":return K.from(e);case"fallback":case"receive":return J.from(e);case"function":return W.from(e);case"struct":return Q.from(e)}}else if("object"==typeof e){switch(e.type){case"constructor":return V.from(e);case"error":return G.from(e);case"event":return K.from(e);case"fallback":case"receive":return J.from(e);case"function":return W.from(e);case"struct":return Q.from(e)}(0,n.assert)(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,n.assertArgument)(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return V.isFragment(e)}static isError(e){return G.isFragment(e)}static isEvent(e){return K.isFragment(e)}static isFunction(e){return W.isFragment(e)}static isStruct(e){return Q.isFragment(e)}}t.Fragment=H;class z extends H{name;constructor(e,t,r,i){super(e,t,i),(0,n.assertArgument)("string"==typeof r&&r.match(b),"invalid identifier","name",r),i=Object.freeze(i.slice()),(0,n.defineProperties)(this,{name:r})}}function q(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}t.NamedFragment=z;class G extends z{constructor(e,t,r){super(e,"error",t,r),Object.defineProperty(this,C,{value:R})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+q(e,this.inputs)),t.join(" ")}static from(e){if(G.isFragment(e))return e;if("string"==typeof e)return G.from(A(e));if(e instanceof w){const t=E("error",e),r=_(e);return T(e),new G(B,t,r)}return new G(B,e.name,e.inputs?e.inputs.map(D.from):[])}static isFragment(e){return e&&e[C]===R}}t.ErrorFragment=G;class K extends z{anonymous;constructor(e,t,r,i){super(e,"event",t,r),Object.defineProperty(this,C,{value:M}),(0,n.defineProperties)(this,{anonymous:i})}get topicHash(){return(0,i.id)(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+q(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){t=(t||[]).map((e=>D.from(e)));return new K(B,e,t,!1).topicHash}static from(e){if(K.isFragment(e))return e;if("string"==typeof e)try{return K.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid event fragment","obj",e)}else if(e instanceof w){const t=E("event",e),r=_(e,!0),n=!!S(e,o(["anonymous"])).has("anonymous");return T(e),new K(B,t,r,n)}return new K(B,e.name,e.inputs?e.inputs.map((e=>D.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[C]===M}}t.EventFragment=K;class V extends H{payable;gas;constructor(e,t,r,i,o){super(e,t,r),Object.defineProperty(this,C,{value:U}),(0,n.defineProperties)(this,{payable:i,gas:o})}format(e){if((0,n.assert)(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${q(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(V.isFragment(e))return e;if("string"==typeof e)try{return V.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof w){S(e,o(["constructor"]));const t=_(e),r=!!S(e,a).has("payable"),n=P(e);return T(e),new V(B,"constructor",t,r,n)}return new V(B,"constructor",e.inputs?e.inputs.map(D.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[C]===U}}t.ConstructorFragment=V;class J extends H{payable;constructor(e,t,r){super(e,"fallback",t),Object.defineProperty(this,C,{value:L}),(0,n.defineProperties)(this,{payable:r})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if(J.isFragment(e))return e;if("string"==typeof e)try{return J.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid fallback fragment","obj",e)}else if(e instanceof w){const t=e.toString(),r=e.peekKeyword(o(["fallback","receive"]));(0,n.assertArgument)(r,"type must be fallback or receive","obj",t);if("receive"===e.popKeyword(o(["fallback","receive"]))){const t=_(e);return(0,n.assertArgument)(0===t.length,"receive cannot have arguments","obj.inputs",t),S(e,o(["payable"])),T(e),new J(B,[],!0)}let i=_(e);i.length?(0,n.assertArgument)(1===i.length&&"bytes"===i[0].type,"invalid fallback inputs","obj.inputs",i.map((e=>e.format("minimal"))).join(", ")):i=[D.from("bytes")];const a=x(e);if((0,n.assertArgument)("nonpayable"===a||"payable"===a,"fallback cannot be constants","obj.stateMutability",a),S(e,o(["returns"])).has("returns")){const t=_(e);(0,n.assertArgument)(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return T(e),new J(B,i,"payable"===a)}if("receive"===e.type)return new J(B,[],!0);if("fallback"===e.type){const t=[D.from("bytes")],r="payable"===e.stateMutability;return new J(B,t,r)}(0,n.assertArgument)(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[C]===L}}t.FallbackFragment=J;class W extends z{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,i,o,a){super(e,"function",t,i),Object.defineProperty(this,C,{value:j}),o=Object.freeze(o.slice());const s="view"===r||"pure"===r,u="payable"===r;(0,n.defineProperties)(this,{constant:s,gas:a,outputs:o,payable:u,stateMutability:r})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+q(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(q(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){t=(t||[]).map((e=>D.from(e)));return new W(B,e,"view",t,[],null).selector}static from(e){if(W.isFragment(e))return e;if("string"==typeof e)try{return W.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid function fragment","obj",e)}else if(e instanceof w){const t=E("function",e),r=_(e),n=x(e);let i=[];S(e,o(["returns"])).has("returns")&&(i=_(e));const a=P(e);return T(e),new W(B,t,n,r,i,a)}let t=e.stateMutability;return null==t&&(t="payable","boolean"==typeof e.constant?(t="view",e.constant||(t="payable","boolean"!=typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(t="nonpayable")),new W(B,e.name,t,e.inputs?e.inputs.map(D.from):[],e.outputs?e.outputs.map(D.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[C]===j}}t.FunctionFragment=W;class Q extends z{constructor(e,t,r){super(e,"struct",t,r),Object.defineProperty(this,C,{value:F})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)try{return Q.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid struct fragment","obj",e)}else if(e instanceof w){const t=E("struct",e),r=_(e);return T(e),new Q(B,t,r)}return new Q(B,e.name,e.inputs?e.inputs.map(D.from):[])}static isFragment(e){return e&&e[C]===F}}t.StructFragment=Q},8456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=t.Result=t.TransactionDescription=t.LogDescription=t.ErrorDescription=t.Interface=t.Indexed=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.Fragment=t.FallbackFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.encodeBytes32String=t.decodeBytes32String=t.AbiCoder=void 0;var n=r(954);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return n.AbiCoder}});var i=r(9414);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}});var o=r(189);Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return o.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return o.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return o.EventFragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return o.FallbackFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return o.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return o.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return o.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return o.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return o.StructFragment}});var a=r(5863);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return a.checkResultErrors}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return a.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return a.Interface}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return a.ErrorDescription}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return a.LogDescription}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return a.TransactionDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return a.Result}});var s=r(9976);Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return s.Typed}})},5863:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Interface=t.Indexed=t.ErrorDescription=t.TransactionDescription=t.LogDescription=t.Result=t.checkResultErrors=void 0;const n=r(2291),i=r(3562),o=r(5347),a=r(954),s=r(8869);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return s.Result}});const u=r(189),c=r(9976);class l{fragment;name;signature;topic;args;constructor(e,t,r){const n=e.name,i=e.format();(0,o.defineProperties)(this,{fragment:e,name:n,signature:i,topic:t,args:r})}}t.LogDescription=l;class f{fragment;name;args;signature;selector;value;constructor(e,t,r,n){const i=e.name,a=e.format();(0,o.defineProperties)(this,{fragment:e,name:i,args:r,signature:a,selector:t,value:n})}}t.TransactionDescription=f;class d{fragment;name;args;signature;selector;constructor(e,t,r){const n=e.name,i=e.format();(0,o.defineProperties)(this,{fragment:e,name:n,args:r,signature:i,selector:t})}}t.ErrorDescription=d;class h{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){(0,o.defineProperties)(this,{hash:e,_isIndexed:!0})}}t.Indexed=h;const p={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},y={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&p[e.toString()]&&(t=p[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class m{fragments;deploy;fallback;receive;#p;#y;#m;#g;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#m=new Map,this.#p=new Map,this.#y=new Map;const r=[];for(const e of t)try{r.push(u.Fragment.from(e))}catch(t){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,t.message)}(0,o.defineProperties)(this,{fragments:Object.freeze(r)});let n=null,i=!1;this.#g=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let r;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void(0,o.defineProperties)(this,{deploy:e});case"fallback":return void(0===e.inputs.length?i=!0:((0,o.assertArgument)(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),n=e,i=n.payable));case"function":r=this.#m;break;case"event":r=this.#y;break;case"error":r=this.#p;break;default:return}const a=e.format();r.has(a)||r.set(a,e)})),this.deploy||(0,o.defineProperties)(this,{deploy:u.ConstructorFragment.from("constructor()")}),(0,o.defineProperties)(this,{fallback:n,receive:i})}format(e){const t=e?"minimal":"full";return this.fragments.map((e=>e.format(t)))}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return a.AbiCoder.defaultAbiCoder()}#b(e,t,r){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e of this.#m.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#m)t.split("(")[0]===e&&n.push(r);if(t){const e=t.length>0?t[t.length-1]:null;let r=t.length,i=!0;c.Typed.isTyped(e)&&"overrides"===e.type&&(i=!1,r--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===r||i&&t===r-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let i=0;i=r.length){if("overrides"===t[i].type)continue;n.splice(e,1);break}if(t[i].type!==r[i].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&n.splice(0,1)}if(0===n.length)return null;if(n.length>1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous function description (i.e. matches ${t})`,"key",e)}return n[0]}const n=this.#m.get(u.FunctionFragment.from(e).format());return n||null}getFunctionName(e){const t=this.#b(e,null,!1);return(0,o.assertArgument)(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#b(e,null,!1)}getFunction(e,t){return this.#b(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#m.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r=0;e--)n[e].inputs.length=0;e--){const r=n[e].inputs;for(let i=0;i1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous event description (i.e. matches ${t})`,"key",e)}return n[0]}const n=this.#y.get(u.EventFragment.from(e).format());return n||null}getEventName(e){const t=this.#v(e,null,!1);return(0,o.assertArgument)(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#v(e,null,!1)}getEvent(e,t){return this.#v(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#y.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r1){const r=t.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous error description (i.e. ${r})`,"name",e)}return t[0]}if("Error(string)"===(e=u.ErrorFragment.from(e).format()))return u.ErrorFragment.from("error Error(string)");if("Panic(uint256)"===e)return u.ErrorFragment.from("error Panic(uint256)");const r=this.#p.get(e);return r||null}forEachError(e){const t=Array.from(this.#p.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r"string"===e.type?(0,i.id)(t):"bytes"===e.type?(0,n.keccak256)((0,o.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=(0,o.toBeHex)(t):e.type.match(/^bytes/)?t=(0,o.zeroPadBytes)(t,32):"address"===e.type&&this.#g.encode(["address"],[t]),(0,o.zeroPadValue)((0,o.hexlify)(t),32));for(t.forEach(((t,n)=>{const i=e.inputs[n];i.indexed?null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?(0,o.assertArgument)(!1,"filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map((e=>a(i,e)))):r.push(a(i,t)):(0,o.assertArgument)(null==t,"cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}const r=[],a=[],s=[];return e.anonymous||r.push(e.topicHash),(0,o.assertArgument)(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const u=t[o];if(e.indexed)if("string"===e.type)r.push((0,i.id)(u));else if("bytes"===e.type)r.push((0,n.keccak256)(u));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this.#g.encode([e.type],[u]))}else a.push(e),s.push(u)})),{data:this.#g.encode(a,s),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}if(null!=r&&!e.anonymous){const t=e.topicHash;(0,o.assertArgument)((0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const n=[],i=[],a=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(u.ParamType.from({type:"bytes32",name:e.name})),a.push(!0)):(n.push(e),a.push(!1)):(i.push(e),a.push(!1))}));const c=null!=r?this.#g.decode(n,(0,o.concat)(r)):null,l=this.#g.decode(i,t,!0),f=[],d=[];let p=0,y=0;return e.inputs.forEach(((e,t)=>{let r=null;if(e.indexed)if(null==c)r=new h(null);else if(a[t])r=new h(c[y++]);else try{r=c[y++]}catch(e){r=e}else try{r=l[p++]}catch(e){r=e}f.push(r),d.push(e.name||null)})),s.Result.fromItems(f,d)}parseTransaction(e){const t=(0,o.getBytes)(e.data,"tx.data"),r=(0,o.getBigInt)(null!=e.value?e.value:0,"tx.value"),n=this.getFunction((0,o.hexlify)(t.slice(0,4)));if(!n)return null;const i=this.#g.decode(n.inputs,t.slice(4));return new f(n,n.selector,i,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new l(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=(0,o.hexlify)(e),r=this.getError((0,o.dataSlice)(t,0,4));if(!r)return null;const n=this.#g.decode(r.inputs,(0,o.dataSlice)(t,4));return new d(r,r.selector,n)}static from(e){return e instanceof m?e:"string"==typeof e?new m(JSON.parse(e)):"function"==typeof e.formatJson?new m(e.formatJson()):"function"==typeof e.format?new m(e.format("json")):new m(e)}}t.Interface=m},9976:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=void 0;const n=r(5347),i={};function o(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new u(i,`${r?"":"u"}int${t}`,e,{signed:r,width:t})}function a(e,t){return new u(i,`bytes${t||""}`,e,{size:t})}const s=Symbol.for("_ethers_typed");class u{type;value;#w;_typedSymbol;constructor(e,t,r,o){null==o&&(o=null),(0,n.assertPrivate)(i,e,"Typed"),(0,n.defineProperties)(this,{_typedSymbol:s,type:t,value:r}),this.#w=o,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#w}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#w?-1:!1===this.#w?this.value.length:null}static from(e,t){return new u(i,e,t)}static uint8(e){return o(e,8)}static uint16(e){return o(e,16)}static uint24(e){return o(e,24)}static uint32(e){return o(e,32)}static uint40(e){return o(e,40)}static uint48(e){return o(e,48)}static uint56(e){return o(e,56)}static uint64(e){return o(e,64)}static uint72(e){return o(e,72)}static uint80(e){return o(e,80)}static uint88(e){return o(e,88)}static uint96(e){return o(e,96)}static uint104(e){return o(e,104)}static uint112(e){return o(e,112)}static uint120(e){return o(e,120)}static uint128(e){return o(e,128)}static uint136(e){return o(e,136)}static uint144(e){return o(e,144)}static uint152(e){return o(e,152)}static uint160(e){return o(e,160)}static uint168(e){return o(e,168)}static uint176(e){return o(e,176)}static uint184(e){return o(e,184)}static uint192(e){return o(e,192)}static uint200(e){return o(e,200)}static uint208(e){return o(e,208)}static uint216(e){return o(e,216)}static uint224(e){return o(e,224)}static uint232(e){return o(e,232)}static uint240(e){return o(e,240)}static uint248(e){return o(e,248)}static uint256(e){return o(e,256)}static uint(e){return o(e,256)}static int8(e){return o(e,-8)}static int16(e){return o(e,-16)}static int24(e){return o(e,-24)}static int32(e){return o(e,-32)}static int40(e){return o(e,-40)}static int48(e){return o(e,-48)}static int56(e){return o(e,-56)}static int64(e){return o(e,-64)}static int72(e){return o(e,-72)}static int80(e){return o(e,-80)}static int88(e){return o(e,-88)}static int96(e){return o(e,-96)}static int104(e){return o(e,-104)}static int112(e){return o(e,-112)}static int120(e){return o(e,-120)}static int128(e){return o(e,-128)}static int136(e){return o(e,-136)}static int144(e){return o(e,-144)}static int152(e){return o(e,-152)}static int160(e){return o(e,-160)}static int168(e){return o(e,-168)}static int176(e){return o(e,-176)}static int184(e){return o(e,-184)}static int192(e){return o(e,-192)}static int200(e){return o(e,-200)}static int208(e){return o(e,-208)}static int216(e){return o(e,-216)}static int224(e){return o(e,-224)}static int232(e){return o(e,-232)}static int240(e){return o(e,-240)}static int248(e){return o(e,-248)}static int256(e){return o(e,-256)}static int(e){return o(e,-256)}static bytes1(e){return a(e,1)}static bytes2(e){return a(e,2)}static bytes3(e){return a(e,3)}static bytes4(e){return a(e,4)}static bytes5(e){return a(e,5)}static bytes6(e){return a(e,6)}static bytes7(e){return a(e,7)}static bytes8(e){return a(e,8)}static bytes9(e){return a(e,9)}static bytes10(e){return a(e,10)}static bytes11(e){return a(e,11)}static bytes12(e){return a(e,12)}static bytes13(e){return a(e,13)}static bytes14(e){return a(e,14)}static bytes15(e){return a(e,15)}static bytes16(e){return a(e,16)}static bytes17(e){return a(e,17)}static bytes18(e){return a(e,18)}static bytes19(e){return a(e,19)}static bytes20(e){return a(e,20)}static bytes21(e){return a(e,21)}static bytes22(e){return a(e,22)}static bytes23(e){return a(e,23)}static bytes24(e){return a(e,24)}static bytes25(e){return a(e,25)}static bytes26(e){return a(e,26)}static bytes27(e){return a(e,27)}static bytes28(e){return a(e,28)}static bytes29(e){return a(e,29)}static bytes30(e){return a(e,30)}static bytes31(e){return a(e,31)}static bytes32(e){return a(e,32)}static address(e){return new u(i,"address",e)}static bool(e){return new u(i,"bool",!!e)}static bytes(e){return new u(i,"bytes",e)}static string(e){return new u(i,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new u(i,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===s}static dereference(e,t){if(u.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}t.Typed=u},7262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIcapAddress=t.getAddress=void 0;const n=r(2291),i=r(5347),o=BigInt(0),a=BigInt(36);function s(e){const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const o=(0,i.getBytes)((0,n.keccak256)(r));for(let e=0;e<40;e+=2)o[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&o[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const u={};for(let e=0;e<10;e++)u[String(e)]=String(e);for(let e=0;e<26;e++)u[String.fromCharCode(65+e)]=String(10+e);function c(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>u[e])).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}const l=function(){const e={};for(let t=0;t<36;t++){e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t)}return e}();function f(e){if((0,i.assertArgument)("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=s(e);return(0,i.assertArgument)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,i.assertArgument)(e.substring(2,4)===c(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=o;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=void 0;const n=r(5347),i=r(7262);function o(e){return e&&"function"==typeof e.getAddress}async function a(e,t){const r=await t;return null!=r&&"0x0000000000000000000000000000000000000000"!==r||((0,n.assert)("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),(0,n.assertArgument)(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),(0,i.getAddress)(r)}t.isAddressable=o,t.isAddress=function(e){try{return(0,i.getAddress)(e),!0}catch(e){}return!1},t.resolveAddress=function(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?(0,i.getAddress)(e):((0,n.assert)(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),a(e,t.resolveName(e))):o(e)?a(e,e.getAddress()):e&&"function"==typeof e.then?a(e,e):void(0,n.assertArgument)(!1,"unsupported addressable value","target",e)}},1891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCreate2Address=t.getCreateAddress=void 0;const n=r(2291),i=r(5347),o=r(7262);t.getCreateAddress=function(e){const t=(0,o.getAddress)(e.from);let r=(0,i.getBigInt)(e.nonce,"tx.nonce").toString(16);return r="0"===r?"0x":r.length%2?"0x0"+r:"0x"+r,(0,o.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.encodeRlp)([t,r])),12))},t.getCreate2Address=function(e,t,r){const a=(0,o.getAddress)(e),s=(0,i.getBytes)(t,"salt"),u=(0,i.getBytes)(r,"initCodeHash");return(0,i.assertArgument)(32===s.length,"salt must be 32 bytes","salt",t),(0,i.assertArgument)(32===u.length,"initCodeHash must be 32 bytes","initCodeHash",r),(0,o.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.concat)(["0xff",a,s,u])),12))}},646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=void 0;var n=r(7262);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return n.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return n.getIcapAddress}});var i=r(1891);Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return i.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return i.getCreate2Address}});var o=r(345);Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return o.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return o.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return o.resolveAddress}})},5239:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroAddress=void 0,t.ZeroAddress="0x0000000000000000000000000000000000000000"},5255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroHash=void 0,t.ZeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"},1295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=t.ZeroHash=t.ZeroAddress=void 0;var n=r(5239);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return n.ZeroAddress}});var i=r(5255);Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return i.ZeroHash}});var o=r(9197);Object.defineProperty(t,"N",{enumerable:!0,get:function(){return o.N}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return o.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return o.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return o.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return o.MaxInt256}});var a=r(6245);Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return a.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return a.MessagePrefix}})},9197:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=void 0,t.N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),t.WeiPerEther=BigInt("1000000000000000000"),t.MaxUint256=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MinInt256=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),t.MaxInt256=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},6245:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=void 0,t.EtherSymbol="Ξ",t.MessagePrefix="Ethereum Signed Message:\n"},1008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=t.BaseContract=t.resolveArgs=t.copyOverrides=void 0;const n=r(8456),i=r(646),o=r(3807),a=r(5347),s=r(6526),u=BigInt(0);function c(e){return e&&"function"==typeof e.call}function l(e){return e&&"function"==typeof e.estimateGas}function f(e){return e&&"function"==typeof e.resolveName}function d(e){return e&&"function"==typeof e.sendTransaction}function h(e){if(null!=e){if(f(e))return e;if(e.provider)return e.provider}}class p{#A;fragment;constructor(e,t,r){if((0,a.defineProperties)(this,{fragment:t}),t.inputs.lengthnull==r[t]?null:e.walkAsync(r[t],((e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map((e=>(0,i.resolveAddress)(e,o)))):(0,i.resolveAddress)(t,o):t)))));return e.interface.encodeFilterTopics(t,n)}()}getTopicFilter(){return this.#A}}function y(e,t){return null==e?null:"function"==typeof e[t]?e:e.provider&&"function"==typeof e.provider[t]?e.provider:null}function m(e){return null==e?null:e.provider||null}async function g(e,t){const r=n.Typed.dereference(e,"overrides");(0,a.assertArgument)("object"==typeof r,"invalid overrides parameter","overrides",e);const i=(0,o.copyRequest)(r);return(0,a.assertArgument)(null==i.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",i.to),(0,a.assertArgument)(null==i.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",i.data),i.from&&(i.from=i.from),i}async function b(e,t,r){const o=y(e,"resolveName"),a=f(o)?o:null;return await Promise.all(t.map(((e,t)=>e.walkAsync(r[t],((e,t)=>(t=n.Typed.dereference(t,e),"address"===e?(0,i.resolveAddress)(t,a):t))))))}function v(e){const t=async function(t){const r=await g(t,["data"]);r.to=await e.getAddress(),r.from&&(r.from=await(0,i.resolveAddress)(r.from,h(e.runner)));const n=e.interface,o=(0,a.getBigInt)(r.value||u,"overrides.value")===u,s="0x"===(r.data||"0x");!n.fallback||n.fallback.payable||!n.receive||s||o||(0,a.assertArgument)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),(0,a.assertArgument)(n.fallback||s,"cannot send data to receive-only contract","overrides.data",r.data);const c=n.receive||n.fallback&&n.fallback.payable;return(0,a.assertArgument)(c||o,"cannot send value to non-payable fallback","overrides.value",r.value),(0,a.assertArgument)(n.fallback||s,"cannot send data to receive-only contract","overrides.data",r.data),r},r=async function(r){const n=e.runner;(0,a.assert)(d(n),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await n.sendTransaction(await t(r)),o=m(e.runner);return new s.ContractTransactionResponse(e.interface,o,i)},n=async e=>await r(e);return(0,a.defineProperties)(n,{_contract:e,estimateGas:async function(r){const n=y(e.runner,"estimateGas");return(0,a.assert)(l(n),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await n.estimateGas(await t(r))},populateTransaction:t,send:r,staticCall:async function(r){const n=y(e.runner,"call");(0,a.assert)(c(n),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const i=await t(r);try{return await n.call(i)}catch(t){if((0,a.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,i);throw t}}}),n}t.copyOverrides=g,t.resolveArgs=b;const w=Symbol.for("_ethersInternal_contract"),A=new WeakMap;function k(e){return A.get(e[w])}async function E(e,t){let r,n=null;if(Array.isArray(t)){const n=function(t){if((0,a.isHexString)(t,32))return t;const r=e.interface.getEvent(t);return(0,a.assertArgument)(r,"unknown fragment","name",t),r.topicHash};r=t.map((e=>null==e?null:Array.isArray(e)?e.map(n):n(e)))}else"*"===t?r=[null]:"string"==typeof t?(0,a.isHexString)(t,32)?r=[t]:(n=e.interface.getEvent(t),(0,a.assertArgument)(n,"unknown fragment","event",t),r=[n.topicHash]):(i=t)&&"object"==typeof i&&"getTopicFilter"in i&&"function"==typeof i.getTopicFilter&&i.fragment?r=await t.getTopicFilter():"fragment"in t?(n=t.fragment,r=[n.topicHash]):(0,a.assertArgument)(!1,"unknown event name","event",t);var i;r=r.map((e=>{if(null==e)return null;if(Array.isArray(e)){const t=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()}));return{fragment:n,tag:r.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&"),topics:r}}async function S(e,t){const{subs:r}=k(e);return r.get((await E(e,t)).tag)||null}async function x(e,t,r){const n=m(e.runner);(0,a.assert)(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:o,topics:u}=await E(e,r),{addr:c,subs:l}=k(e);let f=l.get(o);if(!f){const t={address:c||e,topics:u},a=t=>{let n=i;if(null==n)try{n=e.interface.getEvent(t.topics[0])}catch(e){}if(n){const o=n,a=i?e.interface.decodeEventLog(i,t.data,t.topics):[];P(e,r,a,(n=>new s.ContractEventPayload(e,n,r,o,t)))}else P(e,r,[],(n=>new s.ContractUnknownEventPayload(e,n,r,t)))};let d=[];f={tag:o,listeners:[],start:()=>{d.length||d.push(n.on(t,a))},stop:async()=>{if(0==d.length)return;let e=d;d=[],await Promise.all(e),n.off(t,a)}},l.set(o,f)}return f}let _=Promise.resolve();async function P(e,t,r,n){try{await _}catch(e){}const i=async function(e,t,r,n){await _;const i=await S(e,t);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter((({listener:t,once:i})=>{const o=Array.from(r);n&&o.push(n(i?null:t));try{t.call(e,...o)}catch(e){}return!i})),0===i.listeners.length&&(i.stop(),k(e).subs.delete(i.tag)),o>0}(e,t,r,n);return _=i,await i}const T=["then"];class I{target;interface;runner;filters;[w];fallback;constructor(e,t,r,o){(0,a.assertArgument)("string"==typeof e||(0,i.isAddressable)(e),"invalid value for Contract target","target",e),null==r&&(r=null);const u=n.Interface.from(t);let c;(0,a.defineProperties)(this,{target:e,runner:r,interface:u}),Object.defineProperty(this,w,{value:{}});let l=null,d=null;if(o){const e=m(r);d=new s.ContractTransactionResponse(this.interface,e,o)}let h=new Map;if("string"==typeof e)if((0,a.isHexString)(e))l=e,c=Promise.resolve(e);else{const t=y(r,"resolveName");if(!f(t))throw(0,a.makeError)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});c=t.resolveName(e).then((t=>{if(null==t)throw(0,a.makeError)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return k(this).addr=t,t}))}else c=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return k(this).addr=e,e}));var p,g;p=this,g={addrPromise:c,addr:l,deployTx:d,subs:h},A.set(p[w],g);const b=new Proxy({},{get:(e,t,r)=>{if("symbol"==typeof t||T.indexOf(t)>=0)return Reflect.get(e,t,r);try{return this.getEvent(t)}catch(e){if(!(0,a.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>T.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return(0,a.defineProperties)(this,{filters:b}),(0,a.defineProperties)(this,{fallback:u.receive||u.fallback?v(this):null}),new Proxy(this,{get:(e,t,r)=>{if("symbol"==typeof t||t in e||T.indexOf(t)>=0)return Reflect.get(e,t,r);try{return e.getFunction(t)}catch(e){if(!(0,a.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>"symbol"==typeof t||t in e||T.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new I(this.target,this.interface,e)}attach(e){return new I(e,this.interface,this.runner)}async getAddress(){return await k(this).addrPromise}async getDeployedCode(){const e=m(this.runner);(0,a.assert)(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const t=m(this.runner);return(0,a.assert)(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,r)=>{const n=async()=>{try{if(null!=await this.getDeployedCode())return e(this);t.once("block",n)}catch(e){r(e)}};n()}))}deploymentTransaction(){return k(this).deployTx}getFunction(e){"string"!=typeof e&&(e=e.format());const t=function(e,t){const r=function(...r){const n=e.interface.getFunction(t,r);return(0,a.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=async function(...t){const n=r(...t);let o={};if(n.inputs.length+1===t.length&&(o=await g(t.pop()),o.from&&(o.from=await(0,i.resolveAddress)(o.from,h(e.runner)))),n.inputs.length!==t.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const s=await b(e.runner,n.inputs,t);return Object.assign({},o,await(0,a.resolveProperties)({to:e.getAddress(),data:e.interface.encodeFunctionData(n,s)}))},o=async function(...e){const t=await f(...e);return 1===t.length?t[0]:t},u=async function(...t){const r=e.runner;(0,a.assert)(d(r),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await r.sendTransaction(await n(...t)),o=m(e.runner);return new s.ContractTransactionResponse(e.interface,o,i)},f=async function(...t){const i=y(e.runner,"call");(0,a.assert)(c(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const o=await n(...t);let s="0x";try{s=await i.call(o)}catch(t){if((0,a.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,o);throw t}const u=r(...t);return e.interface.decodeFunctionResult(u,s)},p=async(...e)=>r(...e).constant?await o(...e):await u(...e);return(0,a.defineProperties)(p,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:r,estimateGas:async function(...t){const r=y(e.runner,"estimateGas");return(0,a.assert)(l(r),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await r.estimateGas(await n(...t))},populateTransaction:n,send:u,staticCall:o,staticCallResult:f}),Object.defineProperty(p,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getFunction(t);return(0,a.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),p}(this,e);return t}getEvent(e){return"string"!=typeof e&&(e=e.format()),function(e,t){const r=function(...r){const n=e.interface.getEvent(t,r);return(0,a.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=function(...t){return new p(e,r(...t),t)};return(0,a.defineProperties)(n,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getEvent(t);return(0,a.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),n}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,r){null==t&&(t=0),null==r&&(r="latest");const{addr:n,addrPromise:i}=k(this),u=n||await i,{fragment:c,topics:l}=await E(this,e),f={address:u,topics:l,fromBlock:t,toBlock:r},d=m(this.runner);return(0,a.assert)(d,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await d.getLogs(f)).map((e=>{let t=c;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(e){}if(t)try{return new s.EventLog(e,this.interface,t)}catch(t){return new s.UndecodedEventLog(e,t)}return new o.Log(e,d)}))}async on(e,t){const r=await x(this,"on",e);return r.listeners.push({listener:t,once:!1}),r.start(),this}async once(e,t){const r=await x(this,"once",e);return r.listeners.push({listener:t,once:!0}),r.start(),this}async emit(e,...t){return await P(this,e,t,null)}async listenerCount(e){if(e){const t=await S(this,e);return t?t.listeners.length:0}const{subs:t}=k(this);let r=0;for(const{listeners:e}of t.values())r+=e.length;return r}async listeners(e){if(e){const t=await S(this,e);return t?t.listeners.map((({listener:e})=>e)):[]}const{subs:t}=k(this);let r=[];for(const{listeners:e}of t.values())r=r.concat(e.map((({listener:e})=>e)));return r}async off(e,t){const r=await S(this,e);if(!r)return this;if(t){const e=r.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&r.listeners.splice(e,1)}return null!=t&&0!==r.listeners.length||(r.stop(),k(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){const t=await S(this,e);if(!t)return this;t.stop(),k(this).subs.delete(t.tag)}else{const{subs:e}=k(this);for(const{tag:t,stop:r}of e.values())r(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){return class extends I{constructor(t,r=null){super(t,e,r)}}}static from(e,t,r){null==r&&(r=null);return new this(e,t,r)}}t.BaseContract=I;class O extends(function(){return I}()){}t.Contract=O},406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractFactory=void 0;const n=r(8456),i=r(646),o=r(5347),a=r(1008);class s{interface;bytecode;runner;constructor(e,t,r){const i=n.Interface.from(e);t instanceof Uint8Array||("object"==typeof t&&(t=t.object),t.startsWith("0x")||(t="0x"+t)),t=(0,o.hexlify)((0,o.getBytes)(t)),(0,o.defineProperties)(this,{bytecode:t,interface:i,runner:r||null})}attach(e){return new a.BaseContract(e,this.interface,this.runner)}async getDeployTransaction(...e){let t={};const r=this.interface.deploy;if(r.inputs.length+1===e.length&&(t=await(0,a.copyOverrides)(e.pop())),r.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const n=await(0,a.resolveArgs)(this.runner,r.inputs,e),i=(0,o.concat)([this.bytecode,this.interface.encodeDeploy(n)]);return Object.assign({},t,{data:i})}async deploy(...e){const t=await this.getDeployTransaction(...e);(0,o.assert)(this.runner&&"function"==typeof this.runner.sendTransaction,"factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const r=await this.runner.sendTransaction(t),n=(0,i.getCreateAddress)(r);return new a.BaseContract(n,this.interface,this.runner,r)}connect(e){return new s(this.interface,this.bytecode,e)}static fromSolidity(e,t){(0,o.assertArgument)(null!=e,"bad compiler output","output",e),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n="";return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}}t.ContractFactory=s},9288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UndecodedEventLog=t.EventLog=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractUnknownEventPayload=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=void 0;var n=r(1008);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return n.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return n.Contract}});var i=r(406);Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return i.ContractFactory}});var o=r(6526);Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return o.ContractEventPayload}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return o.ContractUnknownEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return o.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return o.ContractTransactionResponse}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return o.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return o.UndecodedEventLog}})},6526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractEventPayload=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.UndecodedEventLog=t.EventLog=void 0;const n=r(3807),i=r(5347);class o extends n.Log{interface;fragment;args;constructor(e,t,r){super(e,e.provider);const n=t.decodeEventLog(r,e.data,e.topics);(0,i.defineProperties)(this,{args:n,fragment:r,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}t.EventLog=o;class a extends n.Log{error;constructor(e,t){super(e,e.provider),(0,i.defineProperties)(this,{error:t})}}t.UndecodedEventLog=a;class s extends n.TransactionReceipt{#k;constructor(e,t,r){super(r,t),this.#k=e}get logs(){return super.logs.map((e=>{const t=e.topics.length?this.#k.getEvent(e.topics[0]):null;if(t)try{return new o(e,this.#k,t)}catch(t){return new a(e,t)}return e}))}}t.ContractTransactionReceipt=s;class u extends n.TransactionResponse{#k;constructor(e,t,r){super(r,t),this.#k=e}async wait(e,t){const r=await super.wait(e,t);return null==r?null:new s(this.#k,this.provider,r)}}t.ContractTransactionResponse=u;class c extends i.EventPayload{log;constructor(e,t,r,n){super(e,t,r),(0,i.defineProperties)(this,{log:n})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}t.ContractUnknownEventPayload=c;t.ContractEventPayload=class extends c{constructor(e,t,r,n,a){super(e,t,r,new o(a,e.interface,n));const s=e.interface.decodeEventLog(n,this.log.data,this.log.topics);(0,i.defineProperties)(this,{args:s,fragment:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}},7155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.pbkdf2Sync=t.createHmac=t.createHash=void 0;const n=r(4542),i=r(9e3),o=r(6978),a=r(9483),s=r(5347);const u=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}(),c=u.crypto||u.msCrypto;t.createHash=function(e){switch(e){case"sha256":return o.sha256.create();case"sha512":return a.sha512.create()}(0,s.assertArgument)(!1,"invalid hashing algorithm name","algorithm",e)},t.createHmac=function(e,t){const r={sha256:o.sha256,sha512:a.sha512}[e];return(0,s.assertArgument)(null!=r,"invalid hmac algorithm","algorithm",e),n.hmac.create(r,t)},t.pbkdf2Sync=function(e,t,r,n,u){const c={sha256:o.sha256,sha512:a.sha512}[u];return(0,s.assertArgument)(null!=c,"invalid pbkdf2 algorithm","algorithm",u),(0,i.pbkdf2)(c,e,t,{c:r,dkLen:n})},t.randomBytes=function(e){(0,s.assert)(null!=c,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),(0,s.assertArgument)(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);const t=new Uint8Array(e);return c.getRandomValues(t),t}},3192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeHmac=void 0;const n=r(7155),i=r(5347);let o=!1;const a=function(e,t,r){return(0,n.createHmac)(e,t).update(r).digest()};let s=a;function u(e,t,r){const n=(0,i.getBytes)(t,"key"),o=(0,i.getBytes)(r,"data");return(0,i.hexlify)(s(e,n,o))}t.computeHmac=u,u._=a,u.lock=function(){o=!0},u.register=function(e){if(o)throw new Error("computeHmac is locked");s=e},Object.freeze(u)},2291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lock=t.Signature=t.SigningKey=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=void 0;const n=r(3192);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return n.computeHmac}});const i=r(3905);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return i.keccak256}});const o=r(7307);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return o.ripemd160}});const a=r(2862);Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return a.pbkdf2}});const s=r(8964);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return s.randomBytes}});const u=r(5456);Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return u.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return u.scryptSync}});const c=r(5059);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return c.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return c.sha512}});var l=r(4534);Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return l.SigningKey}});var f=r(7005);Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return f.Signature}}),t.lock=function(){n.computeHmac.lock(),i.keccak256.lock(),a.pbkdf2.lock(),s.randomBytes.lock(),o.ripemd160.lock(),u.scrypt.lock(),u.scryptSync.lock(),c.sha256.lock(),c.sha512.lock(),s.randomBytes.lock()}},3905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=void 0;const n=r(6534),i=r(5347);let o=!1;const a=function(e){return(0,n.keccak_256)(e)};let s=a;function u(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(s(t))}t.keccak256=u,u._=a,u.lock=function(){o=!0},u.register=function(e){if(o)throw new TypeError("keccak256 is locked");s=e},Object.freeze(u)},2862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2=void 0;const n=r(7155),i=r(5347);let o=!1;const a=function(e,t,r,i,o){return(0,n.pbkdf2Sync)(e,t,r,i,o)};let s=a;function u(e,t,r,n,o){const a=(0,i.getBytes)(e,"password"),u=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(s(a,u,r,n,o))}t.pbkdf2=u,u._=a,u.lock=function(){o=!0},u.register=function(e){if(o)throw new Error("pbkdf2 is locked");s=e},Object.freeze(u)},8964:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=void 0;const n=r(7155);let i=!1;const o=function(e){return new Uint8Array((0,n.randomBytes)(e))};let a=o;function s(e){return a(e)}t.randomBytes=s,s._=o,s.lock=function(){i=!0},s.register=function(e){if(i)throw new Error("randomBytes is locked");a=e},Object.freeze(s)},7307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=void 0;const n=r(6481),i=r(5347);let o=!1;const a=function(e){return(0,n.ripemd160)(e)};let s=a;function u(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(s(t))}t.ripemd160=u,u._=a,u.lock=function(){o=!0},u.register=function(e){if(o)throw new TypeError("ripemd160 is locked");s=e},Object.freeze(u)},5456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptSync=t.scrypt=void 0;const n=r(9462),i=r(5347);let o=!1,a=!1;const s=async function(e,t,r,i,o,a,s){return await(0,n.scryptAsync)(e,t,{N:r,r:i,p:o,dkLen:a,onProgress:s})},u=function(e,t,r,i,o,a){return(0,n.scrypt)(e,t,{N:r,r:i,p:o,dkLen:a})};let c=s,l=u;async function f(e,t,r,n,o,a,s){const u=(0,i.getBytes)(e,"passwd"),l=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(await c(u,l,r,n,o,a,s))}function d(e,t,r,n,o,a){const s=(0,i.getBytes)(e,"passwd"),u=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(l(s,u,r,n,o,a))}t.scrypt=f,f._=s,f.lock=function(){a=!0},f.register=function(e){if(a)throw new Error("scrypt is locked");c=e},Object.freeze(f),t.scryptSync=d,d._=u,d.lock=function(){o=!0},d.register=function(e){if(o)throw new Error("scryptSync is locked");l=e},Object.freeze(d)},5059:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.sha256=void 0;const n=r(7155),i=r(5347),o=function(e){return(0,n.createHash)("sha256").update(e).digest()},a=function(e){return(0,n.createHash)("sha512").update(e).digest()};let s=o,u=a,c=!1,l=!1;function f(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(s(t))}function d(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(u(t))}t.sha256=f,f._=o,f.lock=function(){c=!0},f.register=function(e){if(c)throw new Error("sha256 is locked");s=e},Object.freeze(f),t.sha512=d,d._=a,d.lock=function(){l=!0},d.register=function(e){if(l)throw new Error("sha512 is locked");u=e},Object.freeze(f)},7005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;const n=r(1295),i=r(5347),o=BigInt(0),a=BigInt(1),s=BigInt(2),u=BigInt(27),c=BigInt(28),l=BigInt(35),f={};function d(e){return(0,i.zeroPadValue)((0,i.toBeArray)(e),32)}class h{#E;#S;#x;#_;get r(){return this.#E}set r(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid r","value",e),this.#E=(0,i.hexlify)(e)}get s(){return this.#S}set s(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid s","value",e);const t=(0,i.hexlify)(e);(0,i.assertArgument)(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),this.#S=t}get v(){return this.#x}set v(e){const t=(0,i.getNumber)(e,"value");(0,i.assertArgument)(27===t||28===t,"invalid v","v",e),this.#x=t}get networkV(){return this.#_}get legacyChainId(){const e=this.networkV;return null==e?null:h.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=(0,i.getBytes)(this.s);return this.yParity&&(e[0]|=128),(0,i.hexlify)(e)}get compactSerialized(){return(0,i.concat)([this.r,this.yParityAndS])}get serialized(){return(0,i.concat)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,r,n){(0,i.assertPrivate)(e,f,"Signature"),this.#E=t,this.#S=r,this.#x=n,this.#_=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new h(f,this.r,this.s,this.v);return this.networkV&&(e.#_=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=(0,i.getBigInt)(e,"v");return t==u||t==c?o:((0,i.assertArgument)(t>=l,"invalid EIP-155 v","v",e),(t-l)/s)}static getChainIdV(e,t){return(0,i.getBigInt)(e)*s+BigInt(35+t-27)}static getNormalizedV(e){const t=(0,i.getBigInt)(e);return t===o||t===u?27:t===a||t===c?28:((0,i.assertArgument)(t>=l,"invalid v","v",e),t&a?27:28)}static from(e){function t(t,r){(0,i.assertArgument)(t,r,"signature",e)}if(null==e)return new h(f,n.ZeroHash,n.ZeroHash,27);if("string"==typeof e){const r=(0,i.getBytes)(e,"signature");if(64===r.length){const e=(0,i.hexlify)(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new h(f,e,(0,i.hexlify)(t),n)}if(65===r.length){const e=(0,i.hexlify)(r.slice(0,32)),n=r.slice(32,64);t(!(128&n[0]),"non-canonical s");const o=h.getNormalizedV(r[64]);return new h(f,e,(0,i.hexlify)(n),o)}t(!1,"invalid raw signature length")}if(e instanceof h)return e.clone();const r=e.r;t(null!=r,"missing r");const o=d(r),a=function(e,r){if(null!=e)return d(e);if(null!=r){t((0,i.isHexString)(r,32),"invalid yParityAndS");const e=(0,i.getBytes)(r);return e[0]&=127,(0,i.hexlify)(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(!(128&(0,i.getBytes)(a)[0]),"non-canonical s");const{networkV:s,v:u}=function(e,r,n){if(null!=e){const t=(0,i.getBigInt)(e);return{networkV:t>=l?t:void 0,v:h.getNormalizedV(t)}}if(null!=r)return t((0,i.isHexString)(r,32),"invalid yParityAndS"),{v:128&(0,i.getBytes)(r)[0]?28:27};if(null!=n){switch((0,i.getNumber)(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new h(f,o,a,u);return s&&(c.#_=s),t(null==e.yParity||(0,i.getNumber)(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}}t.Signature=h},4534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0;const n=r(985),i=r(5347),o=r(7005);class a{#P;constructor(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid private key","privateKey","[REDACTED]"),this.#P=(0,i.hexlify)(e)}get privateKey(){return this.#P}get publicKey(){return a.computePublicKey(this.#P)}get compressedPublicKey(){return a.computePublicKey(this.#P,!0)}sign(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);const t=n.secp256k1.sign((0,i.getBytesCopy)(e),(0,i.getBytesCopy)(this.#P),{lowS:!0});return o.Signature.from({r:(0,i.toBeHex)(t.r,32),s:(0,i.toBeHex)(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=a.computePublicKey(e);return(0,i.hexlify)(n.secp256k1.getSharedSecret((0,i.getBytesCopy)(this.#P),(0,i.getBytes)(t),!1))}static computePublicKey(e,t){let r=(0,i.getBytes)(e,"key");if(32===r.length){const e=n.secp256k1.getPublicKey(r,!!t);return(0,i.hexlify)(e)}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}const o=n.secp256k1.ProjectivePoint.fromHex(r);return(0,i.hexlify)(o.toRawBytes(t))}static recoverPublicKey(e,t){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);const r=o.Signature.from(t);let a=n.secp256k1.Signature.fromCompact((0,i.getBytesCopy)((0,i.concat)([r.r,r.s])));a=a.addRecoveryBit(r.yParity);const s=a.recoverPublicKey((0,i.getBytesCopy)(e));return(0,i.assertArgument)(null!=s,"invalid signautre for digest","signature",t),"0x"+s.toHex(!1)}static addPoints(e,t,r){const i=n.secp256k1.ProjectivePoint.fromHex(a.computePublicKey(e).substring(2)),o=n.secp256k1.ProjectivePoint.fromHex(a.computePublicKey(t).substring(2));return"0x"+i.add(o).toHex(!!r)}}t.SigningKey=a},1752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=t.UndecodedEventLog=t.EventLog=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=t.MessagePrefix=t.EtherSymbol=t.ZeroHash=t.N=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.ZeroAddress=t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=t.Typed=t.TransactionDescription=t.Result=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.FallbackFragment=t.Fragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.AbiCoder=t.encodeBytes32String=t.decodeBytes32String=t.version=void 0,t.EnsPlugin=t.Network=t.EnsResolver=t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanProvider=t.CloudflareProvider=t.ChainstackProvider=t.AnkrProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.AbstractProvider=t.VoidSigner=t.NonceManager=t.AbstractSigner=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.getDefaultProvider=t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=t.SigningKey=t.Signature=t.lock=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=void 0,t.getUint=t.getNumber=t.getBigInt=t.FixedNumber=t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.isError=t.isCallException=t.makeError=t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.resolveProperties=t.defineProperties=t.zeroPadValue=t.zeroPadBytes=t.stripZerosLeft=t.isBytesLike=t.isHexString=t.hexlify=t.getBytesCopy=t.getBytes=t.dataSlice=t.dataLength=t.concat=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=t.Transaction=t.recoverAddress=t.computeAddress=t.accessListify=t.showThrottleMessage=t.copyRequest=t.UnmanagedSubscriber=t.SocketSubscriber=t.SocketPendingSubscriber=t.SocketEventSubscriber=t.SocketBlockSubscriber=t.MulticoinProviderPlugin=t.NetworkPlugin=t.GasCostPlugin=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EtherscanPlugin=void 0,t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.decryptCrowdsaleJson=t.isKeystoreJson=t.isCrowdsaleJson=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.Wallet=t.HDNodeVoidWallet=t.HDNodeWallet=t.BaseWallet=t.Mnemonic=t.uuidV4=t.encodeRlp=t.decodeRlp=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.mask=t.toTwos=t.fromTwos=t.toQuantity=t.toNumber=t.toBeHex=t.toBigInt=t.toBeArray=void 0;var n=r(4586);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return n.version}});var i=r(8456);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}}),Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return i.FallbackFragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return i.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return i.StructFragment}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return i.ErrorDescription}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return i.Result}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}}),Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return i.Typed}});var o=r(646);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return o.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return o.getIcapAddress}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return o.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return o.getCreate2Address}}),Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return o.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return o.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return o.resolveAddress}});var a=r(1295);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return a.ZeroAddress}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return a.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return a.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return a.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return a.MaxInt256}}),Object.defineProperty(t,"N",{enumerable:!0,get:function(){return a.N}}),Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return a.ZeroHash}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return a.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return a.MessagePrefix}});var s=r(9288);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return s.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return s.Contract}}),Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return s.ContractFactory}}),Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return s.ContractEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return s.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return s.ContractTransactionResponse}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return s.ContractUnknownEventPayload}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return s.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return s.UndecodedEventLog}});var u=r(2291);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return u.computeHmac}}),Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return u.randomBytes}}),Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return u.keccak256}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return u.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return u.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return u.sha512}}),Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return u.pbkdf2}}),Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return u.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return u.scryptSync}}),Object.defineProperty(t,"lock",{enumerable:!0,get:function(){return u.lock}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return u.Signature}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return u.SigningKey}});var c=r(3562);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return c.id}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return c.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return c.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return c.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return c.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return c.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return c.verifyMessage}}),Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return c.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return c.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return c.solidityPackedSha256}}),Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return c.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return c.verifyTypedData}});var l=r(3996);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return l.getDefaultProvider}}),Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return l.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return l.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return l.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return l.TransactionResponse}}),Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return l.AbstractSigner}}),Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return l.NonceManager}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return l.VoidSigner}}),Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return l.AbstractProvider}}),Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return l.FallbackProvider}}),Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return l.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return l.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return l.JsonRpcSigner}}),Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return l.BrowserProvider}}),Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return l.AlchemyProvider}}),Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return l.AnkrProvider}}),Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return l.ChainstackProvider}}),Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return l.CloudflareProvider}}),Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return l.EtherscanProvider}}),Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return l.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return l.InfuraWebSocketProvider}}),Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return l.PocketProvider}}),Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return l.QuickNodeProvider}}),Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return l.IpcSocketProvider}}),Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return l.SocketProvider}}),Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return l.WebSocketProvider}}),Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return l.EnsResolver}}),Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return l.Network}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return l.EnsPlugin}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return l.EtherscanPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FetchUrlFeeDataNetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return l.GasCostPlugin}}),Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return l.NetworkPlugin}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return l.MulticoinProviderPlugin}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return l.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return l.SocketEventSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return l.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return l.SocketSubscriber}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return l.UnmanagedSubscriber}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return l.copyRequest}}),Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return l.showThrottleMessage}});var f=r(7778);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return f.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return f.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return f.recoverAddress}}),Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return f.Transaction}});var d=r(5347);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return d.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return d.encodeBase58}}),Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return d.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return d.encodeBase64}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return d.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return d.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return d.dataSlice}}),Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return d.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return d.getBytesCopy}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return d.hexlify}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return d.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return d.isBytesLike}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return d.stripZerosLeft}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return d.zeroPadBytes}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return d.zeroPadValue}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return d.defineProperties}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return d.resolveProperties}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return d.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return d.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return d.assertArgumentCount}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return d.assertNormalize}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return d.assertPrivate}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return d.makeError}}),Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return d.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return d.isError}}),Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return d.EventPayload}}),Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return d.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return d.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return d.FetchCancelSignal}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return d.FixedNumber}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return d.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return d.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return d.getUint}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return d.toBeArray}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return d.toBigInt}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return d.toBeHex}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return d.toNumber}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return d.toQuantity}}),Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return d.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return d.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return d.mask}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return d.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return d.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return d.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return d.parseUnits}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return d.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return d.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return d.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return d.Utf8ErrorFuncs}}),Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return d.decodeRlp}}),Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return d.encodeRlp}}),Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return d.uuidV4}});var h=r(3279);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return h.Mnemonic}}),Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return h.BaseWallet}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return h.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return h.HDNodeVoidWallet}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return h.Wallet}}),Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return h.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return h.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return h.getIndexedAccountPath}}),Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return h.isCrowdsaleJson}}),Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return h.isKeystoreJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return h.decryptCrowdsaleJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return h.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return h.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return h.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return h.encryptKeystoreJsonSync}});var p=r(6591);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return p.Wordlist}}),Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return p.LangEn}}),Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return p.WordlistOwl}}),Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return p.WordlistOwlA}}),Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return p.wordlists}})},1993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=void 0;const n=r(2291),i=r(5347);t.id=function(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))}},3562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=void 0;var n=r(1993);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return n.id}});var i=r(3239);Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return i.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return i.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return i.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return i.dnsEncode}});var o=r(8717);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return o.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return o.verifyMessage}});var a=r(6065);Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return a.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return a.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return a.solidityPackedSha256}});var s=r(7215);Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return s.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return s.verifyTypedData}})},8717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=t.hashMessage=void 0;const n=r(2291),i=r(1295),o=r(7778),a=r(5347);function s(e){return"string"==typeof e&&(e=(0,a.toUtf8Bytes)(e)),(0,n.keccak256)((0,a.concat)([(0,a.toUtf8Bytes)(i.MessagePrefix),(0,a.toUtf8Bytes)(String(e.length)),e]))}t.hashMessage=s,t.verifyMessage=function(e,t){const r=s(e);return(0,o.recoverAddress)(r,t)}},3239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=void 0;const n=r(2291),i=r(5347),o=r(3514),a=new Uint8Array(32);function s(e){return(0,i.assertArgument)(0!==e.length,"invalid ENS name; empty component","comp",e),e}function u(e){const t=(0,i.toUtf8Bytes)(c(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e{(0,i.assertArgument)(t.length<=r,`label ${JSON.stringify(e)} exceeds ${r} bytes`,"name",e);const n=new Uint8Array(t.length+1);return n.set(t,1),n[0]=n.length-1,n}))))+"00"}},6065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=void 0;const n=r(646),i=r(2291),o=r(5347),a=new RegExp("^bytes([0-9]+)$"),s=new RegExp("^(u?int)([0-9]*)$"),u=new RegExp("^(.*)\\[([0-9]*)\\]$");function c(e,t,r){switch(e){case"address":return r?(0,o.getBytes)((0,o.zeroPadValue)(t,32)):(0,o.getBytes)((0,n.getAddress)(t));case"string":return(0,o.toUtf8Bytes)(t);case"bytes":return(0,o.getBytes)(t);case"bool":return t=t?"0x01":"0x00",r?(0,o.getBytes)((0,o.zeroPadValue)(t,32)):(0,o.getBytes)(t)}let i=e.match(s);if(i){let n="int"===i[1],a=parseInt(i[2]||"256");return(0,o.assertArgument)((!i[2]||i[2]===String(a))&&a%8==0&&0!==a&&a<=256,"invalid number type","type",e),r&&(a=256),n&&(t=(0,o.toTwos)(t,a)),(0,o.getBytes)((0,o.zeroPadValue)((0,o.toBeArray)(t),a/8))}if(i=e.match(a),i){const n=parseInt(i[1]);return(0,o.assertArgument)(String(n)===i[1]&&0!==n&&n<=32,"invalid bytes type","type",e),(0,o.assertArgument)((0,o.dataLength)(t)===n,`invalid value for ${e}`,"value",t),r?(0,o.getBytes)((0,o.zeroPadBytes)(t,32)):t}if(i=e.match(u),i&&Array.isArray(t)){const r=i[1],n=parseInt(i[2]||String(t.length));(0,o.assertArgument)(n===t.length,`invalid array length for ${e}`,"value",t);const a=[];return t.forEach((function(e){a.push(c(r,e,!0))})),(0,o.getBytes)((0,o.concat)(a))}(0,o.assertArgument)(!1,"invalid type","type",e)}function l(e,t){(0,o.assertArgument)(e.length===t.length,"wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(c(e,t[n]))})),(0,o.hexlify)((0,o.concat)(r))}t.solidityPacked=l,t.solidityPackedKeccak256=function(e,t){return(0,i.keccak256)(l(e,t))},t.solidityPackedSha256=function(e,t){return(0,i.sha256)(l(e,t))}},7215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=void 0;const n=r(646),i=r(2291),o=r(7778),a=r(5347),s=r(1993),u=new Uint8Array(32);u.fill(0);const c=BigInt(-1),l=BigInt(0),f=BigInt(1),d=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const h=(0,a.toBeHex)(f,32),p=(0,a.toBeHex)(l,32),y={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},m=["name","version","chainId","verifyingContract","salt"];function g(e){return function(t){return(0,a.assertArgument)("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const b={name:g("name"),version:g("version"),chainId:function(e){const t=(0,a.getBigInt)(e,"domain.chainId");return(0,a.assertArgument)(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):(0,a.toQuantity)(t)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(e){}(0,a.assertArgument)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=(0,a.getBytes)(e,"domain.salt");return(0,a.assertArgument)(32===t.length,'invalid domain value "salt"',"domain.salt",e),(0,a.hexlify)(t)}};function v(e){{const t=e.match(/^(u?)int(\d+)$/);if(t){const r=""===t[1],n=parseInt(t[2]);(0,a.assertArgument)(n%8==0&&0!==n&&n<=256&&t[2]===String(n),"invalid numeric width","type",e);const i=(0,a.mask)(d,r?n-1:n),o=r?(i+f)*c:l;return function(t){const n=(0,a.getBigInt)(t,"value");return(0,a.assertArgument)(n>=o&&n<=i,`value out-of-bounds for ${e}`,"value",n),(0,a.toBeHex)(r?(0,a.toTwos)(n,256):n,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0,a.assertArgument)(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){const n=(0,a.getBytes)(t);return(0,a.assertArgument)(n.length===r,`invalid length for ${e}`,"value",t),function(e){const t=(0,a.getBytes)(e),r=t.length%32;return r?(0,a.concat)([t,u.slice(r)]):(0,a.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,a.zeroPadValue)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?h:p};case"bytes":return function(e){return(0,i.keccak256)(e)};case"string":return function(e){return(0,s.id)(e)}}return null}function w(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}function A(e){const t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class k{primaryType;#T;get types(){return JSON.parse(this.#T)}#I;#O;constructor(e){this.#I=new Map,this.#O=new Map;const t=new Map,r=new Map,n=new Map,i={};Object.keys(e).forEach((o=>{i[o]=e[o].map((({name:t,type:r})=>{let{base:n,index:i}=A(r);return"int"!==n||e.int||(n="int256"),"uint"!==n||e.uint||(n="uint256"),{name:t,type:n+(i||"")}})),t.set(o,new Set),r.set(o,[]),n.set(o,new Set)})),this.#T=JSON.stringify(i);for(const n in i){const o=new Set;for(const s of i[n]){(0,a.assertArgument)(!o.has(s.name),`duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(n)}`,"types",e),o.add(s.name);const i=A(s.type).base;(0,a.assertArgument)(i!==n,`circular type reference to ${JSON.stringify(i)}`,"types",e);v(i)||((0,a.assertArgument)(r.has(i),`unknown type ${JSON.stringify(i)}`,"types",e),r.get(i).push(n),t.get(n).add(i))}}const o=Array.from(r.keys()).filter((e=>0===r.get(e).length));(0,a.assertArgument)(0!==o.length,"missing primary type","types",e),(0,a.assertArgument)(1===o.length,`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,a.defineProperties)(this,{primaryType:o[0]}),function i(o,s){(0,a.assertArgument)(!s.has(o),`circular type reference to ${JSON.stringify(o)}`,"types",e),s.add(o);for(const e of t.get(o))if(r.has(e)){i(e,s);for(const t of s)n.get(t).add(e)}s.delete(o)}(this.primaryType,new Set);for(const[e,t]of n){const r=Array.from(t);r.sort(),this.#I.set(e,w(e,i[e])+r.map((e=>w(e,i[e]))).join(""))}}getEncoder(e){let t=this.#O.get(e);return t||(t=this.#B(e),this.#O.set(e,t)),t}#B(e){{const t=v(e);if(t)return t}const t=A(e).array;if(t){const e=t.prefix,r=this.getEncoder(e);return n=>{(0,a.assertArgument)(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,"value",n);let o=n.map(r);return this.#I.has(e)&&(o=o.map(i.keccak256)),(0,i.keccak256)((0,a.concat)(o))}}const r=this.types[e];if(r){const t=(0,s.id)(this.#I.get(e));return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#I.has(r)?(0,i.keccak256)(n):n}));return n.unshift(t),(0,a.concat)(n)}}(0,a.assertArgument)(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#I.get(e);return(0,a.assertArgument)(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,i.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(v(e))return r(e,t);const n=A(e).array;if(n)return(0,a.assertArgument)(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,"value",t),t.map((e=>this._visit(n.prefix,e,r)));const i=this.types[e];if(i)return i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{});(0,a.assertArgument)(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new k(e)}static getPrimaryType(e){return k.from(e).primaryType}static hashStruct(e,t,r){return k.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=y[r];(0,a.assertArgument)(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>m.indexOf(e.name)-m.indexOf(t.name))),k.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,a.concat)(["0x1901",k.hashDomain(e),k.from(t).hash(r)])}static hash(e,t,r){return(0,i.keccak256)(k.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const i={};e.verifyingContract&&!(0,a.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=k.from(t);o.visit(r,((e,t)=>("address"!==e||(0,a.isHexString)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=await n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),{domain:e,value:r=o.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t))}}static getPayload(e,t,r){k.hashDomain(e);const n={},i=[];m.forEach((t=>{const r=e[t];null!=r&&(n[t]=b[t](r),i.push({name:t,type:y[t]}))}));const o=k.from(t);t=o.types;const s=Object.assign({},t);return(0,a.assertArgument)(null==s.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),s.EIP712Domain=i,o.encode(r),{types:s,domain:n,primaryType:o.primaryType,message:o.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,a.hexlify)((0,a.getBytes)(t));if(e.match(/^u?int/))return(0,a.getBigInt)(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return(0,a.assertArgument)("string"==typeof t,"invalid string","value",t),t}(0,a.assertArgument)(!1,"unsupported type","type",e)}))}}}t.TypedDataEncoder=k,t.verifyTypedData=function(e,t,r,n){return(0,o.recoverAddress)(k.hash(e,t,r),n)}},4193:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethers=void 0;const n=r(6740),i=n.__importStar(r(1752));t.ethers=i,n.__exportStar(r(1752),t)},8672:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractProvider=t.UnmanagedSubscriber=void 0;const n=r(646),i=r(1295),o=r(9288),a=r(3562),s=r(7778),u=r(5347),c=r(1691),l=r(5601),f=r(5317),d=r(3807),h=r(4338),p=BigInt(2);function y(e){return e&&"function"==typeof e.then}function m(e,t){return e+":"+JSON.stringify(t,((e,t)=>{if(null==t)return"null";if("bigint"==typeof t)return`bigint:${t.toString()}`;if("string"==typeof t)return t.toLowerCase();if("object"==typeof t&&!Array.isArray(t)){const e=Object.keys(t);return e.sort(),e.reduce(((e,r)=>(e[r]=t[r],e)),{})}return t}))}class g{name;constructor(e){(0,u.defineProperties)(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function b(e){return(e=Array.from(new Set(e).values())).sort(),e}async function v(e,t){if(null==e)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"==typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if((0,u.isHexString)(e,32)){const t=e.toLowerCase();return{type:"transaction",tag:m("tx",{hash:t}),hash:t}}if(e.orphan){const t=e;return{type:"orphan",tag:m("orphan",t),filter:(r=t,JSON.parse(JSON.stringify(r)))}}var r;if(e.address||e.topics){const r=e,i={topics:(r.topics||[]).map((e=>null==e?null:Array.isArray(e)?b(e.map((e=>e.toLowerCase()))):e.toLowerCase()))};if(r.address){const e=[],o=[],a=r=>{(0,u.isHexString)(r)?e.push(r):o.push((async()=>{e.push(await(0,n.resolveAddress)(r,t))})())};Array.isArray(r.address)?r.address.forEach(a):a(r.address),o.length&&await Promise.all(o),i.address=b(e.map((e=>e.toLowerCase())))}return{filter:i,tag:m("event",i),type:"event"}}(0,u.assertArgument)(!1,"unknown ProviderEvent","event",e)}function w(){return(new Date).getTime()}t.UnmanagedSubscriber=g;const A={cacheTimeout:250,pollingInterval:4e3};function k(e,t){try{const r=E(e,t);if(r)return(0,u.toUtf8String)(r)}catch(e){}return null}function E(e,t){if("0x"===e)return null;try{const r=(0,u.getNumber)((0,u.dataSlice)(e,t,t+32)),n=(0,u.getNumber)((0,u.dataSlice)(e,r,r+32));return(0,u.dataSlice)(e,r+32,r+32+n)}catch(e){}return null}function S(e){const t=(0,u.toBeArray)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function x(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}t.AbstractProvider=class{#C;#N;#R;#M;#U;#L;#j;#F;#D;#H;#z;#w;constructor(e,t){if(this.#w=Object.assign({},A,t||{}),"any"===e)this.#L=!0,this.#U=null;else if(e){const t=f.Network.from(e);this.#L=!1,this.#U=Promise.resolve(t),setTimeout((()=>{this.emit("network",t,null)}),0)}else this.#L=!1,this.#U=null;this.#F=-1,this.#j=new Map,this.#C=new Map,this.#N=new Map,this.#R=null,this.#M=!1,this.#D=1,this.#H=new Map,this.#z=!1}get pollingInterval(){return this.#w.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#N.values())}attachPlugin(e){if(this.#N.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#N.set(e.name,e.connect(this)),this}getPlugin(e){return this.#N.get(e)||null}get disableCcipRead(){return this.#z}set disableCcipRead(e){this.#z=!!e}async#q(e){const t=this.#w.cacheTimeout;if(t<0)return await this._perform(e);const r=m(e.method,e);let n=this.#j.get(r);return n||(n=this._perform(e),this.#j.set(r,n),setTimeout((()=>{this.#j.get(r)===n&&this.#j.delete(r)}),t)),await n}async ccipReadFetch(e,t,r){if(this.disableCcipRead||0===r.length||null==e.to)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let t=0;t=500,`response not found during CCIP fetch: ${l}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:a,errorMessage:l}}),o.push(l)}(0,u.assert)(!1,`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:o}})}_wrapBlock(e,t){return new d.Block((0,l.formatBlock)(e),this)}_wrapLog(e,t){return new d.Log((0,l.formatLog)(e),this)}_wrapTransactionReceipt(e,t){return new d.TransactionReceipt((0,l.formatTransactionReceipt)(e),this)}_wrapTransactionResponse(e,t){return new d.TransactionResponse((0,l.formatTransactionResponse)(e),this)}_detectNetwork(){(0,u.assert)(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){(0,u.assert)(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=(0,u.getNumber)(await this.#q({method:"getBlockNumber"}),"%response");return this.#F>=0&&(this.#F=e),e}_getAddress(e){return(0,n.resolveAddress)(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return(0,u.isHexString)(e)?(0,u.isHexString)(e,32)?e:(0,u.toQuantity)(e):("bigint"==typeof e&&(e=(0,u.getNumber)(e,"blockTag")),"number"==typeof e?e>=0?(0,u.toQuantity)(e):this.#F>=0?(0,u.toQuantity)(this.#F+e):this.getBlockNumber().then((t=>(0,u.toQuantity)(t+e))):void(0,u.assertArgument)(!1,"invalid blockTag","blockTag",e))}_getFilter(e){const t=(e.topics||[]).map((e=>null==e?null:Array.isArray(e)?b(e.map((e=>e.toLowerCase()))):e.toLowerCase())),r="blockHash"in e?e.blockHash:void 0,n=(e,n,i)=>{let o;switch(e.length){case 0:break;case 1:o=e[0];break;default:e.sort(),o=e}if(r&&(null!=n||null!=i))throw new Error("invalid filter");const a={};return o&&(a.address=o),t.length&&(a.topics=t),n&&(a.fromBlock=n),i&&(a.toBlock=i),r&&(a.blockHash=r),a};let i,o,a=[];if(e.address)if(Array.isArray(e.address))for(const t of e.address)a.push(this._getAddress(t));else a.push(this._getAddress(e.address));return"fromBlock"in e&&(i=this._getBlockTag(e.fromBlock)),"toBlock"in e&&(o=this._getBlockTag(e.toBlock)),a.filter((e=>"string"!=typeof e)).length||null!=i&&"string"!=typeof i||null!=o&&"string"!=typeof o?Promise.all([Promise.all(a),i,o]).then((e=>n(e[0],e[1],e[2]))):n(a,i,o)}_getTransactionRequest(e){const t=(0,d.copyRequest)(e),r=[];if(["to","from"].forEach((e=>{if(null==t[e])return;const i=(0,n.resolveAddress)(t[e],this);y(i)?r.push(async function(){t[e]=await i}()):t[e]=i})),null!=t.blockTag){const e=this._getBlockTag(t.blockTag);y(e)?r.push(async function(){t.blockTag=await e}()):t.blockTag=e}return r.length?async function(){return await Promise.all(r),t}():t}async getNetwork(){if(null==this.#U){const e=(async()=>{try{const e=await this._detectNetwork();return this.emit("network",e,null),e}catch(t){throw this.#U===e&&(this.#U=null),t}})();return this.#U=e,(await e).clone()}const e=this.#U,[t,r]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==r.chainId&&(this.#L?(this.emit("network",r,t),this.#U===e&&(this.#U=Promise.resolve(r))):(0,u.assert)(!1,`network changed: ${t.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:t,gasPrice:r,priorityFee:n}=await(0,u.resolveProperties)({_block:this.#G("latest",!1),gasPrice:(async()=>{try{const e=await this.#q({method:"getGasPrice"});return(0,u.getBigInt)(e,"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{const e=await this.#q({method:"getPriorityFee"});return(0,u.getBigInt)(e,"%response")}catch(e){}return null})()});let i=null,o=null;const a=this._wrapBlock(t,e);return a&&a.baseFeePerGas&&(o=null!=n?n:BigInt("1000000000"),i=a.baseFeePerGas*p+o),new d.FeeData(r,i,o)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const e=new u.FetchRequest(r.url),n=await r.processFunc(t,this,e);return new d.FeeData(n.gasPrice,n.maxFeePerGas,n.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return y(t)&&(t=await t),(0,u.getBigInt)(await this.#q({method:"estimateGas",transaction:t}),"%response")}async#K(e,t,r){(0,u.assert)(r<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:t,enableCcipRead:!0})});const i=(0,d.copyRequest)(e);try{return(0,u.hexlify)(await this._perform({method:"call",transaction:i,blockTag:t}))}catch(e){if(!this.disableCcipRead&&(0,u.isCallException)(e)&&e.data&&r>=0&&"latest"===t&&null!=i.to&&"0x556f1830"===(0,u.dataSlice)(e.data,0,4)){const o=e.data,a=await(0,n.resolveAddress)(i.to,this);let s;try{s=function(e){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};(0,u.assert)((0,u.dataLength)(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=(0,u.dataSlice)(e,0,32);(0,u.assert)((0,u.dataSlice)(r,0,12)===(0,u.dataSlice)(T,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=(0,u.dataSlice)(r,12);try{const r=[],n=(0,u.getNumber)((0,u.dataSlice)(e,32,64)),i=(0,u.getNumber)((0,u.dataSlice)(e,n,n+32)),o=(0,u.dataSlice)(e,n+32);for(let e=0;et[e])),t}((0,u.dataSlice)(e.data,4))}catch(e){(0,u.assert)(!1,e.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}(0,u.assert)(s.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:s.errorArgs}});const c=await this.ccipReadFetch(i,s.calldata,s.urls);(0,u.assert)(null!=c,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:e.data,errorArgs:s.errorArgs}});const l={to:a,data:(0,u.concat)([s.selector,P([c,s.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{const e=await this.#K(l,t,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:e}),e}catch(e){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:e}),e}}throw e}}async#V(e){const{value:t}=await(0,u.resolveProperties)({network:this.getNetwork(),value:e});return t}async call(e){const{tx:t,blockTag:r}=await(0,u.resolveProperties)({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#V(this.#K(t,r,e.enableCcipRead?0:-1))}async#J(e,t,r){let n=this._getAddress(t),i=this._getBlockTag(r);return"string"==typeof n&&"string"==typeof i||([n,i]=await Promise.all([n,i])),await this.#V(this.#q(Object.assign(e,{address:n,blockTag:i})))}async getBalance(e,t){return(0,u.getBigInt)(await this.#J({method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return(0,u.getNumber)(await this.#J({method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return(0,u.hexlify)(await this.#J({method:"getCode"},e,t))}async getStorage(e,t,r){const n=(0,u.getBigInt)(t,"position");return(0,u.hexlify)(await this.#J({method:"getStorage",position:n},e,r))}async broadcastTransaction(e){const{blockNumber:t,hash:r,network:n}=await(0,u.resolveProperties)({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=s.Transaction.from(e);if(i.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,n).replaceableTransaction(t)}async#G(e,t){if((0,u.isHexString)(e,32))return await this.#q({method:"getBlock",blockHash:e,includeTransactions:t});let r=this._getBlockTag(e);return"string"!=typeof r&&(r=await r),await this.#q({method:"getBlock",blockTag:r,includeTransactions:t})}async getBlock(e,t){const{network:r,params:n}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#G(e,!!t)});return null==n?null:this._wrapBlock(n,r)}async getTransaction(e){const{network:t,params:r}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#q({method:"getTransaction",hash:e})});return null==r?null:this._wrapTransactionResponse(r,t)}async getTransactionReceipt(e){const{network:t,params:r}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#q({method:"getTransactionReceipt",hash:e})});if(null==r)return null;if(null==r.gasPrice&&null==r.effectiveGasPrice){const t=await this.#q({method:"getTransaction",hash:e});if(null==t)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=t.gasPrice}return this._wrapTransactionReceipt(r,t)}async getTransactionResult(e){const{result:t}=await(0,u.resolveProperties)({network:this.getNetwork(),result:this.#q({method:"getTransactionResult",hash:e})});return null==t?null:(0,u.hexlify)(t)}async getLogs(e){let t=this._getFilter(e);y(t)&&(t=await t);const{network:r,params:n}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#q({method:"getLogs",filter:t})});return n.map((e=>this._wrapLog(e,r)))}_getProvider(e){(0,u.assert)(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await c.EnsResolver.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=(0,n.getAddress)(e);const t=(0,a.namehash)(e.substring(2).toLowerCase()+".addr.reverse");try{const r=await c.EnsResolver.getEnsAddress(this),n=new o.Contract(r,["function resolver(bytes32) view returns (address)"],this),a=await n.resolver(t);if(null==a||a===i.ZeroAddress)return null;const s=new o.Contract(a,["function name(bytes32) view returns (string)"],this),u=await s.name(t);return await this.resolveName(u)!==e?null:u}catch(e){if((0,u.isError)(e,"BAD_DATA")&&"0x"===e.value)return null;if((0,u.isError)(e,"CALL_EXCEPTION"))return null;throw e}return null}async waitForTransaction(e,t,r){const n=null!=t?t:1;return 0===n?this.getTransactionReceipt(e):new Promise((async(t,i)=>{let o=null;const a=async r=>{try{const i=await this.getTransactionReceipt(e);if(null!=i&&r-i.blockNumber+1>=n)return t(i),void(o&&(clearTimeout(o),o=null))}catch(e){console.log("EEE",e)}this.once("block",a)};null!=r&&(o=setTimeout((()=>{null!=o&&(o=null,this.off("block",a),i((0,u.makeError)("timeout","TIMEOUT",{reason:"timeout"})))}),r)),a(await this.getBlockNumber())}))}async waitForBlock(e){(0,u.assert)(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=this.#H.get(e);t&&(t.timer&&clearTimeout(t.timer),this.#H.delete(e))}_setTimeout(e,t){null==t&&(t=0);const r=this.#D++,n=()=>{this.#H.delete(r),e()};if(this.paused)this.#H.set(r,{timer:null,func:n,time:t});else{const e=setTimeout(n,t);this.#H.set(r,{timer:e,func:n,time:w()})}return r}_forEachSubscriber(e){for(const t of this.#C.values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new g(e.type);case"block":{const e=new h.PollingBlockSubscriber(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new h.PollingBlockTagSubscriber(this,e.type);case"event":return new h.PollingEventSubscriber(this,e.filter);case"transaction":return new h.PollingTransactionSubscriber(this,e.hash);case"orphan":return new h.PollingOrphanSubscriber(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const r of this.#C.values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=t,r.started&&t.start(),null!=this.#R&&t.pause(this.#R);break}}async#W(e,t){let r=await v(e,this);return"event"===r.type&&t&&t.length>0&&!0===t[0].removed&&(r=await v({orphan:"drop-log",log:t[0]},this)),this.#C.get(r.tag)||null}async#Q(e){const t=await v(e,this),r=t.tag;let n=this.#C.get(r);if(!n){n={subscriber:this._getSubscriber(t),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#C.set(r,n)}return n}async on(e,t){const r=await this.#Q(e);return r.listeners.push({listener:t,once:!1}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#R&&r.subscriber.pause(this.#R)),this}async once(e,t){const r=await this.#Q(e);return r.listeners.push({listener:t,once:!0}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#R&&r.subscriber.pause(this.#R)),this}async emit(e,...t){const r=await this.#W(e,t);if(!r||0===r.listeners.length)return!1;const n=r.listeners.length;return r.listeners=r.listeners.filter((({listener:r,once:n})=>{const i=new u.EventPayload(this,n?null:r,e);try{r.call(this,...t,i)}catch(e){}return!n})),0===r.listeners.length&&(r.started&&r.subscriber.stop(),this.#C.delete(r.tag)),n>0}async listenerCount(e){if(e){const t=await this.#W(e);return t?t.listeners.length:0}let t=0;for(const{listeners:e}of this.#C.values())t+=e.length;return t}async listeners(e){if(e){const t=await this.#W(e);return t?t.listeners.map((({listener:e})=>e)):[]}let t=[];for(const{listeners:e}of this.#C.values())t=t.concat(e.map((({listener:e})=>e)));return t}async off(e,t){const r=await this.#W(e);if(!r)return this;if(t){const e=r.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&r.listeners.splice(e,1)}return t&&0!==r.listeners.length||(r.started&&r.subscriber.stop(),this.#C.delete(r.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:r,subscriber:n}=await this.#Q(e);r&&n.stop(),this.#C.delete(t)}else for(const[e,{started:t,subscriber:r}]of this.#C)t&&r.stop(),this.#C.delete(e);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return this.#M}destroy(){this.removeAllListeners();for(const e of this.#H.keys())this._clearTimeout(e);this.#M=!0}get paused(){return null!=this.#R}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#F=-1,null!=this.#R){if(this.#R==!!e)return;(0,u.assert)(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber((t=>t.pause(e))),this.#R=!!e;for(const e of this.#H.values())e.timer&&clearTimeout(e.timer),e.time=w()-e.time}resume(){if(null!=this.#R){this._forEachSubscriber((e=>e.resume())),this.#R=null;for(const e of this.#H.values()){let t=e.time;t<0&&(t=0),e.time=w(),setTimeout(e.func,t)}}}};const _=new Uint8Array([]);function P(e){const t=[];let r=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VoidSigner=t.AbstractSigner=void 0;const n=r(646),i=r(7778),o=r(5347),a=r(3807);function s(e,t){if(e.provider)return e.provider;(0,o.assert)(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function u(e,t){let r=(0,a.copyRequest)(t);if(null!=r.to&&(r.to=(0,n.resolveAddress)(r.to,e)),null!=r.from){const t=r.from;r.from=Promise.all([e.getAddress(),(0,n.resolveAddress)(t,e)]).then((([e,t])=>((0,o.assertArgument)(e.toLowerCase()===t.toLowerCase(),"transaction from mismatch","tx.from",t),e)))}else r.from=e.getAddress();return await(0,o.resolveProperties)(r)}class c{provider;constructor(e){(0,o.defineProperties)(this,{provider:e||null})}async getNonce(e){return s(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await u(this,e)}async populateTransaction(e){const t=s(this,"populateTransaction"),r=await u(this,e);null==r.nonce&&(r.nonce=await this.getNonce("pending")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));const n=await this.provider.getNetwork();if(null!=r.chainId){const t=(0,o.getBigInt)(r.chainId);(0,o.assertArgument)(t===n.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=n.chainId;const i=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null==r.gasPrice||2!==r.type&&!i?0!==r.type&&1!==r.type||!i||(0,o.assertArgument)(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):(0,o.assertArgument)(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas)if(0===r.type||1===r.type){const e=await t.getFeeData();(0,o.assert)(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==r.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(r.type=2,null!=r.gasPrice){const e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?((0,o.assert)(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):(0,o.assert)(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==r.type&&3!==r.type||(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else r.type=2;return await(0,o.resolveProperties)(r)}async estimateGas(e){return s(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return s(this,"call").call(await this.populateCall(e))}async resolveName(e){const t=s(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){const t=s(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const n=i.Transaction.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}}t.AbstractSigner=c;class l extends c{address;constructor(e,t){super(t),(0,o.defineProperties)(this,{address:e})}async getAddress(){return this.address}connect(e){return new l(this.address,e)}#Z(e,t){(0,o.assert)(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:t})}async signTransaction(e){this.#Z("transactions","signTransaction")}async signMessage(e){this.#Z("messages","signMessage")}async signTypedData(e,t,r){this.#Z("typed-data","signTypedData")}}t.VoidSigner=l},9973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showThrottleMessage=void 0;const r=new Set;t.showThrottleMessage=function(e){r.has(e)||(r.add(e),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${e} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}},2347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultProvider=void 0;const n=r(5347),i=r(6806),o=r(7841),a=r(8907),s=r(2271),u=r(5047),c=r(5855),l=r(8817),f=r(9902),d=r(2371),h=r(5317),p=r(873);const y="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");t.getDefaultProvider=function(e,t){null==t&&(t={});const r=e=>"-"!==t[e]&&("string"==typeof t.exclusive?e===t.exclusive:!Array.isArray(t.exclusive)||-1!==t.exclusive.indexOf(e));if("string"==typeof e&&e.match(/^https?:/))return new d.JsonRpcProvider(e);if("string"==typeof e&&e.match(/^wss?:/)||(m=e)&&"function"==typeof m.send&&"function"==typeof m.close)return new p.WebSocketProvider(e);var m;let g=null;try{g=h.Network.from(e)}catch(e){}const b=[];if(r("publicPolygon")&&g&&("matic"===g.name?b.push(new d.JsonRpcProvider("https://polygon-rpc.com/",g,{staticNetwork:g})):"matic-amoy"===g.name&&b.push(new d.JsonRpcProvider("https://rpc-amoy.polygon.technology/",g,{staticNetwork:g}))),r("alchemy"))try{b.push(new o.AlchemyProvider(e,t.alchemy))}catch(e){}if(r("ankr")&&null!=t.ankr)try{b.push(new i.AnkrProvider(e,t.ankr))}catch(e){}if(r("chainstack"))try{b.push(new a.ChainstackProvider(e,t.chainstack))}catch(e){}if(r("cloudflare"))try{b.push(new s.CloudflareProvider(e))}catch(e){}if(r("etherscan"))try{b.push(new u.EtherscanProvider(e,t.etherscan))}catch(e){}if(r("infura"))try{let r,n=t.infura;"object"==typeof n&&(r=n.projectSecret,n=n.projectId),b.push(new c.InfuraProvider(e,n,r))}catch(e){}if(r("quicknode"))try{let r=t.quicknode;b.push(new l.QuickNodeProvider(e,r))}catch(e){}if((0,n.assert)(b.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),1===b.length)return b[0];let v=Math.floor(b.length/2);return v>2&&(v=2),g&&-1!==y.indexOf(g.name)&&(v=1),t&&t.quorum&&(v=t.quorum),new f.FallbackProvider(b,void 0,{quorum:v})}},1691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnsResolver=t.BasicMulticoinProviderPlugin=t.MulticoinProviderPlugin=void 0;const n=r(646),i=r(1295),o=r(9288),a=r(3562),s=r(5347);function u(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):(0,s.assertArgument)(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class c{name;constructor(e){(0,s.defineProperties)(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}t.MulticoinProviderPlugin=c;t.BasicMulticoinProviderPlugin=class extends c{constructor(){super("org.ethers.plugins.provider.BasicMulticoin")}};const l=new RegExp("^(ipfs)://(.*)$","i"),f=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),l,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class d{provider;address;name;#Y;#X;constructor(e,t,r){(0,s.defineProperties)(this,{provider:e,address:t,name:r}),this.#Y=null,this.#X=new o.Contract(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e)}async supportsWildcard(){return null==this.#Y&&(this.#Y=(async()=>{try{return await this.#X.supportsInterface("0x9061b923")}catch(e){if((0,s.isError)(e,"CALL_EXCEPTION"))return!1;throw this.#Y=null,e}})()),await this.#Y}async#$(e,t){t=(t||[]).slice();const r=this.#X.interface;t.unshift((0,a.namehash)(this.name));let n=null;await this.supportsWildcard()&&(n=r.getFunction(e),(0,s.assert)(n,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),t=[(0,a.dnsEncode)(this.name,255),r.encodeFunctionData(n,t)],e="resolve(bytes,bytes)"),t.push({enableCcipRead:!0});try{const i=await this.#X[e](...t);return n?r.decodeFunctionResult(n,i)[0]:i}catch(e){if(!(0,s.isError)(e,"CALL_EXCEPTION"))throw e}return null}async getAddress(e){if(null==e&&(e=60),60===e)try{const e=await this.#$("addr(bytes32)");return null==e||e===i.ZeroAddress?null:e}catch(e){if((0,s.isError)(e,"CALL_EXCEPTION"))return null;throw e}if(e>=0&&e<2147483648){let t=e+2147483648;const r=await this.#$("addr(bytes32,uint)",[t]);if((0,s.isHexString)(r,20))return(0,n.getAddress)(r)}let t=null;for(const r of this.provider.plugins)if(r instanceof c&&r.supportsCoinType(e)){t=r;break}if(null==t)return null;const r=await this.#$("addr(bytes32,uint)",[e]);if(null==r||"0x"===r)return null;const o=await t.decodeAddress(e,r);if(null!=o)return o;(0,s.assert)(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){const t=await this.#$("text(bytes32,string)",[e]);return null==t||"0x"===t?null:t}async getContentHash(){const e=await this.#$("contenthash(bytes32)");if(null==e||"0x"===e)return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e="e3010170"===t[1]?"ipfs":"ipns",r=parseInt(t[4],16);if(t[5].length===2*r)return`${e}://${(0,s.encodeBase58)("0x"+t[2])}`}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&64===r[1].length)return`bzz://${r[1]}`;(0,s.assert)(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const t=await this.getText("avatar");if(null==t)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatTransactionResponse=t.formatTransactionReceipt=t.formatReceiptLog=t.formatBlock=t.formatLog=t.formatUint256=t.formatHash=t.formatData=t.formatBoolean=t.object=t.arrayOf=t.allowNull=void 0;const n=r(646),i=r(2291),o=r(7778),a=r(5347),s=BigInt(0);function u(e,t){return function(r){return null==r?t:e(r)}}function c(e,t){return r=>{if(t&&null==r)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map((t=>e(t)))}}function l(e,t){return r=>{const n={};for(const i in e){let o=i;if(t&&i in t&&!(o in r))for(const e of t[i])if(e in r){o=e;break}try{const t=e[i](r[o]);void 0!==t&&(n[i]=t)}catch(e){const t=e instanceof Error?e.message:"not-an-error";(0,a.assert)(!1,`invalid value for value.${i} (${t})`,"BAD_DATA",{value:r})}}return n}}function f(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}(0,a.assertArgument)(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}function d(e){return(0,a.assertArgument)((0,a.isHexString)(e,!0),"invalid data","value",e),e}function h(e){return(0,a.assertArgument)((0,a.isHexString)(e,32),"invalid hash","value",e),e}t.allowNull=u,t.arrayOf=c,t.object=l,t.formatBoolean=f,t.formatData=d,t.formatHash=h,t.formatUint256=function(e){if(!(0,a.isHexString)(e))throw new Error("invalid uint256");return(0,a.zeroPadValue)(e,32)};const p=l({address:n.getAddress,blockHash:h,blockNumber:a.getNumber,data:d,index:a.getNumber,removed:u(f,!1),topics:c(h),transactionHash:h,transactionIndex:a.getNumber},{index:["logIndex"]});t.formatLog=function(e){return p(e)};const y=l({hash:u(h),parentHash:h,parentBeaconBlockRoot:u(h,null),number:a.getNumber,timestamp:a.getNumber,nonce:u(d),difficulty:a.getBigInt,gasLimit:a.getBigInt,gasUsed:a.getBigInt,stateRoot:u(h,null),receiptsRoot:u(h,null),blobGasUsed:u(a.getBigInt,null),excessBlobGas:u(a.getBigInt,null),miner:u(n.getAddress),prevRandao:u(h,null),extraData:d,baseFeePerGas:u(a.getBigInt)},{prevRandao:["mixHash"]});t.formatBlock=function(e){const t=y(e);return t.transactions=e.transactions.map((e=>"string"==typeof e?e:v(e))),t};const m=l({transactionIndex:a.getNumber,blockNumber:a.getNumber,transactionHash:h,address:n.getAddress,topics:c(h),data:d,index:a.getNumber,blockHash:h},{index:["logIndex"]});function g(e){return m(e)}t.formatReceiptLog=g;const b=l({to:u(n.getAddress,null),from:u(n.getAddress,null),contractAddress:u(n.getAddress,null),index:a.getNumber,root:u(a.hexlify),gasUsed:a.getBigInt,blobGasUsed:u(a.getBigInt,null),logsBloom:u(d),blockHash:h,hash:h,logs:c(g),blockNumber:a.getNumber,cumulativeGasUsed:a.getBigInt,effectiveGasPrice:u(a.getBigInt),blobGasPrice:u(a.getBigInt,null),status:u(a.getNumber),type:u(a.getNumber,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function v(e){e.to&&(0,a.getBigInt)(e.to)===s&&(e.to="0x0000000000000000000000000000000000000000");const t=l({hash:h,index:u(a.getNumber,void 0),type:e=>"0x"===e||null==e?0:(0,a.getNumber)(e),accessList:u(o.accessListify,null),blobVersionedHashes:u(c(h,!0),null),blockHash:u(h,null),blockNumber:u(a.getNumber,null),transactionIndex:u(a.getNumber,null),from:n.getAddress,gasPrice:u(a.getBigInt),maxPriorityFeePerGas:u(a.getBigInt),maxFeePerGas:u(a.getBigInt),maxFeePerBlobGas:u(a.getBigInt,null),gasLimit:a.getBigInt,to:u(n.getAddress,null),value:a.getBigInt,nonce:a.getNumber,data:d,creates:u(n.getAddress,null),chainId:u(a.getBigInt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==t.to&&null==t.creates&&(t.creates=(0,n.getCreateAddress)(t)),1!==e.type&&2!==e.type||null!=e.accessList||(t.accessList=[]),e.signature?t.signature=i.Signature.from(e.signature):t.signature=i.Signature.from(e),null==t.chainId){const e=t.signature.legacyChainId;null!=e&&(t.chainId=e)}return t.blockHash&&(0,a.getBigInt)(t.blockHash)===s&&(t.blockHash=null),t}t.formatTransactionReceipt=function(e){return b(e)},t.formatTransactionResponse=v},3996:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanPlugin=t.EtherscanProvider=t.ChainstackProvider=t.CloudflareProvider=t.AnkrProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.copyRequest=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=t.NonceManager=t.Network=t.MulticoinProviderPlugin=t.EnsResolver=t.getDefaultProvider=t.showThrottleMessage=t.VoidSigner=t.AbstractSigner=t.UnmanagedSubscriber=t.AbstractProvider=void 0;var n=r(8672);Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return n.AbstractProvider}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return n.UnmanagedSubscriber}});var i=r(3071);Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return i.AbstractSigner}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return i.VoidSigner}});var o=r(9973);Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return o.showThrottleMessage}});var a=r(2347);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return a.getDefaultProvider}});var s=r(1691);Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return s.EnsResolver}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return s.MulticoinProviderPlugin}});var u=r(5317);Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return u.Network}});var c=r(9596);Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return c.NonceManager}});var l=r(4491);Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return l.NetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return l.GasCostPlugin}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return l.EnsPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FetchUrlFeeDataNetworkPlugin}});var f=r(3807);Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return f.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return f.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return f.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return f.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return f.TransactionResponse}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return f.copyRequest}});var d=r(9902);Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return d.FallbackProvider}});var h=r(2371);Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return h.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return h.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return h.JsonRpcSigner}});var p=r(254);Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return p.BrowserProvider}});var y=r(7841);Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return y.AlchemyProvider}});var m=r(6806);Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return m.AnkrProvider}});var g=r(2271);Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return g.CloudflareProvider}});var b=r(8907);Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return b.ChainstackProvider}});var v=r(5047);Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return v.EtherscanProvider}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return v.EtherscanPlugin}});var w=r(5855);Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return w.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return w.InfuraWebSocketProvider}});var A=r(2398);Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return A.PocketProvider}});var k=r(8817);Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return k.QuickNodeProvider}});const E=r(4584);Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return E.IpcSocketProvider}});var S=r(4945);Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return S.SocketProvider}});var x=r(873);Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return x.WebSocketProvider}});var _=r(4945);Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return _.SocketSubscriber}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return _.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return _.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return _.SocketEventSubscriber}})},5317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;const n=r(7778),i=r(5347),o=r(4491),a=new Map;class s{#te;#re;#N;constructor(e,t){this.#te=e,this.#re=(0,i.getBigInt)(t),this.#N=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#te}set name(e){this.#te=e}get chainId(){return this.#re}set chainId(e){this.#re=(0,i.getBigInt)(e,"chainId")}matches(e){if(null==e)return!1;if("string"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return this.name===e}if("number"==typeof e||"bigint"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return!1}if("object"==typeof e){if(null!=e.chainId){try{return this.chainId===(0,i.getBigInt)(e.chainId)}catch(e){}return!1}return null!=e.name&&this.name===e.name}return!1}get plugins(){return Array.from(this.#N.values())}attachPlugin(e){if(this.#N.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#N.set(e.name,e.clone()),this}getPlugin(e){return this.#N.get(e)||null}getPlugins(e){return this.plugins.filter((t=>t.name.split("#")[0]===e))}clone(){const e=new s(this.name,this.chainId);return this.plugins.forEach((t=>{e.attachPlugin(t.clone())})),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new o.GasCostPlugin;let r=t.txBase;if(null==e.to&&(r+=t.txCreate),e.data)for(let n=2;n{n.attachPlugin(e)})),n};s.register(e,n),s.register(t,n),r.altNames&&r.altNames.forEach((e=>{s.register(e,n)}))}l=!0,e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{ensNetwork:11155111}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[c("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[c("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",11155420,{}),e("xdai",100,{ensNetwork:1})}(),null==e)return s.from("mainnet");if("number"==typeof e&&(e=BigInt(e)),"string"==typeof e||"bigint"==typeof e){const t=a.get(e);if(t)return t();if("bigint"==typeof e)return new s("unknown",e);(0,i.assertArgument)(!1,"unknown network","network",e)}if("function"==typeof e.clone){return e.clone()}if("object"==typeof e){(0,i.assertArgument)("string"==typeof e.name&&"number"==typeof e.chainId,"invalid network object name or chainId","network",e);const t=new s(e.name,e.chainId);return(e.ensAddress||null!=e.ensNetwork)&&t.attachPlugin(new o.EnsPlugin(e.ensAddress,e.ensNetwork)),t}(0,i.assertArgument)(!1,"invalid network","network",e)}static register(e,t){"number"==typeof e&&(e=BigInt(e));const r=a.get(e);r&&(0,i.assertArgument)(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",e),a.set(e,t)}}function u(e,t){const r=String(e);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${e}`);const n=r.split(".");if(1===n.length&&n.push(""),2!==n.length)throw new Error(`invalid gwei value: ${e}`);for(;n[1].length9){let e=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||e++,n[1]=e.toString()}return BigInt(n[0]+n[1])}function c(e){return new o.FetchUrlFeeDataNetworkPlugin(e,(async(e,t,r)=>{let n;r.setHeader("User-Agent","ethers");try{const[t,i]=await Promise.all([r.send(),e()]);n=t;const o=n.bodyJson.standard;return{gasPrice:i.gasPrice,maxFeePerGas:u(o.maxFee,9),maxPriorityFeePerGas:u(o.maxPriorityFee,9)}}catch(e){(0,i.assert)(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:n,error:e})}}))}t.Network=s;let l=!1},4491:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=void 0;const n=r(8166),i=r(5347);class o{name;constructor(e){(0,n.defineProperties)(this,{name:e})}clone(){return new o(this.name)}}t.NetworkPlugin=o;class a extends o{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,t){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);const r={effectiveBlock:e};function o(e,n){let o=(t||{})[e];null==o&&(o=n),(0,i.assertArgument)("number"==typeof o,`invalud value for ${e}`,"costs",t),r[e]=o}o("txBase",21e3),o("txCreate",32e3),o("txDataZero",4),o("txDataNonzero",16),o("txAccessListStorageKey",1900),o("txAccessListAddress",2400),(0,n.defineProperties)(this,r)}clone(){return new a(this.effectiveBlock,this)}}t.GasCostPlugin=a;class s extends o{address;targetNetwork;constructor(e,t){super("org.ethers.plugins.network.Ens"),(0,n.defineProperties)(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==t?1:t})}clone(){return new s(this.address,this.targetNetwork)}}t.EnsPlugin=s;class u extends o{#ne;get feeDataFunc(){return this.#ne}constructor(e){super("org.ethers.plugins.network.FeeData"),this.#ne=e}async getFeeData(e){return await this.#ne(e)}clone(){return new u(this.#ne)}}t.FeeDataNetworkPlugin=u;t.FetchUrlFeeDataNetworkPlugin=class extends o{#ie;#oe;get url(){return this.#ie}get processFunc(){return this.#oe}constructor(e,t){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#ie=e,this.#oe=t}clone(){return this}}},7841:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlchemyProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371),s="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class u extends a.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=s);super(u.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new u(e,this.apiKey)}catch(e){}return super._getProvider(e)}async _perform(e){if("getTransactionResult"===e.method){const{trace:t,tx:r}=await(0,n.resolveProperties)({trace:this.send("trace_transaction",[e.hash]),tx:this.getTransaction(e.hash)});if(null==t||null==r)return null;let i,o=!1;try{i=t[0].result.output,o="Reverted"===t[0].error}catch(e){}if(i)return(0,n.assert)(!o,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:i,reason:null,transaction:r,invocation:null,revert:null}),i;(0,n.assert)(!1,"could not parse trace result","BAD_DATA",{value:t})}return await super._perform(e)}isCommunityResource(){return this.apiKey===s}static getRequest(e,t){null==t&&(t=s);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v2/${t}`);return r.allowGzip=!0,t===s&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("alchemy"),!0)),r}}t.AlchemyProvider=u},6806:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnkrProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371),s="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";class u extends a.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=s);const i={polling:!0,staticNetwork:r};super(u.getRequest(r,t),r,i),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new u(e,this.apiKey)}catch(e){}return super._getProvider(e)}static getRequest(e,t){null==t&&(t=s);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===s&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("AnkrProvider"),!0)),r}getRpcError(e,t){return"eth_sendRawTransaction"===e.method&&t&&t.error&&"INTERNAL_ERROR: could not replace existing tx"===t.error.message&&(t.error.message="replacement transaction underpriced"),super.getRpcError(e,t)}isCommunityResource(){return this.apiKey===s}}t.AnkrProvider=u},254:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserProvider=void 0;const n=r(5347),i=r(2371);class o extends i.JsonRpcApiPollingProvider{#ae;constructor(e,t,r){const i=Object.assign({},null!=r?r:{},{batchMaxCount:1});(0,n.assertArgument)(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(t,i),this.#ae=async(t,r)=>{const n={method:t,params:r};this.emit("debug",{action:"sendEip1193Request",payload:n});try{const t=await e.request(n);return this.emit("debug",{action:"receiveEip1193Result",result:t}),t}catch(e){const t=new Error(e.message);throw t.code=e.code,t.data=e.data,t.payload=n,this.emit("debug",{action:"receiveEip1193Error",error:t}),t}}}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){(0,n.assertArgument)(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const t=await this.#ae(e.method,e.params||[]);return[{id:e.id,result:t}]}catch(t){return[{id:e.id,error:{code:t.code,data:t.data,message:t.message}}]}}getRpcError(e,t){switch((t=JSON.parse(JSON.stringify(t))).error.code||-1){case 4001:t.error.message=`ethers-user-denied: ${t.error.message}`;break;case 4200:t.error.message=`ethers-unsupported: ${t.error.message}`}return super.getRpcError(e,t)}async hasSigner(e){null==e&&(e=0);const t=await this.send("eth_accounts",[]);return"number"==typeof e?t.length>e:(e=e.toLowerCase(),0!==t.filter((t=>t.toLowerCase()===e)).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#ae("eth_requestAccounts",[])}catch(e){const t=e.payload;throw this.getRpcError(t,{id:t.id,error:e})}return await super.getSigner(e)}}t.BrowserProvider=o},8907:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainstackProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371);function s(e){switch(e){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}(0,n.assertArgument)(!1,"unsupported network","network",e)}class u extends a.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=s(r.name));super(u.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new u(e,this.apiKey)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.apiKey===s(this._network.name)}static getRequest(e,t){null==t&&(t=s(e.name));const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===s(e.name)&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("ChainstackProvider"),!0)),r}}t.ChainstackProvider=u},2271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloudflareProvider=void 0;const n=r(5347),i=r(5317),o=r(2371);class a extends o.JsonRpcProvider{constructor(e){null==e&&(e="mainnet");const t=i.Network.from(e);(0,n.assertArgument)("mainnet"===t.name,"unsupported network","network",e),super("https://cloudflare-eth.com/",t,{staticNetwork:t})}}t.CloudflareProvider=a},5047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherscanProvider=t.EtherscanPlugin=void 0;const n=r(8456),i=r(9288),o=r(7778),a=r(5347),s=r(8672),u=r(5317),c=r(4491),l=r(9973);const f="org.ethers.plugins.provider.Etherscan";class d extends c.NetworkPlugin{baseUrl;constructor(e){super(f),(0,a.defineProperties)(this,{baseUrl:e})}clone(){return new d(this.baseUrl)}}t.EtherscanPlugin=d;const h=["enableCcipRead"];let p=1;class y extends s.AbstractProvider{network;apiKey;#se;constructor(e,t){const r=null!=t?t:null;super();const n=u.Network.from(e);this.#se=n.getPlugin(f),(0,a.defineProperties)(this,{apiKey:r,network:n}),this.getBaseUrl()}getBaseUrl(){if(this.#se)return this.#se.baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}(0,a.assertArgument)(!1,"unsupported network","network",this.network)}getUrl(e,t){const r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${e}${r}${n}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}async detectNetwork(){return this.network}async fetch(e,t,r){const n=p++,i=r?this.getPostUrl():this.getUrl(e,t),o=r?this.getPostData(e,t):null;this.emit("debug",{action:"sendRequest",id:n,url:i,payload:o});const s=new a.FetchRequest(i);s.setThrottleParams({slotInterval:1e3}),s.retryFunc=(e,t,r)=>(this.isCommunityResource()&&(0,l.showThrottleMessage)("Etherscan"),Promise.resolve(!0)),s.processFunc=async(t,r)=>{const i=r.hasBody()?JSON.parse((0,a.toUtf8String)(r.body)):{},o=("string"==typeof i.result?i.result:"").toLowerCase().indexOf("rate limit")>=0;return"proxy"===e?i&&0==i.status&&"NOTOK"==i.message&&o&&(this.emit("debug",{action:"receiveError",id:n,reason:"proxy-NOTOK",error:i}),r.throwThrottleError(i.result,2e3)):o&&(this.emit("debug",{action:"receiveError",id:n,reason:"null result",error:i.result}),r.throwThrottleError(i.result,2e3)),r},o&&(s.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),s.body=Object.keys(o).map((e=>`${e}=${o[e]}`)).join("&"));const u=await s.send();try{u.assertOk()}catch(e){this.emit("debug",{action:"receiveError",id:n,error:e,reason:"assertOk"}),(0,a.assert)(!1,"response error","SERVER_ERROR",{request:s,response:u})}u.hasBody()||(this.emit("debug",{action:"receiveError",id:n,error:"missing body",reason:"null body"}),(0,a.assert)(!1,"missing response","SERVER_ERROR",{request:s,response:u}));const c=JSON.parse((0,a.toUtf8String)(u.body));return"proxy"===e?("2.0"!=c.jsonrpc&&(this.emit("debug",{action:"receiveError",id:n,result:c,reason:"invalid JSON-RPC"}),(0,a.assert)(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:s,response:u,info:{result:c}})),c.error&&(this.emit("debug",{action:"receiveError",id:n,result:c,reason:"JSON-RPC error"}),(0,a.assert)(!1,"error response","SERVER_ERROR",{request:s,response:u,info:{result:c}})),this.emit("debug",{action:"receiveRequest",id:n,result:c}),c.result):0!=c.status||"No records found"!==c.message&&"No transactions found"!==c.message?((1!=c.status||"string"==typeof c.message&&!c.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:n,result:c}),(0,a.assert)(!1,"error response","SERVER_ERROR",{request:s,response:u,info:{result:c}})),this.emit("debug",{action:"receiveRequest",id:n,result:c}),c.result):(this.emit("debug",{action:"receiveRequest",id:n,result:c}),c.result)}_getTransactionPostData(e){const t={};for(let r in e){if(h.indexOf(r)>=0)continue;if(null==e[r])continue;let n=e[r];if(("type"!==r||0!==n)&&("blockTag"!==r||"latest"!==n)){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r])n=(0,a.toQuantity)(n);else if("accessList"===r)n="["+(0,o.accessListify)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]";else if("blobVersionedHashes"===r){if(0===n.length)continue;(0,a.assert)(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:e}})}else n=(0,a.hexlify)(n);t[r]=n}}return t}_checkError(e,t,r){let i="";if((0,a.isError)(t,"SERVER_ERROR")){try{i=t.info.result.error.message}catch(e){}if(!i)try{i=t.info.message}catch(e){}}if("estimateGas"===e.method&&!i.match(/revert/i)&&i.match(/insufficient funds/i)&&(0,a.assert)(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.transaction}),("call"===e.method||"estimateGas"===e.method)&&i.match(/execution reverted/i)){let r="";try{r=t.info.result.error.data}catch(t){}const i=n.AbiCoder.getBuiltinCallException(e.method,e.transaction,r);throw i.info={request:e,error:t},i}if(i&&"broadcastTransaction"===e.method){const t=o.Transaction.from(e.signedTransaction);i.match(/replacement/i)&&i.match(/underpriced/i)&&(0,a.assert)(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t}),i.match(/insufficient funds/)&&(0,a.assert)(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&(0,a.assert)(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:t})}throw t}async _detectNetwork(){return this.network}async _perform(e){switch(e.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if("mainnet"===this.network.name)return"1000000000";if("optimism"===this.network.name)return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch((t=>this._checkError(e,t,e.signedTransaction)));case"getBlock":if("blockTag"in e)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});(0,a.assert)(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.hash});case"call":{if("latest"!==e.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_call";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}case"estimateGas":{const t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_estimateGas";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}}return super._perform(e)}async getNetwork(){return this.network}async getEtherPrice(){return"mainnet"!==this.network.name?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(e){let t=this._getAddress(e);var r;(r=t)&&"function"==typeof r.then&&(t=await t);try{const e=await this.fetch("contract",{action:"getabi",address:t}),r=JSON.parse(e);return new i.Contract(t,r,this)}catch(e){return null}}isCommunityResource(){return null==this.apiKey}}t.EtherscanProvider=y},9902:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackProvider=void 0;const n=r(5347),i=r(8672),o=r(5317),a=BigInt("1"),s=BigInt("2");function u(){return(new Date).getTime()}function c(e){return JSON.stringify(e,((e,t)=>"bigint"==typeof t?{type:"bigint",value:t.toString()}:t))}const l={stallTimeout:400,priority:1,weight:1},f={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};function d(e){if(null==e)return"null";if(Array.isArray(e))return"["+e.map(d).join(",")+"]";if("object"==typeof e&&"function"==typeof e.toJSON)return d(e.toJSON());switch(typeof e){case"boolean":case"symbol":return e.toString();case"bigint":case"number":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{"+t.map((t=>`${JSON.stringify(t)}:${d(e[t])}`)).join(",")+"}"}}throw console.log("Could not serialize",e),new Error("Hmm...")}function h(e){if("error"in e){const t=e.error;return{tag:d(t),value:t}}const t=e.result;return{tag:d(t),value:t}}function p(e,t){const r=new Map;for(const{value:e,tag:n,weight:i}of t){const t=r.get(n)||{value:e,weight:0};t.weight+=i,r.set(n,t)}let n=null;for(const t of r.values())t.weight>=e&&(!n||t.weight>n.weight)&&(n=t);if(n)return n.value}function y(e,t){let r=0;const n=new Map;let i=null;const o=[];for(const{value:e,tag:a,weight:s}of t)if(e instanceof Error){const t=n.get(a)||{value:e,weight:0};t.weight+=s,n.set(a,t),(null==i||t.weight>i.weight)&&(i=t)}else o.push(BigInt(e)),r+=s;if(r=e?i.value:void 0;o.sort(((e,t)=>ee?1:0));const u=Math.floor(o.length/2);return o.length%2?o[u]:(o[u-1]+o[u]+a)/s}function m(e,t){const r=p(e,t);if(void 0!==r)return r;for(const e of t)if(e.value)return e.value}class g extends i.AbstractProvider{quorum;eventQuorum;eventWorkers;#ue;#ce;#le;constructor(e,t,r){super(t,r),this.#ue=e.map((e=>e instanceof i.AbstractProvider?Object.assign({provider:e},l,f):Object.assign({},l,e,f))),this.#ce=-2,this.#le=null,r&&null!=r.quorum?this.quorum=r.quorum:this.quorum=Math.ceil(this.#ue.reduce(((e,t)=>e+=t.weight),0)/2),this.eventQuorum=1,this.eventWorkers=1,(0,n.assertArgument)(this.quorum<=this.#ue.reduce(((e,t)=>e+t.weight),0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return this.#ue.map((e=>{const t=Object.assign({},e);for(const e in t)"_"===e[0]&&delete t[e];return t}))}async _detectNetwork(){return o.Network.from((0,n.getBigInt)(await this._perform({method:"chainId"})))}async _translatePerform(e,t){switch(t.method){case"broadcastTransaction":return await e.broadcastTransaction(t.signedTransaction);case"call":return await e.call(Object.assign({},t.transaction,{blockTag:t.blockTag}));case"chainId":return(await e.getNetwork()).chainId;case"estimateGas":return await e.estimateGas(t.transaction);case"getBalance":return await e.getBalance(t.address,t.blockTag);case"getBlock":{const r="blockHash"in t?t.blockHash:t.blockTag;return await e.getBlock(r,t.includeTransactions)}case"getBlockNumber":return await e.getBlockNumber();case"getCode":return await e.getCode(t.address,t.blockTag);case"getGasPrice":return(await e.getFeeData()).gasPrice;case"getPriorityFee":return(await e.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await e.getLogs(t.filter);case"getStorage":return await e.getStorage(t.address,t.position,t.blockTag);case"getTransaction":return await e.getTransaction(t.hash);case"getTransactionCount":return await e.getTransactionCount(t.address,t.blockTag);case"getTransactionReceipt":return await e.getTransactionReceipt(t.hash);case"getTransactionResult":return await e.getTransactionResult(t.hash)}}#fe(e){const t=Array.from(e).map((e=>e.config)),r=this.#ue.slice();!function(e){for(let t=e.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}}(r),r.sort(((e,t)=>e.priority-t.priority));for(const e of r)if(!e._lastFatalError&&-1===t.indexOf(e))return e;return null}#de(e,t){const r=this.#fe(e);if(null==r)return null;const n={config:r,result:null,didBump:!1,perform:null,staller:null},i=u();return n.perform=(async()=>{try{r.requests++;const e=await this._translatePerform(r.provider,t);n.result={result:e}}catch(e){r.errorResponses++,n.result={error:e}}const e=u()-i;r._totalTime+=e,r.rollingDuration=.95*r.rollingDuration+.05*e,n.perform=null})(),n.staller=(async()=>{var e;await(e=r.stallTimeout,new Promise((t=>{setTimeout(t,e)}))),n.staller=null})(),e.add(n),n}async#he(){let e=this.#le;if(!e){const t=[];this.#ue.forEach((e=>{t.push((async()=>{await async function(e,t){for(;(e.blockNumber<0||e.blockNumber{try{const t=await e.provider.getBlockNumber();t>e.blockNumber&&(e.blockNumber=t)}catch(t){e.blockNumber=-2,e._lastFatalError=t,e._lastFatalErrorTimestamp=u()}e._updateNumber=null})()),await e._updateNumber,e.outOfSync++,!e._lastFatalError););}(e,0),e._lastFatalError||(e._network=await e.provider.getNetwork())})())})),this.#le=e=(async()=>{await Promise.all(t);let e=null;for(const t of this.#ue){if(t._lastFatalError)continue;const r=t._network;null==e?e=r.chainId:r.chainId!==e&&(0,n.assert)(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})()}await e}async#pe(e,t){const r=[];for(const t of e)if(null!=t.result){const{tag:e,value:n}=h(t.result);r.push({tag:e,value:n,weight:t.config.weight})}if(!(r.reduce(((e,t)=>e+t.weight),0)!e._lastFatalError)).map((e=>({value:e.blockNumber,tag:(0,n.getNumber)(e.blockNumber).toString(),weight:e.weight})))))));const e=function(e,t){if(1===e)return(0,n.getNumber)(y(e,t),"%internal");const r=new Map,i=(e,t)=>{const n=r.get(e)||{result:e,weight:0};n.weight+=t,r.set(e,n)};for(const{weight:e,value:r}of t){const t=(0,n.getNumber)(r);i(t-1,e),i(t,e),i(t+1,e)}let o,a=0;for(const{weight:t,result:n}of r.values())t>=e&&(t>a||null!=o&&t===a&&n>o)&&(a=t,o=n);return o}(this.quorum,r);if(void 0===e)return;return e>this.#ce&&(this.#ce=e),this.#ce}case"getGasPrice":case"getPriorityFee":case"estimateGas":return y(this.quorum,r);case"getBlock":return"blockTag"in t&&"pending"===t.blockTag?m(this.quorum,r):p(this.quorum,r);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return p(this.quorum,r);case"broadcastTransaction":return m(this.quorum,r)}(0,n.assert)(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${c(t.method)})`})}}async#ye(e,t){if(0===e.size)throw new Error("no runners?!");const r=[];let i=0;for(const t of e)t.perform&&r.push(t.perform),t.staller?r.push(t.staller):t.didBump||(t.didBump=!0,i++);const o=await this.#pe(e,t);if(void 0!==o){if(o instanceof Error)throw o;return o}for(let r=0;r0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:t,results:Array.from(e).map((e=>c(e.result)))}}),await Promise.race(r),await this.#ye(e,t)}async _perform(e){if("broadcastTransaction"===e.method){const t=this.#ue.map((e=>null)),r=this.#ue.map((async({provider:r,weight:n},i)=>{try{const o=await r._perform(e);t[i]=Object.assign(h({result:o}),{weight:n})}catch(e){t[i]=Object.assign(h({error:e}),{weight:n})}}));for(;;){const e=t.filter((e=>null!=e));for(const{value:t}of e)if(!(t instanceof Error))return t;const i=p(this.quorum,t.filter((e=>null!=e)));if((0,n.isError)(i,"INSUFFICIENT_FUNDS"))throw i;const o=r.filter(((e,r)=>null==t[r]));if(0===o.length)break;await Promise.race(o)}const i=m(this.quorum,t);if((0,n.assert)(void 0!==i,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:t.map(c)}}),i instanceof Error)throw i;return i}await this.#he();const t=new Set;let r=0;for(;;){const n=this.#de(t,e);if(null==n)break;if(r+=n.config.weight,r>=this.quorum)break}const i=await this.#ye(t,e);for(const e of t)e.perform&&null==e.result&&e.config.lateResponses++;return i}async destroy(){for(const{provider:e}of this.#ue)e.destroy();super.destroy()}}t.FallbackProvider=g},5855:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfuraProvider=t.InfuraWebSocketProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371),s=r(873),u="84842078b09946638c03157f83405213";class c extends s.WebSocketProvider{projectId;projectSecret;constructor(e,t){const r=new l(e,t),i=r._getConnection();(0,n.assert)(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});super(i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),r._network),(0,n.defineProperties)(this,{projectId:r.projectId,projectSecret:r.projectSecret})}isCommunityResource(){return this.projectId===u}}t.InfuraWebSocketProvider=c;class l extends a.JsonRpcProvider{projectId;projectSecret;constructor(e,t,r){null==e&&(e="mainnet");const i=o.Network.from(e);null==t&&(t=u),null==r&&(r=null);super(l.getRequest(i,t,r),i,{staticNetwork:i}),(0,n.defineProperties)(this,{projectId:t,projectSecret:r})}_getProvider(e){try{return new l(e,this.projectId,this.projectSecret)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.projectId===u}static getWebSocketProvider(e,t){return new c(e,t)}static getRequest(e,t,r){null==t&&(t=u),null==r&&(r=null);const o=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v3/${t}`);return o.allowGzip=!0,r&&o.setCredentials("",r),t===u&&(o.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("InfuraProvider"),!0)),o}}t.InfuraProvider=l},4584:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IpcSocketProvider=void 0;t.IpcSocketProvider=undefined},2371:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcProvider=t.JsonRpcApiPollingProvider=t.JsonRpcApiProvider=t.JsonRpcSigner=void 0;const n=r(8456),i=r(646),o=r(3562),a=r(7778),s=r(5347),u=r(8672),c=r(3071),l=r(5317),f=r(7966),d=r(4338),h="bigint,boolean,function,number,string,symbol".split(/,/g);function p(e){if(null==e||h.indexOf(typeof e)>=0)return e;if("function"==typeof e.getAddress)return e;if(Array.isArray(e))return e.map(p);if("object"==typeof e)return Object.keys(e).reduce(((t,r)=>(t[r]=e[r],t)),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function y(e){return new Promise((t=>{setTimeout(t,e)}))}function m(e){return e?e.toLowerCase():e}function g(e){return e&&"number"==typeof e.pollingInterval}const b={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class v extends c.AbstractSigner{address;constructor(e,t){super(e),t=(0,i.getAddress)(t),(0,s.defineProperties)(this,{address:t})}connect(e){(0,s.assert)(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const t=p(e),r=[];if(t.from){const n=t.from;r.push((async()=>{const r=await(0,i.resolveAddress)(n,this.provider);(0,s.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r})())}else t.from=this.address;if(null==t.gasLimit&&r.push((async()=>{t.gasLimit=await this.provider.estimateGas({...t,from:this.address})})()),null!=t.to){const e=t.to;r.push((async()=>{t.to=await(0,i.resolveAddress)(e,this.provider)})())}r.length&&await Promise.all(r);const n=this.provider.getRpcTransaction(t);return this.provider.send("eth_sendTransaction",[n])}async sendTransaction(e){const t=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(e);return await new Promise(((e,n)=>{const i=[1e3,100];let o=0;const a=async()=>{try{const n=await this.provider.getTransaction(r);if(null!=n)return void e(n.replaceableTransaction(t))}catch(e){if((0,s.isError)(e,"CANCELLED")||(0,s.isError)(e,"BAD_DATA")||(0,s.isError)(e,"NETWORK_ERROR"))return null==e.info&&(e.info={}),e.info.sendTransactionHash=r,void n(e);if((0,s.isError)(e,"INVALID_ARGUMENT")&&(o++,null==e.info&&(e.info={}),e.info.sendTransactionHash=r,o>10))return void n(e);this.provider.emit("error",(0,s.makeError)("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:e}))}this.provider._setTimeout((()=>{a()}),i.pop()||4e3)};a()}))}async signTransaction(e){const t=p(e);if(t.from){const r=await(0,i.resolveAddress)(t.from,this.provider);(0,s.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r}else t.from=this.address;const r=this.provider.getRpcTransaction(t);return await this.provider.send("eth_signTransaction",[r])}async signMessage(e){const t="string"==typeof e?(0,s.toUtf8Bytes)(e):e;return await this.provider.send("personal_sign",[(0,s.hexlify)(t),this.address.toLowerCase()])}async signTypedData(e,t,r){const n=p(r),a=await o.TypedDataEncoder.resolveNames(e,t,n,(async e=>{const t=await(0,i.resolveAddress)(e);return(0,s.assertArgument)(null!=t,"TypedData does not support null address","value",e),t}));return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(o.TypedDataEncoder.getPayload(a.domain,t,a.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const t="string"==typeof e?(0,s.toUtf8Bytes)(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),(0,s.hexlify)(t)])}}t.JsonRpcSigner=v;class w extends u.AbstractProvider{#w;#me;#ge;#be;#ve;#we;#Ae;#ke(){if(this.#be)return;const e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#be=setTimeout((()=>{this.#be=null;const e=this.#ge;for(this.#ge=[];e.length;){const t=[e.shift()];for(;e.length&&t.length!==this.#w.batchMaxCount;){t.push(e.shift());if(JSON.stringify(t.map((e=>e.payload))).length>this.#w.batchMaxSize){e.unshift(t.pop());break}}(async()=>{const e=1===t.length?t[0].payload:t.map((e=>e.payload));this.emit("debug",{action:"sendRpcPayload",payload:e});try{const r=await this._send(e);this.emit("debug",{action:"receiveRpcResult",result:r});for(const{resolve:e,reject:n,payload:i}of t){if(this.destroyed){n((0,s.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:i.method}));continue}const t=r.filter((e=>e.id===i.id))[0];if(null!=t)"error"in t?n(this.getRpcError(i,t)):e(t.result);else{const e=(0,s.makeError)("missing response for request","BAD_DATA",{value:r,info:{payload:i}});this.emit("error",e),n(e)}}}catch(e){this.emit("debug",{action:"receiveRpcError",error:e});for(const{reject:r}of t)r(e)}})()}}),e)}constructor(e,t){super(e,t),this.#me=1,this.#w=Object.assign({},b,t||{}),this.#ge=[],this.#be=null,this.#we=null,this.#Ae=null;{let e=null;const t=new Promise((t=>{e=t}));this.#ve={promise:t,resolve:e}}const r=this._getOption("staticNetwork");"boolean"==typeof r?((0,s.assertArgument)(!r||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",t),r&&null!=e&&(this.#we=l.Network.from(e))):r&&((0,s.assertArgument)(null==e||r.matches(e),"staticNetwork MUST match network object","options",t),this.#we=r)}_getOption(e){return this.#w[e]}get _network(){return(0,s.assert)(this.#we,"network is not available yet","NETWORK_ERROR"),this.#we}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let t=e.transaction;if(t&&null!=t.type&&(0,s.getBigInt)(t.type)&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const r=await this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},t,{type:void 0})}))}}const t=this.getRpcRequest(e);return null!=t?await this.send(t.method,t.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;if(this.#we)return this.#we}return this.#Ae?await this.#Ae:this.ready?(this.#Ae=(async()=>{try{const e=l.Network.from((0,s.getBigInt)(await this.send("eth_chainId",[])));return this.#Ae=null,e}catch(e){throw this.#Ae=null,e}})(),await this.#Ae):(this.#Ae=(async()=>{const e={id:this.#me++,method:"eth_chainId",params:[],jsonrpc:"2.0"};let t;this.emit("debug",{action:"sendRpcPayload",payload:e});try{t=(await this._send(e))[0],this.#Ae=null}catch(e){throw this.#Ae=null,this.emit("debug",{action:"receiveRpcError",error:e}),e}if(this.emit("debug",{action:"receiveRpcResult",result:t}),"result"in t)return l.Network.from((0,s.getBigInt)(t.result));throw this.getRpcError(e,t)})(),await this.#Ae)}_start(){null!=this.#ve&&null!=this.#ve.resolve&&(this.#ve.resolve(),this.#ve=null,(async()=>{for(;null==this.#we&&!this.destroyed;)try{this.#we=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",(0,s.makeError)("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await y(1e3)}this.#ke()})())}async _waitUntilReady(){if(null!=this.#ve)return await this.#ve.promise}_getSubscriber(e){return"pending"===e.type?new f.FilterIdPendingSubscriber(this):"event"===e.type?this._getOption("polling")?new d.PollingEventSubscriber(this,e.filter):new f.FilterIdEventSubscriber(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new u.UnmanagedSubscriber("orphan"):super._getSubscriber(e)}get ready(){return null==this.#ve}getRpcTransaction(e){const t={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((r=>{if(null==e[r])return;let n=r;"gasLimit"===r&&(n="gas"),t[n]=(0,s.toQuantity)((0,s.getBigInt)(e[r],`tx.${r}`))})),["from","to","data"].forEach((r=>{null!=e[r]&&(t[r]=(0,s.hexlify)(e[r]))})),e.accessList&&(t.accessList=(0,a.accessListify)(e.accessList)),e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.map((e=>e.toLowerCase()))),t}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[m(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[m(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[m(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[m(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(m):e.filter.address=m(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,t){const{method:r}=e,{error:i}=t;if("eth_estimateGas"===r&&i.message){const t=i.message;if(!t.match(/revert/i)&&t.match(/insufficient funds/i))return(0,s.makeError)("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}})}if("eth_call"===r||"eth_estimateGas"===r){const t=k(i),o=n.AbiCoder.getBuiltinCallException("eth_call"===r?"call":"estimateGas",e.params[0],t?t.data:null);return o.info={error:i,payload:e},o}const o=JSON.stringify(function(e){const t=[];return E(e,t),t}(i));if("string"==typeof i.message&&i.message.match(/user denied|ethers-user-denied/i)){const t={eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"};return(0,s.makeError)("user rejected action","ACTION_REJECTED",{action:t[r]||"unknown",reason:"rejected",info:{payload:e,error:i}})}if("eth_sendRawTransaction"===r||"eth_sendTransaction"===r){const t=e.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return(0,s.makeError)("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return(0,s.makeError)("nonce has already been used","NONCE_EXPIRED",{transaction:t,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return(0,s.makeError)("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t,info:{error:i}});if(o.match(/only replay-protected/i))return(0,s.makeError)("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:t,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?(0,s.makeError)("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):(0,s.makeError)("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,t){if(this.destroyed)return Promise.reject((0,s.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const r=this.#me++,n=new Promise(((n,i)=>{this.#ge.push({resolve:n,reject:i,payload:{method:e,params:t,id:r,jsonrpc:"2.0"}})}));return this.#ke(),n}async getSigner(e){null==e&&(e=0);const t=this.send("eth_accounts",[]);if("number"==typeof e){const r=await t;if(e>=r.length)throw new Error("no such account");return new v(this,r[e])}const{accounts:r}=await(0,s.resolveProperties)({network:this.getNetwork(),accounts:t});e=(0,i.getAddress)(e);for(const t of r)if((0,i.getAddress)(t)===e)return new v(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map((e=>new v(this,e)))}destroy(){this.#be&&(clearTimeout(this.#be),this.#be=null);for(const{payload:e,reject:t}of this.#ge)t((0,s.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#ge=[],super.destroy()}}t.JsonRpcApiProvider=w;class A extends w{#Ee;constructor(e,t){super(e,t);let r=this._getOption("pollingInterval");null==r&&(r=b.pollingInterval),this.#Ee=r}_getSubscriber(e){const t=super._getSubscriber(e);return g(t)&&(t.pollingInterval=this.#Ee),t}get pollingInterval(){return this.#Ee}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");this.#Ee=e,this._forEachSubscriber((e=>{g(e)&&(e.pollingInterval=this.#Ee)}))}}t.JsonRpcApiPollingProvider=A;function k(e){if(null==e)return null;if("string"==typeof e.message&&e.message.match(/revert/i)&&(0,s.isHexString)(e.data))return{message:e.message,data:e.data};if("object"==typeof e){for(const t in e){const r=k(e[t]);if(r)return r}return null}if("string"==typeof e)try{return k(JSON.parse(e))}catch(e){}return null}function E(e,t){if(null!=e){if("string"==typeof e.message&&t.push(e.message),"object"==typeof e)for(const r in e)E(e[r],t);if("string"==typeof e)try{return E(JSON.parse(e),t)}catch(e){}}}t.JsonRpcProvider=class extends A{#Se;constructor(e,t,r){null==e&&(e="http://localhost:8545"),super(t,r),this.#Se="string"==typeof e?new s.FetchRequest(e):e.clone()}_getConnection(){return this.#Se.clone()}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){const t=this._getConnection();t.body=JSON.stringify(e),t.setHeader("content-type","application/json");const r=await t.send();r.assertOk();let n=r.bodyJson;return Array.isArray(n)||(n=[n]),n}}},2398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PocketProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371),s="62e1ad51b37b8e00394bda3b";class u extends a.JsonRpcProvider{applicationId;applicationSecret;constructor(e,t,r){null==e&&(e="mainnet");const i=o.Network.from(e);null==t&&(t=s),null==r&&(r=null);const a={staticNetwork:i};super(u.getRequest(i,t,r),i,a),(0,n.defineProperties)(this,{applicationId:t,applicationSecret:r})}_getProvider(e){try{return new u(e,this.applicationId,this.applicationSecret)}catch(e){}return super._getProvider(e)}static getRequest(e,t,r){null==t&&(t=s);const o=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v1/lb/${t}`);return o.allowGzip=!0,r&&o.setCredentials("",r),t===s&&(o.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("PocketProvider"),!0)),o}isCommunityResource(){return this.applicationId===s}}t.PocketProvider=u},8817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickNodeProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371),s="919b412a057b5e9c9b6dce193c5a60242d6efadb";class u extends a.JsonRpcProvider{token;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=s);super(u.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{token:t})}_getProvider(e){try{return new u(e,this.token)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.token===s}static getRequest(e,t){null==t&&(t=s);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===s&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("QuickNodeProvider"),!0)),r}}t.QuickNodeProvider=u},4945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketProvider=t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=void 0;const n=r(8672),i=r(5347),o=r(2371);class a{#xe;#A;get filter(){return JSON.parse(this.#A)}#_e;#Pe;#Te;constructor(e,t){this.#xe=e,this.#A=JSON.stringify(t),this.#_e=null,this.#Pe=null,this.#Te=null}start(){this.#_e=this.#xe.send("eth_subscribe",this.filter).then((e=>(this.#xe._register(e,this),e)))}stop(){this.#_e.then((e=>{this.#xe.destroyed||this.#xe.send("eth_unsubscribe",[e])})),this.#_e=null}pause(e){(0,i.assert)(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),this.#Pe=!!e}resume(){this.#Pe=null}_handleMessage(e){if(null!=this.#_e&&null===this.#Pe){let t=this.#Te;t=null==t?this._emit(this.#xe,e):t.then((async()=>{await this._emit(this.#xe,e)})),this.#Te=t.then((()=>{this.#Te===t&&(this.#Te=null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}t.SocketSubscriber=a;class s extends a{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}t.SocketBlockSubscriber=s;class u extends a{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}t.SocketPendingSubscriber=u;class c extends a{#Ie;get logFilter(){return JSON.parse(this.#Ie)}constructor(e,t){super(e,["logs",t]),this.#Ie=JSON.stringify(t)}async _emit(e,t){e.emit(this.logFilter,e._wrapLog(t,e._network))}}t.SocketEventSubscriber=c;class l extends o.JsonRpcApiProvider{#Oe;#C;#Be;constructor(e,t){const r=Object.assign({},null!=t?t:{});(0,i.assertArgument)(null==r.batchMaxCount||1===r.batchMaxCount,"sockets-based providers do not support batches","options.batchMaxCount",t),r.batchMaxCount=1,null==r.staticNetwork&&(r.staticNetwork=!0),super(e,r),this.#Oe=new Map,this.#C=new Map,this.#Be=new Map}_getSubscriber(e){switch(e.type){case"close":return new n.UnmanagedSubscriber("close");case"block":return new s(this);case"pending":return new u(this);case"event":return new c(this,e.filter);case"orphan":if("drop-log"===e.filter.orphan)return new n.UnmanagedSubscriber("drop-log")}return super._getSubscriber(e)}_register(e,t){this.#C.set(e,t);const r=this.#Be.get(e);if(r){for(const e of r)t._handleMessage(e);this.#Be.delete(e)}}async _send(e){(0,i.assertArgument)(!Array.isArray(e),"WebSocket does not support batch send","payload",e);const t=new Promise(((t,r)=>{this.#Oe.set(e.id,{payload:e,resolve:t,reject:r})}));return await this._waitUntilReady(),await this._write(JSON.stringify(e)),[await t]}async _processMessage(e){const t=JSON.parse(e);if(t&&"object"==typeof t&&"id"in t){const e=this.#Oe.get(t.id);if(null==e)return void this.emit("error",(0,i.makeError)("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:t}));this.#Oe.delete(t.id),e.resolve(t)}else{if(!t||"eth_subscription"!==t.method)return void this.emit("error",(0,i.makeError)("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:t}));{const e=t.params.subscription,r=this.#C.get(e);if(r)r._handleMessage(t.params.result);else{let r=this.#Be.get(e);null==r&&(r=[],this.#Be.set(e,r)),r.push(t.params.result)}}}}async _write(e){throw new Error("sub-classes must override this")}}t.SocketProvider=l},873:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocketProvider=void 0;const n=r(3913),i=r(4945);class o extends i.SocketProvider{#Se;#Ce;get websocket(){if(null==this.#Ce)throw new Error("websocket closed");return this.#Ce}constructor(e,t,r){super(t,r),"string"==typeof e?(this.#Se=()=>new n.WebSocket(e),this.#Ce=this.#Se()):"function"==typeof e?(this.#Se=e,this.#Ce=e()):(this.#Se=null,this.#Ce=e),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(e){console.log("failed to start WebsocketProvider",e)}},this.websocket.onmessage=e=>{this._processMessage(e.data)}}async _write(e){this.websocket.send(e)}async destroy(){null!=this.#Ce&&(this.#Ce.close(),this.#Ce=null),super.destroy()}}t.WebSocketProvider=o},3807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionResponse=t.TransactionReceipt=t.Log=t.Block=t.copyRequest=t.FeeData=void 0;const n=r(5347),i=r(7778),o=BigInt(0);function a(e){return null==e?null:e}function s(e){return null==e?null:e.toString()}t.FeeData=class{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,t,r){(0,n.defineProperties)(this,{gasPrice:a(e),maxFeePerGas:a(t),maxPriorityFeePerGas:a(r)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:s(e),maxFeePerGas:s(t),maxPriorityFeePerGas:s(r)}}},t.copyRequest=function(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=(0,n.hexlify)(e.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)i in e&&null!=e[i]&&(t[i]=(0,n.getBigInt)(e[i],`request.${i}`));const o="type,nonce".split(/,/);for(const r of o)r in e&&null!=e[r]&&(t[r]=(0,n.getNumber)(e[r],`request.${r}`));return e.accessList&&(t.accessList=(0,i.accessListify)(e.accessList)),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map((e=>(0,n.isBytesLike)(e)?(0,n.hexlify)(e):Object.assign({},e)))),t};class u{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#Ne;constructor(e,t){this.#Ne=e.transactions.map((e=>"string"!=typeof e?new f(e,t):e)),(0,n.defineProperties)(this,{provider:t,hash:a(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:a(e.prevRandao),extraData:e.extraData,baseFeePerGas:a(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#Ne.map((e=>"string"==typeof e?e:e.hash))}get prefetchedTransactions(){const e=this.#Ne.slice();return 0===e.length?[]:((0,n.assert)("object"==typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:r,gasLimit:n,gasUsed:i,hash:o,miner:a,prevRandao:u,nonce:c,number:l,parentHash:f,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,timestamp:y,transactions:m}=this;return{_type:"Block",baseFeePerGas:s(e),difficulty:s(t),extraData:r,gasLimit:s(n),gasUsed:s(i),blobGasUsed:s(this.blobGasUsed),excessBlobGas:s(this.excessBlobGas),hash:o,miner:a,prevRandao:u,nonce:c,number:l,parentHash:f,timestamp:y,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,transactions:m}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>enew c(e,t))));let r=o;null!=e.effectiveGasPrice?r=e.effectiveGasPrice:null!=e.gasPrice&&(r=e.gasPrice),(0,n.defineProperties)(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:r,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#Re}toJSON(){const{to:e,from:t,contractAddress:r,hash:n,index:i,blockHash:o,blockNumber:a,logsBloom:u,logs:c,status:l,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:r,cumulativeGasUsed:s(this.cumulativeGasUsed),from:t,gasPrice:s(this.gasPrice),blobGasUsed:s(this.blobGasUsed),blobGasPrice:s(this.blobGasPrice),gasUsed:s(this.gasUsed),hash:n,index:i,logs:c,logsBloom:u,root:f,status:l,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(u)return null;const{blockNumber:e,nonce:t}=await(0,n.resolveProperties)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t{if(null==e||0!==e.status)return e;(0,n.assert)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},f=await this.provider.getTransactionReceipt(this.hash);if(0===r)return l(f);if(f){if(await f.confirmations()>=r)return l(f)}else if(await c(),0===r)return null;const d=new Promise(((e,t)=>{const o=[],s=()=>{o.forEach((e=>e()))};if(o.push((()=>{u=!0})),i>0){const e=setTimeout((()=>{s(),t((0,n.makeError)("wait for transaction timeout","TIMEOUT"))}),i);o.push((()=>{clearTimeout(e)}))}const f=async n=>{if(await n.confirmations()>=r){s();try{e(l(n))}catch(e){t(e)}}};if(o.push((()=>{this.provider.off(this.hash,f)})),this.provider.on(this.hash,f),a>=0){const e=async()=>{try{await c()}catch(e){if((0,n.isError)(e,"TRANSACTION_REPLACED"))return s(),void t(e)}u||this.provider.once("block",e)};o.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await d}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),h(this)}reorderedEvent(e){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,n.assert)(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),d(this,e)}replaceableTransaction(e){(0,n.assertArgument)(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new f(this,this.provider);return t.#Me=e,t}}function d(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function h(e){return{orphan:"drop-transaction",tx:e}}t.TransactionResponse=f},9596:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonceManager=void 0;const n=r(5347),i=r(3071);class o extends i.AbstractSigner{signer;#Ue;#Le;constructor(e){super(e.provider),(0,n.defineProperties)(this,{signer:e}),this.#Ue=null,this.#Le=0}async getAddress(){return this.signer.getAddress()}connect(e){return new o(this.signer.connect(e))}async getNonce(e){if("pending"===e){null==this.#Ue&&(this.#Ue=super.getNonce("pending"));const e=this.#Le;return await this.#Ue+e}return super.getNonce(e)}increment(){this.#Le++}reset(){this.#Le=0,this.#Ue=null}async sendTransaction(e){const t=this.getNonce("pending");return this.increment(),(e=await this.signer.populateTransaction(e)).nonce=await t,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,t,r){return this.signer.signTypedData(e,t,r)}}t.NonceManager=o},7966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterIdPendingSubscriber=t.FilterIdEventSubscriber=t.FilterIdSubscriber=void 0;const n=r(5347),i=r(4338);class o{#xe;#je;#Fe;#De;#we;#He;constructor(e){this.#xe=e,this.#je=null,this.#Fe=this.#ze.bind(this),this.#De=!1,this.#we=null,this.#He=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}async#ze(e){try{null==this.#je&&(this.#je=this._subscribe(this.#xe));let e=null;try{e=await this.#je}catch(e){if(!(0,n.isError)(e,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==e.operation)throw e}if(null==e)return this.#je=null,void this.#xe._recoverSubscriber(this,this._recover(this.#xe));const t=await this.#xe.getNetwork();if(this.#we||(this.#we=t),this.#we.chainId!==t.chainId)throw new Error("chaid changed");if(this.#He)return;const r=await this.#xe.send("eth_getFilterChanges",[e]);await this._emitResults(this.#xe,r)}catch(e){console.log("@TODO",e)}this.#xe.once("block",this.#Fe)}#qe(){const e=this.#je;e&&(this.#je=null,e.then((e=>{this.#xe.destroyed||this.#xe.send("eth_uninstallFilter",[e])})))}start(){this.#De||(this.#De=!0,this.#ze(-2))}stop(){this.#De&&(this.#De=!1,this.#He=!0,this.#qe(),this.#xe.off("block",this.#Fe))}pause(e){e&&this.#qe(),this.#xe.off("block",this.#Fe)}resume(){this.start()}}t.FilterIdSubscriber=o;t.FilterIdEventSubscriber=class extends o{#Ge;constructor(e,t){var r;super(e),this.#Ge=(r=t,JSON.parse(JSON.stringify(r)))}_recover(e){return new i.PollingEventSubscriber(e,this.#Ge)}async _subscribe(e){return await e.send("eth_newFilter",[this.#Ge])}async _emitResults(e,t){for(const r of t)e.emit(this.#Ge,e._wrapLog(r,e._network))}};t.FilterIdPendingSubscriber=class extends o{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const r of t)e.emit("pending",r)}}},4338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PollingEventSubscriber=t.PollingTransactionSubscriber=t.PollingOrphanSubscriber=t.PollingBlockTagSubscriber=t.OnBlockSubscriber=t.PollingBlockSubscriber=t.getPollingSubscriber=void 0;const n=r(5347);function i(e){return JSON.parse(JSON.stringify(e))}t.getPollingSubscriber=function(e,t){return"block"===t?new o(e):(0,n.isHexString)(t,32)?new s(e,t):void(0,n.assert)(!1,"unsupported polling event","UNSUPPORTED_OPERATION",{operation:"getPollingSubscriber",info:{event:t}})};class o{#xe;#Fe;#Ke;#Ve;constructor(e){this.#xe=e,this.#Fe=null,this.#Ke=4e3,this.#Ve=-2}get pollingInterval(){return this.#Ke}set pollingInterval(e){this.#Ke=e}async#ze(){try{const e=await this.#xe.getBlockNumber();if(-2===this.#Ve)return void(this.#Ve=e);if(e!==this.#Ve){for(let t=this.#Ve+1;t<=e;t++){if(null==this.#Fe)return;await this.#xe.emit("block",t)}this.#Ve=e}}catch(e){}null!=this.#Fe&&(this.#Fe=this.#xe._setTimeout(this.#ze.bind(this),this.#Ke))}start(){this.#Fe||(this.#Fe=this.#xe._setTimeout(this.#ze.bind(this),this.#Ke),this.#ze())}stop(){this.#Fe&&(this.#xe._clearTimeout(this.#Fe),this.#Fe=null)}pause(e){this.stop(),e&&(this.#Ve=-2)}resume(){this.start()}}t.PollingBlockSubscriber=o;class a{#xe;#ze;#De;constructor(e){this.#xe=e,this.#De=!1,this.#ze=e=>{this._poll(e,this.#xe)}}async _poll(e,t){throw new Error("sub-classes must override this")}start(){this.#De||(this.#De=!0,this.#ze(-2),this.#xe.on("block",this.#ze))}stop(){this.#De&&(this.#De=!1,this.#xe.off("block",this.#ze))}pause(e){this.stop()}resume(){this.start()}}t.OnBlockSubscriber=a;t.PollingBlockTagSubscriber=class extends a{#Je;#We;constructor(e,t){super(e),this.#Je=t,this.#We=-2}pause(e){e&&(this.#We=-2),super.pause(e)}async _poll(e,t){const r=await t.getBlock(this.#Je);null!=r&&(-2===this.#We?this.#We=r.number:r.number>this.#We&&(t.emit(this.#Je,r.number),this.#We=r.number))}};t.PollingOrphanSubscriber=class extends a{#A;constructor(e,t){super(e),this.#A=i(t)}async _poll(e,t){throw new Error("@TODO")}};class s extends a{#Qe;constructor(e,t){super(e),this.#Qe=t}async _poll(e,t){const r=await t.getTransactionReceipt(this.#Qe);r&&t.emit(this.#Qe,r)}}t.PollingTransactionSubscriber=s;t.PollingEventSubscriber=class{#xe;#A;#Fe;#De;#Ve;constructor(e,t){this.#xe=e,this.#A=i(t),this.#Fe=this.#ze.bind(this),this.#De=!1,this.#Ve=-2}async#ze(e){if(-2===this.#Ve)return;const t=i(this.#A);t.fromBlock=this.#Ve+1,t.toBlock=e;const r=await this.#xe.getLogs(t);if(0!==r.length)for(const e of r)this.#xe.emit(this.#A,e),this.#Ve=e.blockNumber;else this.#Ve{this.#Ve=e})),this.#xe.on("block",this.#Fe))}stop(){this.#De&&(this.#De=!1,this.#xe.off("block",this.#Fe))}pause(e){this.stop(),e&&(this.#Ve=-2)}resume(){this.start()}}},3913:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocket=void 0;const n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}().WebSocket;t.WebSocket=n},7918:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accessListify=void 0;const n=r(646),i=r(5347);function o(e,t){return{address:(0,n.getAddress)(e),storageKeys:t.map(((e,t)=>((0,i.assertArgument)((0,i.isHexString)(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}t.accessListify=function(e){if(Array.isArray(e))return e.map(((t,r)=>Array.isArray(t)?((0,i.assertArgument)(2===t.length,"invalid slot set",`value[${r}]`,t),o(t[0],t[1])):((0,i.assertArgument)(null!=t&&"object"==typeof t,"invalid address-slot set","value",e),o(t.address,t.storageKeys))));(0,i.assertArgument)(null!=e&&"object"==typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return o(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}},778:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=t.computeAddress=void 0;const n=r(646),i=r(2291);function o(e){let t;return t="string"==typeof e?i.SigningKey.computePublicKey(e,!1):e.publicKey,(0,n.getAddress)((0,i.keccak256)("0x"+t.substring(4)).substring(26))}t.computeAddress=o,t.recoverAddress=function(e,t){return o(i.SigningKey.recoverPublicKey(e,t))}},7778:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=t.recoverAddress=t.computeAddress=t.accessListify=void 0;var n=r(7918);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return n.accessListify}});var i=r(778);Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return i.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return i.recoverAddress}});var o=r(1398);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return o.Transaction}})},1398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=void 0;const n=r(646),i=r(5239),o=r(2291),a=r(5347),s=r(7918),u=r(778),c=BigInt(0),l=BigInt(2),f=BigInt(27),d=BigInt(28),h=BigInt(35),p=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),y=131072;function m(e,t){let r=e.toString(16);for(;r.length<2;)r="0"+r;return r+=(0,o.sha256)(t).substring(4),"0x"+r}function g(e){return"0x"===e?null:(0,n.getAddress)(e)}function b(e,t){try{return(0,s.accessListify)(e)}catch(r){(0,a.assertArgument)(!1,r.message,t,e)}}function v(e,t){return"0x"===e?0:(0,a.getNumber)(e,t)}function w(e,t){if("0x"===e)return c;const r=(0,a.getBigInt)(e,t);return(0,a.assertArgument)(r<=p,"value exceeds uint size",t,r),r}function A(e,t){const r=(0,a.getBigInt)(e,"value"),n=(0,a.toBeArray)(r);return(0,a.assertArgument)(n.length<=32,"value too large",`tx.${t}`,r),n}function k(e){return(0,s.accessListify)(e).map((e=>[e.address,e.storageKeys]))}function E(e,t){(0,a.assertArgument)(Array.isArray(e),`invalid ${t}`,"value",e);for(let t=0;tObject.assign({},e)))}set blobs(e){if(null==e)return void(this.#ct=null);const t=[],r=[];for(let n=0;ne.data)),r.map((e=>e.commitment)),r.map((e=>e.proof))])]):(0,a.concat)(["0x03",(0,a.encodeRlp)(n)])}(this,r,t?this.blobs:null)}(0,a.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#lt(!0,!0)}get unsignedSerialized(){return this.#lt(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#at||this.#st;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&(0,a.assert)(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),(0,a.assert)(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),(0,a.assert)(0!==this.type||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return null!=this.type?i.push(this.type):t?i.push(2):e?(i.push(1),r||i.push(0)):r?(i.push(1),i.push(2)):(n&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return x.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new x;if("string"==typeof e){const t=(0,a.getBytes)(e);if(t[0]>=127)return x.from(function(e){const t=(0,a.decodeRlp)(e);(0,a.assertArgument)(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);const r={type:0,nonce:v(t[0],"nonce"),gasPrice:w(t[1],"gasPrice"),gasLimit:w(t[2],"gasLimit"),to:g(t[3]),value:w(t[4],"value"),data:(0,a.hexlify)(t[5]),chainId:c};if(6===t.length)return r;const n=w(t[6],"v"),i=w(t[7],"r"),s=w(t[8],"s");if(i===c&&s===c)r.chainId=n;else{let e=(n-h)/l;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBase58=t.encodeBase58=void 0;const n=r(7415),i=r(1500),o=r(6508),a="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let s=null;function u(e){if(null==s){s={};for(let e=0;e<58;e++)s[a[e]]=BigInt(e)}const t=s[e];return(0,i.assertArgument)(null!=t,"invalid base58 value","letter",e),t}const c=BigInt(0),l=BigInt(58);t.encodeBase58=function(e){const t=(0,n.getBytes)(e);let r=(0,o.toBigInt)(t),i="";for(;r;)i=a[Number(r%l)]+i,r/=l;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBase64=t.decodeBase64=void 0;const n=r(7415);t.decodeBase64=function(e){e=atob(e);const t=new Uint8Array(e.length);for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=void 0;const n=r(1500);function i(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n>4]+s[15&n]}return r}function c(e,t,r){const i=o(e);(0,n.assert)(t>=i.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(i),length:t,offset:t+1});const a=new Uint8Array(t);return a.fill(0),r?a.set(i,t-i.length):a.set(i,0),u(a)}t.hexlify=u,t.concat=function(e){return"0x"+e.map((e=>u(e).substring(2))).join("")},t.dataLength=function(e){return a(e,!0)?(e.length-2)/2:o(e).length},t.dataSlice=function(e,t,r){const i=o(e);return null!=r&&r>i.length&&(0,n.assert)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:i,length:i.length,offset:r}),u(i.slice(null==t?0:t,null==r?i.length:r))},t.stripZerosLeft=function(e){let t=u(e).substring(2);for(;t.startsWith("00");)t=t.substring(2);return"0x"+t},t.zeroPadValue=function(e,t){return c(e,t,!0)},t.zeroPadBytes=function(e,t){return c(e,t,!1)}},1500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.makeError=t.isCallException=t.isError=void 0;const n=r(4586),i=r(8166);function o(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(o).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let r="0x";for(let n=0;n>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return o(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{ "+t.map((t=>`${o(t)}: ${o(e[t])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function a(e,t){return e&&e.code===t}function s(e,t,r){let a,s=e;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${o(r)}`);for(const e in r){if("shortMessage"===e)continue;const t=r[e];i.push(e+"="+o(t))}}i.push(`code=${t}`),i.push(`version=${n.version}`),i.length&&(e+=" ("+i.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":a=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":a=new RangeError(e);break;default:a=new Error(e)}return(0,i.defineProperties)(a,{code:t}),r&&Object.assign(a,r),null==a.shortMessage&&(0,i.defineProperties)(a,{shortMessage:s}),a}function u(e,t,r,n){if(!e)throw s(t,r,n)}t.isError=a,t.isCallException=function(e){return a(e,"CALL_EXCEPTION")},t.makeError=s,t.assert=u,t.assertArgument=function(e,t,r,n){u(e,t,"INVALID_ARGUMENT",{argument:r,value:n})},t.assertArgumentCount=function(e,t,r){null==r&&(r=""),r&&(r=": "+r),u(e>=t,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:e,expectedCount:t}),u(e<=t,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})};const c=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){const e=String.fromCharCode(233).normalize("NFD");if(e!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e}),[]);t.assertNormalize=function(e){u(c.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})},t.assertPrivate=function(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),u(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}},7698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventPayload=void 0;const n=r(8166);t.EventPayload=class{filter;emitter;#ft;constructor(e,t,r){this.#ft=t,(0,n.defineProperties)(this,{emitter:e,filter:r})}async removeListener(){null!=this.#ft&&await this.emitter.off(this.filter,this.#ft)}}},5191:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchResponse=t.FetchRequest=t.FetchCancelSignal=void 0;const n=r(1949),i=r(7415),o=r(1500),a=r(8166),s=r(3948),u=r(3271);let c=(0,u.createGetUrl)();const l=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),f=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let d=!1;async function h(e,t){try{const t=e.match(l);if(!t)throw new Error("invalid data");return new w(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?(0,n.decodeBase64)(t[3]):(r=t[3],(0,s.toUtf8Bytes)(r.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))))))}catch(t){return new w(599,"BAD REQUEST (invalid data: URI)",{},null,new v(e))}var r}function p(e){return async function(t,r){try{const r=t.match(f);if(!r)throw new Error("invalid link");return new v(`${e}${r[2]}`)}catch(e){return new w(599,"BAD REQUEST (invalid IPFS URI)",{},null,new v(t))}}}const y={data:h,ipfs:p("https://gateway.ipfs.io/ipfs/")},m=new WeakMap;class g{#dt;#ht;constructor(e){this.#dt=[],this.#ht=!1,m.set(e,(()=>{if(!this.#ht){this.#ht=!0;for(const e of this.#dt)setTimeout((()=>{e()}),0);this.#dt=[]}}))}addListener(e){(0,o.assert)(!this.#ht,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#dt.push(e)}get cancelled(){return this.#ht}checkSignal(){(0,o.assert)(!this.cancelled,"cancelled","CANCELLED",{})}}function b(e){if(null==e)throw new Error("missing signal; should not happen");return e.checkSignal(),e}t.FetchCancelSignal=g;class v{#pt;#yt;#mt;#gt;#bt;#ie;#vt;#wt;#At;#kt;#Et;#St;#xt;#_t;#Pt;get url(){return this.#ie}set url(e){this.#ie=String(e)}get body(){return null==this.#vt?null:new Uint8Array(this.#vt)}set body(e){if(null==e)this.#vt=void 0,this.#wt=void 0;else if("string"==typeof e)this.#vt=(0,s.toUtf8Bytes)(e),this.#wt="text/plain";else if(e instanceof Uint8Array)this.#vt=e,this.#wt="application/octet-stream";else{if("object"!=typeof e)throw new Error("invalid body");this.#vt=(0,s.toUtf8Bytes)(JSON.stringify(e)),this.#wt="application/json"}}hasBody(){return null!=this.#vt}get method(){return this.#gt?this.#gt:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#gt=String(e).toUpperCase()}get headers(){const e=Object.assign({},this.#mt);return this.#At&&(e.authorization=`Basic ${(0,n.encodeBase64)((0,s.toUtf8Bytes)(this.#At))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),null==e["content-type"]&&this.#wt&&(e["content-type"]=this.#wt),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){this.#mt[String(e).toLowerCase()]=String(t)}clearHeaders(){this.#mt={}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let r=0;return{next:()=>{if(r=0,"timeout must be non-zero","timeout",e),this.#bt=e}get preflightFunc(){return this.#kt||null}set preflightFunc(e){this.#kt=e}get processFunc(){return this.#Et||null}set processFunc(e){this.#Et=e}get retryFunc(){return this.#St||null}set retryFunc(e){this.#St=e}get getUrlFunc(){return this.#Pt||c}set getUrlFunc(e){this.#Pt=e}constructor(e){this.#ie=String(e),this.#pt=!1,this.#yt=!0,this.#mt={},this.#gt="",this.#bt=3e5,this.#_t={slotInterval:250,maxAttempts:12},this.#Pt=null}toString(){return``}setThrottleParams(e){null!=e.slotInterval&&(this.#_t.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#_t.maxAttempts=e.maxAttempts)}async#Tt(e,t,r,n,i){if(e>=this.#_t.maxAttempts)return i.makeServerError("exceeded maximum retry limit");(0,o.assert)(A()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:n}),r>0&&await function(e){return new Promise((t=>setTimeout(t,e)))}(r);let a=this.clone();const s=(a.url.split(":")[0]||"").toLowerCase();if(s in y){const e=await y[s](a.url,b(n.#xt));if(e instanceof w){let t=e;if(this.processFunc){b(n.#xt);try{t=await this.processFunc(a,t)}catch(e){null!=e.throttle&&"number"==typeof e.stall||t.makeServerError("error in post-processing function",e).assertOk()}}return t}a=e}this.preflightFunc&&(a=await this.preflightFunc(a));const u=await this.getUrlFunc(a,b(n.#xt));let c=new w(u.statusCode,u.statusMessage,u.headers,u.body,n);if(301===c.statusCode||302===c.statusCode){try{const r=c.headers.location||"";return a.redirect(r).#Tt(e+1,t,0,n,c)}catch(e){}return c}if(429===c.statusCode&&(null==this.retryFunc||await this.retryFunc(a,c,e))){const r=c.headers["retry-after"];let i=this.#_t.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"==typeof r&&r.match(/^[1-9][0-9]*$/)&&(i=parseInt(r)),a.clone().#Tt(e+1,t,i,n,c)}if(this.processFunc){b(n.#xt);try{c=await this.processFunc(a,c)}catch(r){null!=r.throttle&&"number"==typeof r.stall||c.makeServerError("error in post-processing function",r).assertOk();let i=this.#_t.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return r.stall>=0&&(i=r.stall),a.clone().#Tt(e+1,t,i,n,c)}}return c}send(){return(0,o.assert)(null==this.#xt,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#xt=new g(this),this.#Tt(0,A()+this.timeout,0,this,new w(0,"",{},null,this))}cancel(){(0,o.assert)(null!=this.#xt,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=m.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();(0,o.assert)("GET"===this.method&&("https"!==t||"http"!==r)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const n=new v(e);return n.method="GET",n.allowGzip=this.allowGzip,n.timeout=this.timeout,n.#mt=Object.assign({},this.#mt),this.#vt&&(n.#vt=new Uint8Array(this.#vt)),n.#wt=this.#wt,n}clone(){const e=new v(this.url);return e.#gt=this.#gt,this.#vt&&(e.#vt=this.#vt),e.#wt=this.#wt,e.#mt=Object.assign({},this.#mt),e.#At=this.#At,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#kt=this.#kt,e.#Et=this.#Et,e.#St=this.#St,e.#_t=Object.assign({},this.#_t),e.#Pt=this.#Pt,e}static lockConfig(){d=!0}static getGateway(e){return y[e.toLowerCase()]||null}static registerGateway(e,t){if("http"===(e=e.toLowerCase())||"https"===e)throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(d)throw new Error("gateways locked");y[e]=t}static registerGetUrl(e){if(d)throw new Error("gateways locked");c=e}static createGetUrlFunc(e){return(0,u.createGetUrl)(e)}static createDataGateway(){return h}static createIpfsGatewayFunc(e){return p(e)}}t.FetchRequest=v;class w{#It;#Ot;#mt;#vt;#ae;#Bt;toString(){return``}get statusCode(){return this.#It}get statusMessage(){return this.#Ot}get headers(){return Object.assign({},this.#mt)}get body(){return null==this.#vt?null:new Uint8Array(this.#vt)}get bodyText(){try{return null==this.#vt?"":(0,s.toUtf8String)(this.#vt)}catch(e){(0,o.assert)(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){(0,o.assert)(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let r=0;return{next:()=>{if(r(e[t.toLowerCase()]=String(r[t]),e)),{}),this.#vt=null==n?null:new Uint8Array(n),this.#ae=i||null,this.#Bt={message:""}}makeServerError(e,t){let r;r=e?`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:`CLIENT ESCALATED SERVER ERROR (${e=`${this.statusCode} ${this.statusMessage}`})`;const n=new w(599,r,this.headers,this.body,this.#ae||void 0);return n.#Bt={message:e,error:t},n}throwThrottleError(e,t){null==t?t=-1:(0,o.assertArgument)(Number.isInteger(t)&&t>=0,"invalid stall timeout","stall",t);const r=new Error(e||"throttling requests");throw(0,a.defineProperties)(r,{stall:t,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#vt}get request(){return this.#ae}ok(){return""===this.#Bt.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=this.#Bt;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let n=null;try{this.#vt&&(n=(0,s.toUtf8String)(this.#vt))}catch(e){}(0,o.assert)(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:r,responseBody:n,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function A(){return(new Date).getTime()}t.FetchResponse=w},9412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=void 0;const n=r(7415),i=r(1500),o=r(6508),a=r(8166),s=BigInt(-1),u=BigInt(0),c=BigInt(1),l=BigInt(5),f={};let d="0000";for(;d.length<80;)d+=d;function h(e){let t=d;for(;t.length=-t&&eu?(0,o.fromTwos)((0,o.mask)(e,n),n):-(0,o.fromTwos)((0,o.mask)(-e,n),n)}else{const t=c<=0&&enull==o[e]?r:((0,i.assertArgument)(typeof o[e]===t,"invalid fixed format ("+e+" not "+t+")","format."+e,o[e]),o[e]);t=a("signed","boolean",t),r=a("width","number",r),n=a("decimals","number",n)}(0,i.assertArgument)(r%8==0,"invalid FixedNumber width (not byte aligned)","format.width",r),(0,i.assertArgument)(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);return{signed:t,width:r,decimals:n,name:(t?"":"u")+"fixed"+String(r)+"x"+String(n)}}class m{format;#Ct;#Nt;#Rt;_value;constructor(e,t,r){(0,i.assertPrivate)(e,f,"FixedNumber"),this.#Nt=t,this.#Ct=r;const n=function(e,t){let r="";e0?r*=h(n):n<0&&(t*=h(-n)),tr?1:0}eq(e){return 0===this.cmp(e)}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#Nt;return this.#Ntu&&(e+=this.#Rt-c),e=this.#Nt/this.#Rt*this.#Rt,this.#Ut(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,r=l*h(t-1);let n=this.value+r;const i=h(t);return n=n/i*i,p(n,this.#Ct,"round"),new m(f,n,this.#Ct)}isZero(){return this.#Nt===u}isNegative(){return this.#Nt0){const t=h(c);(0,i.assert)(s%t===u,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),s/=t}else c<0&&(s*=h(-c));return p(s,a,"fromValue"),new m(f,s,a)}static fromString(e,t){const r=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,i.assertArgument)(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",e);const n=y(t);let o=r[2]||"0",a=r[3]||"";for(;a.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=t.createGetUrl=void 0;const n=r(1500);function i(e){return async function(e,t){(0,n.assert)(null==t||!t.cancelled,"request cancelled before sending","CANCELLED");const r=e.url.split(":")[0].toLowerCase();(0,n.assert)("http"===r||"https"===r,`unsupported protocol ${r}`,"UNSUPPORTED_OPERATION",{info:{protocol:r},operation:"request"}),(0,n.assert)("https"===r||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i=null;const o=new AbortController,a=setTimeout((()=>{i=(0,n.makeError)("request timeout","TIMEOUT"),o.abort()}),e.timeout);t&&t.addListener((()=>{i=(0,n.makeError)("request cancelled","CANCELLED"),o.abort()}));const s={method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:o.signal};let u;try{u=await fetch(e.url,s)}catch(e){if(clearTimeout(a),i)throw i;throw e}clearTimeout(a);const c={};u.headers.forEach(((e,t)=>{c[t.toLowerCase()]=e}));const l=await u.arrayBuffer(),f=null==l?null:new Uint8Array(l);return{statusCode:u.status,statusMessage:u.statusText,headers:c,body:f}}}t.createGetUrl=i;const o=i();t.getUrl=async function(e,t){return o(e,t)}},5347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.encodeRlp=t.decodeRlp=t.defineProperties=t.resolveProperties=t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.toBigInt=t.getUint=t.getNumber=t.getBigInt=t.mask=t.toTwos=t.fromTwos=t.FixedNumber=t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.makeError=t.assertNormalize=t.assertPrivate=t.assertArgumentCount=t.assertArgument=t.assert=t.isError=t.isCallException=t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=void 0,t.uuidV4=t.Utf8ErrorFuncs=void 0;var n=r(8567);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return n.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return n.encodeBase58}});var i=r(1949);Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return i.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return i.encodeBase64}});var o=r(7415);Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return o.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return o.getBytesCopy}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return o.isBytesLike}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return o.hexlify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return o.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return o.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return o.dataSlice}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return o.stripZerosLeft}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return o.zeroPadValue}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return o.zeroPadBytes}});var a=r(1500);Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return a.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return a.isError}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return a.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return a.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return a.assertArgumentCount}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return a.assertPrivate}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return a.assertNormalize}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return a.makeError}});var s=r(7698);Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return s.EventPayload}});var u=r(5191);Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return u.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return u.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return u.FetchCancelSignal}});var c=r(9412);Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return c.FixedNumber}});var l=r(6508);Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return l.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return l.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return l.mask}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return l.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return l.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return l.getUint}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return l.toBigInt}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return l.toNumber}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return l.toBeHex}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return l.toBeArray}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return l.toQuantity}});var f=r(8166);Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return f.resolveProperties}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return f.defineProperties}});var d=r(7780);Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return d.decodeRlp}});var h=r(5212);Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return h.encodeRlp}});var p=r(436);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return p.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return p.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return p.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return p.parseUnits}});var y=r(3948);Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return y.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return y.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return y.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return y.Utf8ErrorFuncs}});var m=r(7744);Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return m.uuidV4}})},6508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.getNumber=t.toBigInt=t.getUint=t.getBigInt=t.mask=t.toTwos=t.fromTwos=void 0;const n=r(7415),i=r(1500),o=BigInt(0),a=BigInt(1),s=9007199254740991;function u(e,t){switch(typeof e){case"bigint":return e;case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-s&&e<=s,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){(0,i.assertArgument)(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid BigNumberish value",t||"value",e)}function c(e,t){const r=u(e,t);return(0,i.assert)(r>=o,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}t.fromTwos=function(e,t){const r=c(e,"value"),n=BigInt(d(t,"width"));if((0,i.assert)(r>>n===o,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),r>>n-a){return-((~r&(a<>4],t+=l[15&r];return BigInt(t)}return u(e)}function d(e,t){switch(typeof e){case"bigint":return(0,i.assertArgument)(e>=-s&&e<=s,"overflow",t||"value",e),Number(e);case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-s&&e<=s,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return d(BigInt(e),t)}catch(r){(0,i.assertArgument)(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid numeric value",t||"value",e)}function h(e){const t=c(e,"value");if(t===o)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let e=0;e=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length<2*n;)r="0"+r}return"0x"+r},t.toBeArray=h,t.toQuantity=function(e){let t=(0,n.hexlify)((0,n.isBytesLike)(e)?e:h(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}},8166:(e,t)=>{"use strict";function r(e,t,r){const n=t.split("|").map((e=>e.trim()));for(let r=0;rPromise.resolve(e[t]))))).reduce(((e,r,n)=>(e[t[n]]=r,e)),{})},t.defineProperties=function(e,t,n){for(let i in t){let o=t[i];const a=n?n[i]:null;a&&r(o,a,i),Object.defineProperty(e,i,{enumerable:!0,value:o,writable:!1})}}},7780:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeRlp=void 0;const n=r(7415),i=r(1500),o=r(7415);function a(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function s(e,t,r){let n=0;for(let i=0;i{(0,i.assert)(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const n=e[t]-247;r(t+1+n);const i=s(e,t+1,n);return r(t+1+n+i),u(e,t,t+1+n,n+i)}if(e[t]>=192){const n=e[t]-192;return r(t+1+n),u(e,t,t+1,n)}if(e[t]>=184){const i=e[t]-183;r(t+1+i);const o=s(e,t+1,i);r(t+1+i+o);return{consumed:1+i+o,result:(0,n.hexlify)(e.slice(t+1+i,t+1+i+o))}}if(e[t]>=128){const i=e[t]-128;r(t+1+i);return{consumed:1+i,result:(0,n.hexlify)(e.slice(t+1,t+1+i))}}return{consumed:1,result:a(e[t])}}t.decodeRlp=function(e){const t=(0,o.getBytes)(e,"data"),r=c(t,0);return(0,i.assertArgument)(r.consumed===t.length,"unexpected junk after rlp payload","data",e),r.result}},5212:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRlp=void 0;const n=r(7415);function i(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function o(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(o(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=i(t.length);return r.unshift(247+r.length),r.concat(t)}const t=Array.prototype.slice.call((0,n.getBytes)(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=i(t.length);return r.unshift(183+r.length),r.concat(t)}const a="0123456789abcdef";t.encodeRlp=function(e){let t="0x";for(const r of o(e))t+=a[r>>4],t+=a[15&r];return t}},436:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=t.formatEther=t.parseUnits=t.formatUnits=void 0;const n=r(1500),i=r(9412),o=r(6508),a=["wei","kwei","mwei","gwei","szabo","finney","ether"];function s(e,t){let r=18;if("string"==typeof t){const e=a.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,o.getNumber)(t,"unit"));return i.FixedNumber.fromValue(e,r,{decimals:r,width:512}).toString()}function u(e,t){(0,n.assertArgument)("string"==typeof e,"value must be a string","value",e);let r=18;if("string"==typeof t){const e=a.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,o.getNumber)(t,"unit"));return i.FixedNumber.fromString(e,{decimals:r,width:512}).value}t.formatUnits=s,t.parseUnits=u,t.formatEther=function(e){return s(e,18)},t.parseEther=function(e){return u(e,18)}},3948:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8CodePoints=t.toUtf8String=t.toUtf8Bytes=t.Utf8ErrorFuncs=void 0;const n=r(7415),i=r(1500);function o(e,t,r,n,i){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return"OVERRUN"===e?r.length-t-1:0}function a(e,r){null==r&&(r=t.Utf8ErrorFuncs.error);const i=(0,n.getBytes)(e,"bytes"),o=[];let a=0;for(;a>7)){o.push(e);continue}let t=null,n=null;if(192==(224&e))t=1,n=127;else if(224==(240&e))t=2,n=2047;else{if(240!=(248&e)){a+=r(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",a-1,i,o);continue}t=3,n=65535}if(a-1+t>=i.length){a+=r("OVERRUN",a-1,i,o);continue}let s=e&(1<<8-t-1)-1;for(let e=0;e1114111?a+=r("OUT_OF_RANGE",a-1-t,i,o,s):s>=55296&&s<=57343?a+=r("UTF16_SURROGATE",a-1-t,i,o,s):s<=n?a+=r("OVERLONG",a-1-t,i,o,s):o.push(s))}return o}function s(e,t){(0,i.assertArgument)("string"==typeof e,"invalid string value","str",e),null!=t&&((0,i.assertNormalize)(t),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);(0,i.assertArgument)(t>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}t.Utf8ErrorFuncs=Object.freeze({error:function(e,t,r,n,o){(0,i.assertArgument)(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:o,replace:function(e,t,r,n,a){return"OVERLONG"===e?((0,i.assertArgument)("number"==typeof a,"invalid bad code point for replacement","badCodepoint",a),n.push(a),0):(n.push(65533),o(e,t,r))}}),t.toUtf8Bytes=s,t.toUtf8String=function(e,t){return a(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")},t.toUtf8CodePoints=function(e,t){return a(s(e,t))}},7744:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuidV4=void 0;const n=r(7415);t.uuidV4=function(e){const t=(0,n.getBytes)(e,"randomBytes");t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=(0,n.hexlify)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}},8394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWallet=void 0;const n=r(646),i=r(3562),o=r(3996),a=r(7778),s=r(5347);class u extends o.AbstractSigner{address;#Ht;constructor(e,t){super(t),(0,s.assertArgument)(e&&"function"==typeof e.sign,"invalid private key","privateKey","[ REDACTED ]"),this.#Ht=e;const r=(0,a.computeAddress)(this.signingKey.publicKey);(0,s.defineProperties)(this,{address:r})}get signingKey(){return this.#Ht}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new u(this.#Ht,e)}async signTransaction(e){e=(0,o.copyRequest)(e);const{to:t,from:r}=await(0,s.resolveProperties)({to:e.to?(0,n.resolveAddress)(e.to,this.provider):void 0,from:e.from?(0,n.resolveAddress)(e.from,this.provider):void 0});null!=t&&(e.to=t),null!=r&&(e.from=r),null!=e.from&&((0,s.assertArgument)((0,n.getAddress)(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const i=a.Transaction.from(e);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign((0,i.hashMessage)(e)).serialized}async signTypedData(e,t,r){const n=await i.TypedDataEncoder.resolveNames(e,t,r,(async e=>{(0,s.assert)(null!=this.provider,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:e}});const t=await this.provider.resolveName(e);return(0,s.assert)(null!=t,"unconfigured ENS name","UNCONFIGURED_NAME",{value:e}),t}));return this.signingKey.sign(i.TypedDataEncoder.hash(n.domain,t,n.value)).serialized}}t.BaseWallet=u},22:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIndexedAccountPath=t.getAccountPath=t.HDNodeVoidWallet=t.HDNodeWallet=t.defaultPath=void 0;const n=r(2291),i=r(3996),o=r(7778),a=r(5347),s=r(9943),u=r(8394),c=r(2931),l=r(1650);t.defaultPath="m/44'/60'/0'/0/0";const f=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),d=2147483648,h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");function p(e,t){let r="";for(;e;)r="0123456789abcdef"[e%16]+r,e=Math.trunc(e/16);for(;r.length<2*t;)r="0"+r;return"0x"+r}function y(e){const t=(0,a.getBytes)(e),r=(0,a.dataSlice)((0,n.sha256)((0,n.sha256)(t)),0,4),i=(0,a.concat)([t,r]);return(0,a.encodeBase58)(i)}const m={};function g(e,t,r,i){const o=new Uint8Array(37);e&d?((0,a.assert)(null!=i,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),o.set((0,a.getBytes)(i),1)):o.set((0,a.getBytes)(r));for(let t=24;t>=0;t-=8)o[33+(t>>3)]=e>>24-t&255;const s=(0,a.getBytes)((0,n.computeHmac)("sha512",t,o));return{IL:s.slice(0,32),IR:s.slice(32)}}function b(e,t){const r=t.split("/");(0,a.assertArgument)(r.length>0,"invalid path","path",t),"m"===r[0]&&((0,a.assertArgument)(0===e.depth,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,"path",t),r.shift());let n=e;for(let e=0;e=16&&r.length<=64,"invalid seed","seed","[REDACTED]");const i=(0,a.getBytes)((0,n.computeHmac)("sha512",f,r)),o=new n.SigningKey((0,a.hexlify)(i.slice(0,32)));return new v(m,o,"0x00000000",(0,a.hexlify)(i.slice(32)),"m",0,0,t,null)}static fromExtendedKey(e){const t=(0,a.toBeArray)((0,a.decodeBase58)(e));(0,a.assertArgument)(82===t.length||y(t.slice(0,78))===e,"invalid extended key","extendedKey","[ REDACTED ]");const r=t[4],i=(0,a.hexlify)(t.slice(5,9)),s=parseInt((0,a.hexlify)(t.slice(9,13)).substring(2),16),u=(0,a.hexlify)(t.slice(13,45)),c=t.slice(45,78);switch((0,a.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":{const e=(0,a.hexlify)(c);return new w(m,(0,o.computeAddress)(e),e,i,u,null,s,r,null)}case"0x0488ade4":case"0x04358394 ":if(0!==c[0])break;return new v(m,new n.SigningKey(c.slice(1)),i,u,null,s,r,null,null)}(0,a.assertArgument)(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(e,r,i){null==e&&(e=""),null==r&&(r=t.defaultPath),null==i&&(i=s.LangEn.wordlist());const o=c.Mnemonic.fromEntropy((0,n.randomBytes)(16),e,i);return v.#qt(o.computeSeed(),o).derivePath(r)}static fromMnemonic(e,r){return r||(r=t.defaultPath),v.#qt(e.computeSeed(),e).derivePath(r)}static fromPhrase(e,r,n,i){null==r&&(r=""),null==n&&(n=t.defaultPath),null==i&&(i=s.LangEn.wordlist());const o=c.Mnemonic.fromPhrase(e,r,i);return v.#qt(o.computeSeed(),o).derivePath(n)}static fromSeed(e){return v.#qt(e,null)}}t.HDNodeWallet=v;class w extends i.VoidSigner{publicKey;fingerprint;parentFingerprint;chainCode;path;index;depth;constructor(e,t,r,i,o,s,u,c,l){super(t,l),(0,a.assertPrivate)(e,m,"HDNodeVoidWallet"),(0,a.defineProperties)(this,{publicKey:r});const f=(0,a.dataSlice)((0,n.ripemd160)((0,n.sha256)(r)),0,4);(0,a.defineProperties)(this,{publicKey:r,fingerprint:f,parentFingerprint:i,chainCode:o,path:s,index:u,depth:c})}connect(e){return new w(m,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,e)}get extendedKey(){return(0,a.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),y((0,a.concat)(["0x0488B21E",p(this.depth,1),this.parentFingerprint,p(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return null!=this.path}deriveChild(e){const t=(0,a.getNumber)(e,"index");(0,a.assertArgument)(t<=4294967295,"invalid index","index",t);let r=this.path;r&&(r+="/"+(2147483647&t),t&d&&(r+="'"));const{IR:i,IL:s}=g(t,this.chainCode,this.publicKey,null),u=n.SigningKey.addPoints(s,this.publicKey,!0),c=(0,o.computeAddress)(u);return new w(m,c,u,this.fingerprint,(0,a.hexlify)(i),r,t,this.depth+1,this.provider)}derivePath(e){return b(this,e)}}t.HDNodeVoidWallet=w,t.getAccountPath=function(e){const t=(0,a.getNumber)(e,"index");return(0,a.assertArgument)(t>=0&&t=0&&t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=t.Mnemonic=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=t.decryptCrowdsaleJson=t.isCrowdsaleJson=t.HDNodeVoidWallet=t.HDNodeWallet=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.BaseWallet=void 0;var n=r(8394);Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return n.BaseWallet}});var i=r(22);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return i.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return i.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return i.getIndexedAccountPath}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return i.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return i.HDNodeVoidWallet}});var o=r(7570);Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return o.isCrowdsaleJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return o.decryptCrowdsaleJson}});var a=r(1650);Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return a.isKeystoreJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return a.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return a.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return a.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return a.encryptKeystoreJsonSync}});var s=r(2931);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return s.Mnemonic}});var u=r(6930);Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return u.Wallet}})},7570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decryptCrowdsaleJson=t.isCrowdsaleJson=void 0;const n=r(8165),i=r(646),o=r(2291),a=r(3562),s=r(5347),u=r(8634);t.isCrowdsaleJson=function(e){try{if(JSON.parse(e).encseed)return!0}catch(e){}return!1},t.decryptCrowdsaleJson=function(e,t){const r=JSON.parse(e),c=(0,u.getPassword)(t),l=(0,i.getAddress)((0,u.spelunk)(r,"ethaddr:string!")),f=(0,u.looseArrayify)((0,u.spelunk)(r,"encseed:string!"));(0,s.assertArgument)(f&&f.length%16==0,"invalid encseed","json",e);const d=(0,s.getBytes)((0,o.pbkdf2)(c,c,2e3,32,"sha256")).slice(0,16),h=f.slice(0,16),p=f.slice(16),y=new n.CBC(d,h),m=(0,n.pkcs7Strip)((0,s.getBytes)(y.decrypt(p)));let g="";for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encryptKeystoreJson=t.encryptKeystoreJsonSync=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=void 0;const n=r(8165),i=r(646),o=r(2291),a=r(7778),s=r(5347),u=r(8634),c=r(4586),l="m/44'/60'/0'/0/0";function f(e,t){const r=(0,s.getBytes)(t),c=(0,u.spelunk)(e,"crypto.ciphertext:data!"),f=(0,s.hexlify)((0,o.keccak256)((0,s.concat)([r.slice(16,32),c]))).substring(2);(0,s.assertArgument)(f===(0,u.spelunk)(e,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");const d=function(e,t,r){if("aes-128-ctr"===(0,u.spelunk)(e,"crypto.cipher:string")){const i=(0,u.spelunk)(e,"crypto.cipherparams.iv:data!"),o=new n.CTR(t,i);return(0,s.hexlify)(o.decrypt(r))}(0,s.assert)(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}(e,r.slice(0,16),c),h=(0,a.computeAddress)(d);if(e.address){let t=e.address.toLowerCase();t.startsWith("0x")||(t="0x"+t),(0,s.assertArgument)((0,i.getAddress)(t)===h,"keystore address/privateKey mismatch","address",e.address)}const p={address:h,privateKey:d};if("0.1"===(0,u.spelunk)(e,"x-ethers.version:string")){const t=r.slice(32,64),i=(0,u.spelunk)(e,"x-ethers.mnemonicCiphertext:data!"),o=(0,u.spelunk)(e,"x-ethers.mnemonicCounter:data!"),a=new n.CTR(t,o);p.mnemonic={path:(0,u.spelunk)(e,"x-ethers.path:string")||l,locale:(0,u.spelunk)(e,"x-ethers.locale:string")||"en",entropy:(0,s.hexlify)((0,s.getBytes)(a.decrypt(i)))}}return p}function d(e){const t=(0,u.spelunk)(e,"crypto.kdf:string");if(t&&"string"==typeof t){if("scrypt"===t.toLowerCase()){const r=(0,u.spelunk)(e,"crypto.kdfparams.salt:data!"),n=(0,u.spelunk)(e,"crypto.kdfparams.n:int!"),i=(0,u.spelunk)(e,"crypto.kdfparams.r:int!"),o=(0,u.spelunk)(e,"crypto.kdfparams.p:int!");(0,s.assertArgument)(n>0&&!(n&n-1),"invalid kdf.N","kdf.N",n),(0,s.assertArgument)(i>0&&o>0,"invalid kdf","kdf",t);const a=(0,u.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,s.assertArgument)(32===a,"invalid kdf.dklen","kdf.dflen",a),{name:"scrypt",salt:r,N:n,r:i,p:o,dkLen:64}}if("pbkdf2"===t.toLowerCase()){const t=(0,u.spelunk)(e,"crypto.kdfparams.salt:data!"),r=(0,u.spelunk)(e,"crypto.kdfparams.prf:string!"),n=r.split("-").pop();(0,s.assertArgument)("sha256"===n||"sha512"===n,"invalid kdf.pdf","kdf.pdf",r);const i=(0,u.spelunk)(e,"crypto.kdfparams.c:int!"),o=(0,u.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,s.assertArgument)(32===o,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:t,count:i,dkLen:o,algorithm:n}}}(0,s.assertArgument)(!1,"unsupported key-derivation function","kdf",t)}function h(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}function p(e){const t=null!=e.salt?(0,s.getBytes)(e.salt,"options.salt"):(0,o.randomBytes)(32);let r=1<<17,n=8,i=1;return e.scrypt&&(e.scrypt.N&&(r=e.scrypt.N),e.scrypt.r&&(n=e.scrypt.r),e.scrypt.p&&(i=e.scrypt.p)),(0,s.assertArgument)("number"==typeof r&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),(0,s.assertArgument)("number"==typeof n&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),(0,s.assertArgument)("number"==typeof i&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:t,N:r,r:n,p:i}}function y(e,t,r,i){const a=(0,s.getBytes)(r.privateKey,"privateKey"),f=null!=i.iv?(0,s.getBytes)(i.iv,"options.iv"):(0,o.randomBytes)(16);(0,s.assertArgument)(16===f.length,"invalid options.iv length","options.iv",i.iv);const d=null!=i.uuid?(0,s.getBytes)(i.uuid,"options.uuid"):(0,o.randomBytes)(16);(0,s.assertArgument)(16===d.length,"invalid options.uuid length","options.uuid",i.iv);const h=e.slice(0,16),p=e.slice(16,32),y=new n.CTR(h,f),m=(0,s.getBytes)(y.encrypt(a)),g=(0,o.keccak256)((0,s.concat)([p,m])),b={address:r.address.substring(2).toLowerCase(),id:(0,s.uuidV4)(d),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,s.hexlify)(f).substring(2)},ciphertext:(0,s.hexlify)(m).substring(2),kdf:"scrypt",kdfparams:{salt:(0,s.hexlify)(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:g.substring(2)}};if(r.mnemonic){const t=null!=i.client?i.client:`ethers/${c.version}`,a=r.mnemonic.path||l,f=r.mnemonic.locale||"en",d=e.slice(32,64),h=(0,s.getBytes)(r.mnemonic.entropy,"account.mnemonic.entropy"),p=(0,o.randomBytes)(16),y=new n.CTR(d,p),m=(0,s.getBytes)(y.encrypt(h)),g=new Date,v="UTC--"+(g.getUTCFullYear()+"-"+(0,u.zpad)(g.getUTCMonth()+1,2)+"-"+(0,u.zpad)(g.getUTCDate(),2)+"T"+(0,u.zpad)(g.getUTCHours(),2)+"-"+(0,u.zpad)(g.getUTCMinutes(),2)+"-"+(0,u.zpad)(g.getUTCSeconds(),2)+".0Z")+"--"+b.address;b["x-ethers"]={client:t,gethFilename:v,path:a,locale:f,mnemonicCounter:(0,s.hexlify)(p).substring(2),mnemonicCiphertext:(0,s.hexlify)(m).substring(2),version:"0.1"}}return JSON.stringify(b)}t.isKeystoreJson=function(e){try{const t=JSON.parse(e);if(3===(null!=t.version?parseInt(t.version):0))return!0}catch(e){}return!1},t.decryptKeystoreJsonSync=function(e,t){const r=JSON.parse(e),n=(0,u.getPassword)(t),i=d(r);if("pbkdf2"===i.name){const{salt:e,count:t,dkLen:a,algorithm:s}=i;return f(r,(0,o.pbkdf2)(n,e,t,a,s))}(0,s.assert)("scrypt"===i.name,"cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:a,N:c,r:l,p:h,dkLen:p}=i;return f(r,(0,o.scryptSync)(n,a,c,l,h,p))},t.decryptKeystoreJson=async function(e,t,r){const n=JSON.parse(e),i=(0,u.getPassword)(t),a=d(n);if("pbkdf2"===a.name){r&&(r(0),await h(0));const{salt:e,count:t,dkLen:s,algorithm:u}=a,c=(0,o.pbkdf2)(i,e,t,s,u);return r&&(r(1),await h(0)),f(n,c)}(0,s.assert)("scrypt"===a.name,"cannot be reached","UNKNOWN_ERROR",{params:a});const{salt:c,N:l,r:p,p:y,dkLen:m}=a;return f(n,await(0,o.scrypt)(i,c,l,p,y,m,r))},t.encryptKeystoreJsonSync=function(e,t,r){null==r&&(r={});const n=(0,u.getPassword)(t),i=p(r),a=(0,o.scryptSync)(n,i.salt,i.N,i.r,i.p,64);return y((0,s.getBytes)(a),i,e,r)},t.encryptKeystoreJson=async function(e,t,r){null==r&&(r={});const n=(0,u.getPassword)(t),i=p(r),a=await(0,o.scrypt)(n,i.salt,i.N,i.r,i.p,64,r.progressCallback);return y((0,s.getBytes)(a),i,e,r)}},2931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mnemonic=void 0;const n=r(2291),i=r(5347),o=r(9943);function a(e){return(1<=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const s=new Uint8Array(Math.ceil(11*r.length/8));let u=0;for(let e=0;e=0,`invalid mnemonic word at index ${e}`,"mnemonic","[ REDACTED ]");for(let e=0;e<11;e++)n&1<<10-e&&(s[u>>3]|=1<<7-u%8),u++}const c=32*r.length/3,l=a(r.length/3),f=(0,i.getBytes)((0,n.sha256)(s.slice(0,c/8)))[0]&l;return(0,i.assertArgument)(f===(s[s.length-1]&l),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),(0,i.hexlify)(s.slice(0,c/8))}function u(e,t){(0,i.assertArgument)(e.length%4==0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),null==t&&(t=o.LangEn.wordlist());const r=[0];let s=11;for(let t=0;t8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],s-=8):(r[r.length-1]<<=s,r[r.length-1]|=e[t]>>8-s,r.push(e[t]&((1<<8-s)-1&255)),s+=3);const u=e.length/4,c=parseInt((0,n.sha256)(e).substring(2,4),16)&a(u);return r[r.length-1]<<=u,r[r.length-1]|=c>>8-u,t.join(r.map((e=>t.getWord(e))))}const c={};class l{phrase;password;wordlist;entropy;constructor(e,t,r,n,a){null==n&&(n=""),null==a&&(a=o.LangEn.wordlist()),(0,i.assertPrivate)(e,c,"Mnemonic"),(0,i.defineProperties)(this,{phrase:r,password:n,wordlist:a,entropy:t})}computeSeed(){const e=(0,i.toUtf8Bytes)("mnemonic"+this.password,"NFKD");return(0,n.pbkdf2)((0,i.toUtf8Bytes)(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,t,r){const n=s(e,r);return e=u((0,i.getBytes)(n),r),new l(c,n,e,t,r)}static fromEntropy(e,t,r){const n=(0,i.getBytes)(e,"entropy"),o=u(n,r);return new l(c,(0,i.hexlify)(n),o,t,r)}static entropyToPhrase(e,t){return u((0,i.getBytes)(e,"entropy"),t)}static phraseToEntropy(e,t){return s(e,t)}static isValidMnemonic(e,t){try{return s(e,t),!0}catch(e){}return!1}}t.Mnemonic=l},8634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.spelunk=t.getPassword=t.zpad=t.looseArrayify=void 0;const n=r(5347);function i(e){return"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),(0,n.getBytesCopy)(e)}t.looseArrayify=i,t.zpad=function(e,t){for(e=String(e);e.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;const n=r(2291),i=r(5347),o=r(8394),a=r(22),s=r(7570),u=r(1650),c=r(2931);function l(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}class f extends o.BaseWallet{constructor(e,t){"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),super("string"==typeof e?new n.SigningKey(e):e,t)}connect(e){return new f(this.signingKey,e)}async encrypt(e,t){const r={address:this.address,privateKey:this.privateKey};return await(0,u.encryptKeystoreJson)(r,e,{progressCallback:t})}encryptSync(e){const t={address:this.address,privateKey:this.privateKey};return(0,u.encryptKeystoreJsonSync)(t,e)}static#Gt(e){if((0,i.assertArgument)(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&"en"===e.mnemonic.locale){const t=c.Mnemonic.fromEntropy(e.mnemonic.entropy),r=a.HDNodeWallet.fromMnemonic(t,e.mnemonic.path);if(r.address===e.address&&r.privateKey===e.privateKey)return r;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const t=new f(e.privateKey);return(0,i.assertArgument)(t.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),t}static async fromEncryptedJson(e,t,r){let n=null;return(0,u.isKeystoreJson)(e)?n=await(0,u.decryptKeystoreJson)(e,t,r):(0,s.isCrowdsaleJson)(e)&&(r&&(r(0),await l(0)),n=(0,s.decryptCrowdsaleJson)(e,t),r&&(r(1),await l(0))),f.#Gt(n)}static fromEncryptedJsonSync(e,t){let r=null;return(0,u.isKeystoreJson)(e)?r=(0,u.decryptKeystoreJsonSync)(e,t):(0,s.isCrowdsaleJson)(e)?r=(0,s.decryptCrowdsaleJson)(e,t):(0,i.assertArgument)(!1,"invalid JSON wallet","json","[ REDACTED ]"),f.#Gt(r)}static createRandom(e){const t=a.HDNodeWallet.createRandom();return e?t.connect(e):t}static fromPhrase(e,t){const r=a.HDNodeWallet.fromPhrase(e);return t?r.connect(t):r}}t.Wallet=f},9610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBits=void 0;t.decodeBits=function(e,t){const r=(1<=e;){const t=i>>o-e;i&=(1<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwl=t.decode=void 0;const n=r(5347),i=" !#$%&'()*+,-./<=>?@[]^_`{|}~",o=/^[a-z]*$/i;function a(e,t){let r=97;return e.reduce(((e,n)=>(n===t?r++:n.match(o)?e.push(String.fromCharCode(r)+n):(r=97,e.push(n)),e)),[])}function s(e,t){for(let r=28;r>=0;r--)e=e.split(i[r]).join(t.substring(2*r,2*r+2));const r=[],n=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,((e,t,n,i)=>{if(n)for(let e=parseInt(n);e>=0;e--)r.push(";");else r.push(t.toLowerCase());return""}));if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return a(a(r,";"),":")}t.decode=s,t.decodeOwl=function(e){return(0,n.assertArgument)("0"===e[0],"unsupported auwl data","data",e),s(e.substring(59),e.substring(1,59))}},7703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwlA=void 0;const n=r(5347),i=r(9610),o=r(2426);t.decodeOwlA=function(e,t){let r=(0,o.decodeOwl)(e).join(",");return t.split(/,/g).forEach((e=>{const o=e.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);(0,n.assertArgument)(null!==o,"internal error parsing accents","accents",t);let a=0;const s=(0,i.decodeBits)(parseInt(o[3]),o[4]),u=parseInt(o[2]),c=new RegExp(`([${o[1]}])`,"g");r=r.replace(c,((e,t)=>(0===--s[a]&&(t=String.fromCharCode(t.charCodeAt(0),u),a++),t)))})),r.split(",")}},6591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=void 0;var n=r(9011);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return n.Wordlist}});var i=r(9943);Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return i.LangEn}});var o=r(2684);Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return o.WordlistOwl}});var a=r(8725);Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return a.WordlistOwlA}});var s=r(2431);Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return s.wordlists}})},9943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LangEn=void 0;const n=r(2684);let i=null;class o extends n.WordlistOwl{constructor(){super("en","0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO","0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60")}static wordlist(){return null==i&&(i=new o),i}}t.LangEn=o},2684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwl=void 0;const n=r(3562),i=r(5347),o=r(2426),a=r(9011);class s extends a.Wordlist{#r;#Kt;constructor(e,t,r){super(e),this.#r=t,this.#Kt=r,this.#Vt=null}get _data(){return this.#r}_decodeWords(){return(0,o.decodeOwl)(this.#r)}#Vt;#Jt(){if(null==this.#Vt){const e=this._decodeWords();if((0,n.id)(e.join("\n")+"\n")!==this.#Kt)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#Vt=e}return this.#Vt}getWord(e){const t=this.#Jt();return(0,i.assertArgument)(e>=0&&e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwlA=void 0;const n=r(2684),i=r(7703);class o extends n.WordlistOwl{#Wt;constructor(e,t,r,n){super(e,t,n),this.#Wt=r}get _accent(){return this.#Wt}_decodeWords(){return(0,i.decodeOwlA)(this._data,this._accent)}}t.WordlistOwlA=o},9011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wordlist=void 0;const n=r(5347);t.Wordlist=class{locale;constructor(e){(0,n.defineProperties)(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}},2431:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlists=void 0;const n=r(9943);t.wordlists={en:n.LangEn.wordlist()}},9784:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"assertionExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"}],"name":"createAssertion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"deleteAssertion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"getAssertion","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"}],"internalType":"struct AssertionStructs.Assertion","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"getAssertionChunksNumber","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"getAssertionSize","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"getAssertionTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"getAssertionTriplesNumber","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},3582:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"AssetExpired","type":"error"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"CommitPhaseOngoing","type":"error"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"CommitPhaseSucceeded","type":"error"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"FirstEpochHasAlreadyEnded","type":"error"},{"inputs":[{"internalType":"address","name":"assetStorage","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NoPendingUpdate","type":"error"},{"inputs":[{"internalType":"address","name":"assetStorage","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"latestStateIndex","type":"uint256"}],"name":"PendingUpdateFinalization","type":"error"},{"inputs":[{"internalType":"address","name":"assetStorage","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"latestState","type":"bytes32"}],"name":"UpdateIsNotFinalized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"returnedTokenAmount","type":"uint96"}],"name":"AssetBurnt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"state","type":"bytes32"}],"name":"AssetMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"AssetPaymentIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"stateIndex","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"returnedTokenAmount","type":"uint96"}],"name":"AssetStateUpdateCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"stateIndex","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"AssetStateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"indexed":false,"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"AssetStoringPeriodExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"AssetUpdatePaymentIncreased","type":"event"},{"inputs":[],"name":"assertionContract","outputs":[{"internalType":"contract Assertion","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burnAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"cancelAssetStateUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"clearOldCommitsMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contentAssetStorage","outputs":[{"internalType":"contract ContentAssetStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"},{"internalType":"bool","name":"immutable_","type":"bool"}],"internalType":"struct ContentAssetStructs.AssetInputArgs","name":"args","type":"tuple"}],"name":"createAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"},{"internalType":"bool","name":"immutable_","type":"bool"}],"name":"createAssetWithVariables","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"extendAssetStoringPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hashingProxy","outputs":[{"internalType":"contract HashingProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"increaseAssetTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"increaseAssetUpdateTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"parametersStorage","outputs":[{"internalType":"contract ParametersStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"serviceAgreementStorageProxy","outputs":[{"internalType":"contract ServiceAgreementStorageProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"serviceAgreementV1","outputs":[{"internalType":"contract ServiceAgreementV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_flag","type":"bool"}],"name":"setOldMetadataClearingFlag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unfinalizedStateStorage","outputs":[{"internalType":"contract UnfinalizedStateStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"updateAssetState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},7247:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assetAssertionId","type":"bytes32"}],"name":"assertionExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"deleteAssertionIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"deleteAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generateTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getAssertionIdByIndex","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAssertionIds","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAssertionIdsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint256","name":"assertionIndex","type":"uint256"}],"name":"getAssertionIssuer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAsset","outputs":[{"components":[{"internalType":"bool","name":"immutable_","type":"bool"},{"internalType":"bytes32[]","name":"assertionIds","type":"bytes32[]"}],"internalType":"struct ContentAssetStructs.Asset","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLatestAssertionId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isMutable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"issuers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"pushAssertionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"address","name":"issuer","type":"address"}],"name":"setAssertionIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"immutable_","type":"bool"}],"name":"setMutability","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},7184:e=>{"use strict";e.exports=JSON.parse('[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractName","type":"string"},{"indexed":false,"internalType":"address","name":"newContractAddress","type":"address"}],"name":"AssetStorageChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractName","type":"string"},{"indexed":false,"internalType":"address","name":"newContractAddress","type":"address"}],"name":"ContractChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractName","type":"string"},{"indexed":false,"internalType":"address","name":"newContractAddress","type":"address"}],"name":"NewAssetStorage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractName","type":"string"},{"indexed":false,"internalType":"address","name":"newContractAddress","type":"address"}],"name":"NewContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"getAllAssetStorages","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"internalType":"struct UnorderedNamedContractDynamicSetLib.Contract[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllContracts","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"internalType":"struct UnorderedNamedContractDynamicSetLib.Contract[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"assetStorageName","type":"string"}],"name":"getAssetStorageAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"contractName","type":"string"}],"name":"getContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"assetStorageAddress","type":"address"}],"name":"isAssetStorage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"assetStorageName","type":"string"}],"name":"isAssetStorage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"selectedContractAddress","type":"address"}],"name":"isContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"contractName","type":"string"}],"name":"isContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"assetStorageName","type":"string"},{"internalType":"address","name":"assetStorageAddress","type":"address"}],"name":"setAssetStorageAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractName","type":"string"},{"internalType":"address","name":"newContractAddress","type":"address"}],"name":"setContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},4:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint72","name":"identityId","type":"uint72"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"purpose","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"keyType","type":"uint256"}],"name":"KeyAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint72","name":"identityId","type":"uint72"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"purpose","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"keyType","type":"uint256"}],"name":"KeyRemoved","type":"event"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"uint256","name":"_purpose","type":"uint256"},{"internalType":"uint256","name":"_type","type":"uint256"}],"name":"addKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"deleteIdentity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generateIdentityId","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operational","type":"address"}],"name":"getIdentityId","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"getKey","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint256","name":"_purpose","type":"uint256"}],"name":"getKeysByPurpose","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"identityIds","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"uint256","name":"_purpose","type":"uint256"}],"name":"keyHasPurpose","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"removeKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"operationalKey","type":"bytes32"}],"name":"removeOperationalKeyIdentityId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"operationalKey","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"setOperationalKeyIdentityId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},2566:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"enum ParanetStructs.MinersAccessPolicy[]","name":"expectedAccessPolicies","type":"uint8[]"},{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"actualAccessPolicy","type":"uint8"}],"name":"InvalidParanetMinersAccessPolicy","type":"error"},{"inputs":[{"internalType":"enum ParanetStructs.NodesAccessPolicy[]","name":"expectedAccessPolicies","type":"uint8[]"},{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"actualAccessPolicy","type":"uint8"}],"name":"InvalidParanetNodesAccessPolicy","type":"error"},{"inputs":[{"internalType":"address","name":"paranetKnowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"paranetTokenId","type":"uint256"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"KnowledgeAssetIsAPartOfOtherParanet","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"ParanetCuratedMinerAccessRequestDoesntExist","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"ParanetCuratedMinerAccessRequestInvalidStatus","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"ParanetCuratedMinerDoesntExist","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"ParanetCuratedMinerHasAlreadyBeenAdded","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeDoesntExist","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeHasAlreadyBeenAdded","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeJoinRequestDoesntExist","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"ParanetCuratedNodeJoinRequestInvalidStatus","type":"error"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ParanetDoesntExist","type":"error"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ParanetHasAlreadyBeenRegistered","type":"error"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ParanetServiceDoesntExist","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"paranetServiceId","type":"bytes32"}],"name":"ParanetServiceHasAlreadyBeenAdded","type":"error"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ParanetServiceHasAlreadyBeenRegistered","type":"error"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ProfileDoesntExist","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"knowledgeAssetTokenId","type":"uint256"}],"name":"KnowledgeAssetSubmittedToParanet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"minerAddress","type":"address"}],"name":"ParanetCuratedMinerAccessRequestAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"minerAddress","type":"address"}],"name":"ParanetCuratedMinerAccessRequestCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"minerAddress","type":"address"}],"name":"ParanetCuratedMinerAccessRequestRejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"minerAddress","type":"address"}],"name":"ParanetCuratedMinerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"minerAddress","type":"address"}],"name":"ParanetCuratedMinerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeJoinRequestAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeJoinRequestCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeJoinRequestRejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"components":[{"internalType":"string","name":"poolType","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"indexed":false,"internalType":"struct ParanetStructs.IncentivesPool","name":"incentivesPool","type":"tuple"}],"name":"ParanetIncetivesPoolDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newParanetName","type":"string"},{"indexed":false,"internalType":"string","name":"newParanetDescription","type":"string"}],"name":"ParanetMetadataUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"paranetName","type":"string"},{"indexed":false,"internalType":"string","name":"paranetDescription","type":"string"},{"indexed":false,"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"nodesAccessPolicy","type":"uint8"},{"indexed":false,"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"minersAccessPolicy","type":"uint8"},{"indexed":false,"internalType":"enum ParanetStructs.KnowledgeAssetsAccessPolicy","name":"knowledgeAssetsAccessPolicy","type":"uint8"}],"name":"ParanetRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"paranetServiceKAStorageContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"paranetServiceKATokenId","type":"uint256"}],"name":"ParanetServiceAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetServiceKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetServiceKATokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newParanetServiceName","type":"string"},{"indexed":false,"internalType":"string","name":"newParanetServiceDescription","type":"string"},{"indexed":false,"internalType":"address[]","name":"newParanetServiceAddresses","type":"address[]"}],"name":"ParanetServiceMetadataUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetServiceKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetServiceKATokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"paranetServiceName","type":"string"},{"indexed":false,"internalType":"string","name":"paranetServiceDescription","type":"string"},{"indexed":false,"internalType":"address[]","name":"paranetServiceAddresses","type":"address[]"}],"name":"ParanetServiceRegistered","type":"event"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"address[]","name":"minerAddresses","type":"address[]"}],"name":"addParanetCuratedMiners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint72[]","name":"identityIds","type":"uint72[]"}],"name":"addParanetCuratedNodes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"components":[{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct ParanetStructs.UniversalAssetLocator[]","name":"services","type":"tuple[]"}],"name":"addParanetServices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"address","name":"minerAddress","type":"address"}],"name":"approveCuratedMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"approveCuratedNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contentAsset","outputs":[{"internalType":"contract ContentAssetV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contentAssetStorage","outputs":[{"internalType":"contract ContentAssetStorageV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hashingProxy","outputs":[{"internalType":"contract HashingProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract HubV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"identityStorage","outputs":[{"internalType":"contract IdentityStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"components":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"},{"internalType":"bool","name":"immutable_","type":"bool"}],"internalType":"struct ContentAssetStructs.AssetInputArgs","name":"knowledgeAssetArgs","type":"tuple"}],"name":"mintKnowledgeAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"paranetKnowledgeAssetsRegistry","outputs":[{"internalType":"contract ParanetKnowledgeAssetsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetKnowledgeMinersRegistry","outputs":[{"internalType":"contract ParanetKnowledgeMinersRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetServicesRegistry","outputs":[{"internalType":"contract ParanetServicesRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetsRegistry","outputs":[{"internalType":"contract ParanetsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"processUpdatedKnowledgeAssetStatesMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"profileStorage","outputs":[{"internalType":"contract ProfileStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"string","name":"paranetName","type":"string"},{"internalType":"string","name":"paranetDescription","type":"string"},{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"nodesAccessPolicy","type":"uint8"},{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"minersAccessPolicy","type":"uint8"}],"name":"registerParanet","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetServiceKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetServiceKATokenId","type":"uint256"},{"internalType":"string","name":"paranetServiceName","type":"string"},{"internalType":"string","name":"paranetServiceDescription","type":"string"},{"internalType":"address[]","name":"paranetServiceAddresses","type":"address[]"}],"name":"registerParanetService","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"address","name":"minerAddress","type":"address"}],"name":"rejectCuratedMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"rejectCuratedNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"address[]","name":"minerAddresses","type":"address[]"}],"name":"removeParanetCuratedMiners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint72[]","name":"identityIds","type":"uint72[]"}],"name":"removeParanetCuratedNodes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"}],"name":"requestParanetCuratedMinerAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"}],"name":"requestParanetCuratedNodeAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"serviceAgreementStorageProxy","outputs":[{"internalType":"contract ServiceAgreementStorageProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"status","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"knowledgeAssetTokenId","type":"uint256"}],"name":"submitKnowledgeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"string","name":"paranetName","type":"string"},{"internalType":"string","name":"paranetDescription","type":"string"}],"name":"updateParanetMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetServiceKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetServiceKATokenId","type":"uint256"},{"internalType":"string","name":"paranetServiceName","type":"string"},{"internalType":"string","name":"paranetServiceDescription","type":"string"},{"internalType":"address[]","name":"paranetServiceAddresses","type":"address[]"}],"name":"updateParanetServiceMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},568:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"poolType","type":"string"},{"internalType":"address","name":"poolAddress","type":"address"}],"name":"ParanetIncentivesPoolAlreadyExists","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"components":[{"internalType":"string","name":"poolType","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"indexed":false,"internalType":"struct ParanetStructs.IncentivesPool","name":"incentivesPool","type":"tuple"}],"name":"ParanetIncetivesPoolDeployed","type":"event"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint256","name":"tracToNeuroEmissionMultiplier","type":"uint256"},{"internalType":"uint16","name":"paranetOperatorRewardPercentage","type":"uint16"},{"internalType":"uint16","name":"paranetIncentivizationProposalVotersRewardPercentage","type":"uint16"}],"name":"deployNeuroIncentivesPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract HubV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"paranetsRegistry","outputs":[{"internalType":"contract ParanetsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"status","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},8469:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"addedCumulativeAwardedNeuro","type":"uint256"}],"name":"addCumulativeAwardedNeuro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"addedTracSpent","type":"uint96"}],"name":"addCumulativeTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"}],"name":"addSubmittedKnowledgeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint96","name":"addedTracSpent","type":"uint96"}],"name":"addTotalTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"addedUnrewardedTracSpent","type":"uint96"}],"name":"addUnrewardedTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"addUpdatingKnowledgeAssetState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetStateId","type":"bytes32"},{"internalType":"uint96","name":"addedUpdateTokenAmount","type":"uint96"}],"name":"addUpdatingKnowledgeAssetUpdateTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"decrementTotalSubmittedKnowledgeAssetsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"deleteKnowledgeMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getCumulativeAwardedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getCumulativeTracSpent","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getKnowledgeMinerMetadata","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint96","name":"totalTracSpent","type":"uint96"},{"internalType":"uint256","name":"totalSubmittedKnowledgeAssetsCount","type":"uint256"}],"internalType":"struct ParanetStructs.KnowledgeMinerMetadata","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getSubmittedKnowledgeAssets","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getSubmittedKnowledgeAssets","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"getTotalSubmittedKnowledgeAssetsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"getTotalTracSpent","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getUnrewardedTracSpent","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getUpdatingKnowledgeAssetStates","outputs":[{"components":[{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"internalType":"struct ParanetStructs.UpdatingKnowledgeAssetState[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getUpdatingKnowledgeAssetStates","outputs":[{"components":[{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"internalType":"struct ParanetStructs.UpdatingKnowledgeAssetState[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract HubV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"incrementTotalSubmittedKnowledgeAssetsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"knowledgeMinerExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"paranetsRegistry","outputs":[{"internalType":"contract ParanetsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"registerKnowledgeMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"}],"name":"removeSubmittedKnowledgeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetStateId","type":"bytes32"}],"name":"removeUpdatingKnowledgeAssetState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"cumulativeAwardedNeuro","type":"uint256"}],"name":"setCumulativeAwardedNeuro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"cumulativeTracSpent","type":"uint96"}],"name":"setCumulativeTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint256","name":"totalSubmittedKnowledgeAssetsCount","type":"uint256"}],"name":"setTotalSubmittedKnowledgeAssetsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint96","name":"totalTracSpent","type":"uint96"}],"name":"setTotalTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"unrewardedTracSpent","type":"uint96"}],"name":"setUnrewardedTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetStateId","type":"bytes32"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"setUpdatingKnowledgeAssetUpdateTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"subtractedCumulativeAwardedNeuro","type":"uint256"}],"name":"subCumulativeAwardedNeuro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"subtractedTracSpent","type":"uint96"}],"name":"subCumulativeTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint96","name":"subtractedTracSpent","type":"uint96"}],"name":"subTotalTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"subtractedUnrewardedTracSpent","type":"uint96"}],"name":"subUnrewardedTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetStateId","type":"bytes32"},{"internalType":"uint96","name":"subtractedUpdateTokenAmount","type":"uint96"}],"name":"subUpdatingKnowledgeAssetUpdateTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},5165:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"},{"internalType":"address","name":"paranetsRegistryAddress","type":"address"},{"internalType":"address","name":"knowledgeMinersRegistryAddress","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"tracToNeuroEmissionMultiplier","type":"uint256"},{"internalType":"uint16","name":"paranetOperatorRewardPercentage_","type":"uint16"},{"internalType":"uint16","name":"paranetIncentivizationProposalVotersRewardPercentage_","type":"uint16"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"currentCumulativeWeight","type":"uint96"},{"internalType":"uint96","name":"targetCumulativeWeight","type":"uint96"}],"name":"InvalidCumulativeVotersWeight","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"claimer","type":"address"}],"name":"NoRewardAvailable","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMultiplier","type":"uint256"}],"name":"NeuroEmissionMultiplierUpdateFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"NeuroEmissionMultiplierUpdateInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NeuroRewardDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ParanetIncentivizationProposalVoterRewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"miner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ParanetKnowledgeMinerRewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ParanetOperatorRewardClaimed","type":"event"},{"inputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint96","name":"weight","type":"uint96"}],"internalType":"struct ParanetStructs.ParanetIncentivizationProposalVoterInput[]","name":"voters_","type":"tuple[]"}],"name":"addVoters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimIncentivizationProposalVoterReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimKnowledgeMinerReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimParanetOperatorReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedMinerRewards","outputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimedMinerRewardsIndexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedOperatorRewards","outputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimedOperatorRewardsIndexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cumulativeVotersWeight","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalizeNeuroEmissionMultiplierUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllRewardedMiners","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"internalType":"struct ParanetStructs.ParanetIncentivesPoolClaimedRewardsProfile[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllRewardedOperators","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"internalType":"struct ParanetStructs.ParanetIncentivesPoolClaimedRewardsProfile[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableAllKnowledgeMinersRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableAllProposalVotersRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableKnowledgeMinerRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableParanetOperatorRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableProposalVoterRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getEffectiveNeuroEmissionMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNeuroBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNeuroEmissionMultipliers","outputs":[{"components":[{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bool","name":"finalized","type":"bool"}],"internalType":"struct ParanetStructs.NeuroEmissionMultiplier[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalAllKnowledgeMinersIncentiveEstimation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalAllProposalVotersIncentiveEstimation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalKnowledgeMinerIncentiveEstimation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalParanetOperatorIncentiveEstimation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalProposalVoterIncentiveEstimation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"voterAddress","type":"address"}],"name":"getVoter","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint96","name":"weight","type":"uint96"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"internalType":"struct ParanetStructs.ParanetIncentivizationProposalVoter","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVoters","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint96","name":"weight","type":"uint96"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"internalType":"struct ParanetStructs.ParanetIncentivizationProposalVoter[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVotersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract HubV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMultiplier","type":"uint256"}],"name":"initiateNeuroEmissionMultiplierUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isKnowledgeMiner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isParanetOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isProposalVoter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minerAddress","type":"address"}],"name":"minerClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"neuroEmissionMultiplierUpdateDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"neuroEmissionMultipliers","outputs":[{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bool","name":"finalized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operatorAddress","type":"address"}],"name":"operatorClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetIncentivizationProposalVotersRewardPercentage","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetKnowledgeMinersRegistry","outputs":[{"internalType":"contract ParanetKnowledgeMinersRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetOperatorRewardPercentage","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetsRegistry","outputs":[{"internalType":"contract ParanetsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"parentParanetId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"removeVoters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalMinersClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalNeuroReceived","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalOperatorsClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVotersClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newRegistrar","type":"address"}],"name":"transferVotersRegistrarRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDelay","type":"uint256"}],"name":"updateNeuroEmissionMultiplierUpdateDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"voterAddress","type":"address"}],"name":"voterClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"voters","outputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint96","name":"weight","type":"uint96"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"votersIndexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votersRegistrar","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]')},684:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"addedKnowledgeValue","type":"uint96"}],"name":"addCumulativeKnowledgeValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes","name":"nodeId","type":"bytes"}],"name":"addCuratedNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"}],"name":"addKnowledgeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"knowledgeMinerAddress","type":"address"}],"name":"addKnowledgeMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"addKnowledgeMinerAccessRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"addNodeJoinRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"serviceId","type":"bytes32"}],"name":"addService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"deleteParanet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getAllIncentivesPools","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"internalType":"struct UnorderedNamedContractDynamicSetStructs.Contract[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getCumulativeKnowledgeValue","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getCuratedNodes","outputs":[{"components":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes","name":"nodeId","type":"bytes"}],"internalType":"struct ParanetStructs.Node[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getCuratedNodesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"incentivesPoolType","type":"string"}],"name":"getIncentivesPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getKnowledgeAssets","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getKnowledgeAssetsAccessPolicy","outputs":[{"internalType":"enum ParanetStructs.KnowledgeAssetsAccessPolicy","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getKnowledgeAssetsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getKnowledgeAssetsStartingFromKnowledgeAssetId","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getKnowledgeAssetsWithPagination","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getKnowledgeMinerAccessRequest","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetKnowledgeMinerAccessRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"getKnowledgeMinerAccessRequests","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetKnowledgeMinerAccessRequest[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"getKnowledgeMinerAccessRequestsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getKnowledgeMiners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getKnowledgeMinersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"getLatestKnowledgeMinerAccessRequest","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetKnowledgeMinerAccessRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"getLatestNodeJoinRequest","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetNodeJoinRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getMinersAccessPolicy","outputs":[{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getNodeJoinRequest","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetNodeJoinRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"getNodeJoinRequests","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetNodeJoinRequest[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"getNodeJoinRequestsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getNodesAccessPolicy","outputs":[{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getParanetKnowledgeAssetLocator","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getParanetMetadata","outputs":[{"components":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"nodesAccessPolicy","type":"uint8"},{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"minersAccessPolicy","type":"uint8"},{"internalType":"enum ParanetStructs.KnowledgeAssetsAccessPolicy","name":"knowledgeAssetsAccessPolicy","type":"uint8"},{"internalType":"uint96","name":"cumulativeKnowledgeValue","type":"uint96"}],"internalType":"struct ParanetStructs.ParanetMetadata","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getServices","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getServicesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"incentivesPoolAddress","type":"address"}],"name":"hasIncentivesPoolByAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"incentivesPoolType","type":"string"}],"name":"hasIncentivesPoolByType","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract HubV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"isCuratedNode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"}],"name":"isKnowledgeAssetRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"knowledgeMinerAddress","type":"address"}],"name":"isKnowledgeMinerRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"serviceId","type":"bytes32"}],"name":"isServiceImplemented","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"paranetExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"paranetName","type":"string"},{"internalType":"string","name":"paranetDescription","type":"string"},{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"nodesAccessPolicy","type":"uint8"},{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"minersAccessPolicy","type":"uint8"},{"internalType":"enum ParanetStructs.KnowledgeAssetsAccessPolicy","name":"knowledgeAssetsAccessPolicy","type":"uint8"}],"name":"registerParanet","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"removeCuratedNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"incentivesPoolAddress","type":"address"}],"name":"removeIncentivesPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"incentivesPoolType","type":"string"}],"name":"removeIncentivesPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"}],"name":"removeKnowledgeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"knowledgeMinerAddress","type":"address"}],"name":"removeKnowledgeMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"removeKnowledgeMinerAccessRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"removeNodeJoinRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"serviceId","type":"bytes32"}],"name":"removeService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"cumulativeKnowledgeValue","type":"uint96"}],"name":"setCumulativeKnowledgeValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"incentivesPoolType","type":"string"},{"internalType":"address","name":"incentivesPoolAddress","type":"address"}],"name":"setIncentivesPoolAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"enum ParanetStructs.KnowledgeAssetsAccessPolicy","name":"knowledgeAssetsAccessPolicy","type":"uint8"}],"name":"setKnowledgeAssetsAccessPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"minersAccessPolicy","type":"uint8"}],"name":"setMinersAccessPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"name_","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"nodesAccessPolicy","type":"uint8"}],"name":"setNodesAccessPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"subtractedKnowledgeValue","type":"uint96"}],"name":"subCumulativeKnowledgeValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"incentivesPoolType","type":"string"},{"internalType":"address","name":"incentivesPoolAddress","type":"address"}],"name":"updateIncentivesPoolAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"updateKnowledgeMinerAccessRequestStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"updateNodeJoinRequestStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},6347:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"agreementV1Exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"agreementV1StorageAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"agreementV1U1Exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"agreementV1U1StorageAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"commitSubmissionExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"commitV1Exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"commitV1U1Exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint72","name":"prevIdentityId","type":"uint72"},{"internalType":"uint72","name":"nextIdentityId","type":"uint72"},{"internalType":"uint40","name":"score","type":"uint40"}],"name":"createV1CommitSubmissionObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint128","name":"epochLength","type":"uint128"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"},{"internalType":"uint8","name":"proofWindowOffsetPerc","type":"uint8"}],"name":"createV1ServiceAgreementObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint72","name":"prevIdentityId","type":"uint72"},{"internalType":"uint72","name":"nextIdentityId","type":"uint72"},{"internalType":"uint40","name":"score","type":"uint40"}],"name":"createV1U1CommitSubmissionObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint128","name":"epochLength","type":"uint128"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"},{"internalType":"uint8","name":"proofWindowOffsetPerc","type":"uint8"}],"name":"createV1U1ServiceAgreementObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"decrementAgreementRewardedNodesNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochStateId","type":"bytes32"}],"name":"decrementCommitsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"deleteAgreementRewardedNodesNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"deleteCommitSubmissionsObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochStateId","type":"bytes32"}],"name":"deleteCommitsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"deleteServiceAgreementObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"deleteServiceAgreementV1Object","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"deleteServiceAgreementV1U1Object","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"stateId","type":"bytes32"}],"name":"deleteUpdateCommitsDeadline","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementData","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint128","name":"epochLength","type":"uint128"},{"internalType":"uint96[2]","name":"tokens","type":"uint96[2]"},{"internalType":"uint8[2]","name":"scoreFunctionIdAndProofWindowOffsetPerc","type":"uint8[2]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementEpochLength","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementEpochsNumber","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementProofWindowOffsetPerc","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"getAgreementRewardedNodesNumber","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementScoreFunctionId","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementTokenAmount","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementUpdateTokenAmount","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"getCommitSubmission","outputs":[{"components":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint72","name":"prevIdentityId","type":"uint72"},{"internalType":"uint72","name":"nextIdentityId","type":"uint72"},{"internalType":"uint40","name":"score","type":"uint40"}],"internalType":"struct ServiceAgreementStructsV1.CommitSubmission","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"getCommitSubmissionIdentityId","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"getCommitSubmissionNextIdentityId","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"getCommitSubmissionPrevIdentityId","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"getCommitSubmissionScore","outputs":[{"internalType":"uint40","name":"","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochStateId","type":"bytes32"}],"name":"getCommitsCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"stateId","type":"bytes32"}],"name":"getUpdateCommitsDeadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"getV1AgreementEpochSubmissionHead","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"},{"internalType":"uint256","name":"stateIndex","type":"uint256"}],"name":"getV1U1AgreementEpochSubmissionHead","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"incrementAgreementRewardedNodesNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochStateId","type":"bytes32"}],"name":"incrementCommitsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"migrateV1ServiceAgreement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"serviceAgreementExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint128","name":"epochLength","type":"uint128"}],"name":"setAgreementEpochLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"}],"name":"setAgreementEpochsNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint8","name":"proofWindowOffsetPerc","type":"uint8"}],"name":"setAgreementProofWindowOffsetPerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"},{"internalType":"uint32","name":"rewardedNodesNumber","type":"uint32"}],"name":"setAgreementRewardedNodesNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint8","name":"newScoreFunctionId","type":"uint8"}],"name":"setAgreementScoreFunctionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"setAgreementStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"setAgreementTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"setAgreementUpdateTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"setCommitSubmissionIdentityId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint72","name":"nextIdentityId","type":"uint72"}],"name":"setCommitSubmissionNextIdentityId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint72","name":"prevIdentityId","type":"uint72"}],"name":"setCommitSubmissionPrevIdentityId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint40","name":"score","type":"uint40"}],"name":"setCommitSubmissionScore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochStateId","type":"bytes32"},{"internalType":"uint8","name":"epochStateCommitsCount","type":"uint8"}],"name":"setCommitsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"stateId","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"setUpdateCommitsDeadline","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"},{"internalType":"bytes32","name":"headCommitId","type":"bytes32"}],"name":"setV1AgreementEpochSubmissionHead","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"},{"internalType":"uint256","name":"stateIndex","type":"uint256"},{"internalType":"bytes32","name":"headCommitId","type":"bytes32"}],"name":"setV1U1AgreementEpochSubmissionHead","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"storageV1","outputs":[{"internalType":"contract ServiceAgreementStorageV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"storageV1U1","outputs":[{"internalType":"contract ServiceAgreementStorageV1U1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"transferAgreementTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"transferV1AgreementTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"transferV1U1AgreementTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},9033:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ScoreError","type":"error"},{"inputs":[{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"}],"name":"ScoreFunctionDoesntExist","type":"error"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TooLowAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TooLowBalance","type":"error"},{"inputs":[],"name":"ZeroEpochsNumber","type":"error"},{"inputs":[],"name":"ZeroTokenAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"keyword","type":"bytes"},{"indexed":false,"internalType":"uint8","name":"hashFunctionId","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"indexed":false,"internalType":"uint128","name":"epochLength","type":"uint128"},{"indexed":false,"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"ServiceAgreementV1Created","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"epochsNumber","type":"uint16"}],"name":"ServiceAgreementV1Extended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"indexed":false,"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"ServiceAgreementV1RewardRaised","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"ServiceAgreementV1Terminated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"indexed":false,"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"ServiceAgreementV1UpdateRewardRaised","type":"event"},{"inputs":[{"internalType":"address","name":"assetOwner","type":"address"},{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"addTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"assetOwner","type":"address"},{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"addUpdateTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"commitManagerV1","outputs":[{"internalType":"contract CommitManagerV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commitManagerV1U1","outputs":[{"internalType":"contract CommitManagerV1U1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"assetCreator","type":"address"},{"internalType":"address","name":"assetContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"keyword","type":"bytes"},{"internalType":"uint8","name":"hashFunctionId","type":"uint8"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"}],"internalType":"struct ServiceAgreementStructsV1.ServiceAgreementInputArgs","name":"args","type":"tuple"}],"name":"createServiceAgreement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"assetOwner","type":"address"},{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"extendStoringPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"assetContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"getChallenge","outputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint256","name":"challenge","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"getTopCommitSubmissions","outputs":[{"components":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint72","name":"prevIdentityId","type":"uint72"},{"internalType":"uint72","name":"nextIdentityId","type":"uint72"},{"internalType":"uint40","name":"score","type":"uint40"}],"internalType":"struct ServiceAgreementStructsV1.CommitSubmission[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hashingProxy","outputs":[{"internalType":"contract HashingProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"isCommitWindowOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"isProofWindowOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"parametersStorage","outputs":[{"internalType":"contract ParametersStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofManagerV1","outputs":[{"internalType":"contract ProofManagerV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofManagerV1U1","outputs":[{"internalType":"contract ProofManagerV1U1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"scoringProxy","outputs":[{"internalType":"contract ScoringProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"assetContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"keyword","type":"bytes"},{"internalType":"uint8","name":"hashFunctionId","type":"uint8"},{"internalType":"uint16","name":"epoch","type":"uint16"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes32","name":"chunkHash","type":"bytes32"}],"internalType":"struct ServiceAgreementStructsV1.ProofInputArgs","name":"args","type":"tuple"}],"name":"sendProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"serviceAgreementStorageProxy","outputs":[{"internalType":"contract ServiceAgreementStorageProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"status","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"assetContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"keyword","type":"bytes"},{"internalType":"uint8","name":"hashFunctionId","type":"uint8"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"internalType":"struct ServiceAgreementStructsV1.CommitInputArgs","name":"args","type":"tuple"}],"name":"submitCommit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"assetOwner","type":"address"},{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"terminateAgreement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},2914:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"tokenSymbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"setupRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]')},3738:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"deleteIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"deleteUnfinalizedState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getIssuer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getUnfinalizedState","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"hasPendingUpdate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"issuer","type":"address"}],"name":"setIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"state","type":"bytes32"}],"name":"setUnfinalizedState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.amdO={},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n=r(5237);DKG=n})(); \ No newline at end of file +var DKG;(()=>{var e={9660:e=>{const t={PUBLIC:"public",PRIVATE:"private",ALL:"all"},r={N_QUADS:"n-quads",JSON_LD:"json-ld"},n={LATEST:"LATEST",FINALIZED:"LATEST_FINALIZED"},i={PUBLIC_KG:"PUBLIC_KG",LOCAL_KG:"LOCAL_KG"},o={CURRENT:"CURRENT",HISTORICAL:"HISTORICAL"},a={ENVIRONMENT:"mainnet",PORT:8900,FREQUENCY:5,MAX_NUMBER_OF_RETRIES:5,HASH_FUNCTION_ID:1,IMMUTABLE:!1,VALIDATE:!0,OUTPUT_FORMAT:r.JSON_LD,STATE:n.LATEST,CONTENT_TYPE:t.PUBLIC,GRAPH_LOCATION:i.LOCAL_KG,GRAPH_STATE:o.CURRENT,HANDLE_NOT_MINED_ERROR:!1,SIMULATE_TXS:!1,FORCE_REPLACE_TXS:!1,GAS_LIMIT_MULTIPLIER:1,GAS_PRICE_MULTIPLIER:1},s="high",u=["low","med",s,"all"];e.exports={MAX_FILE_SIZE:2621440,DID_PREFIX:"did:dkg",PRIVATE_ASSERTION_PREDICATE:"https://ontology.origintrail.io/dkg/1.0#privateAssertionID",ZERO_ADDRESS:"0x0000000000000000000000000000000000000000",BLOCKCHAINS:{development:{"hardhat1:31337":{rpc:"http://localhost:8545",hubContract:"0x5FbDB2315678afecb367f032d93F642f64180aa3"},"hardhat2:31337":{rpc:"http://localhost:9545",hubContract:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}},devnet:{},stabledevnet_staging:{"base:84532":{hubContract:"0xAB4A4794Fc1F415C24807B947280aCa8dC492238",rpc:"https://sepolia.base.org"}},stabledevnet_prod:{"base:84532":{hubContract:"0xaA849CAC4FA86f6b7484503f3c7a314772AED6d4",rpc:"https://sepolia.base.org"}},testnet:{"base:84532":{hubContract:"0xCca0eA14540588A09c85cD6A6Fc53eA3A7010692",rpc:"https://sepolia.base.org"}},mainnet:{}},BLOCKCHAINS_RENAME_PAIRS:{hardhat1:"hardhat1:31337",hardhat2:"hardhat2:31337","otp::devnet":"otp:2160","otp::testnet":"otp:20430","otp::mainnet":"otp:2043"},MAX_BLOCKCHAIN_CALL_RETRIES:3,TRANSACTION_RETRY_ERRORS:["transaction was not mined","already known","replacement transaction underpriced"],WEBSOCKET_PROVIDER_OPTIONS:{reconnect:{auto:!0,delay:1e3,maxAttempts:3},clientConfig:{keepalive:!0,keepaliveInterval:3e4}},OPERATIONS:{PUBLISH:"publish",GET:"get",LOCAL_STORE:"local-store",QUERY:"query",PUBLISH_PARANET:"publishParanet"},OPERATION_STATUSES:{PENDING:"PENDING",COMPLETED:"COMPLETED",FAILED:"FAILED"},ASSERTION_STATES:{LATEST:"latest",LATEST_FINALIZED:"latest_finalized"},CONTENT_TYPES:t,GET_OUTPUT_FORMATS:r,INCENTIVE_TYPE:{NEUROWEB:"Neuroweb"},ASSET_STATES:n,STORE_TYPES:{TRIPLE:"TRIPLE",TRIPLE_PARANET:"TRIPLE_PARANET",PENDING:"PENDING"},GRAPH_LOCATIONS:i,GRAPH_STATES:o,OT_NODE_TRIPLE_STORE_REPOSITORIES:{PUBLIC_CURRENT:"publicCurrent",PUBLIC_HISTORY:"publicHistory",PRIVATE_CURRENT:"privateCurrent",PRIVATE_HISTORY:"privateHistory"},QUERY_TYPES:{CONSTRUCT:"CONSTRUCT",SELECT:"SELECT"},OPERATIONS_STEP_STATUS:{INCREASE_ALLOWANCE_COMPLETED:"INCREASE_ALLOWANCE_COMPLETED",CREATE_ASSET_COMPLETED:"CREATE_ASSET_COMPLETED",NETWORK_PUBLISH_COMPLETED:"NETWORK_PUBLISH_COMPLETED"},DEFAULT_GET_LOCAL_STORE_RESULT_FREQUENCY:.5,DEFAULT_PROXIMITY_SCORE_FUNCTIONS_PAIR_IDS:{development:{"hardhat1:31337":2,"hardhat2:31337":2,"otp:2043":2},devnet:{"otp:2160":2,"gnosis:10200":2,"base:84532":2},stabledevnet_staging:{"base:84532":2},stabledevnet_prod:{"base:84532":2},testnet:{"otp:20430":2,"gnosis:10200":2,"base:84532":2},mainnet:{"otp:2043":2,"gnosis:100":2,"base:8453":2}},DEFAULT_NEUROWEB_FINALITY_PARAMETERS:{WAIT_NEUROWEB_TX_FINALIZATION:!1,TX_FINALITY_POLLING_INTERVAL:6e3,TX_FINALITY_MAX_WAIT_TIME:6e4,TX_REMINING_POLLING_INTERVAL:6e3,TX_REMINING_MAX_WAIT_TIME:6e4},DEFAULT_PARAMETERS:a,DEFAULT_GAS_PRICE:{GNOSIS:"20",OTP:"1"},LOW_BID_SUGGESTION:"low",MED_BID_SUGGESTION:"med",HIGH_BID_SUGGESTION:s,ALL_BID_SUGGESTION:"all",BID_SUGGESTION_RANGE_ENUM:u,PARANET_NODES_ACCESS_POLICY:{OPEN:0,CURATED:1},PARANET_MINERS_ACCESS_POLICY:{OPEN:0,CURATED:1},PARANET_KNOWLEDGE_ASSET_ACCESS_POLICY:{OPEN:0}}},5237:(e,t,r)=>{const n=r(4171),i=r(4131),o=r(2675),a=r(5495),s=r(9993),u=r(6286),c=r(1112),l=r(7109);e.exports=class{constructor(e){const t=new l(e).getServices();this.assertion=new n(t),this.asset=new i(t),this.blockchain=new o(t),this.node=new u(t),this.graph=new a(t),this.network=new s(t),this.paranet=new c(t)}}},4171:(e,t,r)=>{const{assertionMetadata:n,calculateRoot:i,formatGraph:o}=r(8121);e.exports=class{constructor(e){this.nodeApiService=e.nodeApiService,this.inputService=e.inputService}async formatGraph(e){return o(e)}async getPublicAssertionId(e){const t=await o(e);return i(t.public)}async getSizeInBytes(e){const t=await o(e);return n.getAssertionSizeInBytes(t.public)}async getTriplesNumber(e){const t=await o(e);return n.getAssertionTriplesNumber(t.public)}async getChunksNumber(e){const t=await o(e);return n.getAssertionChunksNumber(t.public)}}},4131:(e,t,r)=>{const{assertionMetadata:n,calculateRoot:i,formatGraph:o}=r(8121),{ethers:a,ZeroHash:s}=r(4193),{deriveUAL:u,getOperationStatusObject:c,resolveUAL:l,toNQuads:f,toJSONLD:d}=r(6458),{ASSET_STATES:h,CONTENT_TYPES:p,OPERATIONS:y,OPERATIONS_STEP_STATUS:m,GET_OUTPUT_FORMATS:g,OPERATION_STATUSES:b,DEFAULT_GET_LOCAL_STORE_RESULT_FREQUENCY:v,PRIVATE_ASSERTION_PREDICATE:w,STORE_TYPES:A,QUERY_TYPES:k,OT_NODE_TRIPLE_STORE_REPOSITORIES:E,ZERO_ADDRESS:S}=r(9660),x=r(2974);e.exports=class{constructor(e){this.nodeApiService=e.nodeApiService,this.validationService=e.validationService,this.blockchainService=e.blockchainService,this.inputService=e.inputService}async isValidUAL(e,t={}){if("string"!=typeof e||""===e.trim())throw new Error("UAL must be a non-empty string.");const r=this.inputService.getBlockchain(t);this.validationService.validateIsValidUAL(r);const n=e.split("/");if(3!==n.length)throw new Error("UAL format is incorrect.");const i=n[0].split(":");if(3!==i.length&&4!==i.length)throw new Error("Prefix format in UAL is incorrect.");if("did"!==i[0])throw new Error(`Invalid DID prefix. Expected: 'did'. Received: '${i[0]}'.`);if("dkg"!==i[1])throw new Error(`Invalid DKG prefix. Expected: 'dkg'. Received: '${i[1]}'.`);if(i[2]!==r.name.split(":")[0])throw new Error(`Invalid blockchain name in the UAL prefix. Expected: '${r.name.split(":")[0]}'. Received: '${i[2]}'.`);if(4===i.length){const e=await this.blockchainService.getChainId(r);if(Number(i[3])!==e)throw new Error(`Chain ID in UAL does not match the blockchain. Expected: '${e}'. Received: '${i[3]}'.`)}const o=await this.blockchainService.getContractAddress("ContentAssetStorage",r);if(n[1].toLowerCase()!==o.toLowerCase())throw new Error(`Contract address in UAL does not match. Expected: '${o}'. Received: '${n[1]}'.`);try{const e=await this.blockchainService.getAssetOwner(n[2],r);if(!e||e===S)throw new Error("Token does not exist or has no owner.");return!0}catch(e){throw new Error(`Error fetching asset owner: ${e.message}`)}}async setAllowance(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateSetAllowance(r);const n=await this.blockchainService.getContractAddress("ServiceAgreementV1",r),i=e-BigInt(await this.blockchainService.callContractFunction("Token","allowance",[r.publicKey,n],r));let o;return i>0?o=await this.blockchainService.executeContractFunction("Token","increaseAllowance",[n,i],r):i<0&&(o=await this.blockchainService.executeContractFunction("Token","decreaseAllowance",[n,-i],r)),o?{operation:o,transactionHash:o.transactionHash,status:o.status}:{status:"Skipped: Allowance is already equal to the requested amount."}}async increaseAllowance(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateIncreaseAllowance(r);const n=await this.blockchainService.getContractAddress("ServiceAgreementV1",r),i=await this.blockchainService.executeContractFunction("Token","increaseAllowance",[n,e],r);return{operation:i,transactionHash:i.transactionHash,status:i.status}}async decreaseAllowance(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateDecreaseAllowance(r);const n=await this.blockchainService.getContractAddress("ServiceAgreementV1",r),i=await this.blockchainService.callContractFunction("Token","allowance",[r.publicKey,n],r),o=await this.blockchainService.executeContractFunction("Token","decreaseAllowance",[n,BigInt(e)>BigInt(i)?i:e],r);return{operation:o,transactionHash:o.transactionHash,status:o.status}}async getCurrentAllowance(e={}){const t=this.inputService.getBlockchain(e),r=await this.blockchainService.getContractAddress("ServiceAgreementV1",t),n=await this.blockchainService.callContractFunction("Token","allowance",[t.publicKey,r],t);return BigInt(n)}async create(e,t={},r=x){this.validationService.validateObjectType(e);let a={};e.public||e.private?a=e:a.public=e;const{blockchain:s,endpoint:f,port:d,maxNumberOfRetries:h,frequency:p,epochsNum:g,hashFunctionId:w,scoreFunctionId:k,immutable:E,tokenAmount:S,authToken:_,paranetUAL:P}=this.inputService.getAssetCreateArguments(t);this.validationService.validateAssetCreate(a,s,f,d,h,p,g,w,k,E,S,_,P);const{public:T,private:I}=await o(a),O=n.getAssertionSizeInBytes(T);this.validationService.validateAssertionSizeInBytes(O+(void 0===I?0:n.getAssertionSizeInBytes(I)));const B=i(T),C=await this.blockchainService.getContractAddress("ContentAssetStorage",s),N=S??await this.nodeApiService.getBidSuggestion(f,d,_,s.name,g,O,C,B,w);let R,M;if(null==P)({tokenId:R,receipt:M}=await this.blockchainService.createAsset({publicAssertionId:B,assertionSize:O,triplesNumber:n.getAssertionTriplesNumber(T),chunksNumber:n.getAssertionChunksNumber(T),epochsNum:g,tokenAmount:N,scoreFunctionId:k??1,immutable_:E},null,null,s,r));else{const{contract:e,tokenId:t}=l(P);({tokenId:R,receipt:M}=await this.blockchainService.createAsset({publicAssertionId:B,assertionSize:O,triplesNumber:n.getAssertionTriplesNumber(T),chunksNumber:n.getAssertionChunksNumber(T),epochsNum:g,tokenAmount:N,scoreFunctionId:k??1,immutable_:E},e,t,s,r))}const U={blockchain:s.name,contract:C,tokenId:R},L=[{...U,assertionId:B,assertion:T,storeType:A.TRIPLE}];I?.length&&L.push({...U,assertionId:i(I),assertion:I,storeType:A.TRIPLE});const j=u(s.name,C,R),F=await this.nodeApiService.publish(f,d,_,B,T,s.name,C,R,w),D=await this.nodeApiService.getOperationResult(f,d,_,y.PUBLISH,h,p,F);if(D.status===b.FAILED)return{UAL:j,assertionId:B,operation:{mintKnowledgeAsset:M,publish:c(D,F)}};const H=await this.nodeApiService.localStore(f,d,_,L),z=await this.nodeApiService.getOperationResult(f,d,_,y.LOCAL_STORE,h,v,H);return r.afterHook({status:m.CREATE_ASSET_COMPLETED,data:{localStoreOperationId:H,localStoreOperationResult:z}}),{UAL:j,publicAssertionId:B,operation:{mintKnowledgeAsset:M,publish:c(D,F),localStore:c(z,H)}}}async get(e,t={}){const{blockchain:r,endpoint:n,port:o,maxNumberOfRetries:a,frequency:u,state:m,contentType:b,validate:v,outputFormat:A,authToken:S,hashFunctionId:x,paranetUAL:_}=this.inputService.getAssetGetArguments(t);this.validationService.validateAssetGet(e,r,n,o,a,u,m,b,x,v,A,S);const{tokenId:P}=l(e);let T,I=!1;if(m===h.LATEST){const e=await this.blockchainService.getUnfinalizedState(P,r);null!=e&&e!==s&&(T=e,I=!1)}let O=[];const B=Object.values(h).includes(m);if(!T)if(O=await this.blockchainService.getAssertionIds(P,r),B)T=O[O.length-1],I=!0;else if("number"==typeof m){if(m>=O.length)throw new Error("State index is out of range.");T=O[m],m===O.length-1&&(I=!0)}else{if(!O.includes(m))throw new Error("Incorrect state option.");T=m,m===O[O.length-1]&&(I=!0)}const C=await this.nodeApiService.get(n,o,S,e,B?m:T,x,_),N=await this.nodeApiService.getOperationResult(n,o,S,y.GET,a,u,C);if(!N.data.assertion)return"FAILED"!==N.status&&(N.data={errorType:"DKG_CLIENT_ERROR",errorMessage:"Unable to find assertion on the network!"},N.status="FAILED"),{operation:{publicGet:c(N,C)}};const{assertion:R}=N.data;let{privateAssertion:M}=N.data;!0===v&&i(R)!==T&&(N.data={errorType:"DKG_CLIENT_ERROR",errorMessage:"Calculated root hashes don't match!"});let U={operation:{}};if(_){U.operation.publicGet=c(N,C);const e=await d(R.join("\n"));if(U.public={assertion:e,assertionId:T},M){const e=await d(M.join("\n"));U.private={assertion:e,assertionId:N.data.privateAssertionId}}return U}if(b!==p.PRIVATE){let e=R;try{e=A!==g.N_QUADS?await d(R.join("\n")):R.join("\n")}catch(e){N.data={errorType:"DKG_CLIENT_ERROR",errorMessage:e.message}}b===p.PUBLIC?U={...U,assertion:e,assertionId:T}:U.public={assertion:e,assertionId:T},U.operation.publicGet=c(N,C)}if(b!==p.PUBLIC){const e=R.filter((e=>e.includes(w))),t=e.length>0?e[0]:null;let r,s={};if(t){const e=t.match(/"(.*?)"/)[1];if(N?.data?.privateAssertion?.length)M=N.data.privateAssertion;else{const t=`\n CONSTRUCT { ?s ?p ?o }\n WHERE {\n {\n GRAPH \n {\n ?s ?p ?o .\n }\n }\n }`;r=await this.nodeApiService.query(n,o,S,t,k.CONSTRUCT,I?E.PRIVATE_CURRENT:E.PRIVATE_HISTORY),s=await this.nodeApiService.getOperationResult(n,o,S,y.QUERY,a,u,r);const i=s.data;M=await f(i,"application/n-quads")}let l;M.length&&!0===v&&i(M)!==e&&(s.data={errorType:"DKG_CLIENT_ERROR",errorMessage:"Calculated root hashes don't match!"});try{l=A!==g.N_QUADS?await d(M.join("\n")):M.join("\n")}catch(e){s.data={errorType:"DKG_CLIENT_ERROR",errorMessage:e.message}}b===p.PRIVATE?U={...U,assertion:l,assertionId:e}:U.private={assertion:l,assertionId:e},r&&(U.operation.queryPrivate=c(s,r))}}return U}async transfer(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateAssetTransfer(e,t,n);const{tokenId:i}=l(e),o=await this.blockchainService.transferAsset(i,t,n);return{UAL:e,owner:await this.blockchainService.getAssetOwner(i,n),operation:o}}async getOwner(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateAssetGetOwner(e,r);const{tokenId:n}=l(e);return{UAL:e,owner:await this.blockchainService.getAssetOwner(n,r),operation:c({data:{},status:"COMPLETED"},null)}}async getStateIssuer(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateAssetGetStateIssuer(e,t,n);const{tokenId:i}=l(e),o=await this.blockchainService.getAssertionIdByIndex(i,t,n);return{UAL:e,issuer:await this.blockchainService.getAssertionIssuer(i,o,t,n),state:o,operation:c({data:{},status:"COMPLETED"},null)}}async getLatestStateIssuer(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateAssetGetLatestStateIssuer(e,r);const{tokenId:n}=l(e),i=await this.blockchainService.getAssertionIds(n,r),o=i.length-1,a=i[o];return{UAL:e,issuer:await this.blockchainService.getAssertionIssuer(n,a,o,r),latestState:a,operation:c({data:{},status:"COMPLETED"},null)}}async getStates(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateAssetGetStates(e,r);const{tokenId:n}=l(e);return{UAL:e,states:await this.blockchainService.getAssertionIds(n,r),operation:c({data:{},status:"COMPLETED"},null)}}async burn(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateAssetBurn(e,r);const{tokenId:n}=l(e);return{UAL:e,operation:await this.blockchainService.burnAsset(n,r)}}async extendStoringPeriod(e,t,r={}){const n=this.inputService.getBlockchain(r),i=this.inputService.getTokenAmount(r);this.validationService.validateExtendAssetStoringPeriod(e,t,i,n);const{tokenId:o,contract:a}=l(e);let s;if(null!=i)s=i;else{const e=this.inputService.getEndpoint(r),i=this.inputService.getPort(r),u=this.inputService.getAuthToken(r),c=this.inputService.getHashFunctionId(r),l=await this.blockchainService.getLatestAssertionId(o,n),f=await this.blockchainService.getAssertionSize(l,n);s=await this.nodeApiService.getBidSuggestion(e,i,u,n.name,t,f,a,l,c)}return{UAL:e,operation:await this.blockchainService.extendAssetStoringPeriod(o,t,s,n)}}async addTokens(e,t={}){const r=this.inputService.getBlockchain(t),n=this.inputService.getTokenAmount(t);this.validationService.validateAddTokens(e,n,r);const{tokenId:i}=l(e);let o;if(null!=n)o=n;else{const n=this.inputService.getEndpoint(t),a=this.inputService.getPort(t),s=this.inputService.getAuthToken(t),u=this.inputService.getHashFunctionId(t),c=await this.blockchainService.getLatestAssertionId(i,r),l=await this.blockchainService.getAssertionSize(c,r);if(o=await this._getUpdateBidSuggestion(e,r,n,a,s,c,l,u),o<=0)throw new Error("Token amount is bigger than default suggested amount, please specify exact tokenAmount if you still want to add more tokens!")}return{UAL:e,operation:await this.blockchainService.addTokens(i,o,r)}}async _getUpdateBidSuggestion(e,t,r,n,i,o,s,u){const{contract:c,tokenId:f}=l(e),d=await this.blockchainService.getAssertionIdByIndex(f,0,t),h=a.solidityPacked(["address","bytes32"],[c,d]),p=a.sha256(a.solidityPacked(["address","uint256","bytes"],[c,f,h])),y=await this.blockchainService.getAgreementData(p,t),m=await this.blockchainService.getBlockchainTimestamp(t),g=Math.floor((m-y.startTime)/y.epochLength),b=y.epochsNumber-g,v=await this.nodeApiService.getBidSuggestion(r,n,i,t.name,b,s,c,o,u),w=BigInt(v)-(BigInt(y.tokenAmount)+BigInt(y.updateTokenAmount??0));return w>0?w:0}async submitToParanet(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateSubmitToParanet(e,t,n);const{contract:i,tokenId:o}=l(e),{contract:a,tokenId:s}=l(t);return{UAL:e,operation:await this.blockchainService.submitToParanet({paranetContract:a,paranetTokenId:s,contract:i,tokenId:o},n)}}async localStore(e,t={},r=x){this.validationService.validateObjectType(e);const{blockchain:a,endpoint:s,port:f,maxNumberOfRetries:d,frequency:h,epochsNum:p,hashFunctionId:m,scoreFunctionId:g,immutable:w,tokenAmount:k,authToken:E,paranetUAL:S}=this.inputService.getAssetCreateArguments(t);this.validationService.validateAssetCreate(e,a,s,f,d,h,p,m,g,w,k,E,S);const{public:_,private:P}=await o(e),T=n.getAssertionSizeInBytes(_);this.validationService.validateAssertionSizeInBytes(T+(void 0===P?0:n.getAssertionSizeInBytes(P)));const I=i(_),O=await this.blockchainService.getContractAddress("ContentAssetStorage",a),B=k??await this.nodeApiService.getBidSuggestion(s,f,E,a.name,p,T,O,I,m),{tokenId:C,receipt:N}=await this.blockchainService.createAsset({publicAssertionId:I,assertionSize:T,triplesNumber:n.getAssertionTriplesNumber(_),chunksNumber:n.getAssertionChunksNumber(_),epochsNum:p,tokenAmount:B,scoreFunctionId:g??1,immutable_:w},null,null,a,r),R={blockchain:a.name,contract:O,tokenId:C},M=[{...R,assertionId:I,assertion:_,storeType:A.TRIPLE_PARANET,paranetUAL:S}];P?.length&&M.push({...R,assertionId:i(P),assertion:P,storeType:A.TRIPLE_PARANET,paranetUAL:S});const U=u(a.name,O,C),L=await this.nodeApiService.localStore(s,f,E,M),j=await this.nodeApiService.getOperationResult(s,f,E,y.LOCAL_STORE,d,v,L);if(j.status===b.FAILED)return{UAL:U,assertionId:I,operation:{mintKnowledgeAsset:N,localStore:c(j,L)}};const{contract:F,tokenId:D}=l(S),H=await this.blockchainService.submitToParanet({paranetContract:F,paranetTokenId:D,contentAssetStorageAddress:O,tokenId:C},a);return{UAL:U,publicAssertionId:I,operation:{mintKnowledgeAsset:N,localStore:c(j,L),submitToParanet:H}}}}},2675:e=>{e.exports=class{constructor(e){this.blockchainService=e.blockchainService,this.inputService=e.inputService}async getChainId(e={}){const t=this.inputService.getBlockchain(e);return this.blockchainService.getChainId(t)}async getGasPrice(e={}){const t=this.inputService.getBlockchain(e);return this.blockchainService.getGasPrice(t)}async getWalletBalances(e={}){const t=this.inputService.getBlockchain(e);return this.blockchainService.getWalletBalances(t)}}},5495:(e,t,r)=>{const{OPERATIONS:n}=r(9660),{deriveRepository:i}=r(6458);e.exports=class{constructor(e){this.nodeApiService=e.nodeApiService,this.validationService=e.validationService,this.inputService=e.inputService}async query(e,t,r={}){const{graphLocation:o,graphState:a,endpoint:s,port:u,maxNumberOfRetries:c,frequency:l,authToken:f,paranetUAL:d}=this.inputService.getQueryArguments(r);this.validationService.validateGraphQuery(e,t,o,a,s,u,c,l,f);const h=d??i(o,a),p=await this.nodeApiService.query(s,u,f,e,t,h);return this.nodeApiService.getOperationResult(s,u,f,n.QUERY,c,l,p)}}},9993:e=>{e.exports=class{constructor(e){this.inputService=e.inputService,this.blockchainService=e.blockchainService,this.nodeApiService=e.nodeApiService}async getBidSuggestion(e,t,r={}){const{blockchain:n,endpoint:i,port:o,epochsNum:a,hashFunctionId:s,authToken:u,bidSuggestionRange:c}=this.inputService.getBidSuggestionArguments(r),l=await this.blockchainService.getContractAddress("ContentAssetStorage",n),f=await this.nodeApiService.getBidSuggestion(i,o,u,n.name,a,t,l,e,s,c);return"string"==typeof f?BigInt(f):f}}},6286:e=>{e.exports=class{constructor(e){this.nodeApiService=e.nodeApiService,this.inputService=e.inputService,this.validationService=e.validationService,this.blockchainService=e.blockchainService}async info(e={}){const t=this.inputService.getEndpoint(e),r=this.inputService.getPort(e),n=this.inputService.getAuthToken(e);return(await this.nodeApiService.info(t,r,n)).data}async getIdentityId(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateGetIdentityId(e,r);return await this.blockchainService.getIdentityId(e,r)}}},1112:(e,t,r)=>{const{ethers:n}=r(4193),{resolveUAL:i}=r(6458),{INCENTIVE_TYPE:o}=r(9660);e.exports=class{constructor(e){this.blockchainService=e.blockchainService,this.inputService=e.inputService,this.nodeApiService=e.nodeApiService,this.validationService=e.validationService}async create(e,t={}){const{blockchain:r,paranetName:n,paranetDescription:o,paranetNodesAccessPolicy:a,paranetMinersAccessPolicy:s}=this.inputService.getParanetCreateArguments(t);this.validationService.validateParanetCreate(e,r,n,o,a,s);const{contract:u,tokenId:c}=i(e);return{paranetUAL:e,operation:await this.blockchainService.registerParanet({contract:u,tokenId:c,paranetName:n,paranetDescription:o,paranetNodesAccessPolicy:a,paranetMinersAccessPolicy:s},r)}}async addCuratedNodes(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateParanetAddCuratedNodes(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.addParanetCuratedNodes({contract:o,tokenId:a,identityIds:t},n)}async removeCuratedNodes(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateParanetRemoveCuratedNodes(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.removeParanetCuratedNodes({contract:o,tokenId:a,identityIds:t},n)}async requestCuratedNodeAccess(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateRequestParanetCuratedNodeAccess(e,r);const{contract:n,tokenId:o}=i(e);await this.blockchainService.requestParanetCuratedNodeAccess({contract:n,tokenId:o},r)}async approveCuratedNode(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateApproveCuratedNode(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.approveCuratedNode({contract:o,tokenId:a,identityId:t},n)}async rejectCuratedNode(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateRejectCuratedNode(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.rejectCuratedNode({contract:o,tokenId:a,identityId:t},n)}async getCuratedNodes(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateGetCuratedNodes(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getCuratedNodes({paranetId:s},r)}async addCuratedMiners(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateParanetAddCuratedMiners(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.addParanetCuratedMiners({contract:o,tokenId:a,minerAddresses:t},n)}async removeCuratedMiners(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateParanetRemoveCuratedMiners(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.removeParanetCuratedMiners({contract:o,tokenId:a,minerAddresses:t},n)}async requestCuratedMinerAccess(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateRequestParanetCuratedMinerAccess(e,r);const{contract:n,tokenId:o}=i(e);await this.blockchainService.requestParanetCuratedMinerAccess({contract:n,tokenId:o},r)}async approveCuratedMiner(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateApproveCuratedMiner(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.approveCuratedMiner({contract:o,tokenId:a,minerAddress:t},n)}async rejectCuratedMiner(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateRejectCuratedMiner(e,n,t);const{contract:o,tokenId:a}=i(e);await this.blockchainService.rejectCuratedMiner({contract:o,tokenId:a,minerAddress:t},n)}async getKnowledgeMiners(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateGetParanetKnowledgeMiners(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getKnowledgeMiners({paranetId:s},r)}async deployIncentivesContract(e,t,r={}){const{blockchain:a,tracToNeuroEmissionMultiplier:s,operatorRewardPercentage:u,incentivizationProposalVotersRewardPercentage:c}=this.inputService.getParanetDeployIncentivesContractArguments(r);if(this.validationService.validateDeployIncentivesContract(e,a,s,u,c),t===o.NEUROWEB){const{contract:t,tokenId:r}=i(e),o=await this.blockchainService.deployNeuroIncentivesPool({contract:t,tokenId:r,tracToNeuroEmissionMultiplier:s,operatorRewardPercentage:u,incentivizationProposalVotersRewardPercentage:c},a),l=n.keccak256(n.solidityPacked(["address","uint256"],[t,r]));return{paranetUAL:e,incentivesPoolContractAddress:await this.blockchainService.getNeuroIncentivesPoolAddress(l,a),operation:o}}throw Error(`Unsupported incentive type: ${t}.`)}async createService(e,t={}){const{blockchain:r,paranetServiceName:n,paranetServiceDescription:o,paranetServiceAddresses:a}=this.inputService.getParanetCreateServiceArguments(t);this.validationService.validateParanetCreateServiceArguments(e,n,o,a,r);const{contract:s,tokenId:u}=i(e);return{serviceUAL:e,operation:await this.blockchainService.registerParanetService({contract:s,tokenId:u,paranetServiceName:n,paranetServiceDescription:o,paranetServiceAddresses:a},r)}}async addServices(e,t,r={}){const n=this.inputService.getBlockchain(r);this.validationService.validateParanetAddServicesArguments(e,t,n);const{contract:o,tokenId:a}=i(e),s=[];for(const e of t){const{contract:t,tokenId:r}=i(e);s.push([t,r])}return{paranetUAL:e,paranetServiceUALs:t,operation:await this.blockchainService.addParanetServices({contract:o,tokenId:a,processedServicesArray:s},n)}}async claimMinerReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a])),u=await this.blockchainService.claimKnowledgeMinerReward(s,r);return{operation:u,transactionHash:u.transactionHash,status:u.status}}async claimVoterReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a])),u=await this.blockchainService.claimVoterReward(s,r);return{operation:u,transactionHash:u.transactionHash,status:u.status}}async claimOperatorReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a])),u=await this.blockchainService.claimOperatorReward(s,r);return{operation:u,transactionHash:u.transactionHash,status:u.status}}async getClaimableMinerReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getClaimableKnowledgeMinerReward(s,r)}async getClaimableAllMinersReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getClaimableAllKnowledgeMinersReward(s,r)}async getClaimableVoterReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getClaimableVoterReward(s,r)}async getClaimableAllVotersReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getClaimableAllVotersReward(s,r)}async getClaimableOperatorReward(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a]));return await this.blockchainService.getClaimableOperatorReward(s,r)}async updateClaimableRewards(e,t={}){const r=this.inputService.getBlockchain(t);this.validationService.validateParanetRewardArguments(e,r);const{contract:o,tokenId:a}=i(e),s=n.keccak256(n.solidityPacked(["address","uint256"],[o,a])),u=await this.blockchainService.getUpdatingKnowledgeAssetStates({miner:r.publicKey,paranetId:s},r);if(u.length>0){const e=await this.blockchainService.updateClaimableRewards({contract:o,tokenId:a,start:0,end:u.length},r);return{operation:e,transactionHash:e.transactionHash,status:e.status}}return{status:"No updated knowledge assets."}}async isKnowledgeMiner(e,t={}){let{blockchain:r,roleAddress:o}=this.inputService.getParanetRoleCheckArguments(t);null==o&&(o=r.publicKey),this.validationService.validateParanetRoleCheckArguments(o,e,r);const{contract:a,tokenId:s}=i(e),u=n.keccak256(n.solidityPacked(["address","uint256"],[a,s]));return await this.blockchainService.isParanetKnowledgeMiner(o,u,r)}async isParanetOperator(e,t={}){let{blockchain:r,roleAddress:o}=this.inputService.getParanetRoleCheckArguments(t);null==o&&(o=r.publicKey),this.validationService.validateParanetRoleCheckArguments(o,e,r);const{contract:a,tokenId:s}=i(e),u=n.keccak256(n.solidityPacked(["address","uint256"],[a,s]));return await this.blockchainService.isParanetOperator(o,u,r)}async isProposalVoter(e,t={}){let{blockchain:r,roleAddress:o}=this.inputService.getParanetRoleCheckArguments(t);null==o&&(o=r.publicKey),this.validationService.validateParanetRoleCheckArguments(o,e,r);const{contract:a,tokenId:s}=i(e),u=n.keccak256(n.solidityPacked(["address","uint256"],[a,s]));return await this.blockchainService.isParanetProposalVoter(o,u,r)}}},2872:function(e){"use strict";!function(){function t(e){return parseInt(e)===e}function r(e){if(!t(e.length))return!1;for(var r=0;r255)return!1;return!0}function n(e,n){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return n&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(t(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function i(e){return new Uint8Array(e)}function o(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var a,s={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},u=(a="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+a[15&n])}return t.join("")}}),c={16:10,24:12,32:14},l=[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],f=[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],d=[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],h=[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],p=[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],y=[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],m=[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],g=[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],b=[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],v=[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],w=[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],A=[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],k=[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],E=[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],S=[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 x(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t];for(var a,s=0,u=i;u>16&255]<<24^f[a>>8&255]<<16^f[255&a]<<8^f[a>>24&255]^l[s]<<24,s+=1,8!=i)for(t=1;t>8&255]<<8^f[a>>16&255]<<16^f[a>>24&255]<<24;for(t=i/2+1;t>2,h=u%4,this._Ke[d][h]=o[t],this._Kd[e-d][h]=o[t++],u++}for(var d=1;d>24&255]^k[a>>16&255]^E[a>>8&255]^S[255&a]},_.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=x(e),o=0;o<4;o++)n[o]^=this._Ke[0][o];for(var a=1;a>24&255]^p[n[(o+1)%4]>>16&255]^y[n[(o+2)%4]>>8&255]^m[255&n[(o+3)%4]]^this._Ke[a][o];n=r.slice()}var s,u=i(16);for(o=0;o<4;o++)s=this._Ke[t][o],u[4*o]=255&(f[n[o]>>24&255]^s>>24),u[4*o+1]=255&(f[n[(o+1)%4]>>16&255]^s>>16),u[4*o+2]=255&(f[n[(o+2)%4]>>8&255]^s>>8),u[4*o+3]=255&(f[255&n[(o+3)%4]]^s);return u},_.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=x(e),o=0;o<4;o++)n[o]^=this._Kd[0][o];for(var a=1;a>24&255]^b[n[(o+3)%4]>>16&255]^v[n[(o+2)%4]>>8&255]^w[255&n[(o+1)%4]]^this._Kd[a][o];n=r.slice()}var s,u=i(16);for(o=0;o<4;o++)s=this._Kd[t][o],u[4*o]=255&(d[n[o]>>24&255]^s>>24),u[4*o+1]=255&(d[n[(o+3)%4]>>16&255]^s>>16),u[4*o+2]=255&(d[n[(o+2)%4]>>8&255]^s>>8),u[4*o+3]=255&(d[255&n[(o+1)%4]]^s);return u};var P=function(e){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new _(e)};P.prototype.encrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=i(e.length),r=i(16),a=0;a=0;--t)this._counter[t]=e%256,e>>=8},B.prototype.setBytes=function(e){if(16!=(e=n(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},B.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var C=function(e,t){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof B||(t=new B(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new _(e)};C.prototype.encrypt=function(e){for(var t=n(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,a=0;a{const n=r(4841);e.exports=async function(e,t){const r={algorithm:"URDNA2015",format:"application/n-quads"};t&&(r.inputFormat=t);const i=(await n.canonize(e,r)).split("\n").filter((e=>""!==e));if(i&&0===i.length)throw Error("File format is corrupted, no n-quads are extracted.");return i}},9803:e=>{e.exports={getAssertionSizeInBytes:function(e){const t=JSON.stringify(e);return(new TextEncoder).encode(t).length},getAssertionTriplesNumber:function(e){return e.length},getAssertionChunksNumber:function(e){return e.length}}},4598:(e,t,r)=>{const n=r(9283),{MerkleTree:i}=r(737),o=r(4102);e.exports=function(e){e.sort();const t=e.map(((e,t)=>o(n.utils.solidityPack(["bytes32","uint256"],[o(e),t]))));return`0x${new i(t,o,{sortPairs:!0}).getRoot().toString("hex")}`}},1456:e=>{e.exports="https://ontology.origintrail.io/dkg/1.0#privateAssertionID"},1907:(e,t,r)=>{const n=r(9283),{MerkleTree:i}=r(737),o=r(4102);e.exports=function(e,t){e.sort();const r=e.map(((e,t)=>o(n.utils.solidityPack(["bytes32","uint256"],[o(e),t])))),a=new i(r,o,{sortPairs:!0});return{leaf:o(e[t]),proof:a.getHexProof(r[t])}}},7065:(e,t,r)=>{const n=r(8325),i=r(4598),o=r(1456);function a(e){return 0===Object.keys(e).length&&e.constructor===Object}e.exports=async function(e){let t;e.private&&!a(e.private)&&(t=await n(e.private));const r={"@graph":[e.public&&!a(e.public)?e.public:null,e.private&&!a(e.private)?{[o]:t?i(t):null}:null]},s={public:await n(r)};return t&&(s.private=t),s}},8121:(e,t,r)=>{const n=r(9803),i=r(4598),o=r(8325),a=r(7065),s=r(1907),u=r(4205),c=r(4102);e.exports={calculateRoot:i,formatAssertion:o,formatGraph:a,getMerkleProof:s,peerId2Hash:u,keccak256:c,assertionMetadata:n}},4102:(e,t,r)=>{const n=r(9283);e.exports=function(e){let t=e;return n.utils.isBytesLike(e)||(t=n.utils.toUtf8Bytes(e)),n.utils.keccak256(t)}},9283:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseContract:()=>Rn,BigNumber:()=>W,Contract:()=>Mn,ContractFactory:()=>Un,FixedNumber:()=>Jn,Signer:()=>lr,VoidSigner:()=>fr,Wallet:()=>xo,Wordlist:()=>xi,constants:()=>i,errors:()=>m,ethers:()=>u,getDefaultProvider:()=>ku,logger:()=>$u,providers:()=>o,utils:()=>s,version:()=>Xu,wordlists:()=>Ii});var n={};r.r(n),r.d(n,{decode:()=>Pe,encode:()=>Se});var i={};r.r(i),r.d(i,{AddressZero:()=>To,EtherSymbol:()=>Oo,HashZero:()=>Io,MaxInt256:()=>mt,MaxUint256:()=>pt,MinInt256:()=>yt,NegativeOne:()=>ct,One:()=>ft,Two:()=>dt,WeiPerEther:()=>ht,Zero:()=>lt});var o={};r.r(o),r.d(o,{AlchemyProvider:()=>Ts,AlchemyWebSocketProvider:()=>Ps,AnkrProvider:()=>Cs,BaseProvider:()=>rs,CloudflareProvider:()=>Ms,EtherscanProvider:()=>qs,FallbackProvider:()=>ou,Formatter:()=>Ta,InfuraProvider:()=>lu,InfuraWebSocketProvider:()=>cu,IpcProvider:()=>au,JsonRpcBatchProvider:()=>fu,JsonRpcProvider:()=>ys,JsonRpcSigner:()=>ds,NodesmithProvider:()=>hu,PocketProvider:()=>mu,Provider:()=>or,Resolver:()=>$a,StaticJsonRpcProvider:()=>Es,UrlJsonRpcProvider:()=>Ss,Web3Provider:()=>wu,WebSocketProvider:()=>ws,getDefaultProvider:()=>ku,getNetwork:()=>jo,isCommunityResourcable:()=>Ia,isCommunityResource:()=>Oa,showThrottleMessage:()=>Ca});var a={};r.r(a),r.d(a,{decode:()=>Fo,encode:()=>Do});var s={};r.r(s),r.d(s,{AbiCoder:()=>Vt,ConstructorFragment:()=>Mt,ErrorFragment:()=>jt,EventFragment:()=>Bt,FormatTypes:()=>_t,Fragment:()=>Ot,FunctionFragment:()=>Ut,HDNode:()=>Di,Indexed:()=>Xt,Interface:()=>tr,LogDescription:()=>Qt,Logger:()=>b,ParamType:()=>Tt,RLP:()=>n,SigningKey:()=>$r,SupportedAlgorithm:()=>gi,TransactionDescription:()=>Zt,TransactionTypes:()=>nn,UnicodeNormalizationForm:()=>De,Utf8ErrorFuncs:()=>qe,Utf8ErrorReason:()=>He,_TypedDataEncoder:()=>pi,_fetchData:()=>Aa,_toEscapedUtf8String:()=>Je,accessListify:()=>hn,arrayify:()=>x,base58:()=>mi,base64:()=>a,checkProperties:()=>ie,checkResultErrors:()=>he,commify:()=>Ju,computeAddress:()=>cn,computeHmac:()=>ki,computePublicKey:()=>tn,concat:()=>_,deepCopy:()=>ce,defaultAbiCoder:()=>Jt,defaultPath:()=>Fi,defineReadOnly:()=>te,dnsEncode:()=>pa,entropyToMnemonic:()=>qi,fetchJson:()=>ka,formatBytes32String:()=>qu,formatEther:()=>Zu,formatUnits:()=>Wu,getAccountPath:()=>Ki,getAddress:()=>Re,getContractAddress:()=>Le,getCreate2Address:()=>je,getIcapAddress:()=>Ue,getJsonWalletAddress:()=>wo,getStatic:()=>re,hashMessage:()=>Yn,hexConcat:()=>R,hexDataLength:()=>C,hexDataSlice:()=>N,hexStripZeros:()=>U,hexValue:()=>M,hexZeroPad:()=>L,hexlify:()=>B,id:()=>Ye,isAddress:()=>Me,isBytes:()=>S,isBytesLike:()=>k,isHexString:()=>I,isValidMnemonic:()=>Gi,isValidName:()=>da,joinSignature:()=>F,keccak256:()=>ve,mnemonicToEntropy:()=>zi,mnemonicToSeed:()=>Hi,namehash:()=>ha,nameprep:()=>zu,parseBytes32String:()=>Gu,parseEther:()=>Yu,parseTransaction:()=>vn,parseUnits:()=>Qu,poll:()=>Ea,randomBytes:()=>Qi,recoverAddress:()=>ln,recoverPublicKey:()=>en,resolveProperties:()=>ne,ripemd160:()=>vi,serializeTransaction:()=>gn,sha256:()=>wi,sha512:()=>Ai,shallowCopy:()=>oe,shuffled:()=>Gs,solidityKeccak256:()=>Ou,solidityPack:()=>Iu,soliditySha256:()=>Bu,splitSignature:()=>j,stripZeros:()=>P,toUtf8Bytes:()=>Ke,toUtf8CodePoints:()=>Ze,toUtf8String:()=>Qe,verifyMessage:()=>_o,verifyTypedData:()=>Po,zeroPad:()=>T});var u={};r.r(u),r.d(u,{BaseContract:()=>Rn,BigNumber:()=>W,Contract:()=>Mn,ContractFactory:()=>Un,FixedNumber:()=>Jn,Signer:()=>lr,VoidSigner:()=>fr,Wallet:()=>xo,Wordlist:()=>xi,constants:()=>i,errors:()=>m,getDefaultProvider:()=>ku,logger:()=>$u,providers:()=>o,utils:()=>s,version:()=>Xu,wordlists:()=>Ii});let c=!1,l=!1;const f={debug:1,default:2,info:2,warning:3,error:4,off:5};let d=f.default,h=null;const p=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var y,m;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(y||(y={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(m||(m={}));const g="0123456789abcdef";class b{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==f[r]&&this.throwArgumentError("invalid log level name","logLevel",e),d>f[r]||console.log.apply(console,t)}debug(...e){this._log(b.levels.DEBUG,e)}info(...e){this._log(b.levels.INFO,e)}warn(...e){this._log(b.levels.WARNING,e)}makeError(e,t,r){if(l)return this.makeError("censored error",t,{});t||(t=b.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=g[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const i=e;let o="";switch(t){case m.NUMERIC_FAULT:{o="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":o+="-"+t;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case m.CALL_EXCEPTION:case m.INSUFFICIENT_FUNDS:case m.MISSING_NEW:case m.NONCE_EXPIRED:case m.REPLACEMENT_UNDERPRICED:case m.TRANSACTION_REPLACED:case m.UNPREDICTABLE_GAS_LIMIT:o=t}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const a=new Error(e);return a.reason=i,a.code=t,Object.keys(r).forEach((function(e){a[e]=r[e]})),a}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,b.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",b.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,b.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,b.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,b.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",b.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",b.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",b.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return h||(h=new b("logger/5.7.0")),h}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",b.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),c){if(!e)return;this.globalLogger().throwError("error censorship permanent",b.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}l=!!e,c=!!t}static setLogLevel(e){const t=f[e.toLowerCase()];null!=t?d=t:b.globalLogger().warn("invalid log level - "+e)}static from(e){return new b(e)}}b.errors=m,b.levels=y;const v=new b("bytes/5.7.0");function w(e){return!!e.toHexString}function A(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return A(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function k(e){return I(e)&&!(e.length%2)||S(e)}function E(e){return"number"==typeof e&&e==e&&e%1==0}function S(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!E(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function x(e,t){if(t||(t={}),"number"==typeof e){v.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),A(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),w(e)&&(e=e.toHexString()),I(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":v.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;ex(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),A(n)}function P(e){let t=x(e);if(0===t.length)return t;let r=0;for(;rt&&v.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),A(r)}function I(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}const O="0123456789abcdef";function B(e,t){if(t||(t={}),"number"==typeof e){v.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=O[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),w(e))return e.toHexString();if(I(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":v.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(S(e)){let t="0x";for(let r=0;r>4]+O[15&n]}return t}return v.throwArgumentError("invalid hexlify value","value",e)}function C(e){if("string"!=typeof e)e=B(e);else if(!I(e)||e.length%2)return null;return(e.length-2)/2}function N(e,t,r){return"string"!=typeof e?e=B(e):(!I(e)||e.length%2)&&v.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function R(e){let t="0x";return e.forEach((e=>{t+=B(e).substring(2)})),t}function M(e){const t=U(B(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function U(e){"string"!=typeof e&&(e=B(e)),I(e)||v.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t2*t+2&&v.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function j(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(k(e)){let r=x(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=B(r.slice(0,32)),t.s=B(r.slice(32,64))):65===r.length?(t.r=B(r.slice(0,32)),t.s=B(r.slice(32,64)),t.v=r[64]):v.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:v.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=B(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=T(x(t._vs),32);t._vs=B(r);const n=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=n:t.recoveryParam!==n&&v.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const i=B(r);null==t.s?t.s=i:t.s!==i&&v.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?v.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&v.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&I(t.r)?t.r=L(t.r,32):v.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&I(t.s)?t.s=L(t.s,32):v.throwArgumentError("signature missing or invalid s","signature",e);const r=x(t.s);r[0]>=128&&v.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const n=B(r);t._vs&&(I(t._vs)||v.throwArgumentError("signature invalid _vs","signature",e),t._vs=L(t._vs,32)),null==t._vs?t._vs=n:t._vs!==n&&v.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function F(e){return B(_([(e=j(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}var D=r(9404),H=r.n(D);const z="bignumber/5.7.0";var q=H().BN;const G=new b(z),K={},V=9007199254740991;let J=!1;class W{constructor(e,t){e!==K&&G.throwError("cannot call constructor directly; use BigNumber.from",b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Z(Y(this).fromTwos(e))}toTwos(e){return Z(Y(this).toTwos(e))}abs(){return"-"===this._hex[0]?W.from(this._hex.substring(1)):this}add(e){return Z(Y(this).add(Y(e)))}sub(e){return Z(Y(this).sub(Y(e)))}div(e){return W.from(e).isZero()&&X("division-by-zero","div"),Z(Y(this).div(Y(e)))}mul(e){return Z(Y(this).mul(Y(e)))}mod(e){const t=Y(e);return t.isNeg()&&X("division-by-zero","mod"),Z(Y(this).umod(t))}pow(e){const t=Y(e);return t.isNeg()&&X("negative-power","pow"),Z(Y(this).pow(t))}and(e){const t=Y(e);return(this.isNegative()||t.isNeg())&&X("unbound-bitwise-result","and"),Z(Y(this).and(t))}or(e){const t=Y(e);return(this.isNegative()||t.isNeg())&&X("unbound-bitwise-result","or"),Z(Y(this).or(t))}xor(e){const t=Y(e);return(this.isNegative()||t.isNeg())&&X("unbound-bitwise-result","xor"),Z(Y(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&X("negative-width","mask"),Z(Y(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&X("negative-width","shl"),Z(Y(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&X("negative-width","shr"),Z(Y(this).shrn(e))}eq(e){return Y(this).eq(Y(e))}lt(e){return Y(this).lt(Y(e))}lte(e){return Y(this).lte(Y(e))}gt(e){return Y(this).gt(Y(e))}gte(e){return Y(this).gte(Y(e))}isNegative(){return"-"===this._hex[0]}isZero(){return Y(this).isZero()}toNumber(){try{return Y(this).toNumber()}catch(e){X("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return G.throwError("this platform does not support BigInt",b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?J||(J=!0,G.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?G.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",b.errors.UNEXPECTED_ARGUMENT,{}):G.throwError("BigNumber.toString does not accept parameters",b.errors.UNEXPECTED_ARGUMENT,{})),Y(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof W)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new W(K,Q(e)):e.match(/^-?[0-9]+$/)?new W(K,Q(new q(e))):G.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&X("underflow","BigNumber.from",e),(e>=V||e<=-V)&&X("overflow","BigNumber.from",e),W.from(String(e));const t=e;if("bigint"==typeof t)return W.from(t.toString());if(S(t))return W.from(B(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return W.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(I(e)||"-"===e[0]&&I(e.substring(1))))return W.from(e)}return G.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function Q(e){if("string"!=typeof e)return Q(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&G.throwArgumentError("invalid hex","value",e),"0x00"===(e=Q(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function Z(e){return W.from(Q(e))}function Y(e){const t=W.from(e).toHexString();return"-"===t[0]?new q("-"+t.substring(3),16):new q(t.substring(2),16)}function X(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),G.throwError(e,b.errors.NUMERIC_FAULT,n)}var $=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const ee=new b("properties/5.7.0");function te(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function re(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function ne(e){return $(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function ie(e,t){e&&"object"==typeof e||ee.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||ee.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function oe(e){const t={};for(const r in e)t[r]=e[r];return t}const ae={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function se(e){if(null==e||ae[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;rce(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&te(t,r,ce(n))}return t}return ee.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function ce(e){return ue(e)}class le{constructor(e){for(const t in e)this[t]=ce(e[t])}}const fe="abi/5.7.0",de=new b(fe);function he(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t}class pe{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){de.throwArgumentError(e,this.localName,t)}}class ye{constructor(e){te(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return R(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(_(e._data))}writeBytes(e){let t=x(e);const r=t.length%this.wordSize;return r&&(t=_([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=x(W.from(e));return t.length>this.wordSize&&de.throwError("value out-of-bounds",b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=_([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class me{constructor(e,t,r,n){te(this,"_data",x(e)),te(this,"wordSize",t||32),te(this,"_coerceFunc",r),te(this,"allowLoose",n),this._offset=0}get data(){return B(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):me.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:de.throwError("data out-of-bounds",b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new me(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return W.from(this.readBytes(this.wordSize))}}var ge=r(1176),be=r.n(ge);function ve(e){return"0x"+be().keccak_256(x(e))}const we=new b("rlp/5.7.0");function Ae(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function ke(e,t,r){let n=0;for(let i=0;it+1+n&&we.throwError("child data too short",b.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function _e(e,t){if(0===e.length&&we.throwError("data too short",b.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&we.throwError("data short segment too short",b.errors.BUFFER_OVERRUN,{});const n=ke(e,t+1,r);return t+1+r+n>e.length&&we.throwError("data long segment too short",b.errors.BUFFER_OVERRUN,{}),xe(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&we.throwError("data array too short",b.errors.BUFFER_OVERRUN,{}),xe(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&we.throwError("data array too short",b.errors.BUFFER_OVERRUN,{});const n=ke(e,t+1,r);t+1+r+n>e.length&&we.throwError("data array too short",b.errors.BUFFER_OVERRUN,{});return{consumed:1+r+n,result:B(e.slice(t+1+r,t+1+r+n))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&we.throwError("data too short",b.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:B(e.slice(t+1,t+1+r))}}return{consumed:1,result:B(e[t])}}function Pe(e){const t=x(e),r=_e(t,0);return r.consumed!==t.length&&we.throwArgumentError("invalid rlp data","data",e),r.result}const Te=new b("address/5.7.0");function Ie(e){I(e,20)||Te.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=x(ve(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const Oe={};for(let e=0;e<10;e++)Oe[String(e)]=String(e);for(let e=0;e<26;e++)Oe[String.fromCharCode(65+e)]=String(10+e);const Be=Math.floor((Ce=9007199254740991,Math.log10?Math.log10(Ce):Math.log(Ce)/Math.LN10));var Ce;function Ne(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>Oe[e])).join("");for(;t.length>=Be;){let e=t.substring(0,Be);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function Re(e){let t=null;if("string"!=typeof e&&Te.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=Ie(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&Te.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==Ne(e)&&Te.throwArgumentError("bad icap checksum","address",e),r=e.substring(4),t=new q(r,36).toString(16);t.length<40;)t="0"+t;t=Ie("0x"+t)}else Te.throwArgumentError("invalid address","address",e);var r;return t}function Me(e){try{return Re(e),!0}catch(e){}return!1}function Ue(e){let t=(r=Re(e).substring(2),new q(r,16).toString(36)).toUpperCase();for(var r;t.length<30;)t="0"+t;return"XE"+Ne("XE00"+t)+t}function Le(e){let t=null;try{t=Re(e.from)}catch(t){Te.throwArgumentError("missing from address","transaction",e)}return Re(N(ve(Se([t,P(x(W.from(e.nonce).toHexString()))])),12))}function je(e,t,r){return 32!==C(t)&&Te.throwArgumentError("salt must be 32 bytes","salt",t),32!==C(r)&&Te.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Re(N(ve(_(["0xff",Re(e),t,r])),12))}const Fe=new b("strings/5.7.0");var De,He;function ze(e,t,r,n,i){if(e===He.BAD_PREFIX||e===He.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return e===He.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(De||(De={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(He||(He={}));const qe=Object.freeze({error:function(e,t,r,n,i){return Fe.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:ze,replace:function(e,t,r,n,i){return e===He.OVERLONG?(n.push(i),0):(n.push(65533),ze(e,t,r))}});function Ge(e,t){null==t&&(t=qe.error),e=x(e);const r=[];let n=0;for(;n>7)){r.push(i);continue}let o=null,a=null;if(192==(224&i))o=1,a=127;else if(224==(240&i))o=2,a=2047;else{if(240!=(248&i)){n+=t(128==(192&i)?He.UNEXPECTED_CONTINUE:He.BAD_PREFIX,n-1,e,r);continue}o=3,a=65535}if(n-1+o>=e.length){n+=t(He.OVERRUN,n-1,e,r);continue}let s=i&(1<<8-o-1)-1;for(let i=0;i1114111?n+=t(He.OUT_OF_RANGE,n-1-o,e,r,s):s>=55296&&s<=57343?n+=t(He.UTF16_SURROGATE,n-1-o,e,r,s):s<=a?n+=t(He.OVERLONG,n-1-o,e,r,s):r.push(s))}return r}function Ke(e,t=De.current){t!=De.current&&(Fe.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return x(r)}function Ve(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function Je(e,t){return'"'+Ge(e,t).map((e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?Ve(e):Ve(55296+((e-=65536)>>10&1023))+Ve(56320+(1023&e))})).join("")+'"'}function We(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function Qe(e,t){return We(Ge(e,t))}function Ze(e,t=De.current){return Ge(Ke(e,t))}function Ye(e){return ve(Ke(e))}class Xe extends pe{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=Re(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return Re(L(e.readValue().toHexString(),20))}}class $e extends pe{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const et=new b(fe);function tt(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||et.throwError("cannot encode object for signature with missing names",b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&et.throwError("cannot encode object for signature with duplicate names",b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else et.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&et.throwArgumentError("types/value length mismatch","tuple",r);let i=new ye(e.wordSize),o=new ye(e.wordSize),a=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=o.length;e.encode(o,r);let n=i.writeUpdatableValue();a.push((e=>{n(e+t)}))}else e.encode(i,r)})),a.forEach((e=>{e(i.length)}));let s=e.appendWriter(i);return s+=e.appendWriter(o),s}function rt(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),o=n.subReader(r.toNumber());try{i=t.decode(o)}catch(e){if(e.code===b.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===b.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));const i=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let e=0;e{throw t}})}return Object.freeze(r)}class nt extends pe{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;re._data.length&&et.throwError("insufficient data length",b.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){return tt(e,this.coders,t)}decode(e){return e.coerce(this.name,rt(e,this.coders))}}const wt=new b(fe),At={};let kt={calldata:!0,memory:!0,storage:!0},Et={calldata:!0,memory:!0};function St(e,t){if("bytes"===e||"string"===e){if(kt[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&Et[t])return!0;return(kt[t]||"payable"===t)&&wt.throwArgumentError("invalid modifier","name",t),!1}function xt(e,t){for(let r in t)te(e,r,t[r])}const _t=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),Pt=new RegExp(/^(.*)\[([0-9]*)\]$/);class Tt{constructor(e,t){e!==At&&wt.throwError("use fromString",b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),xt(this,t);let r=this.type.match(Pt);xt(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:Tt.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=_t.sighash),_t[e]||wt.throwArgumentError("invalid format type","format",e),e===_t.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==_t.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===_t.full?", ":",")+")"):t+=this.type,e!==_t.sighash&&(!0===this.indexed&&(t+=" indexed"),e===_t.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?Tt.fromString(e,t):Tt.fromObject(e)}static fromObject(e){return Tt.isParamType(e)?e:new Tt(At,{name:e.name||null,type:Ft(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(Tt.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){wt.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},a=o;for(let r=0;rTt.fromString(e,t)))}class Ot{constructor(e,t){e!==At&&wt.throwError("use a static from method",b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),xt(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Ot.isFragment(e)?e:"string"==typeof e?Ot.fromString(e):Ot.fromObject(e)}static fromObject(e){if(Ot.isFragment(e))return e;switch(e.type){case"function":return Ut.fromObject(e);case"event":return Bt.fromObject(e);case"constructor":return Mt.fromObject(e);case"error":return jt.fromObject(e);case"fallback":case"receive":return null}return wt.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Bt.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?Ut.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?Mt.fromString(e.trim()):"error"===e.split(" ")[0]?jt.fromString(e.substring(5).trim()):wt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class Bt extends Ot{format(e){if(e||(e=_t.sighash),_t[e]||wt.throwArgumentError("invalid format type","format",e),e===_t.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==_t.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===_t.full?", ":",")+") ",e!==_t.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?Bt.fromString(e):Bt.fromObject(e)}static fromObject(e){if(Bt.isEventFragment(e))return e;"event"!==e.type&&wt.throwArgumentError("invalid event object","value",e);const t={name:Ht(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Tt.fromObject):[],type:"event"};return new Bt(At,t)}static fromString(e){let t=e.match(zt);t||wt.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:wt.warn("unknown modifier: "+e)}})),Bt.fromObject({name:t[1].trim(),anonymous:r,inputs:It(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function Ct(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&wt.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||wt.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=W.from(r[1]),r[0]):e}function Nt(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function Rt(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&wt.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&wt.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||wt.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&wt.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&wt.throwArgumentError("unable to determine stateMutability","value",e),t}class Mt extends Ot{format(e){if(e||(e=_t.sighash),_t[e]||wt.throwArgumentError("invalid format type","format",e),e===_t.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===_t.sighash&&wt.throwError("cannot format a constructor for sighash",b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===_t.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?Mt.fromString(e):Mt.fromObject(e)}static fromObject(e){if(Mt.isConstructorFragment(e))return e;"constructor"!==e.type&&wt.throwArgumentError("invalid constructor object","value",e);let t=Rt(e);t.constant&&wt.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Tt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?W.from(e.gas):null};return new Mt(At,r)}static fromString(e){let t={type:"constructor"},r=(e=Ct(e,t)).match(zt);return r&&"constructor"===r[1].trim()||wt.throwArgumentError("invalid constructor string","value",e),t.inputs=It(r[2].trim(),!1),Nt(r[3].trim(),t),Mt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class Ut extends Mt{format(e){if(e||(e=_t.sighash),_t[e]||wt.throwArgumentError("invalid format type","format",e),e===_t.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==_t.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===_t.full?", ":",")+") ",e!==_t.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?Ut.fromString(e):Ut.fromObject(e)}static fromObject(e){if(Ut.isFunctionFragment(e))return e;"function"!==e.type&&wt.throwArgumentError("invalid function object","value",e);let t=Rt(e);const r={type:e.type,name:Ht(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(Tt.fromObject):[],outputs:e.outputs?e.outputs.map(Tt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?W.from(e.gas):null};return new Ut(At,r)}static fromString(e){let t={type:"function"},r=(e=Ct(e,t)).split(" returns ");r.length>2&&wt.throwArgumentError("invalid function string","value",e);let n=r[0].match(zt);if(n||wt.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&Ht(t.name),t.inputs=It(n[2],!1),Nt(n[3].trim(),t),r.length>1){let n=r[1].match(zt);""==n[1].trim()&&""==n[3].trim()||wt.throwArgumentError("unexpected tokens","value",e),t.outputs=It(n[2],!1)}else t.outputs=[];return Ut.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function Lt(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||wt.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class jt extends Ot{format(e){if(e||(e=_t.sighash),_t[e]||wt.throwArgumentError("invalid format type","format",e),e===_t.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==_t.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===_t.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?jt.fromString(e):jt.fromObject(e)}static fromObject(e){if(jt.isErrorFragment(e))return e;"error"!==e.type&&wt.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:Ht(e.name),inputs:e.inputs?e.inputs.map(Tt.fromObject):[]};return Lt(new jt(At,t))}static fromString(e){let t={type:"error"},r=e.match(zt);return r||wt.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&Ht(t.name),t.inputs=It(r[2],!1),Lt(jt.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function Ft(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const Dt=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ht(e){return e&&e.match(Dt)||wt.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const zt=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const qt=new b(fe),Gt=new RegExp(/^bytes([0-9]*)$/),Kt=new RegExp(/^(u?int)([0-9]*)$/);class Vt{constructor(e){te(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Xe(e.name);case"bool":return new it(e.name);case"string":return new bt(e.name);case"bytes":return new at(e.name);case"array":return new nt(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new vt((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new ut(e.name)}let t=e.type.match(Kt);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&qt.throwArgumentError("invalid "+t[1]+" bit length","param",e),new gt(r/8,"int"===t[1],e.name)}if(t=e.type.match(Gt),t){let r=parseInt(t[1]);return(0===r||r>32)&&qt.throwArgumentError("invalid bytes length","param",e),new st(r,e.name)}return qt.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new me(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new ye(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(Tt.from(e))));return new vt(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&qt.throwError("types/values length mismatch",b.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(Tt.from(e)))),n=new vt(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const n=e.map((e=>this._getCoder(Tt.from(e))));return new vt(n,"_").decode(this._getReader(x(t),r))}}const Jt=new Vt,Wt=new b(fe);class Qt extends le{}class Zt extends le{}class Yt extends le{}class Xt extends le{static isIndexed(e){return!(!e||!e._isIndexed)}}const $t={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function er(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class tr{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,te(this,"fragments",t.map((e=>Ot.from(e))).filter((e=>null!=e))),te(this,"_abiCoder",re(new.target,"getAbiCoder")()),te(this,"functions",{}),te(this,"errors",{}),te(this,"events",{}),te(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void Wt.warn("duplicate definition - constructor"):void te(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?Wt.warn("duplicate definition - "+r):t[r]=e})),this.deploy||te(this,"deploy",Mt.from({payable:!1,type:"constructor"})),te(this,"_isInterface",!0)}format(e){e||(e=_t.full),e===_t.sighash&&Wt.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===_t.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return Jt}static getAddress(e){return Re(e)}static getSighash(e){return N(Ye(e.format()),0,4)}static getEventTopic(e){return Ye(e.format())}getFunction(e){if(I(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];Wt.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?Wt.throwArgumentError("no matching function","name",t):r.length>1&&Wt.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[Ut.fromString(e).format()];return t||Wt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(I(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];Wt.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?Wt.throwArgumentError("no matching event","name",t):r.length>1&&Wt.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[Bt.fromString(e).format()];return t||Wt.throwArgumentError("no matching event","signature",e),t}getError(e){if(I(e)){const t=re(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}Wt.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?Wt.throwArgumentError("no matching error","name",t):r.length>1&&Wt.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[Ut.fromString(e).format()];return t||Wt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return re(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),re(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=x(t);return B(r.slice(0,4))!==this.getSighash(e)&&Wt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",B(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),B(_([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=x(t);return B(r.slice(0,4))!==this.getSighash(e)&&Wt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",B(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),B(_([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=x(t),n=null,i="",o=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=B(r.slice(0,4)),t=$t[e];if(t)o=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,s=t.signature,t.reason&&(n=o[0]),"Error"===a?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:"Panic"===a&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const t=this.getError(e);o=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,s=t.format()}catch(e){}break}}return Wt.throwError("call revert exception"+i,b.errors.CALL_EXCEPTION,{method:e.format(),data:B(t),errorArgs:o,errorName:a,errorSignature:s,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),B(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&Wt.throwError("too many arguments for "+e.format(),b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?Ye(t):"bytes"===e.type?ve(B(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=W.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),L(B(t),32));for(t.forEach(((t,i)=>{let o=e.inputs[i];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?Wt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((e=>n(o,e)))):r.push(n(o,t)):null!=t&&Wt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Wt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const a=t[o];if(e.indexed)if("string"===e.type)r.push(Ye(a));else if("bytes"===e.type)r.push(ve(a));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[a]))}else n.push(e),i.push(a)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);I(r[0],32)&&r[0].toLowerCase()===t||Wt.throwError("fragment/topic mismatch",b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],i=[],o=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(Tt.fromObject({type:"bytes32",name:e.name})),o.push(!0)):(n.push(e),o.push(!1)):(i.push(e),o.push(!1))}));let a=null!=r?this._abiCoder.decode(n,_(r)):null,s=this._abiCoder.decode(i,t,!0),u=[],c=0,l=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==a)u[t]=new Xt({_isIndexed:!0,hash:null});else if(o[t])u[t]=new Xt({_isIndexed:!0,hash:a[l++]});else try{u[t]=a[l++]}catch(e){u[t]=e}else try{u[t]=s[c++]}catch(e){u[t]=e}if(e.name&&null==u[e.name]){const r=u[t];r instanceof Error?Object.defineProperty(u,e.name,{enumerable:!0,get:()=>{throw er(`property ${JSON.stringify(e.name)}`,r)}}):u[e.name]=r}}));for(let e=0;e{throw er(`index ${e}`,t)}})}return Object.freeze(u)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new Zt({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:W.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Qt({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=B(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new Yt({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}var rr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const nr=new b("abstract-provider/5.7.0");class ir extends le{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class or{constructor(){nr.checkAbstract(new.target,or),te(this,"_isProvider",!0)}getFeeData(){return rr(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield ne({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,n=null,i=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,i=W.from("1500000000"),n=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:r,maxFeePerGas:n,maxPriorityFeePerGas:i,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}var ar=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const sr=new b("abstract-signer/5.7.0"),ur=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],cr=[b.errors.INSUFFICIENT_FUNDS,b.errors.NONCE_EXPIRED,b.errors.REPLACEMENT_UNDERPRICED];class lr{constructor(){sr.checkAbstract(new.target,lr),te(this,"_isSigner",!0)}getBalance(e){return ar(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return ar(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return ar(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield ne(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return ar(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield ne(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return ar(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return ar(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return ar(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return ar(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return ar(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===ur.indexOf(t)&&sr.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=oe(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&sr.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return ar(this,void 0,void 0,(function*(){const t=yield ne(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>ar(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&sr.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||sr.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):sr.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&sr.throwError("network does not support EIP-1559",b.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):sr.throwError("failed to get consistent fee data",b.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(cr.indexOf(e.code)>=0)throw e;return sr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&sr.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield ne(t)}))}_checkProvider(e){this.provider||sr.throwError("missing provider",b.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class fr extends lr{constructor(e,t){super(),te(this,"address",e),te(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{sr.throwError(e,b.errors.UNSUPPORTED_OPERATION,{operation:t})}))}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new fr(this.address,e)}}var dr=r(7952),hr=r.n(dr);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;function pr(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}var yr=mr;function mr(e,t){if(!e)throw new Error(t||"Assertion failed")}mr.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var gr=pr((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),br=pr((function(e,t){var r=t;r.assert=yr,r.toArray=gr.toArray,r.zero2=gr.zero2,r.toHex=gr.toHex,r.encode=gr.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=1&u?3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u:0,r[0].push(a),s=1&c?3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c:0,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new(H())(e,"hex","le")}})),vr=br.getNAF,wr=br.getJSF,Ar=br.assert;function kr(e,t){this.type=e,this.p=new(H())(t.p,16),this.red=t.prime?H().red(t.prime):H().mont(this.p),this.zero=new(H())(0).toRed(this.red),this.one=new(H())(1).toRed(this.red),this.two=new(H())(2).toRed(this.red),this.n=t.n&&new(H())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Er=kr;function Sr(e,t){this.curve=e,this.type=t,this.precomputed=null}kr.prototype.point=function(){throw new Error("Not implemented")},kr.prototype.validate=function(){throw new Error("Not implemented")},kr.prototype._fixedNafMul=function(e,t){Ar(e.precomputed);var r=e._getDoubles(),n=vr(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=i;f>0;f--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];Ar(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},kr.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,f=0;for(o=0;o=1;o-=2){var h=o-1,p=o;if(1===u[h]&&1===u[p]){var y=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(y[1]=t[h].add(t[p]),y[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(y[1]=t[h].toJ().mixedAdd(t[p]),y[2]=t[h].add(t[p].neg())):(y[1]=t[h].toJ().mixedAdd(t[p]),y[2]=t[h].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],g=wr(r[h],r[p]);for(f=Math.max(g[0].length,f),l[h]=new Array(f),l[p]=new Array(f),a=0;a=0;o--){for(var k=0;o>=0;){var E=!0;for(a=0;a=0&&k++,w=w.dblp(k),o<0)break;for(a=0;a0?s=c[a][S-1>>1]:S<0&&(s=c[a][-S-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},Sr.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(o=t,a=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:i},{a:o,b:a}]},Pr.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},Pr.prototype.pointFromX=function(e,t){(e=new(H())(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},Pr.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},Pr.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},Ir.prototype.isInfinity=function(){return this.inf},Ir.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},Ir.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},Ir.prototype.getX=function(){return this.x.fromRed()},Ir.prototype.getY=function(){return this.y.fromRed()},Ir.prototype.mul=function(e){return e=new(H())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Ir.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},Ir.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},Ir.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Ir.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},Ir.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},xr(Or,Er.BasePoint),Pr.prototype.jpoint=function(e,t,r){return new Or(this,e,t,r)},Or.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},Or.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Or.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),f=n.redMul(c),d=u.redSqr().redIAdd(l).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},Or.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),d=s.redMul(l.redISub(f)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},Or.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},Or.prototype.inspect=function(){return this.isInfinity()?"":""},Or.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Br=pr((function(e,t){var r=t;r.base=Er,r.short=Tr,r.mont=null,r.edwards=null})),Cr=pr((function(e,t){var r,n=t,i=br.assert;function o(e){"short"===e.type?this.curve=new Br.short(e):"edwards"===e.type?this.curve=new Br.edwards(e):this.curve=new Br.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,a("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:hr().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:hr().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:hr().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:hr().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"]}),a("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:hr().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hr().sha256,gRed:!1,g:["9"]}),a("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:hr().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}a("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:hr().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function Nr(e){if(!(this instanceof Nr))return new Nr(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=gr.toArray(e.entropy,e.entropyEnc||"hex"),r=gr.toArray(e.nonce,e.nonceEnc||"hex"),n=gr.toArray(e.pers,e.persEnc||"hex");yr(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var Rr=Nr;Nr.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},Nr.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=gr.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var jr=br.assert;function Fr(e,t){if(e instanceof Fr)return e;this._importDER(e,t)||(jr(e.r&&e.s,"Signature without r or s"),this.r=new(H())(e.r,16),this.s=new(H())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var Dr=Fr;function Hr(){this.place=0}function zr(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function qr(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}Fr.prototype._importDER=function(e,t){e=br.toArray(e,t);var r=new Hr;if(48!==e[r.place++])return!1;var n=zr(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=zr(e,r);if(!1===i)return!1;var o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=zr(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var s=e.slice(r.place,a+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new(H())(o),this.s=new(H())(s),this.recoveryParam=null,!0},Fr.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=qr(t),r=qr(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Gr(n,t.length),(n=n.concat(t)).push(2),Gr(n,r.length);var i=n.concat(r),o=[48];return Gr(o,i.length),o=o.concat(i),br.encode(o,e)};var Kr=function(){throw new Error("unsupported")},Vr=br.assert;function Jr(e){if(!(this instanceof Jr))return new Jr(e);"string"==typeof e&&(Vr(Object.prototype.hasOwnProperty.call(Cr,e),"Unknown curve "+e),e=Cr[e]),e instanceof Cr.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Wr=Jr;Jr.prototype.keyPair=function(e){return new Lr(this,e)},Jr.prototype.keyFromPrivate=function(e,t){return Lr.fromPrivate(this,e,t)},Jr.prototype.keyFromPublic=function(e,t){return Lr.fromPublic(this,e,t)},Jr.prototype.genKeyPair=function(e){e||(e={});for(var t=new Rr({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Kr(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(H())(2));;){var i=new(H())(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Jr.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Jr.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(H())(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),a=e.toArray("be",i),s=new Rr({hash:this.hash,entropy:o,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),u=this.n.sub(new(H())(1)),c=0;;c++){var l=n.k?n.k(c):new(H())(s.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(u)>=0)){var f=this.g.mul(l);if(!f.isInfinity()){var d=f.getX(),h=d.umod(this.n);if(0!==h.cmpn(0)){var p=l.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var y=(f.getY().isOdd()?1:0)|(0!==d.cmp(h)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),y^=1),new Dr({r:h,s:p,recoveryParam:y})}}}}}},Jr.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(H())(e,16)),r=this.keyFromPublic(r,n);var i=(t=new Dr(t,"hex")).r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,s=o.invm(this.n),u=s.mul(e).umod(this.n),c=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},Jr.prototype.recoverPubKey=function(e,t,r,n){Vr((3&r)===r,"The recovery param is more than two bits"),t=new Dr(t,n);var i=this.n,o=new(H())(e),a=t.r,s=t.s,u=1&r,c=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");a=c?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var l=t.r.invm(i),f=i.sub(o).mul(l).umod(i),d=s.mul(l).umod(i);return this.g.mulAdd(f,a,d)},Jr.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new Dr(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var Qr=pr((function(e,t){var r=t;r.version="6.5.4",r.utils=br,r.rand=function(){throw new Error("unsupported")},r.curve=Br,r.curves=Cr,r.ec=Wr,r.eddsa=null})).ec;const Zr=new b("signing-key/5.7.0");let Yr=null;function Xr(){return Yr||(Yr=new Qr("secp256k1")),Yr}class $r{constructor(e){te(this,"curve","secp256k1"),te(this,"privateKey",B(e)),32!==C(this.privateKey)&&Zr.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=Xr().keyFromPrivate(x(this.privateKey));te(this,"publicKey","0x"+t.getPublic(!1,"hex")),te(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),te(this,"_isSigningKey",!0)}_addPoint(e){const t=Xr().keyFromPublic(x(this.publicKey)),r=Xr().keyFromPublic(x(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=Xr().keyFromPrivate(x(this.privateKey)),r=x(e);32!==r.length&&Zr.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return j({recoveryParam:n.recoveryParam,r:L("0x"+n.r.toString(16),32),s:L("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=Xr().keyFromPrivate(x(this.privateKey)),r=Xr().keyFromPublic(x(tn(e)));return L("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function en(e,t){const r=j(t),n={r:x(r.r),s:x(r.s)};return"0x"+Xr().recoverPubKey(x(e),n,r.recoveryParam).encode("hex",!1)}function tn(e,t){const r=x(e);if(32===r.length){const e=new $r(r);return t?"0x"+Xr().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?B(r):"0x"+Xr().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+Xr().keyFromPublic(r).getPublic(!0,"hex"):B(r):Zr.throwArgumentError("invalid public or private key","key","[REDACTED]")}const rn=new b("transactions/5.7.0");var nn;function on(e){return"0x"===e?null:Re(e)}function an(e){return"0x"===e?lt:W.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(nn||(nn={}));const sn=[{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"}],un={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function cn(e){return Re(N(ve(N(tn(e),1)),12))}function ln(e,t){return cn(en(x(e),t))}function fn(e,t){const r=P(W.from(e).toHexString());return r.length>32&&rn.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function dn(e,t){return{address:Re(e),storageKeys:(t||[]).map(((t,r)=>(32!==C(t)&&rn.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function hn(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&rn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),dn(e[0],e[1])):dn(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return dn(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function pn(e){return hn(e).map((e=>[e.address,e.storageKeys]))}function yn(e,t){if(null!=e.gasPrice){const t=W.from(e.gasPrice),r=W.from(e.maxFeePerGas||0);t.eq(r)||rn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[fn(e.chainId||0,"chainId"),fn(e.nonce||0,"nonce"),fn(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),fn(e.maxFeePerGas||0,"maxFeePerGas"),fn(e.gasLimit||0,"gasLimit"),null!=e.to?Re(e.to):"0x",fn(e.value||0,"value"),e.data||"0x",pn(e.accessList||[])];if(t){const e=j(t);r.push(fn(e.recoveryParam,"recoveryParam")),r.push(P(e.r)),r.push(P(e.s))}return R(["0x02",Se(r)])}function mn(e,t){const r=[fn(e.chainId||0,"chainId"),fn(e.nonce||0,"nonce"),fn(e.gasPrice||0,"gasPrice"),fn(e.gasLimit||0,"gasLimit"),null!=e.to?Re(e.to):"0x",fn(e.value||0,"value"),e.data||"0x",pn(e.accessList||[])];if(t){const e=j(t);r.push(fn(e.recoveryParam,"recoveryParam")),r.push(P(e.r)),r.push(P(e.s))}return R(["0x01",Se(r)])}function gn(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&rn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){ie(e,un);const r=[];sn.forEach((function(t){let n=e[t.name]||[];const i={};t.numeric&&(i.hexPad="left"),n=x(B(n,i)),t.length&&n.length!==t.length&&n.length>0&&rn.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=P(n),n.length>t.maxLength&&rn.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push(B(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!=typeof n&&rn.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!k(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push(B(n)),r.push("0x"),r.push("0x")),!t)return Se(r);const i=j(t);let o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&rn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&rn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push(B(o)),r.push(P(x(i.r))),r.push(P(x(i.s))),Se(r)}(e,t);switch(e.type){case 1:return mn(e,t);case 2:return yn(e,t)}return rn.throwError(`unsupported transaction type: ${e.type}`,b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function bn(e,t,r){try{const r=an(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){rn.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=L(t[1],32),e.s=L(t[2],32);try{const t=ve(r(e));e.from=ln(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function vn(e){const t=x(e);if(t[0]>127)return function(e){const t=Pe(e);9!==t.length&&6!==t.length&&rn.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:an(t[0]).toNumber(),gasPrice:an(t[1]),gasLimit:an(t[2]),to:on(t[3]),value:an(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=W.from(t[6]).toNumber()}catch(e){return r}if(r.r=L(t[7],32),r.s=L(t[8],32),W.from(r.r).isZero()&&W.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=t.slice(0,6);0!==r.chainId&&(i.push(B(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);const o=ve(Se(i));try{r.from=ln(o,{r:B(r.r),s:B(r.s),recoveryParam:n})}catch(e){}r.hash=ve(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=Pe(e.slice(1));8!==t.length&&11!==t.length&&rn.throwArgumentError("invalid component count for transaction type: 1","payload",B(e));const r={type:1,chainId:an(t[0]).toNumber(),nonce:an(t[1]).toNumber(),gasPrice:an(t[2]),gasLimit:an(t[3]),to:on(t[4]),value:an(t[5]),data:t[6],accessList:hn(t[7])};return 8===t.length||(r.hash=ve(e),bn(r,t.slice(8),mn)),r}(t);case 2:return function(e){const t=Pe(e.slice(1));9!==t.length&&12!==t.length&&rn.throwArgumentError("invalid component count for transaction type: 2","payload",B(e));const r=an(t[2]),n=an(t[3]),i={type:2,chainId:an(t[0]).toNumber(),nonce:an(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:an(t[4]),to:on(t[5]),value:an(t[6]),data:t[7],accessList:hn(t[8])};return 9===t.length||(i.hash=ve(e),bn(i,t.slice(9),yn)),i}(t)}return rn.throwError(`unsupported transaction type: ${t[0]}`,b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}var wn=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const An=new b("contracts/5.7.0"),kn={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function En(e,t){return wn(this,void 0,void 0,(function*(){const r=yield t;"string"!=typeof r&&An.throwArgumentError("invalid address or ENS name","name",r);try{return Re(r)}catch(e){}e||An.throwError("a provider or signer is needed to resolve ENS names",b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield e.resolveName(r);return null==n&&An.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function Sn(e,t,r){return wn(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>Sn(e,Array.isArray(t)?t[n]:t[r.name],r)))):"address"===r.type?yield En(e,t):"tuple"===r.type?yield Sn(e,t,r.components):"array"===r.baseType?Array.isArray(t)?yield Promise.all(t.map((t=>Sn(e,t,r.arrayChildren)))):Promise.reject(An.makeError("invalid value for array",b.errors.INVALID_ARGUMENT,{argument:"value",value:t})):t}))}function xn(e,t,r){return wn(this,void 0,void 0,(function*(){let n={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(n=oe(r.pop())),An.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?n.from?n.from=ne({override:En(e.signer,n.from),signer:e.signer.getAddress()}).then((e=>wn(this,void 0,void 0,(function*(){return Re(e.signer)!==e.override&&An.throwError("Contract with a Signer cannot override from",b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})))):n.from=e.signer.getAddress():n.from&&(n.from=En(e.provider,n.from));const i=yield ne({args:Sn(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:ne(n)||{}}),o=e.interface.encodeFunctionData(t,i.args),a={data:o,to:i.address},s=i.overrides;if(null!=s.nonce&&(a.nonce=W.from(s.nonce).toNumber()),null!=s.gasLimit&&(a.gasLimit=W.from(s.gasLimit)),null!=s.gasPrice&&(a.gasPrice=W.from(s.gasPrice)),null!=s.maxFeePerGas&&(a.maxFeePerGas=W.from(s.maxFeePerGas)),null!=s.maxPriorityFeePerGas&&(a.maxPriorityFeePerGas=W.from(s.maxPriorityFeePerGas)),null!=s.from&&(a.from=s.from),null!=s.type&&(a.type=s.type),null!=s.accessList&&(a.accessList=hn(s.accessList)),null==a.gasLimit&&null!=t.gas){let e=21e3;const r=x(o);for(let t=0;tnull!=n[e]));return u.length&&An.throwError(`cannot override ${u.map((e=>JSON.stringify(e))).join(",")}`,b.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:u}),a}))}function _n(e,t){const r=t.wait.bind(t);t.wait=t=>r(t).then((t=>(t.events=t.logs.map((r=>{let n=ce(r),i=null;try{i=e.interface.parseLog(r)}catch(e){}return i&&(n.args=i.args,n.decode=(t,r)=>e.interface.decodeEventLog(i.eventFragment,t,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>e.provider,n.getBlock=()=>e.provider.getBlock(t.blockHash),n.getTransaction=()=>e.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(t),n})),t)))}function Pn(e,t,r){const n=e.signer||e.provider;return function(...i){return wn(this,void 0,void 0,(function*(){let o;if(i.length===t.inputs.length+1&&"object"==typeof i[i.length-1]){const e=oe(i.pop());null!=e.blockTag&&(o=yield e.blockTag),delete e.blockTag,i.push(e)}null!=e.deployTransaction&&(yield e._deployed(o));const a=yield xn(e,t,i),s=yield n.call(a,o);try{let n=e.interface.decodeFunctionResult(t,s);return r&&1===t.outputs.length&&(n=n[0]),n}catch(t){throw t.code===b.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=i,t.transaction=a),t}}))}}function Tn(e,t,r){return t.constant?Pn(e,t,r):function(e,t){return function(...r){return wn(this,void 0,void 0,(function*(){e.signer||An.throwError("sending a transaction requires a signer",b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());const n=yield xn(e,t,r),i=yield e.signer.sendTransaction(n);return _n(e,i),i}))}}(e,t)}function In(e){return!e.address||null!=e.topics&&0!==e.topics.length?(e.address||"*")+"@"+(e.topics?e.topics.map((e=>Array.isArray(e)?e.join("|"):e)).join(":"):""):"*"}class On{constructor(e,t){te(this,"tag",e),te(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter((r=>!(!t&&r.listener===e)||(t=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((e=>e.listener))}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter((t=>{const r=e.slice();return setTimeout((()=>{t.listener.apply(this,r)}),0),!t.once})),t}prepareEvent(e){}getEmit(e){return[e]}}class Bn extends On{constructor(){super("error",null)}}class Cn extends On{constructor(e,t,r,n){const i={address:e};let o=t.getEventTopic(r);n?(o!==n[0]&&An.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(In(i),i),te(this,"address",e),te(this,"interface",t),te(this,"fragment",r)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(e,t)=>this.interface.decodeEventLog(this.fragment,e,t);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=he(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r}}class Nn extends On{constructor(e,t){super("*",{address:e}),te(this,"address",e),te(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(e,r)=>this.interface.decodeEventLog(t.eventFragment,e,r),e.args=t.args}catch(e){}}}class Rn{constructor(e,t,r){te(this,"interface",re(new.target,"getInterface")(t)),null==r?(te(this,"provider",null),te(this,"signer",null)):lr.isSigner(r)?(te(this,"provider",r.provider||null),te(this,"signer",r)):or.isProvider(r)?(te(this,"provider",r),te(this,"signer",null)):An.throwArgumentError("invalid signer or provider","signerOrProvider",r),te(this,"callStatic",{}),te(this,"estimateGas",{}),te(this,"functions",{}),te(this,"populateTransaction",{}),te(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach((t=>{const r=this.interface.events[t];te(this.filters,t,((...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,e)}))),e[r.name]||(e[r.name]=[]),e[r.name].push(t)})),Object.keys(e).forEach((t=>{const r=e[t];1===r.length?te(this.filters,t,this.filters[r[0]]):An.warn(`Duplicate definition of ${t} (${r.join(", ")})`)}))}if(te(this,"_runningEvents",{}),te(this,"_wrappedEmits",{}),null==e&&An.throwArgumentError("invalid contract address or ENS name","addressOrName",e),te(this,"address",e),this.provider)te(this,"resolvedAddress",En(this.provider,e));else try{te(this,"resolvedAddress",Promise.resolve(Re(e)))}catch(e){An.throwError("provider is required to use ENS name as contract address",b.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((e=>{}));const n={},i={};Object.keys(this.interface.functions).forEach((e=>{const t=this.interface.functions[e];if(i[e])An.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{i[e]=!0;{const r=t.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(e)}null==this[e]&&te(this,e,Tn(this,t,!0)),null==this.functions[e]&&te(this.functions,e,Tn(this,t,!1)),null==this.callStatic[e]&&te(this.callStatic,e,Pn(this,t,!0)),null==this.populateTransaction[e]&&te(this.populateTransaction,e,function(e,t){return function(...r){return xn(e,t,r)}}(this,t)),null==this.estimateGas[e]&&te(this.estimateGas,e,function(e,t){const r=e.signer||e.provider;return function(...n){return wn(this,void 0,void 0,(function*(){r||An.throwError("estimate require a provider or signer",b.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield xn(e,t,n);return yield r.estimateGas(i)}))}}(this,t))}})),Object.keys(n).forEach((e=>{const t=n[e];if(t.length>1)return;e=e.substring(1);const r=t[0];try{null==this[e]&&te(this,e,this[r])}catch(e){}null==this.functions[e]&&te(this.functions,e,this.functions[r]),null==this.callStatic[e]&&te(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&te(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&te(this.estimateGas,e,this.estimateGas[r])}))}static getContractAddress(e){return Le(e)}static getInterface(e){return tr.isInterface(e)?e:new tr(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,e).then((e=>("0x"===e&&An.throwError("contract not deployed",b.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(e){this.signer||An.throwError("sending a transactions require a signer",b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=oe(e||{});return["from","to"].forEach((function(e){null!=t[e]&&An.throwError("cannot override "+e,b.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(t)))}connect(e){"string"==typeof e&&(e=new fr(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&te(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return Xt.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new Bn);if("event"===e)return this._normalizeRunningEvent(new On("event",null));if("*"===e)return this._normalizeRunningEvent(new Nn(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Cn(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const t=e.topics[0];if("string"!=typeof t)throw new Error("invalid topic");const r=this.interface.getEvent(t);return this._normalizeRunningEvent(new Cn(this.address,this.interface,r,e.topics))}catch(e){}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new On(In(t),t))}return this._normalizeRunningEvent(new Nn(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){const n=ce(t);return n.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e))},n.getBlock=()=>this.provider.getBlock(t.blockHash),n.getTransaction=()=>this.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(n),n}_addEventListener(e,t,r){if(this.provider||An.throwError("events require a provider or a signer with a provider",b.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{const t=e.getEmit(n);this.emit(e.filter,...t)}catch(e){n.decodeError=e.error}null!=e.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r)}}queryFilter(e,t,r){const n=this._getRunningEvent(e),i=oe(n.filter);return"string"==typeof t&&I(t,32)?(null!=r&&An.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=t):(i.fromBlock=null!=t?t:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((e=>e.map((e=>this._wrapEvent(n,e,null)))))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),n=r.run(t)>0;return this._checkRunningEvents(r),n}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce(((e,t)=>e+this._runningEvents[t].listenerCount()),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(null==e){const e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach((t=>{e.push(t)}));return e}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const e in this._runningEvents){const t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}removeListener(e,t){return this.off(e,t)}}class Mn extends Rn{}class Un{constructor(e,t,r){let n=null;n="string"==typeof t?t:S(t)?B(t):t&&"string"==typeof t.object?t.object:"!","0x"!==n.substring(0,2)&&(n="0x"+n),(!I(n)||n.length%2)&&An.throwArgumentError("invalid bytecode","bytecode",t),r&&!lr.isSigner(r)&&An.throwArgumentError("invalid signer","signer",r),te(this,"bytecode",n),te(this,"interface",re(new.target,"getInterface")(e)),te(this,"signer",r||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){t=oe(e.pop());for(const e in t)if(!kn[e])throw new Error("unknown transaction override "+e)}if(["data","from","to"].forEach((e=>{null!=t[e]&&An.throwError("cannot override "+e,b.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value){W.from(t.value).isZero()||this.interface.deploy.payable||An.throwError("non-payable constructor cannot override value",b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}return An.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=B(_([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return wn(this,void 0,void 0,(function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),An.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const r=yield Sn(this.signer,e,this.interface.deploy.inputs);r.push(t);const n=this.getDeployTransaction(...r),i=yield this.signer.sendTransaction(n),o=re(this.constructor,"getContractAddress")(i),a=re(this.constructor,"getContract")(o,this.interface,this.signer);return _n(a,i),te(a,"deployTransaction",i),a}))}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){null==e&&An.throwError("missing compiler output",b.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}static getInterface(e){return Mn.getInterface(e)}static getContractAddress(e){return Le(e)}static getContract(e,t,r){return new Mn(e,t,r)}}const Ln=new b(z),jn={},Fn=W.from(0),Dn=W.from(-1);function Hn(e,t,r,n){const i={fault:t,operation:r};return void 0!==n&&(i.value=n),Ln.throwError(e,b.errors.NUMERIC_FAULT,i)}let zn="0";for(;zn.length<256;)zn+=zn;function qn(e){if("number"!=typeof e)try{e=W.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+zn.substring(0,e):Ln.throwArgumentError("invalid decimal size","decimals",e)}function Gn(e,t){null==t&&(t=0);const r=qn(t),n=(e=W.from(e)).lt(Fn);n&&(e=e.mul(Dn));let i=e.mod(r).toString();for(;i.length2&&Ln.throwArgumentError("too many decimal points","value",e);let o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&Hn("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.lengthnull==e[t]?n:(typeof e[t]!==r&&Ln.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&Ln.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&Ln.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new Vn(jn,t,r,n)}}class Jn{constructor(e,t,r,n){e!==jn&&Ln.throwError("cannot use FixedNumber constructor; use FixedNumber.from",b.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Ln.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=Kn(this._value,this.format.decimals),r=Kn(e._value,e.format.decimals);return Jn.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=Kn(this._value,this.format.decimals),r=Kn(e._value,e.format.decimals);return Jn.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=Kn(this._value,this.format.decimals),r=Kn(e._value,e.format.decimals);return Jn.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=Kn(this._value,this.format.decimals),r=Kn(e._value,e.format.decimals);return Jn.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=Jn.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(Wn.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=Jn.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(Wn.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&Ln.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=Jn.from("1"+zn.substring(0,e),this.format),n=Qn.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&Ln.throwArgumentError("invalid byte width","width",e);return L(W.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString(),e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Jn.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||function(e){return null!=e&&(W.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||I(e)||"bigint"==typeof e||S(e))}(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),Jn.fromString(Gn(e,t),Vn.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=Vn.from(t),n=Kn(e,r.decimals);!r.signed&&n.lt(Fn)&&Hn("unsigned value cannot be negative","overflow","value",e);let i=null;r.signed?i=n.toTwos(r.width).toHexString():(i=n.toHexString(),i=L(i,r.width/8));const o=Gn(n,r.decimals);return new Jn(jn,i,o,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=Vn.from(t);if(x(e).length>r.width/8)throw new Error("overflow");let n=W.from(e);r.signed&&(n=n.fromTwos(r.width));const i=n.toTwos((r.signed?0:1)+r.width).toHexString(),o=Gn(n,r.decimals);return new Jn(jn,i,o,r)}static from(e,t){if("string"==typeof e)return Jn.fromString(e,t);if(S(e))return Jn.fromBytes(e,t);try{return Jn.fromValue(e,0,t)}catch(e){if(e.code!==b.errors.INVALID_ARGUMENT)throw e}return Ln.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const Wn=Jn.from(1),Qn=Jn.from("0.5"),Zn="Ethereum Signed Message:\n";function Yn(e){return"string"==typeof e&&(e=Ke(e)),ve(_([Ke(Zn),Ke(String(e.length)),e]))}const Xn="hash/5.7.0";var $n=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const ei=new b(Xn),ti=new Uint8Array(32);ti.fill(0);const ri=W.from(-1),ni=W.from(0),ii=W.from(1),oi=W.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const ai=L(ii.toHexString(),32),si=L(ni.toHexString(),32),ui={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},ci=["name","version","chainId","verifyingContract","salt"];function li(e){return function(t){return"string"!=typeof t&&ei.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const fi={name:li("name"),version:li("version"),chainId:function(e){try{return W.from(e).toString()}catch(e){}return ei.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return Re(e).toLowerCase()}catch(e){}return ei.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=x(e);if(32!==t.length)throw new Error("bad length");return B(t)}catch(e){}return ei.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function di(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&ei.throwArgumentError("invalid numeric width","type",e);const i=oi.mask(r?n-1:n),o=r?i.add(ii).mul(ri):ni;return function(t){const r=W.from(t);return(r.lt(o)||r.gt(i))&&ei.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),L(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&ei.throwArgumentError("invalid bytes width","type",e),function(t){return x(t).length!==r&&ei.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=x(e),r=t.length%32;return r?R([t,ti.slice(r)]):B(t)}(t)}}}switch(e){case"address":return function(e){return L(Re(e),32)};case"bool":return function(e){return e?ai:si};case"bytes":return function(e){return ve(e)};case"string":return function(e){return Ye(e)}}return null}function hi(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class pi{constructor(e){te(this,"types",Object.freeze(ce(e))),te(this,"_encoderCache",{}),te(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const i={};e[n].forEach((o=>{i[o.name]&&ei.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(n)}`,"types",e),i[o.name]=!0;const a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===n&&ei.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e);di(a)||(r[a]||ei.throwArgumentError(`unknown type ${JSON.stringify(a)}`,"types",e),r[a].push(n),t[n][a]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?ei.throwArgumentError("missing primary type","types",e):i.length>1&&ei.throwArgumentError(`ambiguous primary types or unused types: ${i.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),te(this,"primaryType",i[0]),function i(o,a){a[o]&&ei.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),a[o]=!0,Object.keys(t[o]).forEach((e=>{r[e]&&(i(e,a),Object.keys(a).forEach((t=>{n[t][e]=!0})))})),delete a[o]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=hi(t,e[t])+r.map((t=>hi(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=di(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&ei.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(ve)),ve(R(i))}}const r=this.types[e];if(r){const t=Ye(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?ve(n):n}));return n.unshift(t),R(n)}}return ei.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||ei.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return ve(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(di(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&ei.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const i=this.types[e];return i?i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{}):ei.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new pi(e)}static getPrimaryType(e){return pi.from(e).primaryType}static hashStruct(e,t,r){return pi.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=ui[r];n||ei.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>ci.indexOf(e.name)-ci.indexOf(t.name))),pi.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return R(["0x1901",pi.hashDomain(e),pi.from(t).hash(r)])}static hash(e,t,r){return ve(pi.encode(e,t,r))}static resolveNames(e,t,r,n){return $n(this,void 0,void 0,(function*(){e=oe(e);const i={};e.verifyingContract&&!I(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=pi.from(t);o.visit(r,((e,t)=>("address"!==e||I(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=o.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){pi.hashDomain(e);const n={},i=[];ci.forEach((t=>{const r=e[t];null!=r&&(n[t]=fi[t](r),i.push({name:t,type:ui[t]}))}));const o=pi.from(t),a=oe(t);return a.EIP712Domain?ei.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):a.EIP712Domain=i,o.encode(r),{types:a,domain:n,primaryType:o.primaryType,message:o.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return B(x(t));if(e.match(/^u?int/))return W.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&ei.throwArgumentError("invalid string","value",t),t}return ei.throwArgumentError("unsupported type","type",e)}))}}}class yi{constructor(e){te(this,"alphabet",e),te(this,"base",e.length),te(this,"_alphabetMap",{}),te(this,"_leader",e.charAt(0));for(let t=0;t0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r>24&255,u[t.length+1]=f>>16&255,u[t.length+2]=f>>8&255,u[t.length+3]=255&f;let d=x(ki(i,e,u));o||(o=d.length,l=new Uint8Array(o),a=Math.ceil(n/o),c=n-(a-1)*o),l.set(d);for(let t=1;t=256)throw new Error("Depth too large!");return Ui(_([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",B(this.depth),this.parentFingerprint,L(B(this.index),4),this.chainCode,null!=this.privateKey?_(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Di(ji,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~Ni));const r=new Uint8Array(37);if(e&Ni){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(x(this.privateKey),1),t&&(t+="'")}else r.set(x(this.publicKey));for(let t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;const n=x(ki(gi.sha512,this.chainCode,r)),i=n.slice(0,32),o=n.slice(32);let a=null,s=null;if(this.privateKey)a=Mi(W.from(i).add(this.privateKey).mod(Bi));else{s=new $r(B(i))._addPoint(this.publicKey)}let u=t;const c=this.mnemonic;return c&&(u=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new Di(ji,a,s,this.fingerprint,Mi(o),e,this.depth+1,u)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let e=0;e=Ni)throw new Error("invalid path index - "+n);r=r._derive(Ni+e)}else{if(!n.match(/^[0-9]+$/))throw new Error("invalid path component - "+n);{const e=parseInt(n);if(e>=Ni)throw new Error("invalid path index - "+n);r=r._derive(e)}}}return r}static _fromSeed(e,t){const r=x(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=x(ki(gi.sha512,Ci,r));return new Di(ji,Mi(n.slice(0,32)),null,"0x00000000",Mi(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=qi(zi(e,r=Li(r)),r),Di._fromSeed(Hi(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return Di._fromSeed(e,null)}static fromExtendedKey(e){const t=mi.decode(e);82===t.length&&Ui(t.slice(0,78))===e||Oi.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],n=B(t.slice(5,9)),i=parseInt(B(t.slice(9,13)).substring(2),16),o=B(t.slice(13,45)),a=t.slice(45,78);switch(B(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Di(ji,null,B(a),n,o,i,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==a[0])break;return new Di(ji,B(a.slice(1)),null,n,o,i,r,null)}return Oi.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function Hi(e,t){t||(t="");const r=Ke("mnemonic"+t,De.NFKD);return Ei(Ke(e,De.NFKD),r,2048,64,"sha512")}function zi(e,t){t=Li(t),Oi.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=x(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let e=0;e>3]|=1<<7-i%8),i++}const o=32*r.length/3,a=Ri(r.length/3);if((x(wi(n.slice(0,o/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return B(n.slice(0,o/8))}function qi(e,t){if(t=Li(t),(e=x(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let t=0;t8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&(1<<8-n)-1),n+=3);const i=e.length/4,o=x(wi(e))[0]&Ri(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,t.join(r.map((e=>t.getWord(e))))}function Gi(e,t){try{return zi(e,t),!0}catch(e){}return!1}function Ki(e){return("number"!=typeof e||e<0||e>=Ni||e%1)&&Oi.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}const Vi=new b("random/5.7.0");const Ji=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();let Wi=Ji.crypto||Ji.msCrypto;function Qi(e){(e<=0||e>1024||e%1||e!=e)&&Vi.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return Wi.getRandomValues(t),x(t)}Wi&&Wi.getRandomValues||(Vi.warn("WARNING: Missing strong random number source"),Wi={getRandomValues:function(e){return Vi.throwError("no secure random source avaialble",b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var Zi=r(2872),Yi=r.n(Zi),Xi=r(9983),$i=r.n(Xi);function eo(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),x(e)}function to(e,t){for(e=String(e);e.lengtht)),te(this,"address",cn(this.publicKey)),this.address!==Re(e.address)&&So.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;te(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||Fi,locale:t.locale||"en"})));const r=this.mnemonic;cn(Di.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path).privateKey)!==this.address&&So.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else te(this,"_mnemonic",(()=>null))}else{if($r.isSigningKey(e))"secp256k1"!==e.curve&&So.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),te(this,"_signingKey",(()=>e));else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new $r(e);te(this,"_signingKey",(()=>t))}te(this,"_mnemonic",(()=>null)),te(this,"address",cn(this.publicKey))}var r;t&&!or.isProvider(t)&&So.throwArgumentError("invalid provider","provider",t),te(this,"provider",t||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(e){return new xo(this,e)}signTransaction(e){return ne(e).then((t=>{null!=t.from&&(Re(t.from)!==this.address&&So.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest(ve(gn(t)));return gn(t,r)}))}signMessage(e){return Eo(this,void 0,void 0,(function*(){return F(this._signingKey().signDigest(Yn(e)))}))}_signTypedData(e,t,r){return Eo(this,void 0,void 0,(function*(){const n=yield pi.resolveNames(e,t,r,(e=>(null==this.provider&&So.throwError("cannot resolve ENS names without a provider",b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return F(this._signingKey().signDigest(pi.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback");return t||(t={}),function(e,t,r,n){try{if(Re(e.address)!==cn(e.privateKey))throw new Error("address/privateKey mismatch");if(uo(e)){const t=e.mnemonic;if(Di.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||Fi).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(e){return Promise.reject(e)}"function"!=typeof r||n||(n=r,r={}),r||(r={});const i=x(e.privateKey),o=ro(t);let a=null,s=null,u=null;if(uo(e)){const t=e.mnemonic;a=x(zi(t.phrase,t.locale||"en")),s=t.path||Fi,u=t.locale||"en"}let c=r.client;c||(c="ethers.js");let l=null;l=r.salt?x(r.salt):Qi(32);let f=null;if(r.iv){if(f=x(r.iv),16!==f.length)throw new Error("invalid iv")}else f=Qi(16);let d=null;if(r.uuid){if(d=x(r.uuid),16!==d.length)throw new Error("invalid uuid")}else d=Qi(16);let h=1<<17,p=8,y=1;return r.scrypt&&(r.scrypt.N&&(h=r.scrypt.N),r.scrypt.r&&(p=r.scrypt.r),r.scrypt.p&&(y=r.scrypt.p)),$i().scrypt(o,l,h,p,y,64,n).then((t=>{const r=(t=x(t)).slice(0,16),n=t.slice(16,32),o=t.slice(32,64),m=new(Yi().Counter)(f),g=x(new(Yi().ModeOfOperation.ctr)(r,m).encrypt(i)),b=ve(_([n,g])),v={address:e.address.substring(2).toLowerCase(),id:io(d),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:B(f).substring(2)},ciphertext:B(g).substring(2),kdf:"scrypt",kdfparams:{salt:B(l).substring(2),n:h,dklen:32,p:y,r:p},mac:b.substring(2)}};if(a){const e=Qi(16),t=new(Yi().Counter)(e),r=x(new(Yi().ModeOfOperation.ctr)(o,t).encrypt(a)),n=new Date,i=n.getUTCFullYear()+"-"+to(n.getUTCMonth()+1,2)+"-"+to(n.getUTCDate(),2)+"T"+to(n.getUTCHours(),2)+"-"+to(n.getUTCMinutes(),2)+"-"+to(n.getUTCSeconds(),2)+".0Z";v["x-ethers"]={client:c,gethFilename:"UTC--"+i+"--"+v.address,mnemonicCounter:B(e).substring(2),mnemonicCiphertext:B(r).substring(2),path:s,locale:u,version:"0.1"}}return JSON.stringify(v)}))}(this,e,t,r)}static createRandom(e){let t=Qi(16);e||(e={}),e.extraEntropy&&(t=x(N(ve(_([t,e.extraEntropy])),0,16)));const r=qi(t,e.locale);return xo.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return Ao(e,t,r).then((e=>new xo(e)))}static fromEncryptedJsonSync(e,t){return new xo(ko(e,t))}static fromMnemonic(e,t,r){return t||(t=Fi),new xo(Di.fromMnemonic(e,null,r).derivePath(t))}}function _o(e,t){return ln(Yn(e),t)}function Po(e,t,r,n){return ln(pi.hash(e,t,r),n)}const To="0x0000000000000000000000000000000000000000",Io="0x0000000000000000000000000000000000000000000000000000000000000000",Oo="Ξ",Bo=new b("networks/5.7.1");function Co(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new t.PocketProvider(e,r.pocket);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new t.AnkrProvider(e,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return Co(e)},t}function No(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return No(e,t)},r}const Ro={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Co("homestead")},Mo={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Co("ropsten")},Uo={chainId:63,name:"classicMordor",_defaultProvider:No("https://www.ethercluster.com/mordor","classicMordor")},Lo={unspecified:{chainId:0,name:"unspecified"},homestead:Ro,mainnet:Ro,morden:{chainId:2,name:"morden"},ropsten:Mo,testnet:Mo,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Co("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Co("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Co("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Co("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:No("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Uo,classicTestnet:Uo,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:No("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Co("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Co("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function jo(e){if(null==e)return null;if("number"==typeof e){for(const t in Lo){const r=Lo[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=Lo[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=Lo[e.name];if(!t)return"number"!=typeof e.chainId&&Bo.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&Bo.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var n;return null==r&&t._defaultProvider&&(r=(n=t._defaultProvider)&&"function"==typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}function Fo(e){e=atob(e);const t=[];for(let r=0;r0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function zo(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e>--u&1}const f=Math.pow(2,31),d=f>>>1,h=d>>1,p=f-1;let y=0;for(let e=0;e<31;e++)y=y<<1|l();let m=[],g=0,b=f;for(;;){let e=Math.floor(((y-g+1)*i-1)/b),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|l(),a=a<<1^d,s=(s^d)<<1|d|1;g=a,b=1+s-a}let v=n-4;return m.map((t=>{switch(t-v){case 3:return v+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return v+256+(e[s++]<<8|e[s++]);case 1:return v+e[s++];default:return t-1}}))}(e))}function qo(e){return 1&e?~e>>1:e>>1}function Go(e,t){let r=Array(e);for(let n=0,i=-1;nt[e])):r}function Jo(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;in[t].push(e)));return n}function Wo(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return Ho(Jo(i.length,1+e,t).map(((e,t)=>{const o=e[0],a=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[o+t*r,a.map((e=>e+i))]}))})))}function Qo(e,t){return Jo(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const Zo=zo(Fo("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),Yo=new Set(Vo(Zo)),Xo=new Set(Vo(Zo)),$o=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(Wo(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(Qo(r,e))}return function(e){const t={};for(let r=0;re-t));return function r(){let n=[];for(;;){let i=Vo(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let a=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:a,save:1==i,check:2==i}}()}(Zo),ta=45,ra=95;function na(e){return Ze(e)}function ia(e){return e.filter((e=>65039!=e))}function oa(e){for(let t of e.split(".")){let e=na(t);try{for(let t=e.lastIndexOf(ra)-1;t>=0;t--)if(e[t]!==ra)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===ta&&e[3]===ta)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function aa(e){return oa(function(e,t){let r=na(e).reverse(),n=[];for(;r.length;){let e=sa(r);if(e){n.push(...t(e));continue}let i=r.pop();if(Yo.has(i)){n.push(i);continue}if(Xo.has(i))continue;let o=$o[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...o)}return oa((i=String.fromCodePoint(...n),i.normalize("NFC")));var i}(e,ia))}function sa(e,t){var r;let n,i,o=ea,a=[],s=e.length;for(t&&(t.length=0);s;){let u=e[--s];if(o=null===(r=o.branches.find((e=>e.set.has(u))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=u;else if(o.check&&u===i)break;a.push(u),o.fe0f&&(a.push(65039),s>0&&65039==e[s-1]&&s--),o.valid&&(n=a.slice(),2==o.valid&&n.splice(1,1),t&&t.push(...e.slice(s).reverse()),e.length=s)}return n}const ua=new b(Xn),ca=new Uint8Array(32);function la(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function fa(e){const t=Ke(aa(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e=t.length)throw new Error("invalid ENS name; empty component");return r.push(la(t.slice(n))),r}function da(e){try{return 0!==fa(e).length}catch(e){}return!1}function ha(e){"string"!=typeof e&&ua.throwArgumentError("invalid ENS name; not a string","name",e);let t=ca;const r=fa(e);for(;r.length;)t=ve(_([t,ve(r.pop())]));return B(t)}function pa(e){return B(_(fa(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}ca.fill(0);var ya=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};function ma(e,t){return ya(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach(((e,t)=>{o[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{o[e.toLowerCase()]=n.headers.get(e)})),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:x(new Uint8Array(i))}}))}var ga=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const ba=new b("web/5.7.1");function va(e){return new Promise((t=>{setTimeout(t,e)}))}function wa(e,t){if(null==e)return null;if("string"==typeof e)return e;if(k(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return Qe(e)}catch(e){}return B(e)}return e}function Aa(e,t,r){const n="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;ba.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);const i="object"==typeof e?e.throttleCallback:null,o="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;ba.assertArgument(o>0&&o%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const a="object"==typeof e&&!!e.errorPassThrough,s={};let u=null;const c={method:"GET"};let l=!1,f=12e4;if("string"==typeof e)u=e;else if("object"==typeof e){if(null!=e&&null!=e.url||ba.throwArgumentError("missing URL","connection.url",e),u=e.url,"number"==typeof e.timeout&&e.timeout>0&&(f=e.timeout),e.headers)for(const t in e.headers)s[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(l=!0);if(c.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==u.substring(0,6)&&!0!==e.allowInsecureAuthentication&&ba.throwError("basic authentication requires a secure https url",b.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;s.authorization={key:"Authorization",value:"Basic "+Do(Ke(t))}}null!=e.skipFetchSetup&&(c.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(c.fetchOptions=oe(e.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=u?u.match(d):null;if(h)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?Fo(h[3]):(p=h[3],Ke(p.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){ba.throwError("processing response error",b.errors.SERVER_ERROR,{body:wa(h[1],h[2]),error:e,requestBody:null,requestMethod:"GET",url:u})}var p;t&&(c.method="POST",c.body=t,null==s["content-type"]&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==s["content-length"]&&(s["content-length"]={key:"Content-Length",value:String(t.length)}));const y={};Object.keys(s).forEach((e=>{const t=s[e];y[t.key]=t.value})),c.headers=y;const m=function(){let e=null;return{promise:new Promise((function(t,r){f&&(e=setTimeout((()=>{null!=e&&(e=null,r(ba.makeError("timeout",b.errors.TIMEOUT,{requestBody:wa(c.body,y["content-type"]),requestMethod:c.method,timeout:f,url:u})))}),f))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),g=function(){return ga(this,void 0,void 0,(function*(){for(let e=0;e=300)&&(m.cancel(),ba.throwError("bad response",b.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:wa(s,t.headers?t.headers["content-type"]:null),requestBody:wa(c.body,y["content-type"]),requestMethod:c.method,url:u})),r)try{const e=yield r(s,t);return m.cancel(),e}catch(r){if(r.throttleRetry&&e"content-type"===e.toLowerCase())).length||(r.headers=oe(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return Aa(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse(Qe(e))}catch(t){ba.throwError("invalid JSON",b.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function Ea(e,t){return t||(t={}),null==(t=oe(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let i=null,o=!1;const a=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout((()=>{a()&&n(new Error("timeout"))}),t.timeout));const s=t.retryLimit;let u=0;!function i(){return e().then((function(e){if(void 0!==e)a()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(u++,u>s)return void(a()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));et.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){a()&&n(e)}))}()}))}var Sa=r(9674),xa=r.n(Sa);const _a="providers/5.7.2",Pa=new b(_a);class Ta{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),a=this.hex.bind(this),s=this.number.bind(this),u=this.type.bind(this);return e.transaction={hash:o,type:u,accessList:Ta.allowNull(this.accessList.bind(this),null),blockHash:Ta.allowNull(o,null),blockNumber:Ta.allowNull(s,null),transactionIndex:Ta.allowNull(s,null),confirmations:Ta.allowNull(s,null),from:t,gasPrice:Ta.allowNull(r),maxPriorityFeePerGas:Ta.allowNull(r),maxFeePerGas:Ta.allowNull(r),gasLimit:r,to:Ta.allowNull(t,null),value:r,nonce:s,data:i,r:Ta.allowNull(this.uint256),s:Ta.allowNull(this.uint256),v:Ta.allowNull(s),creates:Ta.allowNull(t,null),raw:Ta.allowNull(i)},e.transactionRequest={from:Ta.allowNull(t),nonce:Ta.allowNull(s),gasLimit:Ta.allowNull(r),gasPrice:Ta.allowNull(r),maxPriorityFeePerGas:Ta.allowNull(r),maxFeePerGas:Ta.allowNull(r),to:Ta.allowNull(t),value:Ta.allowNull(r),data:Ta.allowNull((e=>this.data(e,!0))),type:Ta.allowNull(s),accessList:Ta.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:s,blockNumber:s,transactionHash:o,address:t,topics:Ta.arrayOf(o),data:i,logIndex:s,blockHash:o},e.receipt={to:Ta.allowNull(this.address,null),from:Ta.allowNull(this.address,null),contractAddress:Ta.allowNull(t,null),transactionIndex:s,root:Ta.allowNull(a),gasUsed:r,logsBloom:Ta.allowNull(i),blockHash:o,transactionHash:o,logs:Ta.arrayOf(this.receiptLog.bind(this)),blockNumber:s,confirmations:Ta.allowNull(s,null),cumulativeGasUsed:r,effectiveGasPrice:Ta.allowNull(r),status:Ta.allowNull(s),type:u},e.block={hash:Ta.allowNull(o),parentHash:o,number:s,timestamp:s,nonce:Ta.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:Ta.allowNull(t),extraData:i,transactions:Ta.allowNull(Ta.arrayOf(o)),baseFeePerGas:Ta.allowNull(r)},e.blockWithTransactions=oe(e.block),e.blockWithTransactions.transactions=Ta.allowNull(Ta.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Ta.allowNull(n,void 0),toBlock:Ta.allowNull(n,void 0),blockHash:Ta.allowNull(o,void 0),address:Ta.allowNull(t,void 0),topics:Ta.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Ta.allowNull(s),blockHash:Ta.allowNull(o),transactionIndex:s,removed:Ta.allowNull(this.boolean.bind(this)),address:t,data:Ta.allowFalsish(i,"0x"),topics:Ta.arrayOf(o),transactionHash:o,logIndex:s},e}accessList(e){return hn(e||[])}number(e){return"0x"===e?0:W.from(e).toNumber()}type(e){return"0x"===e||null==e?0:W.from(e).toNumber()}bigNumber(e){return W.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),I(e))?e.toLowerCase():Pa.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return Re(e)}callAddress(e){if(!I(e,32))return null;const t=Re(N(e,12));return t===To?null:t}contractAddress(e){return Le(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||I(e))return M(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==C(r)?Pa.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=W.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!I(e))throw new Error("invalid uint256");return L(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=Ta.check(t,e);return n._difficulty=null==r?null:W.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Ta.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&W.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=Ta.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;I(r)&&(r=W.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),I(r)&&(r=W.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return vn(e)}receiptLog(e){return Ta.check(this.formats.receiptLog,e)}receipt(e){const t=Ta.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=W.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&Pa.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):Pa.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&Pa.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return Ta.check(this.formats.filter,e)}filterLog(e){return Ta.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const i=e[n](t[n]);void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}function Ia(e){return e&&"function"==typeof e.isCommunityResource}function Oa(e){return Ia(e)&&e.isCommunityResource()}let Ba=!1;function Ca(){Ba||(Ba=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var Na=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Ra=new b(_a);function Ma(e){return null==e?"null":(32!==C(e)&&Ra.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function Ua(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[Ma(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return Ma(e)})).join("&")}function La(e){if("string"==typeof e){if(32===C(e=e.toLowerCase()))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+Ua(e);if(ir.isForkEvent(e))throw Ra.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+Ua(e.topics||[])}throw new Error("invalid event - "+e)}function ja(){return(new Date).getTime()}function Fa(e){return new Promise((t=>{setTimeout(t,e)}))}const Da=["block","network","pending","poll"];class Ha{constructor(e,t,r){te(this,"tag",e),te(this,"listener",t),te(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const i={};return r.length>0&&(i.topics=r),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Da.indexOf(this.tag)>=0}}const za={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function qa(e){return L(W.from(e).toHexString(),32)}function Ga(e){return mi.encode(_([e,N(wi(wi(e)),0,4)]))}const Ka=new RegExp("^(ipfs)://(.*)$","i"),Va=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Ka,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ja(e,t){try{return Qe(Wa(e,t))}catch(e){}return null}function Wa(e,t){if("0x"===e)return null;const r=W.from(N(e,t,t+32)).toNumber(),n=W.from(N(e,r,r+32)).toNumber();return N(e,r+32,r+32+n)}function Qa(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):Ra.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function Za(e){const t=x(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function Ya(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function Xa(e){const t=[];let r=0;for(let n=0;nW.from(e).eq(1))).catch((e=>{if(e.code===b.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return Na(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:R([e,ha(this.name),t||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=R(["0x9061b923",Xa([pa(this.name),r.data])]));try{let e=yield this.provider.call(r);return x(e).length%32==4&&Ra.throwError("resolver threw error",b.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=Wa(e,0)),e}catch(e){if(e.code===b.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return Na(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?Wa(r,0):null}))}_getAddress(e,t){const r=za[String(e)];if(null==r&&Ra.throwError(`unsupported coin type: ${e}`,b.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=x(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Ga(_([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Ga(_([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=xa().toWords(n.slice(2));return e.unshift(t),xa().encode(r.prefix,e)}}return null}getAddress(e){return Na(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===Io?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===b.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",qa(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&Ra.throwError("invalid or unsupported coin data",b.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return Na(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;re[t]))}return Ra.throwError("invalid or unsupported content hash data",b.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return Na(this,void 0,void 0,(function*(){let t=Ke(e);t=_([qa(64),qa(t.length),t]),t.length%32!=0&&(t=_([t,L("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",B(t));return null==r||"0x"===r?null:Qe(r)}))}}let es=null,ts=1;class rs extends or{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),te(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=re(new.target,"getNetwork")(e);t?(te(this,"_network",t),this.emit("network",t,null)):Ra.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Na(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||Ra.throwError("no network detected",b.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:te(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return Ea((()=>this._ready().then((e=>e),(e=>{if(e.code!==b.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==es&&(es=new Ta),es}static getNetwork(e){return jo(null==e?"homestead":e)}ccipReadFetch(e,t,r){return Na(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e=0?null:JSON.stringify({data:i,sender:n}),u=yield ka({url:a,errorPassThrough:!0},s,((e,t)=>(e.status=t.statusCode,e)));if(u.data)return u.data;const c=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ra.throwError(`response not found during CCIP fetch: ${c}`,b.errors.SERVER_ERROR,{url:t,errorMessage:c});o.push(c)}return Ra.throwError(`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,b.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(e){return Na(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(ja()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=ja(),r=ne({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const i=ja();return(e=W.from(e).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return Na(this,void 0,void 0,(function*(){const e=ts++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)Ra.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",Ra.makeError("network block skew detected",b.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(o)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Na(this,void 0,void 0,(function*(){return Ra.throwError("provider does not support network detection",b.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return Na(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Fa(0),this._network;const r=Ra.makeError("underlying network changed",b.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=ja();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return Na(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return Na(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise(((i,o)=>{const a=[];let s=!1;const u=function(){return!!s||(s=!0,a.forEach((e=>{e()})),!1)},c=e=>{e.confirmations{this.removeListener(e,c)})),n){let r=n.startBlock,i=null;const c=a=>Na(this,void 0,void 0,(function*(){s||(yield Fa(1e3),this.getTransactionCount(n.from).then((l=>Na(this,void 0,void 0,(function*(){if(!s){if(l<=n.nonce)r=a;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3,i{s||this.once("block",c)})))}));if(s)return;this.once("block",c),a.push((()=>{this.removeListener("block",c)}))}if("number"==typeof r&&r>0){const e=setTimeout((()=>{u()||o(Ra.makeError("timeout exceeded",b.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),a.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return Na(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return W.from(e)}catch(t){return Ra.throwError("bad result from backend",b.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield ne({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return W.from(n)}catch(e){return Ra.throwError("bad result from backend",b.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield ne({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return W.from(n).toNumber()}catch(e){return Ra.throwError("bad result from backend",b.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield ne({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return B(n)}catch(e){return Ra.throwError("bad result from backend",b.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield ne({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>M(e)))}),i=yield this.perform("getStorageAt",n);try{return B(i)}catch(e){return Ra.throwError("bad result from backend",b.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==C(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&Ra.throwError("Transaction hash mismatch from Provider.sendTransaction.",b.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>Na(this,void 0,void 0,(function*(){let i;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const o=yield this._waitForTransaction(e.hash,t,n,i);return null==o&&0===t?null:(this._emitted["t:"+e.hash]=o.blockNumber,0===o.status&&Ra.throwError("transaction failed",b.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),n}sendTransaction(e){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>B(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return Na(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?W.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?B(e):null)))})),this.formatter.transactionRequest(yield ne(r))}))}_getFilter(e){return Na(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield ne(t))}))}_call(e,t,r){return Na(this,void 0,void 0,(function*(){r>=10&&Ra.throwError("CCIP read exceeded maximum redirections",b.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===i.substring(0,10)&&C(i)%32==4)try{const o=N(i,4),a=N(o,0,32);W.from(a).eq(n)||Ra.throwError("CCIP Read sender did not match",b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const s=[],u=W.from(N(o,32,64)).toNumber(),c=W.from(N(o,u,u+32)).toNumber(),l=N(o,u+32);for(let t=0;tNa(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;rthis._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Na(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Ea((()=>Na(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return Na(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Ea((()=>Na(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return Na(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield ne({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),Ta.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return Na(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return Na(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&Ra.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return Na(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new $a(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return Na(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||Ra.throwError("network does not support ENS",b.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+ha(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return Na(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if(I(e))throw t}"string"!=typeof e&&Ra.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return Na(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=Ja(yield this.call({to:r,data:"0x691f3431"+ha(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return Na(this,void 0,void 0,(function*(){let t=null;if(I(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new $a(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==b.errors.CALL_EXCEPTION)throw e}try{const e=Ja(yield this.call({to:n,data:"0x691f3431"+ha(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==b.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return Ra.throwError(e+" not implemented",b.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new Ha(La(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],i=La(e);return this._events=this._events.filter((e=>e.tag!==i||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=La(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=La(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,i=La(e);return this._events=this._events.filter((e=>e.tag!==i||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=La(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var ns=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const is=new b(_a),os=["call","estimateGas"];function as(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=I(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(const r in e){const n=as(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return as(JSON.parse(e),t)}catch(e){}return null}function ss(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=as(t,!0);if(e)return e.data;is.throwError("missing revert data in call exception; Transaction reverted without a reason string",b.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=as(t.body,!1);null==r&&(r=as(t,!1)),r&&is.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===b.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?i=t.error.message:"string"==typeof t.body?i=t.body:"string"==typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&is.throwError("insufficient funds for intrinsic transaction cost",b.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&is.throwError("nonce has already been used",b.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&is.throwError("replacement fee too low",b.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&is.throwError("legacy pre-eip-155 transactions not supported",b.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),os.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&is.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function us(e){return new Promise((function(t){setTimeout(t,e)}))}function cs(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function ls(e){return e?e.toLowerCase():e}const fs={};class ds extends lr{constructor(e,t,r){if(super(),e!==fs)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");te(this,"provider",t),null==r&&(r=0),"string"==typeof r?(te(this,"_address",this.provider.formatter.address(r)),te(this,"_index",null)):"number"==typeof r?(te(this,"_index",r),te(this,"_address",null)):is.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return is.throwError("cannot alter JSON-RPC Signer connection",b.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new hs(fs,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&is.throwError("unknown account #"+this._index,b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=oe(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=oe(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>ns(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&is.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),ne({tx:ne(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&is.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&is.throwError("user rejected transaction",b.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),ss("sendTransaction",e,n))))}))}signTransaction(e){return is.throwError("signing transactions is unsupported",b.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ns(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield Ea((()=>ns(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}}))}signMessage(e){return ns(this,void 0,void 0,(function*(){const t="string"==typeof e?Ke(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[B(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&is.throwError("user rejected signing",b.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return ns(this,void 0,void 0,(function*(){const t="string"==typeof e?Ke(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),B(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&is.throwError("user rejected signing",b.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return ns(this,void 0,void 0,(function*(){const n=yield pi.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(pi.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&is.throwError("user rejected signing",b.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return ns(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class hs extends ds{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const ps={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class ys extends rs{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=re(this.constructor,"defaultUrl")()),te(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(oe(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ns(this,void 0,void 0,(function*(){yield us(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=re(this.constructor,"getNetwork");try{return t(W.from(e).toNumber())}catch(t){return is.throwError("could not detect network",b.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return is.throwError("could not detect network",b.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new ds(fs,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ce(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const i=ka(this.connection,JSON.stringify(r),cs).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=i,setTimeout((()=>{this._cache[e]=null}),0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ls(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ls(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ls(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ls(t.address),L(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[re(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[re(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=ls(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return ns(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&W.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=oe(t)).transaction=oe(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&is.throwError(e+" not implemented",b.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return ss(e,r,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return us(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=oe(ps);if(t)for(const e in t)t[e]&&(r[e]=!0);ie(e,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=M(W.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(n[t]=B(e[t]))})),e.accessList&&(n.accessList=hn(e.accessList)),n}}let ms=null;try{if(ms=WebSocket,null==ms)throw new Error("inject please")}catch(e){const t=new b(_a);ms=function(){t.throwError("WebSockets not supported in this environment",b.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var gs=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const bs=new b(_a);let vs=1;class ws extends ys{constructor(e,t){"any"===t&&bs.throwError("WebSocketProvider does not support 'any' network yet",b.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof e?e:"_websocket",t),this._pollingInterval=-1,this._wsReady=!1,te(this,"_websocket","string"==typeof e?new ms(this.connection.url):e),te(this,"_requests",{}),te(this,"_subs",{}),te(this,"_subIds",{}),te(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((e=>{this.websocket.send(this._requests[e].payload)}))},this.websocket.onmessage=e=>{const t=e.data,r=JSON.parse(t);if(null!=r.id){const e=String(r.id),n=this._requests[e];if(delete this._requests[e],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let e=null;r.error?(e=new Error(r.error.message||"unknown error"),te(e,"code",r.error.code||null),te(e,"response",t)):e=new Error("unknown error"),n.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const e=this._subs[r.params.subscription];e&&e.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){bs.throwError("cannot reset events block on WebSocketProvider",b.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){bs.throwError("cannot set polling interval on WebSocketProvider",b.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return gs(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&bs.throwError("cannot set polling on WebSocketProvider",b.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){const r=vs++;return new Promise(((n,i)=>{const o=JSON.stringify({method:e,params:t,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(e,t){return e?i(e):n(t)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,r){return gs(this,void 0,void 0,(function*(){let n=this._subIds[e];null==n&&(n=Promise.all(t).then((e=>this.send("eth_subscribe",e))),this._subIds[e]=n);const i=yield n;this._subs[i]={tag:e,processFunc:r}}))}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],(e=>{const t=W.from(e.number).toNumber();this._emitted.block=t,this.emit("block",t)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(e=>{this.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(t=>{null==t.removed&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))}));break;case"tx":{const t=e=>{const t=e.hash;this.getTransactionReceipt(t).then((e=>{e&&this.emit(t,e)}))};t(e),this._subscribe("tx",["newHeads"],(e=>{this._events.filter((e=>"tx"===e.type)).forEach(t)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}_stopEvent(e){let t=e.tag;if("tx"===e.type){if(this._events.filter((e=>"tx"===e.type)).length)return;t="tx"}else if(this.listenerCount(e.event))return;const r=this._subIds[t];r&&(delete this._subIds[t],r.then((e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]))})))}destroy(){return gs(this,void 0,void 0,(function*(){this.websocket.readyState===ms.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}var As=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const ks=new b(_a);class Es extends ys{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return As(this,void 0,void 0,(function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||ks.throwError("no network detected",b.errors.UNKNOWN_ERROR,{}),null==this._network&&(te(this,"_network",t),this.emit("network",t,null))),t}))}}class Ss extends Es{constructor(e,t){ks.checkAbstract(new.target,Ss),e=re(new.target,"getNetwork")(e),t=re(new.target,"getApiKey")(t);super(re(new.target,"getUrl")(e,t),e),"string"==typeof t?te(this,"apiKey",t):null!=t&&Object.keys(t).forEach((e=>{te(this,e,t[e])}))}_startPending(){ks.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ks.throwError("API provider does not support signing",b.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return ks.throwError("not implemented; sub-classes must override getUrl",b.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const xs=new b(_a),_s="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class Ps extends ws{constructor(e,t){const r=new Ts(e,t);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),te(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===_s}}class Ts extends Ss{static getWebSocketProvider(e,t){return new Ps(e,t)}static getApiKey(e){return null==e?_s:(e&&"string"!=typeof e&&xs.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:xs.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===_s&&Ca(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===_s}}const Is=new b(_a),Os="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Bs(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return Is.throwArgumentError("unsupported network","name",e)}class Cs extends Ss{isCommunityResource(){return this.apiKey===Os}static getApiKey(e){return null==e?Os:e}static getUrl(e,t){null==t&&(t=Os);const r={allowGzip:!0,url:"https://"+Bs(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===Os&&Ca(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}var Ns=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Rs=new b(_a);class Ms extends Ss{static getApiKey(e){return null!=e&&Rs.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let r=null;if("homestead"===e.name)r="https://cloudflare-eth.com/";else Rs.throwArgumentError("unsupported network","network",arguments[0]);return r}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return Ns(this,void 0,void 0,(function*(){if("getBlockNumber"===e){return(yield r.perform.call(this,"getBlock",{blockTag:"latest"})).number}return r.perform.call(this,e,t)}))}}var Us=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Ls=new b(_a);function js(e){const t={};for(let r in e){if(null==e[r])continue;let n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?M(B(n)):"accessList"===r?"["+hn(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]":B(n),t[r]=n)}return t}function Fs(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!=typeof e.message||!e.message.match(/^OK/)){const t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function Ds(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){const t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){const t=new Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){const t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function Hs(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function zs(e,t,r){if("call"===e&&t.code===b.errors.SERVER_ERROR){const e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let r=e.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),I(r))return r;Ls.throwError("missing revert data in call exception",b.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let n=t.message;throw t.code===b.errors.SERVER_ERROR&&(t.error&&"string"==typeof t.error.message?n=t.error.message:"string"==typeof t.body?n=t.body:"string"==typeof t.responseText&&(n=t.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Ls.throwError("insufficient funds for intrinsic transaction cost",b.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Ls.throwError("nonce has already been used",b.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&Ls.throwError("replacement fee too low",b.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&Ls.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class qs extends rs{constructor(e,t){super(e),te(this,"baseUrl",this.getBaseUrl()),te(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return Ls.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){const r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${r}${n}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,r){return Us(this,void 0,void 0,(function*(){const n=r?this.getPostUrl():this.getUrl(e,t),i=r?this.getPostData(e,t):null,o="proxy"===e?Ds:Fs;this.emit("debug",{action:"request",request:n,provider:this});const a={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&Ca(),Promise.resolve(!0))};let s=null;i&&(a.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},s=Object.keys(i).map((e=>`${e}=${i[e]}`)).join("&"));const u=yield ka(a,s,o||Ds);return this.emit("debug",{action:"response",request:n,response:ce(u),provider:this}),u}))}detectNetwork(){return Us(this,void 0,void 0,(function*(){return this.network}))}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return Us(this,void 0,void 0,(function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((e=>zs("sendTransaction",e,t.signedTransaction)));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const e=js(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(e){return zs("call",e,t.transaction)}}case"estimateGas":{const e=js(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(e){return zs("estimateGas",e,t.transaction)}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=Hs(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=Hs(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Ls.throwError("unsupported topic count",b.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){const r=t.filter.topics[0];"string"==typeof r&&66===r.length||Ls.throwError("unsupported topic format",b.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}const r=yield this.fetch("logs",e);let n={};for(let e=0;e{["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);const t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t}))}))}isCommunityResource(){return null==this.apiKey}}function Gs(e){for(let t=(e=e.slice()).length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}var Ks=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Vs=new b(_a);function Js(){return(new Date).getTime()}function Ws(e){let t=null;for(let r=0;rt?null:(n+i)/2}function Zs(e){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("string"==typeof e)return e;if(W.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((e=>Zs(e))));if("object"==typeof e){const t=Object.keys(e);return t.sort(),"{"+t.map((t=>{let r=e[t];return r="function"==typeof r?"[function]":Zs(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}let Ys=1;function Xs(e){let t=null,r=null,n=new Promise((n=>{t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:e=>(n=n.then(e),n)}}const $s=[b.errors.CALL_EXCEPTION,b.errors.INSUFFICIENT_FUNDS,b.errors.NONCE_EXPIRED,b.errors.REPLACEMENT_UNDERPRICED,b.errors.UNPREDICTABLE_GAS_LIMIT],eu=["address","args","errorArgs","errorSignature","method","transaction"];function tu(e,t){const r={weight:e.weight};return Object.defineProperty(r,"provider",{get:()=>e.provider}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function ru(e,t,r){let n=Zs;switch(t){case"getBlockNumber":return function(t){const r=t.map((e=>e.result));let n=Qs(t.map((e=>e.result)),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){const t=e.map((e=>e.result));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Qs(e.map((e=>e.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=oe(e)).confirmations=-1,Zs(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=oe(e)).transactions=e.transactions.map((e=>((e=oe(e)).confirmations=-1,e))),Zs(e))}:function(e){return null==e?null:Zs(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){const n={};r.forEach((t=>{const r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));const i=Object.keys(n);for(let e=0;e=t)return r.result}}}(n,e.quorum)}function nu(e,t){return Ks(this,void 0,void 0,(function*(){const r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:Ea((()=>new Promise(((n,i)=>{setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))),{oncePoll:r})}))}function iu(e,t,r,n){return Ks(this,void 0,void 0,(function*(){let i=e.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&I(n.blockTag)&&(i=yield nu(e,t)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&I(n.blockTag)&&(i=yield nu(e,t)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&I(n.blockTag)&&(i=yield nu(e,t)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&I(n.blockTag)&&(i=yield nu(e,t)),"call"===r&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&I(r.fromBlock)||r.toBlock&&I(r.toBlock))&&(i=yield nu(e,t)),i.getLogs(r)}}return Vs.throwError("unknown method error",b.errors.UNKNOWN_ERROR,{method:r,params:n})}))}class ou extends rs{constructor(e,t){0===e.length&&Vs.throwArgumentError("missing providers","providers",e);const r=e.map(((e,t)=>{if(or.isProvider(e)){const t=Oa(e)?2e3:750,r=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:r})}const r=oe(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=Oa(e)?2e3:750),null==r.weight&&(r.weight=1);const n=r.weight;return(n%1||n>512||n<1)&&Vs.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,n),Object.freeze(r)})),n=r.reduce(((e,t)=>e+t.weight),0);null==t?t=n/2:t>n&&Vs.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let i=Ws(r.map((e=>e.provider.network)));null==i&&(i=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then(e,t)}),0)}))),super(i),te(this,"providerConfigs",Object.freeze(r)),te(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Ks(this,void 0,void 0,(function*(){return Ws(yield Promise.all(this.providerConfigs.map((e=>e.provider.getNetwork()))))}))}perform(e,t){return Ks(this,void 0,void 0,(function*(){if("sendTransaction"===e){const e=yield Promise.all(this.providerConfigs.map((e=>e.provider.sendTransaction(t.signedTransaction).then((e=>e.hash),(e=>e)))));for(let t=0;te.priority-t.priority));const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const s=Js();let u=n.filter((e=>e.runner&&s-e.starte+t.weight),0);for(;u{r.staller=null})),r.runner=iu(r,i,e,t).then((n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:tu(r,Js()),request:{method:e,params:ce(t)},provider:this})}),(n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:tu(r,Js()),request:{method:e,params:ce(t)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:tu(r,null),request:{method:e,params:ce(t)},provider:this}),u+=r.weight}const c=[];n.forEach((e=>{!e.done&&e.runner&&(c.push(e.runner),e.staller&&c.push(e.staller.getPromise()))})),c.length&&(yield Promise.race(c));const l=n.filter((e=>e.done&&null==e.error));if(l.length>=this.quorum){const e=r(l);if(void 0!==e)return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),e;a||(yield Xs(100).getPromise()),a=!1}const f=n.reduce(((e,t)=>{if(!t.done||null==t.error)return e;const r=t.error.code;return $s.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{});if(Object.keys(f).forEach((e=>{const t=f[e];if(t.weight{e.staller&&e.staller.cancel(),e.cancelled=!0}));const r=t.error,i={};eu.forEach((e=>{null!=r[e]&&(i[e]=r[e])})),Vs.throwError(r.reason||r.message,e,i)})),0===n.filter((e=>!e.done)).length)break}return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),Vs.throwError("failed to meet quorum",b.errors.SERVER_ERROR,{method:e,params:t,results:n.map((e=>tu(e))),provider:this})}))}}const au=null,su=new b(_a),uu="84842078b09946638c03157f83405213";class cu extends ws{constructor(e,t){const r=new lu(e,t),n=r.connection;n.password&&su.throwError("INFURA WebSocket project secrets unsupported",b.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),te(this,"apiKey",r.projectId),te(this,"projectId",r.projectId),te(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===uu}}class lu extends Ss{static getWebSocketProvider(e,t){return new cu(e,t)}static getApiKey(e){const t={apiKey:uu,projectId:uu,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(su.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),su.assertArgument("string"==typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:su.throwError("unsupported network",b.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===uu&&Ca(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}isCommunityResource(){return this.projectId===uu}}class fu extends ys{send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const n={request:r,resolve:null,reject:null},i=new Promise(((e,t)=>{n.resolve=e,n.reject=t}));return this._pendingBatch.push(n),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const t=e.map((e=>e.request));return this.emit("debug",{action:"requestBatch",request:ce(t),provider:this}),ka(this.connection,JSON.stringify(t)).then((r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach(((e,t)=>{const n=r[t];if(n.error){const t=new Error(n.error.message);t.code=n.error.code,t.data=n.error.data,e.reject(t)}else e.resolve(n.result)}))}),(r=>{this.emit("debug",{action:"response",error:r,request:t,provider:this}),e.forEach((e=>{e.reject(r)}))}))}),10)),i}}const du=new b(_a);class hu extends Ss{static getApiKey(e){return e&&"string"!=typeof e&&du.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){du.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:du.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}const pu=new b(_a),yu="62e1ad51b37b8e00394bda3b";class mu extends Ss{static getApiKey(e){const t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=yu:"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:pu.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:pu.throwError("unsupported network",b.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={headers:{},url:`https://${r}/v1/lb/${t.applicationId}`};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}isCommunityResource(){return this.applicationId===yu}}const gu=new b(_a);let bu=1;function vu(e,t){const r="Web3LegacyFetcher";return function(e,n){const i={method:e,params:n,id:bu++,jsonrpc:"2.0"};return new Promise(((e,n)=>{this.emit("debug",{action:"request",fetcher:r,request:ce(i),provider:this}),t(i,((t,o)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:i,provider:this}),n(t);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:o,provider:this}),o.error){const e=new Error(o.error.message);return e.code=o.error.code,e.data=o.error.data,n(e)}e(o.result)}))}))}}class wu extends ys{constructor(e,t){null==e&&gu.throwArgumentError("missing provider","provider",e);let r=null,n=null,i=null;"function"==typeof e?(r="unknown:",n=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),i=e,e.request?(""===r&&(r="eip-1193:"),n=function(e){return function(t,r){null==r&&(r=[]);const n={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ce(n),provider:this}),e.request(n).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:e,provider:this}),e}))}}(e)):e.sendAsync?n=vu(0,e.sendAsync.bind(e)):e.send?n=vu(0,e.send.bind(e)):gu.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),te(this,"jsonRpcFetchFunc",n),te(this,"provider",i)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}const Au=new b(_a);function ku(e,t){if(null==e&&(e="homestead"),"string"==typeof e){const t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new ys(e);case"ws":case"wss":return new ws(e);default:Au.throwArgumentError("unsupported URL scheme","network",e)}}const r=jo(e);return r&&r._defaultProvider||Au.throwError("unsupported getDefaultProvider network",b.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:ou,AlchemyProvider:Ts,AnkrProvider:Cs,CloudflareProvider:Ms,EtherscanProvider:qs,InfuraProvider:lu,JsonRpcProvider:ys,NodesmithProvider:hu,PocketProvider:mu,Web3Provider:wu,IpcProvider:au},t)}const Eu=new RegExp("^bytes([0-9]+)$"),Su=new RegExp("^(u?int)([0-9]*)$"),xu=new RegExp("^(.*)\\[([0-9]*)\\]$"),_u="0000000000000000000000000000000000000000000000000000000000000000",Pu=new b("solidity/5.7.0");function Tu(e,t,r){switch(e){case"address":return r?T(t,32):x(t);case"string":return Ke(t);case"bytes":return x(t);case"bool":return t=t?"0x01":"0x00",r?T(t,32):x(t)}let n=e.match(Su);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!=0||0===i||i>256)&&Pu.throwArgumentError("invalid number type","type",e),r&&(i=256),T(t=W.from(t).toTwos(i),i/8)}if(n=e.match(Eu),n){const i=parseInt(n[1]);return(String(i)!==n[1]||0===i||i>32)&&Pu.throwArgumentError("invalid bytes type","type",e),x(t).byteLength!==i&&Pu.throwArgumentError(`invalid value for ${e}`,"value",t),r?x((t+_u).substring(0,66)):t}if(n=e.match(xu),n&&Array.isArray(t)){const r=n[1];parseInt(n[2]||String(t.length))!=t.length&&Pu.throwArgumentError(`invalid array length for ${e}`,"value",t);const i=[];return t.forEach((function(e){i.push(Tu(r,e,!0))})),_(i)}return Pu.throwArgumentError("invalid type","type",e)}function Iu(e,t){e.length!=t.length&&Pu.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(Tu(e,t[n]))})),B(_(r))}function Ou(e,t){return ve(Iu(e,t))}function Bu(e,t){return wi(Iu(e,t))}function Cu(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function Nu(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}function Ru(e,t){let r=0;for(let n=0;n=r&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}const Mu=Nu("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Uu="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),Lu=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],ju=Cu("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Fu=Cu("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),Du=Cu("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");let t=[];for(let r=0;r{if(Uu.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=Ru(e,Lu);if(t)return[e+t.s];let r=ju[e];if(r)return r;let n=Fu[e];return n?[e+n[0]]:Du[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=Ze(We(t),De.NFKC),t.forEach((e=>{if(Ru(e,Hu))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(Ru(e,Mu))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=We(t);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}function qu(e){const t=Ke(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return B(_([t,Io]).slice(0,32))}function Gu(e){const t=x(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return Qe(t.slice(0,r))}const Ku=new b("units/5.7.0"),Vu=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Ju(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&Ku.throwArgumentError("invalid value","value",e);let r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);const o=[];for(;r.length;){if(r.length<=3){o.unshift(r);break}{const e=r.length-3;o.unshift(r.substring(e)),r=r.substring(0,e)}}return n+o.join(",")+i}function Wu(e,t){if("string"==typeof t){const e=Vu.indexOf(t);-1!==e&&(t=3*e)}return Gn(e,null!=t?t:18)}function Qu(e,t){if("string"!=typeof e&&Ku.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=Vu.indexOf(t);-1!==e&&(t=3*e)}return Kn(e,null!=t?t:18)}function Zu(e){return Wu(e,18)}function Yu(e){return Qu(e,18)}const Xu="ethers/5.7.2",$u=new b(Xu);try{const e=window;null==e._ethers&&(e._ethers=u)}catch(e){}},4205:(e,t,r)=>{const n=r(9283);e.exports=async function(e){return n.utils.sha256(n.utils.toUtf8Bytes(e))}},2505:(e,t,r)=>{e.exports=r(8015)},5592:(e,t,r)=>{"use strict";var n=r(9516),i=r(7522),o=r(1567),a=r(9106),s=r(9615),u=r(2012),c=r(4202),l=r(4896),f=r(5845),d=r(8563),h=r(5656);e.exports=function(e){return new Promise((function(t,r){var p,y=e.data,m=e.headers,g=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}n.isFormData(y)&&n.isStandardBrowserEnv()&&delete m["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",A=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+A)}var k=s(e.baseURL,e.url);function E(){if(v){var n="getAllResponseHeaders"in v?u(v.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v};i((function(e){t(e),b()}),(function(e){r(e),b()}),o),v=null}}if(v.open(e.method.toUpperCase(),a(k,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=E:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(E)},v.onabort=function(){v&&(r(new f("Request aborted",f.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new f("Network Error",f.ERR_NETWORK,e,v,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||l;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new f(t,n.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,e,v)),v=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||c(k))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in v&&n.forEach(m,(function(e,t){void 0===y&&"content-type"===t.toLowerCase()?delete m[t]:v.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),g&&"json"!==g&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){v&&(r(!e||e&&e.type?new d:e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),y||(y=null);var x=h(k);x&&-1===["http","https","file"].indexOf(x)?r(new f("Unsupported protocol "+x+":",f.ERR_BAD_REQUEST,e)):v.send(y)}))}},8015:(e,t,r)=>{"use strict";var n=r(9516),i=r(9012),o=r(5155),a=r(5343);var s=function e(t){var r=new o(t),s=i(o.prototype.request,r);return n.extend(s,o.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(r(7412));s.Axios=o,s.CanceledError=r(8563),s.CancelToken=r(3191),s.isCancel=r(3864),s.VERSION=r(9641).version,s.toFormData=r(4059),s.AxiosError=r(5845),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=r(7980),s.isAxiosError=r(5019),e.exports=s,e.exports.default=s},3191:(e,t,r)=>{"use strict";var n=r(8563);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t{"use strict";var n=r(5845);function i(e){n.call(this,null==e?"canceled":e,n.ERR_CANCELED),this.name="CanceledError"}r(9516).inherits(i,n,{__CANCEL__:!0}),e.exports=i},3864:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},5155:(e,t,r)=>{"use strict";var n=r(9516),i=r(9106),o=r(3471),a=r(4490),s=r(5343),u=r(9615),c=r(7222),l=c.validators;function f(e){this.defaults=e,this.interceptors={request:new o,response:new o}}f.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&c.assertOptions(r,{silentJSONParsing:l.transitional(l.boolean),forcedJSONParsing:l.transitional(l.boolean),clarifyTimeoutError:l.transitional(l.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var o,u=[];if(this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)})),!i){var f=[a,void 0];for(Array.prototype.unshift.apply(f,n),f=f.concat(u),o=Promise.resolve(t);f.length;)o=o.then(f.shift(),f.shift());return o}for(var d=t;n.length;){var h=n.shift(),p=n.shift();try{d=h(d)}catch(e){p(e);break}}try{o=a(d)}catch(e){return Promise.reject(e)}for(;u.length;)o=o.then(u.shift(),u.shift());return o},f.prototype.getUri=function(e){e=s(this.defaults,e);var t=u(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}f.prototype[e]=t(),f.prototype[e+"Form"]=t(!0)})),e.exports=f},5845:(e,t,r)=>{"use strict";var n=r(9516);function i(e,t,r,n,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}n.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){a[e]={value:e}})),Object.defineProperties(i,a),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,r,a,s,u){var c=Object.create(o);return n.toFlatObject(e,c,(function(e){return e!==Error.prototype})),i.call(c,e.message,t,r,a,s),c.name=e.name,u&&Object.assign(c,u),c},e.exports=i},3471:(e,t,r)=>{"use strict";var n=r(9516);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},9615:(e,t,r)=>{"use strict";var n=r(9137),i=r(4680);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},4490:(e,t,r)=>{"use strict";var n=r(9516),i=r(2881),o=r(3864),a=r(7412),s=r(8563);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},5343:(e,t,r)=>{"use strict";var n=r(9516);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function u(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);n.isUndefined(i)&&t!==u||(r[e]=i)})),r}},7522:(e,t,r)=>{"use strict";var n=r(5845);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}},2881:(e,t,r)=>{"use strict";var n=r(9516),i=r(7412);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},7412:(e,t,r)=>{"use strict";var n=r(5606),i=r(9516),o=r(7018),a=r(5845),s=r(4896),u=r(4059),c={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var f,d={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(f=r(5592)),f),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e))return e;if(i.isArrayBufferView(e))return e.buffer;if(i.isURLSearchParams(e))return l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,n=i.isObject(e),a=t&&t["Content-Type"];if((r=i.isFileList(e))||n&&"multipart/form-data"===a){var s=this.env&&this.env.FormData;return u(r?{"files[]":e}:e,s&&new s)}return n||"application/json"===a?(l(t,"application/json"),function(e,t,r){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&i.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw a.from(e,a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:r(1534)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){d.headers[e]=i.merge(c)})),e.exports=d},4896:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},9641:e=>{e.exports={version:"0.27.2"}},9012:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n{"use strict";var n=r(9516);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},4680:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},1567:(e,t,r)=>{"use strict";var n=r(9516);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},9137:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},5019:(e,t,r)=>{"use strict";var n=r(9516);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},4202:(e,t,r)=>{"use strict";var n=r(9516);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},7018:(e,t,r)=>{"use strict";var n=r(9516);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},1534:e=>{e.exports=null},2012:(e,t,r)=>{"use strict";var n=r(9516),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},5656:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},7980:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4059:(e,t,r)=>{"use strict";var n=r(8287).Buffer,i=r(9516);e.exports=function(e,t){t=t||new FormData;var r=[];function o(e){return null===e?"":i.isDate(e)?e.toISOString():i.isArrayBuffer(e)||i.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):n.from(e):e}return function e(n,a){if(i.isPlainObject(n)||i.isArray(n)){if(-1!==r.indexOf(n))throw Error("Circular reference detected in "+a);r.push(n),i.forEach(n,(function(r,n){if(!i.isUndefined(r)){var s,u=a?a+"."+n:n;if(r&&!a&&"object"==typeof r)if(i.endsWith(n,"{}"))r=JSON.stringify(r);else if(i.endsWith(n,"[]")&&(s=i.toArray(r)))return void s.forEach((function(e){!i.isUndefined(e)&&t.append(u,o(e))}));e(r,u)}})),r.pop()}else t.append(a,o(n))}(e),t}},7222:(e,t,r)=>{"use strict";var n=r(9641).version,i=r(5845),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var a={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new i(o(n," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!a[n]&&(a[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var a=n[o],s=t[a];if(s){var u=e[a],c=void 0===u||s(u,a,e);if(!0!==c)throw new i("option "+a+" must be "+c,i.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new i("Unknown option "+a,i.ERR_BAD_OPTION)}},validators:o}},9516:(e,t,r)=>{"use strict";var n,i=r(9012),o=Object.prototype.toString,a=(n=Object.create(null),function(e){var t=o.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function u(e){return Array.isArray(e)}function c(e){return void 0===e}var l=s("ArrayBuffer");function f(e){return null!==e&&"object"==typeof e}function d(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=s("Date"),p=s("File"),y=s("Blob"),m=s("FileList");function g(e){return"[object Function]"===o.call(e)}var b=s("URLSearchParams");function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),u(e))for(var r=0,n=e.length;r0;)a[o=n[i]]||(t[o]=e[o],a[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:A,isFileList:m}},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},9674:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<32;n++){var i=t.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(e){var t=e>>25;return(33554431&e)<<5^996825010&-(1&t)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(t=o(t),r=0;rt)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var u=e.slice(0,s),c=e.slice(s+1);if(c.length<6)return"Data too short";var l=a(u);if("string"==typeof l)return l;for(var f=[],d=0;d=c.length||f.push(p)}return 1!==l?"Invalid checksum for "+e:{prefix:u,words:f}}function u(e,t,r,n){for(var i=0,o=0,a=(1<=r;)o-=r,s.push(i>>o&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"==typeof i)throw new Error(i);for(var s=e+"1",u=0;u>5)throw new Error("Non 5-bit word");i=o(i)^c,s+=t.charAt(c)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){s+=t.charAt(i>>5*(5-u)&31)}return s},toWordsUnsafe:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},9404:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=u(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?d[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],l=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var y=f.modrn(l).toString(e);r=(f=f.idivn(l)).isZero()?y+r:d[c-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function y(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,y=h>>>13,m=0|a[2],g=8191&m,b=m>>>13,v=0|a[3],w=8191&v,A=v>>>13,k=0|a[4],E=8191&k,S=k>>>13,x=0|a[5],_=8191&x,P=x>>>13,T=0|a[6],I=8191&T,O=T>>>13,B=0|a[7],C=8191&B,N=B>>>13,R=0|a[8],M=8191&R,U=R>>>13,L=0|a[9],j=8191&L,F=L>>>13,D=0|s[0],H=8191&D,z=D>>>13,q=0|s[1],G=8191&q,K=q>>>13,V=0|s[2],J=8191&V,W=V>>>13,Q=0|s[3],Z=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(d,H)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(y,H)|0,o=Math.imul(y,z);var ge=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,H),i=(i=Math.imul(g,z))+Math.imul(b,H)|0,o=Math.imul(b,z),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,K)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,z))+Math.imul(A,H)|0,o=Math.imul(A,z),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,W)|0;var ve=(c+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,z))+Math.imul(S,H)|0,o=Math.imul(S,z),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Y)|0;var we=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(_,H),i=(i=Math.imul(_,z))+Math.imul(P,H)|0,o=Math.imul(P,z),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,K)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0;var Ae=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,z))+Math.imul(O,H)|0,o=Math.imul(O,z),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var ke=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,z))+Math.imul(N,H)|0,o=Math.imul(N,z),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0;var Ee=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,z))+Math.imul(U,H)|0,o=Math.imul(U,z),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,K)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0;var Se=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,z))+Math.imul(F,H)|0,o=Math.imul(F,z),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(U,G)|0,o=o+Math.imul(U,K)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(N,J)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ye)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,K))+Math.imul(F,G)|0,o=Math.imul(F,K),n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(U,J)|0,o=o+Math.imul(U,W)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var _e=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,W))+Math.imul(F,J)|0,o=Math.imul(F,W),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Pe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,Y))+Math.imul(F,Z)|0,o=Math.imul(F,Y),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Te=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Ie=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ye)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(U,ue)|0,o=o+Math.imul(U,ce)|0,n=n+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(N,fe)|0,o=o+Math.imul(N,de)|0;var Be=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(U,fe)|0,o=o+Math.imul(U,de)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ye)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ne=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ye)|0)+Math.imul(U,pe)|0))<<13)|0;c=((o=o+Math.imul(U,ye)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Re=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ye))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,u[0]=me,u[1]=ge,u[2]=be,u[3]=ve,u[4]=we,u[5]=Ae,u[6]=ke,u[7]=Ee,u[8]=Se,u[9]=xe,u[10]=_e,u[11]=Pe,u[12]=Te,u[13]=Ie,u[14]=Oe,u[15]=Be,u[16]=Ce,u[17]=Ne,u[18]=Re,0!==c&&(u[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(m=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?y(this,e,t):r<1024?g(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;!(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,y=1;!(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;!(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;!(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function P(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(k,A),k.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new E;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return w[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var y=h,m=0;0!==y.cmp(s);m++)y=y.redSqr();n(m=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new P(e)},i(P,_),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},P.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},P.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},P.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},8924:(e,t,r)=>{var n=r(8287).Buffer;e.exports=function(e){for(var t=new n(e.length),r=0,i=e.length-1;r<=i;++r,--i)t[r]=e[i],t[i]=e[r];return t}},8287:(e,t,r)=>{"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Q(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Q(e,SharedArrayBuffer)||e&&Q(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Z(e.length)?s(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),s(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return k(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function M(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,i,o)}function q(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw q(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=H(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function J(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},2341:e=>{"use strict";e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce(((t,r,n)=>t+(0===n?"":",")+e(void 0===r||"symbol"==typeof r?null:r)),"")+"]":"{"+Object.keys(t).sort().reduce(((r,n,i)=>{if(void 0===t[n]||"symbol"==typeof t[n])return r;return r+(0===r.length?"":",")+e(n)+":"+e(t[n])}),"")+"}"}},955:function(e,t,r){var n;e.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],a=[],s=[],u=[],c=[],l=[],f=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var y=e[r],m=e[y],g=e[m],b=257*e[p]^16843008*p;a[r]=b<<24|b>>>8,s[r]=b<<16|b>>>16,u[r]=b<<8|b>>>24,c[r]=b,b=16843009*g^65537*m^257*y^16843008*r,l[p]=b<<24|b>>>8,f[p]=b<<16|b>>>16,d[p]=b<<8|b>>>24,h[p]=b,r?(r=y^e[e[e[g^y]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],y=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a6&&a%r==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/r|0]<<24),o[a]=o[a-r]^c);for(var s=this._invKeySchedule=[],u=0;u>>24]]^f[i[c>>>16&255]]^d[i[c>>>8&255]]^h[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,d,h,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var u=this._nRounds,c=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],d=e[t+3]^r[3],h=4,p=1;p>>24]^i[l>>>16&255]^o[f>>>8&255]^a[255&d]^r[h++],m=n[l>>>24]^i[f>>>16&255]^o[d>>>8&255]^a[255&c]^r[h++],g=n[f>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&l]^r[h++],b=n[d>>>24]^i[c>>>16&255]^o[l>>>8&255]^a[255&f]^r[h++];c=y,l=m,f=g,d=b}y=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&d])^r[h++],m=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^r[h++],g=(s[f>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^r[h++],b=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^r[h++],e[t]=y,e[t+1]=m,e[t+2]=g,e[t+3]=b},keySize:8});e.AES=t._createHelper(y)}(),n.AES)},3128:function(e,t,r){var n;e.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var e=n,t=e.lib.BlockCipher,r=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function u(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][r]+e.sbox[1][n];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function c(e,t,r){let n,o=t,a=r;for(let t=0;t1;--t)o^=e.pbox[t],a=u(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[1],o^=e.pbox[0],{left:o,right:a}}function f(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=a[t][r]}let n=0;for(let a=0;a=r&&(n=0);let s=0,u=0,l=0;for(let t=0;t>>2];e.sigBytes-=t}},y=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:h,padding:p}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),m=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(u)},parse:function(e){var t,r=u.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=o.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),y.create({ciphertext:r,salt:t})}},g=r.SerializableCipher=i.extend({cfg:i.extend({format:m}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return y.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(t.kdf={}).OpenSSL={execute:function(e,t,r,n,i){if(n||(n=o.random(8)),i)a=c.create({keySize:t+r,hasher:i}).compute(e,n);else var a=c.create({keySize:t+r}).compute(e,n);var s=o.create(a.words.slice(t),4*r);return a.sigBytes=4*t,y.create({key:a,iv:s,salt:n})}},v=r.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:b}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var o=g.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=i.iv,g.decrypt.call(this,e,t,i.key,n)}})}()))},9021:function(e,t,r){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==r.g&&r.g.crypto&&(n=r.g.crypto),!n)try{n=r(477)}catch(e){}var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),a={},s=a.lib={},u=s.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=u.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=u.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},d=l.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},h=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,o);if(u){for(var f=0;f>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u>>6*(3-u)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var n=e.length,i=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var r=e.length,n=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*r)}}}(),n.enc.Utf16)},9506:function(e,t,r){var n,i,o,a,s,u,c,l;e.exports=(l=r(9021),r(5471),r(1025),i=(n=l).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,i=n.hasher.create(),o=a.create(),s=o.words,u=n.keySize,c=n.iterations;s.lengthn&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,u=o.words,c=0;c>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};r.prototype=e}}(),n.lib.WordArray)},4636:function(e,t,r){var n;e.exports=(n=r(9021),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],u=e[t+1],h=e[t+2],p=e[t+3],y=e[t+4],m=e[t+5],g=e[t+6],b=e[t+7],v=e[t+8],w=e[t+9],A=e[t+10],k=e[t+11],E=e[t+12],S=e[t+13],x=e[t+14],_=e[t+15],P=o[0],T=o[1],I=o[2],O=o[3];P=c(P,T,I,O,a,7,s[0]),O=c(O,P,T,I,u,12,s[1]),I=c(I,O,P,T,h,17,s[2]),T=c(T,I,O,P,p,22,s[3]),P=c(P,T,I,O,y,7,s[4]),O=c(O,P,T,I,m,12,s[5]),I=c(I,O,P,T,g,17,s[6]),T=c(T,I,O,P,b,22,s[7]),P=c(P,T,I,O,v,7,s[8]),O=c(O,P,T,I,w,12,s[9]),I=c(I,O,P,T,A,17,s[10]),T=c(T,I,O,P,k,22,s[11]),P=c(P,T,I,O,E,7,s[12]),O=c(O,P,T,I,S,12,s[13]),I=c(I,O,P,T,x,17,s[14]),P=l(P,T=c(T,I,O,P,_,22,s[15]),I,O,u,5,s[16]),O=l(O,P,T,I,g,9,s[17]),I=l(I,O,P,T,k,14,s[18]),T=l(T,I,O,P,a,20,s[19]),P=l(P,T,I,O,m,5,s[20]),O=l(O,P,T,I,A,9,s[21]),I=l(I,O,P,T,_,14,s[22]),T=l(T,I,O,P,y,20,s[23]),P=l(P,T,I,O,w,5,s[24]),O=l(O,P,T,I,x,9,s[25]),I=l(I,O,P,T,p,14,s[26]),T=l(T,I,O,P,v,20,s[27]),P=l(P,T,I,O,S,5,s[28]),O=l(O,P,T,I,h,9,s[29]),I=l(I,O,P,T,b,14,s[30]),P=f(P,T=l(T,I,O,P,E,20,s[31]),I,O,m,4,s[32]),O=f(O,P,T,I,v,11,s[33]),I=f(I,O,P,T,k,16,s[34]),T=f(T,I,O,P,x,23,s[35]),P=f(P,T,I,O,u,4,s[36]),O=f(O,P,T,I,y,11,s[37]),I=f(I,O,P,T,b,16,s[38]),T=f(T,I,O,P,A,23,s[39]),P=f(P,T,I,O,S,4,s[40]),O=f(O,P,T,I,a,11,s[41]),I=f(I,O,P,T,p,16,s[42]),T=f(T,I,O,P,g,23,s[43]),P=f(P,T,I,O,w,4,s[44]),O=f(O,P,T,I,E,11,s[45]),I=f(I,O,P,T,_,16,s[46]),P=d(P,T=f(T,I,O,P,h,23,s[47]),I,O,a,6,s[48]),O=d(O,P,T,I,b,10,s[49]),I=d(I,O,P,T,x,15,s[50]),T=d(T,I,O,P,m,21,s[51]),P=d(P,T,I,O,E,6,s[52]),O=d(O,P,T,I,p,10,s[53]),I=d(I,O,P,T,A,15,s[54]),T=d(T,I,O,P,u,21,s[55]),P=d(P,T,I,O,v,6,s[56]),O=d(O,P,T,I,_,10,s[57]),I=d(I,O,P,T,g,15,s[58]),T=d(T,I,O,P,S,21,s[59]),P=d(P,T,I,O,y,6,s[60]),O=d(O,P,T,I,k,10,s[61]),I=d(I,O,P,T,h,15,s[62]),T=d(T,I,O,P,w,21,s[63]),o[0]=o[0]+P|0,o[1]=o[1]+T|0,o[2]=o[2]+I|0,o[3]=o[3]+O|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<>>32-o)+t}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(Math),n.MD5)},2169:function(e,t,r){var n;e.exports=(n=r(9021),r(7165),n.mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,r,n){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var a=0;a>24))e+=1<<24;else{var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}return e}function r(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var i=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),r(a);var s=a.slice(0);n.encryptBlock(s,0);for(var u=0;u>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)},4905:function(e,t,r){var n;e.exports=(n=r(9021),r(7165),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)},482:function(e,t,r){var n;e.exports=(n=r(9021),r(7165),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)},8124:function(e,t,r){var n;e.exports=(n=r(9021),r(7165),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},2155:function(e,t,r){var n;e.exports=(n=r(9021),r(7165),n.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},n.pad.ZeroPadding)},19:function(e,t,r){var n,i,o,a,s,u,c,l,f;e.exports=(f=r(9021),r(3009),r(1025),i=(n=f).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.SHA256,c=s.HMAC,l=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=c.create(r.hasher,e),i=a.create(),o=a.create([1]),s=i.words,u=o.words,l=r.keySize,f=r.iterations;s.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&l,d=l<<16|65535&c;for(n[0]^=c,n[1]^=f,n[2]^=l,n[3]^=d,n[4]^=c,n[5]^=f,n[6]^=l,n[7]^=d,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),n.RabbitLegacy)},6298:function(e,t,r){var n;e.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],a=[],s=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)u.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&l,d=l<<16|65535&c;for(i[0]^=c,i[1]^=f,i[2]^=l,i[3]^=d,i[4]^=c,i[5]^=f,i[6]^=l,i[7]^=d,r=0;r<4;r++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),n.Rabbit)},7193:function(e,t,r){var n;e.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var u=n[i];n[i]=n[o],n[o]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var a=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),n.RC4)},8056:function(e,t,r){var n;e.exports=(n=r(9021),function(){var e=n,t=e.lib,r=t.WordArray,i=t.Hasher,o=e.algo,a=r.create([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]),s=r.create([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]),u=r.create([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]),c=r.create([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]),l=r.create([0,1518500249,1859775393,2400959708,2840853838]),f=r.create([1352829926,1548603684,1836072691,2053994217,0]),d=o.RIPEMD160=i.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,d,v,w,A,k,E,S,x,_,P,T=this._hash.words,I=l.words,O=f.words,B=a.words,C=s.words,N=u.words,R=c.words;for(k=o=T[0],E=d=T[1],S=v=T[2],x=w=T[3],_=A=T[4],r=0;r<80;r+=1)P=o+e[t+B[r]]|0,P+=r<16?h(d,v,w)+I[0]:r<32?p(d,v,w)+I[1]:r<48?y(d,v,w)+I[2]:r<64?m(d,v,w)+I[3]:g(d,v,w)+I[4],P=(P=b(P|=0,N[r]))+A|0,o=A,A=w,w=b(v,10),v=d,d=P,P=k+e[t+C[r]]|0,P+=r<16?g(E,S,x)+O[0]:r<32?m(E,S,x)+O[1]:r<48?y(E,S,x)+O[2]:r<64?p(E,S,x)+O[3]:h(E,S,x)+O[4],P=(P=b(P|=0,R[r]))+_|0,k=_,_=x,x=b(S,10),S=E,E=P;P=T[1]+v+x|0,T[1]=T[2]+w+_|0,T[2]=T[3]+A+k|0,T[3]=T[4]+o+E|0,T[4]=T[0]+d+S|0,T[0]=P},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function y(e,t,r){return(e|~t)^r}function m(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}e.RIPEMD160=i._createHelper(d),e.HmacRIPEMD160=i._createHmacHelper(d)}(Math),n.RIPEMD160)},5471:function(e,t,r){var n,i,o,a,s,u,c,l;e.exports=(l=r(9021),i=(n=l).lib,o=i.WordArray,a=i.Hasher,s=n.algo,u=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],c=0;c<80;c++){if(c<16)u[c]=0|e[t+c];else{var l=u[c-3]^u[c-8]^u[c-14]^u[c-16];u[c]=l<<1|l>>>31}var f=(n<<5|n>>>27)+s+u[c];f+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=n,n=f}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=a._createHelper(c),n.HmacSHA1=a._createHmacHelper(c),l.SHA1)},6308:function(e,t,r){var n,i,o,a,s,u;e.exports=(u=r(9021),r(3009),i=(n=u).lib.WordArray,o=n.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),n.SHA224=a._createHelper(s),n.HmacSHA224=a._createHmacHelper(s),u.SHA224)},3009:function(e,t,r){var n;e.exports=(n=r(9021),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],f=r[6],d=r[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],y=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,m=c[h-2],g=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;c[h]=y+c[h-7]+g+c[h-16]}var b=n&i^n&o^i&o,v=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&f)+u[h]+c[h];d=f,f=l,l=s,s=a+w|0,a=o,o=i,i=n,n=w+(v+b)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+d|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),n.SHA256)},5953:function(e,t,r){var n;e.exports=(n=r(9021),r(3240),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.x64.Word,s=t.algo,u=[],c=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,d=0;d<7;d++){if(1&i){var h=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(T=r[i]).high^=a,T.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var h=0,p=0,y=0;y<5;y++)h^=(T=r[d+5*y]).high,p^=T.low;var m=f[d];m.high=h,m.low=p}for(d=0;d<5;d++){var g=f[(d+4)%5],b=f[(d+1)%5],v=b.high,w=b.low;for(h=g.high^(v<<1|w>>>31),p=g.low^(w<<1|v>>>31),y=0;y<5;y++)(T=r[d+5*y]).high^=h,T.low^=p}for(var A=1;A<25;A++){var k=(T=r[A]).high,E=T.low,S=u[A];S<32?(h=k<>>32-S,p=E<>>32-S):(h=E<>>64-S,p=k<>>64-S);var x=f[c[A]];x.high=h,x.low=p}var _=f[0],P=r[0];for(_.high=P.high,_.low=P.low,d=0;d<5;d++)for(y=0;y<5;y++){var T=r[A=d+5*y],I=f[A],O=f[(d+1)%5+5*y],B=f[(d+2)%5+5*y];T.high=I.high^~O.high&B.high,T.low=I.low^~O.low&B.low}T=r[0];var C=l[s];T.high^=C.high,T.low^=C.low}},_doFinalize:function(){var t=this._data,r=t.words,n=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],l=0;l>>24)|4278255360&(d<<24|d>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),c.push(h),c.push(d)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(d),t.HmacSHA3=o._createHmacHelper(d)}(Math),n.SHA3)},9557:function(e,t,r){var n,i,o,a,s,u,c,l;e.exports=(l=r(9021),r(3240),r(1380),i=(n=l).x64,o=i.Word,a=i.WordArray,s=n.algo,u=s.SHA512,c=s.SHA384=u.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=u._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=u._createHelper(c),n.HmacSHA384=u._createHmacHelper(c),l.SHA384)},1380:function(e,t,r){var n;e.exports=(n=r(9021),r(3240),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var l=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],f=r[6],d=r[7],h=n.high,p=n.low,y=i.high,m=i.low,g=o.high,b=o.low,v=a.high,w=a.low,A=s.high,k=s.low,E=l.high,S=l.low,x=f.high,_=f.low,P=d.high,T=d.low,I=h,O=p,B=y,C=m,N=g,R=b,M=v,U=w,L=A,j=k,F=E,D=S,H=x,z=_,q=P,G=T,K=0;K<80;K++){var V,J,W=c[K];if(K<16)J=W.high=0|e[t+2*K],V=W.low=0|e[t+2*K+1];else{var Q=c[K-15],Z=Q.high,Y=Q.low,X=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^Z>>>7,$=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^(Y>>>7|Z<<25),ee=c[K-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=c[K-7],ae=oe.high,se=oe.low,ue=c[K-16],ce=ue.high,le=ue.low;J=(J=(J=X+ae+((V=$+se)>>>0<$>>>0?1:0))+ne+((V+=ie)>>>0>>0?1:0))+ce+((V+=le)>>>0>>0?1:0),W.high=J,W.low=V}var fe,de=L&F^~L&H,he=j&D^~j&z,pe=I&B^I&N^B&N,ye=O&C^O&R^C&R,me=(I>>>28|O<<4)^(I<<30|O>>>2)^(I<<25|O>>>7),ge=(O>>>28|I<<4)^(O<<30|I>>>2)^(O<<25|I>>>7),be=(L>>>14|j<<18)^(L>>>18|j<<14)^(L<<23|j>>>9),ve=(j>>>14|L<<18)^(j>>>18|L<<14)^(j<<23|L>>>9),we=u[K],Ae=we.high,ke=we.low,Ee=q+be+((fe=G+ve)>>>0>>0?1:0),Se=ge+ye;q=H,G=z,H=F,z=D,F=L,D=j,L=M+(Ee=(Ee=(Ee=Ee+de+((fe+=he)>>>0>>0?1:0))+Ae+((fe+=ke)>>>0>>0?1:0))+J+((fe+=V)>>>0>>0?1:0))+((j=U+fe|0)>>>0>>0?1:0)|0,M=N,U=R,N=B,R=C,B=I,C=O,I=Ee+(me+pe+(Se>>>0>>0?1:0))+((O=fe+Se|0)>>>0>>0?1:0)|0}p=n.low=p+O,n.high=h+I+(p>>>0>>0?1:0),m=i.low=m+C,i.high=y+B+(m>>>0>>0?1:0),b=o.low=b+R,o.high=g+N+(b>>>0>>0?1:0),w=a.low=w+U,a.high=v+M+(w>>>0>>0?1:0),k=s.low=k+j,s.high=A+L+(k>>>0>>0?1:0),S=l.low=S+D,l.high=E+F+(S>>>0>>0?1:0),_=f.low=_+z,f.high=x+H+(_>>>0>>0?1:0),T=d.low=T+G,d.high=P+q+(T>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),n.SHA512)},7628:function(e,t,r){var n;e.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var e=n,t=e.lib,r=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],l=u[o];for(r=0;r<24;r++)c[r/6|0]|=t[(s[r]-1+l)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(s[r+24]-1+l)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),d.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,u=0;u<8;u++)s|=c[u][((a^i[u])&l[u])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,d.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(r.create(t)),this._des2=f.createEncryptor(r.create(n)),this._des3=f.createEncryptor(r.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),n.TripleDES)},3240:function(e,t,r){var n;e.exports=(n=r(9021),function(e){var t=n,r=t.lib,i=r.Base,o=r.WordArray,a=t.x64={};a.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(4542),i=r(4224),o=r(7292);function a(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=a,t.createCurve=function(e,t){const r=t=>(0,o.weierstrass)({...e,...a(t)});return Object.freeze({...r(t),create:r})}},6023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(5646),i=r(8421),o=BigInt(0),a=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&a&&(n=n.add(i)),i=i.double(),r>>=a;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let a=e,s=a;for(let e=0;e>=h,n>u&&(n-=d,o+=a);const s=t,p=t+Math.abs(n)-1,y=e%2!=0,m=n<0;0===n?l=l.add(r(y,i[s])):c=c.add(r(m,i[p]))}return{p:c,f:l}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},2124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(5646),i=r(8421);const o=i.bytesToNumberBE;function a(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function s(e,t){const r=new Uint8Array(e.length);for(let n=0;n255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=n,f=Math.ceil(r/o);if(f>255)throw new Error("Invalid xmd length");const d=(0,i.concatBytes)(t,a(t.length,1)),h=a(0,l),p=a(r,2),y=new Array(f),m=n((0,i.concatBytes)(h,e,p,a(0,1),d));y[0]=n((0,i.concatBytes)(m,a(1,1),d));for(let e=1;e<=f;e++){const t=[s(m,y[e-1]),a(e+1,1),d];y[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...y).slice(0,r)}function f(e,t,r,n,o){if(u(e),u(t),c(r),t.length>255){const e=Math.ceil(2*n/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(a(r,2)).update(t).update(a(t.length,1)).digest()}function d(e,t,r){(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:a,k:s,m:d,hash:h,expand:p,DST:y}=r;u(e),c(t);const m=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,i.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(y),g=a.toString(2).length,b=Math.ceil((g+s)/8),v=t*d*b;let w;if("xmd"===p)w=l(e,m,v,h);else if("xof"===p)w=f(e,m,v,s,h);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const A=new Array(t);for(let e=0;eArray.from(e).reverse()));return(t,n)=>{const[i,o,a,s]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(i,o),n=e.mul(n,e.div(a,s)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=d(n,2,{...r,DST:r.DST,...i}),a=e.fromAffine(t(o[0])),s=e.fromAffine(t(o[1])),u=a.add(s).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,i){const o=d(n,1,{...r,DST:r.encodeDST,...i}),a=e.fromAffine(t(o[0])).clearCofactor();return a.assertValidity(),a}}}},5646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(8421),i=BigInt(0),o=BigInt(1),a=BigInt(2),s=BigInt(3),u=BigInt(4),c=BigInt(5),l=BigInt(8);BigInt(9),BigInt(16);function f(e,t){const r=e%t;return r>=i?r:t+r}function d(e,t,r){if(r<=i||t 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function h(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,a=i,s=o,u=o,c=i;for(;r!==i;){const e=n/r,t=n%r,i=a-u*e,o=s-c*e;n=r,r=t,a=u,s=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return f(a,t)}function p(e){const t=(e-o)/a;let r,n,s;for(r=e-o,n=0;r%a===i;r/=a,n++);for(s=a;si;)n*=n,n%=r;return n},t.invert=h,t.tonelliShanks=p,t.FpSqrt=y;t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;const m=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function g(e,t,r){if(r 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,a=t;for(;r>i;)r&o&&(n=e.mul(n,a)),a=e.sqr(a),r>>=o;return n}function b(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}function v(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function w(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function A(e){const t=w(e);return t+Math.ceil(t/2)}t.validateField=function(e){const t=m.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=g,t.FpInvertBatch=b,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?h(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-o)/a;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,a={}){if(e<=i)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:u}=v(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=y(e),l=Object.freeze({ORDER:e,BITS:s,BYTES:u,MASK:(0,n.bitMask)(s),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&te===i,isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>g(l,e,t),div:(t,r)=>f(t*h(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:a.sqrt||(e=>c(l,e)),invertBatch:e=>b(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,u):(0,n.numberToBytesBE)(e,u),fromBytes:e=>{if(e.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,a=v(t).nByteLength+8;if(a<24||i1024)throw new Error(`hashToPrivateScalar: expected ${a}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=w,t.getMinHashLength=A,t.mapHashToField=function(e,t,r=!1){const i=e.length,a=w(t),s=A(t);if(i<16||i1024)throw new Error(`expected ${s}-1024 bytes of input, got ${i}`);const u=f(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(u,a):(0,n.numberToBytesBE)(u,a)}},8421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),i=BigInt(2),o=e=>e instanceof Uint8Array,a=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function s(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;re+t.length),0));let r=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}t.bytesToHex=s,t.numberToHexUnpadded=u,t.hexToNumber=c,t.hexToBytes=l,t.bytesToNumberBE=function(e){return c(s(e))},t.bytesToNumberLE=function(e){if(!o(e))throw new Error("Uint8Array expected");return c(s(Uint8Array.from(e).reverse()))},t.numberToBytesBE=f,t.numberToBytesLE=function(e,t){return f(e,t).reverse()},t.numberToVarBytesBE=function(e){return l(u(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=d,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;rr;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n};t.bitSet=(e,t,i)=>e|(i?n:r)<(i<new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=h(e),i=h(e),o=0;const a=()=>{n.fill(1),i.fill(0),o=0},s=(...e)=>r(i,n,...e),u=(e=h())=>{i=s(p([0]),e),n=s(),0!==e.length&&(i=s(p([1]),e),n=s())},c=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e{let r;for(a(),u(e);!(r=t(c()));)u();return a(),r}};const y={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=y[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},7292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(5646),i=r(8421),o=r(8421),a=r(6023);const{bytesToNumberBE:s,hexToBytes:u}=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:s(i),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?u(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:o,l:a}=t.DER._parseInt(n.subarray(2)),{d:s,l:c}=t.DER._parseInt(a);if(c.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,a=i.length/2,s=r(o),u=r(a);return`30${r(a+o+4)}02${u}${i}02${s}${n}`}};const c=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(3),h=BigInt(4);function p(e){const t=function(e){const t=(0,a.validateBasic)(e);i.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,s=t.toBytes||((e,t,n)=>{const o=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),u=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:i}=t,o=r.sqr(e),a=r.mul(o,e);return r.add(r.add(a,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function h(e){return"bigint"==typeof e&&cr.eql(e,r.ZERO);return i(t)&&i(n)?b.ZERO:new b(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(u((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(y(e))}_setWindowSize(e){this._WINDOW_SIZE=e,m.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),o=f(e);if(!r.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){g(e);const{px:t,py:n,pz:i}=this,{px:o,py:a,pz:s}=e,u=r.eql(r.mul(t,s),r.mul(o,i)),c=r.eql(r.mul(n,s),r.mul(a,i));return u&&c}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,d),{px:o,py:a,pz:s}=this;let u=r.ZERO,c=r.ZERO,l=r.ZERO,f=r.mul(o,o),h=r.mul(a,a),p=r.mul(s,s),y=r.mul(o,a);return y=r.add(y,y),l=r.mul(o,s),l=r.add(l,l),u=r.mul(e,l),c=r.mul(i,p),c=r.add(u,c),u=r.sub(h,c),c=r.add(h,c),c=r.mul(u,c),u=r.mul(y,u),l=r.mul(i,l),p=r.mul(e,p),y=r.sub(f,p),y=r.mul(e,y),y=r.add(y,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,y),c=r.add(c,f),p=r.mul(a,s),p=r.add(p,p),f=r.mul(p,y),u=r.sub(u,f),l=r.mul(p,h),l=r.add(l,l),l=r.add(l,l),new b(u,c,l)}add(e){g(e);const{px:n,py:i,pz:o}=this,{px:a,py:s,pz:u}=e;let c=r.ZERO,l=r.ZERO,f=r.ZERO;const h=t.a,p=r.mul(t.b,d);let y=r.mul(n,a),m=r.mul(i,s),v=r.mul(o,u),w=r.add(n,i),A=r.add(a,s);w=r.mul(w,A),A=r.add(y,m),w=r.sub(w,A),A=r.add(n,o);let k=r.add(a,u);return A=r.mul(A,k),k=r.add(y,v),A=r.sub(A,k),k=r.add(i,o),c=r.add(s,u),k=r.mul(k,c),c=r.add(m,v),k=r.sub(k,c),f=r.mul(h,A),c=r.mul(p,v),f=r.add(c,f),c=r.sub(m,f),f=r.add(m,f),l=r.mul(c,f),m=r.add(y,y),m=r.add(m,y),v=r.mul(h,v),A=r.mul(p,A),m=r.add(m,v),v=r.sub(y,v),v=r.mul(h,v),A=r.add(A,v),y=r.mul(m,A),l=r.add(l,y),y=r.mul(k,A),c=r.mul(w,c),c=r.sub(c,y),y=r.mul(w,m),f=r.mul(k,f),f=r.add(f,y),new b(c,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return w.wNAFCached(this,m,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}))}multiplyUnsafe(e){const n=b.ZERO;if(e===c)return n;if(p(e),e===l)return this;const{endo:i}=t;if(!i)return w.unsafeLadder(this,e);let{k1neg:o,k1:a,k2neg:s,k2:u}=i.splitScalar(e),f=n,d=n,h=this;for(;a>c||u>c;)a&l&&(f=f.add(h)),u&l&&(d=d.add(h)),h=h.double(),a>>=l,u>>=l;return o&&(f=f.negate()),s&&(d=d.negate()),d=new b(r.mul(d.px,i.beta),d.py,d.pz),f.add(d)}multiply(e){p(e);let n,i,o=e;const{endo:a}=t;if(a){const{k1neg:e,k1:t,k2neg:s,k2:u}=a.splitScalar(o);let{p:c,f:l}=this.wNAF(t),{p:f,f:d}=this.wNAF(u);c=w.constTimeNegate(e,c),f=w.constTimeNegate(s,f),f=new b(r.mul(f.px,a.beta),f.py,f.pz),n=c.add(f),i=l.add(d)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return b.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=b.BASE,i=(e,t)=>t!==c&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const a=r.mul(t,e),s=r.mul(n,e),u=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:a,y:s}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),s(b,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);const v=t.nBitLength,w=(0,a.wNAF)(b,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:y,weierstrassEquation:f,isWithinCurveOrder:h}}function y(e,t){const r=e.ORDER;let n=c;for(let e=r-l;e%f===c;e/=f)n+=l;const i=n,o=f<{let n=m,o=e.pow(r,p),a=e.sqr(o);a=e.mul(a,r);let s=e.mul(t,a);s=e.pow(s,u),s=e.mul(s,o),o=e.mul(s,r),a=e.mul(s,t);let c=e.mul(a,o);s=e.pow(c,y);let d=e.eql(s,e.ONE);o=e.mul(a,g),s=e.mul(c,n),a=e.cmov(o,a,d),c=e.cmov(s,c,d);for(let t=i;t>l;t--){let r=t-f;r=f<{let o=e.sqr(i);const a=e.mul(t,i);o=e.mul(o,a);let s=e.pow(o,r);s=e.mul(s,a);const u=e.mul(s,n),c=e.mul(e.sqr(s),i),l=e.eql(c,t);return{isValid:l,value:e.cmov(u,s,l)}}}return b}t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,a.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:s,n:u}=r,f=s.BYTES+1,d=2*s.BYTES+1;function h(e){return n.mod(e,u)}function y(e){return n.invert(e,u)}const{ProjectivePoint:m,normPrivateKeyToScalar:g,weierstrassEquation:b,isWithinCurveOrder:v}=p({...r,toBytes(e,t,r){const n=t.toAffine(),o=s.toBytes(n.x),a=i.concatBytes;return r?a(Uint8Array.from([t.hasEvenY()?2:3]),o):a(Uint8Array.from([4]),o,s.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===d&&4===r){return{x:s.fromBytes(n.subarray(0,s.BYTES)),y:s.fromBytes(n.subarray(s.BYTES,2*s.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${d} uncompressed bytes`)}{const e=i.bytesToNumberBE(n);if(!(c<(o=e)&&oi.bytesToHex(i.numberToBytesBE(e,r.nByteLength));function A(e){return e>u>>l}const k=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class E{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*t),new E(k(e,0,t),k(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,o.ensureBytes)("DER",e));return new E(r,n)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new E(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:i}=this,a=P((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const u=2===i||3===i?t+r.n:t;if(u>=s.ORDER)throw new Error("recovery id 2 or 3 invalid");const c=1&i?"03":"02",l=m.fromHex(c+w(u)),f=y(u),d=h(-a*f),p=h(n*f),g=m.BASE.multiplyAndAddUnsafe(l,d,p);if(!g)throw new Error("point at infinify");return g.assertValidity(),g}hasHighS(){return A(this.s)}normalizeS(){return this.hasHighS()?new E(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const S={isValidPrivateKey(e){try{return g(e),!0}catch(e){return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{const e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute:(e=8,t=m.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function x(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===d:r?n===2*f||n===2*d:e instanceof m}const _=r.bits2int||function(e){const t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},P=r.bits2int_modN||function(e){return h(_(e))},T=i.bitMask(r.nBitLength);function I(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(c<=e&&ee in n)))throw new Error("sign() legacy options not supported");const{hash:a,randomBytes:u}=r;let{lowS:f,prehash:d,extraEntropy:p}=n;null==f&&(f=!0),e=(0,o.ensureBytes)("msgHash",e),d&&(e=(0,o.ensureBytes)("prehashed msgHash",a(e)));const b=P(e),w=g(t),k=[I(w),I(b)];if(null!=p){const e=!0===p?u(s.BYTES):p;k.push((0,o.ensureBytes)("extraEntropy",e))}const S=i.concatBytes(...k),x=b;return{seed:S,k2sig:function(e){const t=_(e);if(!v(t))return;const r=y(t),n=m.BASE.multiply(t).toAffine(),i=h(n.x);if(i===c)return;const o=h(r*h(x+i*w));if(o===c)return;let a=(n.x===i?0:2)|Number(n.y&l),s=o;return f&&A(o)&&(s=function(e){return A(e)?h(-e):e}(o),a^=1),new E(i,s,a)}}}const B={lowS:r.lowS,prehash:!1},C={lowS:r.lowS,prehash:!1};return m.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return m.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(x(e))throw new Error("first arg must be private key");if(!x(t))throw new Error("second arg must be public key");return m.fromHex(t).multiply(g(e)).toRawBytes(r)},sign:function(e,t,n=B){const{seed:o,k2sig:a}=O(e,t,n),s=r;return i.createHmacDrbg(s.hash.outputLen,s.nByteLength,s.hmac)(o,a)},verify:function(e,n,i,a=C){const s=e;if(n=(0,o.ensureBytes)("msgHash",n),i=(0,o.ensureBytes)("publicKey",i),"strict"in a)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:c}=a;let l,f;try{if("string"==typeof s||s instanceof Uint8Array)try{l=E.fromDER(s)}catch(e){if(!(e instanceof t.DER.Err))throw e;l=E.fromCompact(s)}else{if("object"!=typeof s||"bigint"!=typeof s.r||"bigint"!=typeof s.s)throw new Error("PARSE");{const{r:e,s:t}=s;l=new E(e,t)}}f=m.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;c&&(n=r.hash(n));const{r:d,s:p}=l,g=P(n),b=y(p),v=h(g*b),w=h(d*b),A=m.BASE.multiplyAndAddUnsafe(f,v,w)?.toAffine();return!!A&&h(A.x)===d},ProjectivePoint:m,Signature:E,utils:S}},t.SWUFpSqrtRatio=y,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=y(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,a,s,u,c,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),a=e.add(o,e.ONE),a=e.mul(a,t.B),s=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),s=e.mul(s,t.A),o=e.sqr(a),c=e.sqr(s),u=e.mul(c,t.A),o=e.add(o,u),o=e.mul(o,a),c=e.mul(c,s),u=e.mul(c,t.B),o=e.add(o,u),l=e.mul(i,a);const{isValid:d,value:h}=r(o,c);f=e.mul(i,n),f=e.mul(f,h),l=e.cmov(l,a,d),f=e.cmov(f,h,d);const p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),l=e.div(l,s),{x:l,y:f}}}},985:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const n=r(6978),i=r(4224),o=r(5646),a=r(7292),s=r(8421),u=r(2124),c=r(7749),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),d=BigInt(1),h=BigInt(2),p=(e,t)=>(e+t/h)/t;function y(e){const t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),a=BigInt(22),s=BigInt(23),u=BigInt(44),c=BigInt(88),f=e*e*e%t,d=f*f*e%t,p=(0,o.pow2)(d,r,t)*d%t,y=(0,o.pow2)(p,r,t)*d%t,g=(0,o.pow2)(y,h,t)*f%t,b=(0,o.pow2)(g,i,t)*g%t,v=(0,o.pow2)(b,a,t)*b%t,w=(0,o.pow2)(v,u,t)*v%t,A=(0,o.pow2)(w,c,t)*w%t,k=(0,o.pow2)(A,u,t)*v%t,E=(0,o.pow2)(k,r,t)*d%t,S=(0,o.pow2)(E,s,t)*b%t,x=(0,o.pow2)(S,n,t)*f%t,_=(0,o.pow2)(x,h,t);if(!m.eql(m.sqr(_),e))throw new Error("Cannot find square root");return _}const m=(0,o.Field)(l,void 0,void 0,{sqrt:y});t.secp256k1=(0,c.createCurve)({a:BigInt(0),b:BigInt(7),Fp:m,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-d*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=BigInt("0x100000000000000000000000000000000"),u=p(a*e,t),c=p(-n*e,t);let l=(0,o.mod)(e-u*r-c*i,t),h=(0,o.mod)(-u*n-c*a,t);const y=l>s,m=h>s;if(y&&(l=t-l),m&&(h=t-h),l>s||h>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:y,k1:l,k2neg:m,k2:h}}}},n.sha256);const g=BigInt(0),b=e=>"bigint"==typeof e&&ge.charCodeAt(0))));r=(0,s.concatBytes)(t,t),v[e]=r}return(0,n.sha256)((0,s.concatBytes)(r,...t))}const A=e=>e.toRawBytes(!0).slice(1),k=e=>(0,s.numberToBytesBE)(e,32),E=e=>(0,o.mod)(e,l),S=e=>(0,o.mod)(e,f),x=t.secp256k1.ProjectivePoint;function _(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=x.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:S(-r),bytes:A(n)}}function P(e){if(!b(e))throw new Error("bad x: need 0 < x < p");const t=E(e*e);let r=y(E(t*e+BigInt(7)));r%h!==g&&(r=E(-r));const n=new x(e,r,d);return n.assertValidity(),n}function T(...e){return S((0,s.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function I(e){return _(e).bytes}function O(e,t,r=(0,i.randomBytes)(32)){const n=(0,s.ensureBytes)("message",e),{bytes:o,scalar:a}=_(t),u=(0,s.ensureBytes)("auxRand",r,32),c=k(a^(0,s.bytesToNumberBE)(w("BIP0340/aux",u))),l=w("BIP0340/nonce",c,o,n),f=S((0,s.bytesToNumberBE)(l));if(f===g)throw new Error("sign failed: k is zero");const{bytes:d,scalar:h}=_(f),p=T(d,o,n),y=new Uint8Array(64);if(y.set(d,0),y.set(k(S(h+p*a)),32),!B(y,n,o))throw new Error("sign: Invalid signature produced");return y}function B(e,t,r){const n=(0,s.ensureBytes)("signature",e,64),i=(0,s.ensureBytes)("message",t),o=(0,s.ensureBytes)("publicKey",r,32);try{const e=P((0,s.bytesToNumberBE)(o)),t=(0,s.bytesToNumberBE)(n.subarray(0,32));if(!b(t))return!1;const r=(0,s.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&g(0,u.isogenyMap)(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),N=(()=>(0,a.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))}))(),R=(()=>(0,u.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=N(m.create(e[0]));return C(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();t.hashToCurve=R.hashToCurve,t.encodeToCurve=R.encodeToCurve},7302:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){i(e);const r=t.outputLen;if(e.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(7302),i=r(4224);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:o}=this,a=(e=(0,i.toBytes)(e)).length;for(let n=0;no-s&&(this.process(r,0),s=0);for(let e=s;e>i&o),s=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,a,n),e.setUint32(t+c,s,n)}(r,o-8,BigInt(8*this.length),a),this.process(r,0);const u=(0,i.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0);t.toBig=a;const s=(e,t,r)=>e>>>r;t.shrSH=s;const u=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=u;const c=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=c;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const d=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=d;const h=(e,t)=>t;t.rotr32H=h;const p=(e,t)=>e;t.rotr32L=p;const y=(e,t,r)=>e<>>32-r;t.rotlSH=y;const m=(e,t,r)=>t<>>32-r;t.rotlSL=m;const g=(e,t,r)=>t<>>64-r;t.rotlBH=g;const b=(e,t,r)=>e<>>64-r;function v(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=b,t.add=v;const w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;const A=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=A;const k=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=k;const E=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=E;const S=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=S;const x=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=x;const _={fromBig:i,split:o,toBig:a,shrSH:s,shrSL:u,rotrSH:c,rotrSL:l,rotrBH:f,rotrBL:d,rotr32H:h,rotr32L:p,rotlSH:y,rotlSL:m,rotlBH:g,rotlBL:b,add:v,add3L:w,add3H:A,add4L:k,add4H:E,add5H:x,add5L:S};t.default=_},1760:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},4542:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(7302),i=r(4224);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,a=new Uint8Array(o);a.set(r.length>o?e.create().update(r).digest():r);for(let e=0;enew o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},9e3:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Async=t.pbkdf2=void 0;const n=r(7302),i=r(4542),o=r(4224);function a(e,t,r,a){(0,n.hash)(e);const s=(0,o.checkOpts)({dkLen:32,asyncTick:10},a),{c:u,dkLen:c,asyncTick:l}=s;if((0,n.number)(u),(0,n.number)(c),(0,n.number)(l),u<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const f=(0,o.toBytes)(t),d=(0,o.toBytes)(r),h=new Uint8Array(c),p=i.hmac.create(e,f),y=p._cloneInto().update(d);return{c:u,dkLen:c,asyncTick:l,DK:h,PRF:p,PRFSalt:y}}function s(e,t,r,n,i){return e.destroy(),t.destroy(),n&&n.destroy(),i.fill(0),r}t.pbkdf2=function(e,t,r,n){const{c:i,dkLen:u,DK:c,PRF:l,PRFSalt:f}=a(e,t,r,n);let d;const h=new Uint8Array(4),p=(0,o.createView)(h),y=new Uint8Array(l.outputLen);for(let e=1,t=0;t{f._cloneInto(h).update(m).digestInto(m);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const n=r(5184),i=r(4224),o=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),a=Uint8Array.from({length:16},((e,t)=>t));let s=[a],u=[a.map((e=>(9*e+5)%16))];for(let e=0;e<4;e++)for(let t of[s,u])t.push(t[e].map((e=>o[e])));const c=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),l=s.map(((e,t)=>e.map((e=>c[t][e])))),f=u.map(((e,t)=>e.map((e=>c[t][e])))),d=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),h=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),p=(e,t)=>e<>>32-t;function y(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const m=new Uint32Array(16);class g extends n.SHA2{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)m[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,i=0|this.h1,o=i,a=0|this.h2,c=a,g=0|this.h3,b=g,v=0|this.h4,w=v;for(let e=0;e<5;e++){const t=4-e,A=d[e],k=h[e],E=s[e],S=u[e],x=l[e],_=f[e];for(let t=0;t<16;t++){const n=p(r+y(e,i,a,g)+m[E[t]]+A,x[t])+v|0;r=v,v=g,g=0|p(a,10),a=i,i=n}for(let e=0;e<16;e++){const r=p(n+y(t,o,c,b)+m[S[e]]+k,_[e])+w|0;n=w,w=b,b=0|p(c,10),c=o,o=r}}this.set(this.h1+a+b|0,this.h2+g+w|0,this.h3+v+n|0,this.h4+r+o|0,this.h0+i+c|0)}roundClean(){m.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}t.RIPEMD160=g,t.ripemd160=(0,i.wrapConstructor)((()=>new g))},9462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptAsync=t.scrypt=void 0;const n=r(7302),i=r(6978),o=r(9e3),a=r(4224),s=(e,t)=>e<>>32-t;function u(e,t,r,n,i,o){let a=e[t++]^r[n++],u=e[t++]^r[n++],c=e[t++]^r[n++],l=e[t++]^r[n++],f=e[t++]^r[n++],d=e[t++]^r[n++],h=e[t++]^r[n++],p=e[t++]^r[n++],y=e[t++]^r[n++],m=e[t++]^r[n++],g=e[t++]^r[n++],b=e[t++]^r[n++],v=e[t++]^r[n++],w=e[t++]^r[n++],A=e[t++]^r[n++],k=e[t++]^r[n++],E=a,S=u,x=c,_=l,P=f,T=d,I=h,O=p,B=y,C=m,N=g,R=b,M=v,U=w,L=A,j=k;for(let e=0;e<8;e+=2)P^=s(E+M|0,7),B^=s(P+E|0,9),M^=s(B+P|0,13),E^=s(M+B|0,18),C^=s(T+S|0,7),U^=s(C+T|0,9),S^=s(U+C|0,13),T^=s(S+U|0,18),L^=s(N+I|0,7),x^=s(L+N|0,9),I^=s(x+L|0,13),N^=s(I+x|0,18),_^=s(j+R|0,7),O^=s(_+j|0,9),R^=s(O+_|0,13),j^=s(R+O|0,18),S^=s(E+_|0,7),x^=s(S+E|0,9),_^=s(x+S|0,13),E^=s(_+x|0,18),I^=s(T+P|0,7),O^=s(I+T|0,9),P^=s(O+I|0,13),T^=s(P+O|0,18),R^=s(N+C|0,7),B^=s(R+N|0,9),C^=s(B+R|0,13),N^=s(C+B|0,18),M^=s(j+L|0,7),U^=s(M+j|0,9),L^=s(U+M|0,13),j^=s(L+U|0,18);i[o++]=a+E|0,i[o++]=u+S|0,i[o++]=c+x|0,i[o++]=l+_|0,i[o++]=f+P|0,i[o++]=d+T|0,i[o++]=h+I|0,i[o++]=p+O|0,i[o++]=y+B|0,i[o++]=m+C|0,i[o++]=g+N|0,i[o++]=b+R|0,i[o++]=v+M|0,i[o++]=w+U|0,i[o++]=A+L|0,i[o++]=k+j|0}function c(e,t,r,n,i){let o=n+0,a=n+16*i;for(let n=0;n<16;n++)r[a+n]=e[t+16*(2*i-1)+n];for(let n=0;n0&&(a+=16),u(r,o,e,t+=16,r,a)}function l(e,t,r){const s=(0,a.checkOpts)({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:u,r:c,p:l,dkLen:f,asyncTick:d,maxmem:h,onProgress:p}=s;if((0,n.number)(u),(0,n.number)(c),(0,n.number)(l),(0,n.number)(f),(0,n.number)(d),(0,n.number)(h),void 0!==p&&"function"!=typeof p)throw new Error("progressCb should be function");const y=128*c,m=y/4;if(u<=1||u&u-1||u>=2**(y/8)||u>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(l<0||l>137438953440/y)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(f<0||f>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const g=y*(u+l);if(g>h)throw new Error(`Scrypt: parameters too large, ${g} (128 * r * (N + p)) > ${h} (maxmem)`);const b=(0,o.pbkdf2)(i.sha256,e,t,{c:1,dkLen:y*l}),v=(0,a.u32)(b),w=(0,a.u32)(new Uint8Array(y*u)),A=(0,a.u32)(new Uint8Array(y));let k=()=>{};if(p){const e=2*u*l,t=Math.max(Math.floor(e/1e4),1);let r=0;k=()=>{r++,!p||r%t&&r!==e||p(r/e)}}return{N:u,r:c,p:l,dkLen:f,blockSize32:m,V:w,B32:v,B:b,tmp:A,blockMixCb:k,asyncTick:d}}function f(e,t,r,n,a){const s=(0,o.pbkdf2)(i.sha256,e,r,{c:1,dkLen:t});return r.fill(0),n.fill(0),a.fill(0),s}t.scrypt=function(e,t,r){const{N:n,r:i,p:o,dkLen:a,blockSize32:s,V:u,B32:d,B:h,tmp:p,blockMixCb:y}=l(e,t,r);for(let e=0;e{c(d,r,d,r+=u,i),m()})),c(d,(n-1)*u,h,t,i),m(),await(0,a.asyncLoop)(n,g,(()=>{const e=h[t+u-16]%n;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(5184),i=r(4224),o=(e,t,r)=>e&t^e&r^t&r,a=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]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=u[e-15],r=u[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;u[e]=o+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:s,D:c,E:l,F:f,G:d,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&d)+a[e]+u[e]|0,y=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,s)|0;h=d,d=f,f=l,l=c+t|0,c=s,s=n,n=r,r=t+y|0}var p;r=r+this.A|0,n=n+this.B|0,s=s+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,n,s,c,l,f,d,h)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)((()=>new c)),t.sha224=(0,i.wrapConstructor)((()=>new l))},6534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(7302),i=r(9975),o=r(4224),[a,s,u]=[[],[],[]],c=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(7),h=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],a.push(2*(5*n+r)),s.push((e+1)*(e+2)/2%64);let i=c;for(let e=0;e<7;e++)t=(t<>d)*p)%h,t&f&&(i^=l<<(l<r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),b=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function v(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],a=r[i+1],s=g(o,a,1)^r[n],u=b(o,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=u}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=s[r],o=g(t,i,n),u=b(t,i,n),c=a[r];t=e[c],i=e[c+1],e[c]=o,e[c+1]=u}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=y[n],e[1]^=m[n]}r.fill(0)}t.keccakP=v;class w extends o.Hash{constructor(e,t,r,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new w(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=w;const A=(e,t,r)=>(0,o.wrapConstructor)((()=>new w(t,e,r)));t.sha3_224=A(6,144,28),t.sha3_256=A(6,136,32),t.sha3_384=A(6,104,48),t.sha3_512=A(6,72,64),t.keccak_224=A(1,144,28),t.keccak_256=A(1,136,32),t.keccak_384=A(1,104,48),t.keccak_512=A(1,72,64);const k=(e,t,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=k(31,168,16),t.shake256=k(31,136,32)},9483:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA512=void 0;const n=r(5184),i=r(9975),o=r(4224),[a,s]=(()=>i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),u=new Uint32Array(80),c=new Uint32Array(80);class l extends n.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:a,Dl:s,Eh:u,El:c,Fh:l,Fl:f,Gh:d,Gl:h,Hh:p,Hl:y}=this;return[e,t,r,n,i,o,a,s,u,c,l,f,d,h,p,y]}set(e,t,r,n,i,o,a,s,u,c,l,f,d,h,p,y){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|u,this.El=0|c,this.Fh=0|l,this.Fl=0|f,this.Gh=0|d,this.Gl=0|h,this.Hh=0|p,this.Hl=0|y}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t),c[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|u[e-15],r=0|c[e-15],n=i.default.rotrSH(t,r,1)^i.default.rotrSH(t,r,8)^i.default.shrSH(t,r,7),o=i.default.rotrSL(t,r,1)^i.default.rotrSL(t,r,8)^i.default.shrSL(t,r,7),a=0|u[e-2],s=0|c[e-2],l=i.default.rotrSH(a,s,19)^i.default.rotrBH(a,s,61)^i.default.shrSH(a,s,6),f=i.default.rotrSL(a,s,19)^i.default.rotrBL(a,s,61)^i.default.shrSL(a,s,6),d=i.default.add4L(o,f,c[e-7],c[e-16]),h=i.default.add4H(d,n,l,u[e-7],u[e-16]);u[e]=0|h,c[e]=0|d}let{Ah:r,Al:n,Bh:o,Bl:l,Ch:f,Cl:d,Dh:h,Dl:p,Eh:y,El:m,Fh:g,Fl:b,Gh:v,Gl:w,Hh:A,Hl:k}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(y,m,14)^i.default.rotrSH(y,m,18)^i.default.rotrBH(y,m,41),E=i.default.rotrSL(y,m,14)^i.default.rotrSL(y,m,18)^i.default.rotrBL(y,m,41),S=y&g^~y&v,x=m&b^~m&w,_=i.default.add5L(k,E,x,s[e],c[e]),P=i.default.add5H(_,A,t,S,a[e],u[e]),T=0|_,I=i.default.rotrSH(r,n,28)^i.default.rotrBH(r,n,34)^i.default.rotrBH(r,n,39),O=i.default.rotrSL(r,n,28)^i.default.rotrBL(r,n,34)^i.default.rotrBL(r,n,39),B=r&o^r&f^o&f,C=n&l^n&d^l&d;A=0|v,k=0|w,v=0|g,w=0|b,g=0|y,b=0|m,({h:y,l:m}=i.default.add(0|h,0|p,0|P,0|T)),h=0|f,p=0|d,f=0|o,d=0|l,o=0|r,l=0|n;const N=i.default.add3L(T,O,C);r=i.default.add3H(N,P,I,B),n=0|N}({h:r,l:n}=i.default.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l}=i.default.add(0|this.Bh,0|this.Bl,0|o,0|l)),({h:f,l:d}=i.default.add(0|this.Ch,0|this.Cl,0|f,0|d)),({h,l:p}=i.default.add(0|this.Dh,0|this.Dl,0|h,0|p)),({h:y,l:m}=i.default.add(0|this.Eh,0|this.El,0|y,0|m)),({h:g,l:b}=i.default.add(0|this.Fh,0|this.Fl,0|g,0|b)),({h:v,l:w}=i.default.add(0|this.Gh,0|this.Gl,0|v,0|w)),({h:A,l:k}=i.default.add(0|this.Hh,0|this.Hl,0|A,0|k)),this.set(r,n,o,l,f,d,h,p,y,m,g,b,v,w,A,k)}roundClean(){u.fill(0),c.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=l;class f extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class d extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class h extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.sha512=(0,o.wrapConstructor)((()=>new l)),t.sha512_224=(0,o.wrapConstructor)((()=>new f)),t.sha512_256=(0,o.wrapConstructor)((()=>new d)),t.sha384=(0,o.wrapConstructor)((()=>new h))},4224:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(1760),i=e=>e instanceof Uint8Array;t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o=0&&ee+t.length),0));let r=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t};t.Hash=class{clone(){return this._cloneInto()}};const u={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==u.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(s(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(s(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(s(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},6740:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>A,__asyncGenerator:()=>w,__asyncValues:()=>k,__await:()=>v,__awaiter:()=>l,__classPrivateFieldGet:()=>P,__classPrivateFieldIn:()=>I,__classPrivateFieldSet:()=>T,__createBinding:()=>d,__decorate:()=>s,__exportStar:()=>h,__extends:()=>i,__generator:()=>f,__importDefault:()=>_,__importStar:()=>x,__makeTemplateObject:()=>E,__metadata:()=>c,__param:()=>u,__read:()=>y,__rest:()=>a,__spread:()=>m,__spreadArray:()=>b,__spreadArrays:()=>g,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof v?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function A(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:v(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&d(t,e,r);return S(t,e),t}function _(e){return e&&e.__esModule?e:{default:e}}function P(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function T(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function I(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},7952:(e,t,r)=>{var n=t;n.utils=r(7426),n.common=r(6166),n.sha=r(6229),n.ripemd=r(6784),n.hmac=r(8948),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},6166:(e,t,r)=>{"use strict";var n=r(7426),i=r(3349);function o(){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}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o{"use strict";var n=r(7426),i=r(3349);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(7426),i=r(6166),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,c),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],b=r,v=n,w=i,A=c,k=l,E=0;E<80;E++){var S=a(o(u(r,f(E,n,i,c),e[p[E]+t],d(E)),m[E]),l);r=l,l=c,c=o(i,10),i=n,n=S,S=a(o(u(b,f(79-E,v,w,A),e[y[E]+t],h(E)),g[E]),k),b=k,k=A,A=o(w,10),w=v,v=S}S=s(this.h[1],i,A),this.h[1]=s(this.h[2],c,k),this.h[2]=s(this.h[3],l,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,w),this.h[0]=S},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],y=[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],m=[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],g=[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]},6229:(e,t,r)=>{"use strict";t.sha1=r(3917),t.sha224=r(7714),t.sha256=r(2287),t.sha384=r(1911),t.sha512=r(7766)},3917:(e,t,r)=>{"use strict";var n=r(7426),i=r(6166),o=r(6225),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,l=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,l),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(7426),i=r(2287);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},2287:(e,t,r)=>{"use strict";var n=r(7426),i=r(6166),o=r(6225),a=r(3349),s=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,f=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,y=o.g1_256,m=i.BlockHash,g=[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 b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(b,m),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(7426),i=r(7766);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},7766:(e,t,r)=>{"use strict";var n=r(7426),i=r(6166),o=r(3349),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,f=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,y=n.sum64_5_hi,m=n.sum64_5_lo,g=i.BlockHash,b=[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 v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function k(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function S(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function _(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function B(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,g),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(7426).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},7426:(e,t,r)=>{"use strict";var n=r(3349),i=r(6698);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var l=0,f=t;return l+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,l=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*y}},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},1176:(e,t,r)=>{var n,i=r(5606);!function(){"use strict";var o="input is invalid type",a="object"==typeof window,s=a?window:{};s.JS_SHA3_NO_WINDOW&&(a=!1);var u=!a&&"object"==typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?s=r.g:u&&(s=self);var c=!s.JS_SHA3_NO_COMMON_JS&&e.exports,l=r.amdO,f=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),h=[4,1024,262144,67108864],p=[0,8,16,24],y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],g=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!f||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new M(e,t,e).update(n)[r]()}},A=function(e,t,r){return function(n,i){return new M(e,t,i).update(n)[r]()}},k=function(e,t,r){return function(t,n,i,o){return P["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return P["kmac"+e].update(t,n,i,o)[r]()}},S=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function U(e,t,r){M.call(this,e,t,r)}M.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,a=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,l=0,d=this.s;l>2]|=e[l]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(a[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=s){for(this.start=n-s,this.block=a[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},M.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var a=0;a=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},M.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t==0&&(L(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},M.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&L(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},U.prototype=new M,U.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var L=function(e){var t,r,n,i,o,a,s,u,c,l,f,d,h,p,m,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(d<<1|h>>>31),r=c^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],m=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=p^~g&v,e[1]=m^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&p,e[7]=k^~S&m,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~p&g,e[9]=S^~m&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=y[n],e[1]^=y[n+1]};if(c)e.exports=P;else{for(I=0;I{"use strict";const{isArray:n,isObject:i,isString:o}=r(7382),{asArray:a}=r(9263),{prependBase:s}=r(470),u=r(2207),c=r(7532);function l(e){throw new u("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}function f({context:e,base:t}){if(!e)return;const r=e["@context"];if(o(r))e["@context"]=s(t,r);else if(n(r))for(let e=0;e10)throw new u("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"loading remote context failed":"context overflow",max:10});if(a.has(t))throw new u("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"recursive context inclusion":"context overflow",url:t});let s,c;a.add(t);try{c=await r(t),s=c.document||null,o(s)&&(s=JSON.parse(s))}catch(e){throw new u("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!i(s))throw new u("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:t});return s="@context"in s?{"@context":s["@context"]}:{"@context":{}},c.contextUrl&&(n(s["@context"])||(s["@context"]=[s["@context"]]),s["@context"].push(c.contextUrl)),{context:s,remoteDoc:c}}}},2207:e=>{"use strict";e.exports=class extends Error{constructor(e="An unspecified JSON-LD error occurred.",t="jsonld.Error",r={}){super(e),this.name=t,this.message=e,this.details=r}}},5445:e=>{"use strict";e.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,r){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,r)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}},8229:(e,t,r)=>{"use strict";e.exports=r(989).NQuads},3743:e=>{"use strict";e.exports=class{constructor(){this._requests={}}wrapLoader(e){const t=this;return t._loader=e,function(){return t.add.apply(t,arguments)}}async add(e){let t=this._requests[e];if(t)return Promise.resolve(t);t=this._requests[e]=this._loader(e);try{return await t}finally{delete this._requests[e]}}}},7532:(e,t,r)=>{"use strict";const n=r(9749);e.exports=class{constructor({document:e}){this.document=e,this.cache=new n({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},1058:(e,t,r)=>{"use strict";const n=r(2207),{isArray:i,isObject:o,isString:a,isUndefined:s}=r(7382),{isList:u,isValue:c,isGraph:l,isSimpleGraph:f,isSubjectReference:d}=r(3978),{expandIri:h,getContextValue:p,isKeyword:y,process:m,processingMode:g}=r(1972),{removeBase:b,prependBase:v}=r(470),{REGEX_KEYWORD:w,addValue:A,asArray:k,compareShortestLeast:E}=r(9263),S={};function x(e,t,r){if("@nest"!==h(e,t,{vocab:!0},r))throw new n("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}e.exports=S,S.compact=async({activeCtx:e,activeProperty:t=null,element:r,options:h={}})=>{if(i(r)){let n=[];for(let i=0;i1&&(_=Array.from(_).sort());const P=e;for(const t of _){const r=S.compactIri({activeCtx:P,iri:t,relativeTo:{vocab:!0}}),n=p(w,r,"@context");s(n)||(e=await m({activeCtx:e,localCtx:n,options:h,propagate:!1}))}const T=Object.keys(r).sort();for(const s of T){const d=r[s];if("@id"!==s)if("@type"!==s)if("@reverse"!==s)if("@preserve"!==s)if("@index"!==s)if("@graph"!==s&&"@list"!==s&&"@included"!==s&&y(s)){const t=S.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});A(v,t,d)}else{if(!i(d))throw new n("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===d.length){const t=S.compactIri({activeCtx:e,iri:s,value:d,relativeTo:{vocab:!0},reverse:b}),r=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let n=v;r&&(x(e,r,h),o(v[r])||(v[r]={}),n=v[r]),A(n,t,d,{propertyIsArray:!0})}for(const t of d){const r=S.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:b}),n=e.mappings.has(r)?e.mappings.get(r)["@nest"]:null;let d=v;n&&(x(e,n,h),o(v[n])||(v[n]={}),d=v[n]);const y=p(e,r,"@container")||[],m=l(t),g=u(t);let w;g?w=t["@list"]:m&&(w=t["@graph"]);let E=await S.compact({activeCtx:e,activeProperty:r,element:g||m?w:t,options:h});if(g){if(i(E)||(E=[E]),y.includes("@list")){A(d,r,E,{valueIsArray:!0,allowDuplicate:!0});continue}E={[S.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:!0}})]:E},"@index"in t&&(E[S.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"])}if(m)if(y.includes("@graph")&&(y.includes("@id")||y.includes("@index")&&f(t))){let n;d.hasOwnProperty(r)?n=d[r]:d[r]=n={};const i=(y.includes("@id")?t["@id"]:t["@index"])||S.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}});A(n,i,E,{propertyIsArray:!h.compactArrays||y.includes("@set")})}else y.includes("@graph")&&f(t)?(i(E)&&E.length>1&&(E={"@included":E}),A(d,r,E,{propertyIsArray:!h.compactArrays||y.includes("@set")})):(i(E)&&1===E.length&&h.compactArrays&&(E=E[0]),E={[S.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:!0}})]:E},"@id"in t&&(E[S.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t["@id"]),"@index"in t&&(E[S.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"]),A(d,r,E,{propertyIsArray:!h.compactArrays||y.includes("@set")}));else if(y.includes("@language")||y.includes("@index")||y.includes("@id")||y.includes("@type")){let n,i;if(d.hasOwnProperty(r)?n=d[r]:d[r]=n={},y.includes("@language"))c(E)&&(E=E["@value"]),i=t["@language"];else if(y.includes("@index")){const n=p(e,r,"@index")||"@index",o=S.compactIri({activeCtx:e,iri:n,relativeTo:{vocab:!0}});if("@index"===n)i=t["@index"],delete E[o];else{let e;if([i,...e]=k(E[n]||[]),a(i))switch(e.length){case 0:delete E[n];break;case 1:E[n]=e[0];break;default:E[n]=e}else i=null}}else if(y.includes("@id")){const t=S.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}});i=E[t],delete E[t]}else if(y.includes("@type")){const n=S.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}});let o;switch([i,...o]=k(E[n]||[]),o.length){case 0:delete E[n];break;case 1:E[n]=o[0];break;default:E[n]=o}1===Object.keys(E).length&&"@id"in t&&(E=await S.compact({activeCtx:e,activeProperty:r,element:{"@id":t["@id"]},options:h}))}i||(i=S.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}})),A(n,i,E,{propertyIsArray:y.includes("@set")})}else{const e=!h.compactArrays||y.includes("@set")||y.includes("@list")||i(E)&&0===E.length||"@list"===s||"@graph"===s;A(d,r,E,{propertyIsArray:e})}}}else{if((p(e,t,"@container")||[]).includes("@index"))continue;const r=S.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});A(v,r,d)}else{const r=await S.compact({activeCtx:e,activeProperty:t,element:d,options:h});i(r)&&0===r.length||A(v,s,r)}else{const t=await S.compact({activeCtx:e,activeProperty:"@reverse",element:d,options:h});for(const r in t)if(e.mappings.has(r)&&e.mappings.get(r).reverse){const n=t[r],i=(p(e,r,"@container")||[]).includes("@set")||!h.compactArrays;A(v,r,n,{propertyIsArray:i}),delete t[r]}if(Object.keys(t).length>0){const r=S.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});A(v,r,t)}}else{let t=k(d).map((e=>S.compactIri({activeCtx:w,iri:e,relativeTo:{vocab:!0}})));1===t.length&&(t=t[0]);const r=S.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}}),n=(p(e,r,"@container")||[]).includes("@set")&&g(e,1.1)||i(t)&&0===d.length;A(v,r,t,{propertyIsArray:n})}else{let t=k(d).map((t=>S.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:h.base})));1===t.length&&(t=t[0]);v[S.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t}}return v}return r},S.compactIri=({activeCtx:e,iri:t,value:r=null,relativeTo:i={vocab:!1},reverse:a=!1,base:s=null})=>{if(null===t)return t;e.isPropertyTermScoped&&e.previousContext&&(e=e.previousContext);const f=e.getInverse();if(y(t)&&t in f&&"@none"in f[t]&&"@type"in f[t]["@none"]&&"@none"in f[t]["@none"]["@type"])return f[t]["@none"]["@type"]["@none"];if(i.vocab&&t in f){const n=e["@language"]||"@none",i=[];o(r)&&"@index"in r&&!("@graph"in r)&&i.push("@index","@index@set"),o(r)&&"@preserve"in r&&(r=r["@preserve"][0]),l(r)?("@index"in r&&i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r&&i.push("@graph@id","@graph@id@set"),i.push("@graph","@graph@set","@set"),"@index"in r||i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r||i.push("@graph@id","@graph@id@set")):o(r)&&!c(r)&&i.push("@id","@id@set","@type","@set@type");let s="@language",f="@null";if(a)s="@type",f="@reverse",i.push("@set");else if(u(r)){"@index"in r||i.push("@list");const e=r["@list"];if(0===e.length)s="@any",f="@none";else{let t=0===e.length?n:null,r=null;for(let n=0;ne.includes("_")));e&&s.push(e.replace(/^[^_]+_/,"_"))}s.push("@none");const u=e.inverse[t];for(const e of n){if(!(e in u))continue;const t=u[e][i];for(const e of s)if(e in t)return t[e]}return null}(e,t,r,i,s,f);if(null!==d)return d}if(i.vocab&&"@vocab"in e){const r=e["@vocab"];if(0===t.indexOf(r)&&t!==r){const n=t.substr(r.length);if(!e.mappings.has(n))return n}}let d=null;const h=[];let p=e.fastCurieMap;const m=t.length-1;for(let e=0;e=0;--n){const i=h[n],o=i.terms;for(const n of o){const o=n+":"+t.substr(i.iri.length);e.mappings.get(n)._prefix&&(!e.mappings.has(o)||null===r&&e.mappings.get(o)["@id"]===t)&&(null===d||E(o,d)<0)&&(d=o)}}if(null!==d)return d;for(const[r,i]of e.mappings)if(i&&i._prefix&&t.startsWith(r+":"))throw new n(`Absolute IRI "${t}" confused with prefix "${r}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e});if(!i.vocab){if("@base"in e){if(e["@base"]){const r=b(v(s,e["@base"]),t);return w.test(r)?`./${r}`:r}return t}return b(s,t)}return t},S.compactValue=({activeCtx:e,activeProperty:t,value:r,options:n})=>{if(c(r)){const n=p(e,t,"@type"),i=p(e,t,"@language"),o=p(e,t,"@direction"),s=p(e,t,"@container")||[],u="@index"in r&&!s.includes("@index");if(!u&&"@none"!==n){if(r["@type"]===n)return r["@value"];if("@language"in r&&r["@language"]===i&&"@direction"in r&&r["@direction"]===o)return r["@value"];if("@language"in r&&r["@language"]===i)return r["@value"];if("@direction"in r&&r["@direction"]===o)return r["@value"]}const c=Object.keys(r).length,l=1===c||2===c&&"@index"in r&&!u,f="@language"in e,d=a(r["@value"]),h=e.mappings.has(t)&&null===e.mappings.get(t)["@language"];if(l&&"@none"!==n&&(!f||!d||h))return r["@value"];const y={};return u&&(y[S.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=r["@index"]),"@type"in r?y[S.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}})]=S.compactIri({activeCtx:e,iri:r["@type"],relativeTo:{vocab:!0}}):"@language"in r&&(y[S.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:!0}})]=r["@language"]),"@direction"in r&&(y[S.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:!0}})]=r["@direction"]),y[S.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:!0}})]=r["@value"],y}const i=h(e,t,{vocab:!0},n),o=p(e,t,"@type"),s=S.compactIri({activeCtx:e,iri:r["@id"],relativeTo:{vocab:"@vocab"===o},base:n.base});return"@id"===o||"@vocab"===o||"@graph"===i?s:{[S.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]:s}}},9378:e=>{"use strict";const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#",r="http://www.w3.org/2001/XMLSchema#";e.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:t,RDF_LIST:t+"List",RDF_FIRST:t+"first",RDF_REST:t+"rest",RDF_NIL:t+"nil",RDF_TYPE:t+"type",RDF_PLAIN_LITERAL:t+"PlainLiteral",RDF_XML_LITERAL:t+"XMLLiteral",RDF_JSON_LITERAL:t+"JSON",RDF_OBJECT:t+"object",RDF_LANGSTRING:t+"langString",XSD:r,XSD_BOOLEAN:r+"boolean",XSD_DOUBLE:r+"double",XSD_INTEGER:r+"integer",XSD_STRING:r+"string"}},1972:(e,t,r)=>{"use strict";const n=r(9263),i=r(2207),{isArray:o,isObject:a,isString:s,isUndefined:u}=r(7382),{isAbsolute:c,isRelative:l,prependBase:f}=r(470),{handleEvent:d}=r(2246),{REGEX_BCP47:h,REGEX_KEYWORD:p,asArray:y,compareShortestLeast:m}=r(9263),g=new Map,b={};function v(e,t,r,n,i,o){if(null===t||!s(t)||b.isKeyword(t))return t;if(t.match(p))return null;if(n&&n.hasOwnProperty(t)&&!0!==i.get(t)&&b.createTermDefinition({activeCtx:e,localCtx:n,term:t,defined:i,options:o}),(r=r||{}).vocab){const r=e.mappings.get(t);if(null===r)return null;if(a(r)&&"@id"in r)return r["@id"]}const u=t.indexOf(":");if(u>0){const r=t.substr(0,u),a=t.substr(u+1);if("_"===r||0===a.indexOf("//"))return t;n&&n.hasOwnProperty(r)&&b.createTermDefinition({activeCtx:e,localCtx:n,term:r,defined:i,options:o});const s=e.mappings.get(r);if(s&&s._prefix)return s["@id"]+a;if(c(t))return t}if(r.vocab&&"@vocab"in e){t=e["@vocab"]+t}else if(r.base){let r,n;"@base"in e?e["@base"]?(n=f(o.base,e["@base"]),r=f(n,t)):(n=e["@base"],r=t):(n=o.base,r=f(o.base,t)),t=r}return t}function w(e,t){if(!e||"object"!=typeof e||!t||"object"!=typeof t)return e===t;const r=Array.isArray(e);if(r!==Array.isArray(t))return!1;if(r){if(e.length!==t.length)return!1;for(let r=0;r{a(t)&&"@context"in t&&o(t["@context"])&&(t=t["@context"]);if(0===y(t).length)return e;const m=[],g=[({event:e,next:t})=>{m.push(e),t()}];r.eventHandler&&g.push(r.eventHandler);const w=r;r={...r,eventHandler:g};const A=await r.contextResolver.resolve({activeCtx:e,context:t,documentLoader:r.documentLoader,base:r.base});a(A[0].document)&&"boolean"==typeof A[0].document["@propagate"]&&(n=A[0].document["@propagate"]);let k=e;n||k.previousContext||(k=k.clone(),k.previousContext=e);for(const n of A){let{document:o}=n;if(e=k,null===o){if(!u&&0!==Object.keys(e.protected).length)throw new i("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});k=e=b.getInitialContext(r).clone();continue}const y=n.getProcessed(e);if(y){if(w.eventHandler)for(const e of y.events)d({event:e,options:w});k=e=y.context;continue}if(a(o)&&"@context"in o&&(o=o["@context"]),!a(o))throw new i("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:o});k=k.clone();const g=new Map;if("@version"in o){if(1.1!==o["@version"])throw new i("Unsupported JSON-LD version: "+o["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:o});if(e.processingMode&&"json-ld-1.0"===e.processingMode)throw new i("@version: "+o["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:o});k.processingMode="json-ld-1.1",k["@version"]=o["@version"],g.set("@version",!0)}if(k.processingMode=k.processingMode||e.processingMode,"@base"in o){let e=o["@base"];if(null===e||c(e));else{if(!l(e))throw new i('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:o});e=f(k["@base"],e)}k["@base"]=e,g.set("@base",!0)}if("@vocab"in o){const e=o["@vocab"];if(null===e)delete k["@vocab"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});if(!c(e)&&b.processingMode(k,1))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});{const t=v(k,e,{vocab:!0,base:!0},void 0,void 0,r);c(t)||r.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:t}},options:r}),k["@vocab"]=t}}g.set("@vocab",!0)}if("@language"in o){const e=o["@language"];if(null===e)delete k["@language"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:o});e.match(h)||r.eventHandler&&d({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:r}),k["@language"]=e.toLowerCase()}g.set("@language",!0)}if("@direction"in o){const t=o["@direction"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:o});if(null===t)delete k["@direction"];else{if("ltr"!==t&&"rtl"!==t)throw new i('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:o});k["@direction"]=t}g.set("@direction",!0)}if("@propagate"in o){const r=o["@propagate"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if("boolean"!=typeof r)throw new i("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});g.set("@propagate",!0)}if("@import"in o){const n=o["@import"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if(!s(n))throw new i("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const a=await r.contextResolver.resolve({activeCtx:e,context:n,documentLoader:r.documentLoader,base:r.base});if(1!==a.length)throw new i("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const u=a[0].getProcessed(e);if(u)o=u;else{const r=a[0].document;if("@import"in r)throw new i("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const e in r)o.hasOwnProperty(e)||(o[e]=r[e]);a[0].setProcessed(e,o)}g.set("@import",!0)}g.set("@protected",o["@protected"]||!1);for(const e in o)if(b.createTermDefinition({activeCtx:k,localCtx:o,term:e,defined:g,options:r,overrideProtected:u}),a(o[e])&&"@context"in o[e]){const t=o[e]["@context"];let n=!0;if(s(t)){const e=f(r.base,t);p.has(e)?n=!1:p.add(e)}if(n)try{await b.process({activeCtx:k.clone(),localCtx:o[e]["@context"],overrideProtected:!0,options:r,cycles:p})}catch(t){throw new i("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:o[e]["@context"],term:e})}}n.setProcessed(e,{context:k,events:m})}return k},b.createTermDefinition=({activeCtx:e,localCtx:t,term:r,defined:n,options:u,overrideProtected:l=!1})=>{if(n.has(r)){if(n.get(r))return;throw new i("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:r})}let f;if(n.set(r,!1),t.hasOwnProperty(r)&&(f=t[r]),"@type"===r&&a(f)&&"@set"===(f["@container"]||"@set")&&b.processingMode(e,1.1)){const e=["@container","@id","@protected"],n=Object.keys(f);if(0===n.length||n.some((t=>!e.includes(t))))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r})}else{if(b.isKeyword(r))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r});if(r.match(p))return void(u.eventHandler&&d({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:r}},options:u}));if(""===r)throw new i("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const h=e.mappings.get(r);e.mappings.has(r)&&e.mappings.delete(r);let y=!1;if((s(f)||null===f)&&(y=!0,f={"@id":f}),!a(f))throw new i("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const m={};e.mappings.set(r,m),m.reverse=!1;const g=["@container","@id","@language","@reverse","@type"];b.processingMode(e,1.1)&&g.push("@context","@direction","@index","@nest","@prefix","@protected");for(const e in f)if(!g.includes(e))throw new i("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const A=r.indexOf(":");if(m._termHasColon=A>0,"@reverse"in f){if("@id"in f)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in f)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const o=f["@reverse"];if(!s(o))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(o.match(p))return u.eventHandler&&d({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:o}},options:u}),void(h?e.mappings.set(r,h):e.mappings.delete(r));const a=v(e,o,{vocab:!0,base:!1},t,n,u);if(!c(a))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});m["@id"]=a,m.reverse=!0}else if("@id"in f){let o=f["@id"];if(o&&!s(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(null===o)m["@id"]=null;else{if(!b.isKeyword(o)&&o.match(p))return u.eventHandler&&d({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:o}},options:u}),void(h?e.mappings.set(r,h):e.mappings.delete(r));if(o!==r){if(o=v(e,o,{vocab:!0,base:!1},t,n,u),!c(o)&&!b.isKeyword(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(r.match(/(?::[^:])|\//)){if(v(e,r,{vocab:!0,base:!1},t,new Map(n).set(r,!0),u)!==o)throw new i("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t})}m["@id"]=o,m._prefix=y&&!m._termHasColon&&null!==o.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in m))if(m._termHasColon){const i=r.substr(0,A);if(t.hasOwnProperty(i)&&b.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:n,options:u}),e.mappings.has(i)){const t=r.substr(A+1);m["@id"]=e.mappings.get(i)["@id"]+t}else m["@id"]=r}else if("@type"===r)m["@id"]=r;else{if(!("@vocab"in e))throw new i("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:r});m["@id"]=e["@vocab"]+r}if((!0===f["@protected"]||!0===n.get("@protected")&&!1!==f["@protected"])&&(e.protected[r]=!0,m.protected=!0),n.set(r,!0),"@type"in f){let r=f["@type"];if(!s(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if("@json"===r||"@none"===r){if(b.processingMode(e,1))throw new i(`Invalid JSON-LD syntax; an @context @type value must not be "${r}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if("@id"!==r&&"@vocab"!==r){if(r=v(e,r,{vocab:!0,base:!1},t,n,u),!c(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(0===r.indexOf("_:"))throw new i("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}m["@type"]=r}if("@container"in f){const r=s(f["@container"])?[f["@container"]]:f["@container"]||[],n=["@list","@set","@index","@language"];let a=!0;const u=r.includes("@set");if(b.processingMode(e,1.1)){if(n.push("@graph","@id","@type"),r.includes("@list")){if(1!==r.length)throw new i("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(r.includes("@graph")){if(r.some((e=>"@graph"!==e&&"@id"!==e&&"@index"!==e&&"@set"!==e)))throw new i("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else a&=r.length<=(u?2:1);if(r.includes("@type")&&(m["@type"]=m["@type"]||"@id",!["@id","@vocab"].includes(m["@type"])))throw new i("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else a&=!o(f["@container"]),a&=r.length<=1;if(a&=r.every((e=>n.includes(e))),a&=!(u&&r.includes("@list")),!a)throw new i("Invalid JSON-LD syntax; @context @container value must be one of the following: "+n.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(m.reverse&&!r.every((e=>["@index","@set"].includes(e))))throw new i("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});m["@container"]=r}if("@index"in f){if(!("@container"in f)||!m["@container"].includes("@index"))throw new i(`Invalid JSON-LD syntax; @index without @index in @container: "${f["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!s(f["@index"])||0===f["@index"].indexOf("@"))throw new i(`Invalid JSON-LD syntax; @index must expand to an IRI: "${f["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});m["@index"]=f["@index"]}if("@context"in f&&(m["@context"]=f["@context"]),"@language"in f&&!("@type"in f)){let e=f["@language"];if(null!==e&&!s(e))throw new i("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});null!==e&&(e=e.toLowerCase()),m["@language"]=e}if("@prefix"in f){if(r.match(/:|\//))throw new i("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(b.isKeyword(m["@id"]))throw new i("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if("boolean"!=typeof f["@prefix"])throw new i("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t});m._prefix=!0===f["@prefix"]}if("@direction"in f){const e=f["@direction"];if(null!==e&&"ltr"!==e&&"rtl"!==e)throw new i('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});m["@direction"]=e}if("@nest"in f){const e=f["@nest"];if(!s(e)||"@nest"!==e&&0===e.indexOf("@"))throw new i("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});m["@nest"]=e}const k=m["@id"];if("@context"===k||"@preserve"===k)throw new i("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(h&&h.protected&&!l&&(e.protected[r]=!0,m.protected=!0,!w(h,m)))throw new i("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:r})},b.expandIri=(e,t,r,n)=>v(e,t,r,void 0,void 0,n),b.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),r=g.get(t);if(r)return r;const i={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},r=e.fastCurieMap={},n={},i=(e["@language"]||"@none").toLowerCase(),s=e["@direction"],u=e.mappings,c=[...u.keys()].sort(m);for(const e of c){const o=u.get(e);if(null===o)continue;let c=o["@container"]||"@none";if(c=[].concat(c).sort().join(""),null===o["@id"])continue;const l=y(o["@id"]);for(const u of l){let l=t[u];const f=b.isKeyword(u);if(l)f||o._termHasColon||n[u].push(e);else if(t[u]=l={},!f&&!o._termHasColon){n[u]=[e];const t={iri:u,terms:n[u]};u[0]in r?r[u[0]].push(t):r[u[0]]=[t]}if(l[c]||(l[c]={"@language":{},"@type":{},"@any":{}}),l=l[c],a(e,l["@any"],"@none"),o.reverse)a(e,l["@type"],"@reverse");else if("@none"===o["@type"])a(e,l["@any"],"@none"),a(e,l["@language"],"@none"),a(e,l["@type"],"@none");else if("@type"in o)a(e,l["@type"],o["@type"]);else if("@language"in o&&"@direction"in o){const t=o["@language"],r=o["@direction"];a(e,l["@language"],t&&r?`${t}_${r}`.toLowerCase():t?t.toLowerCase():r?`_${r}`:"@null")}else"@language"in o?a(e,l["@language"],(o["@language"]||"@null").toLowerCase()):"@direction"in o?o["@direction"]?a(e,l["@language"],`_${o["@direction"]}`):a(e,l["@language"],"@none"):s?(a(e,l["@language"],`_${s}`),a(e,l["@language"],"@none"),a(e,l["@type"],"@none")):(a(e,l["@language"],i),a(e,l["@language"],"@none"),a(e,l["@type"],"@none"))}}for(const e in r)o(r,e,1);return t},clone:function(){const e={};e.mappings=n.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=n.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone());e.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(e["@base"]=this["@base"]);"@language"in this&&(e["@language"]=this["@language"]);"@vocab"in this&&(e["@vocab"]=this["@vocab"]);return e},revertToPreviousContext:function(){if(!this.previousContext)return this;return this.previousContext.clone()},protected:{}};return 1e4===g.size&&g.clear(),g.set(t,i),i;function o(e,t,r){const n=e[t],i=e[t]={};let a,s;for(const e of n)a=e.iri,s=r>=a.length?"":a[r],s in i?i[s].push(e):i[s]=[e];for(const e in i)""!==e&&o(i,e,r+1)}function a(e,t,r){t.hasOwnProperty(r)||(t[r]=e)}},b.getContextValue=(e,t,r)=>{if(null===t){if("@context"===r)return;return null}if(e.mappings.has(t)){const n=e.mappings.get(t);if(u(r))return n;if(n.hasOwnProperty(r))return n[r]}return"@language"===r&&r in e||"@direction"===r&&r in e?e[r]:"@context"!==r?null:void 0},b.processingMode=(e,t)=>t.toString()>="1.1"?!e.processingMode||e.processingMode>="json-ld-"+t.toString():"json-ld-1.0"===e.processingMode,b.isKeyword=e=>{if(!s(e)||"@"!==e[0])return!1;switch(e){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},6957:(e,t,r)=>{"use strict";const{parseLinkHeader:n,buildHeaders:i}=r(9263),{LINK_HEADER_CONTEXT:o}=r(9378),a=r(2207),s=r(3743),{prependBase:u}=r(470),c=/(^|(\r\n))link:/i;e.exports=({secure:e,headers:t={},xhr:r}={headers:{}})=>{t=i(t);return(new s).wrapLoader((async function i(s){if(0!==s.indexOf("http:")&&0!==s.indexOf("https:"))throw new a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:s});if(e&&0!==s.indexOf("https"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:s});let l;try{l=await function(e,t,r){e=e||XMLHttpRequest;const n=new e;return new Promise(((e,i)=>{n.onload=()=>e(n),n.onerror=e=>i(e),n.open("GET",t,!0);for(const e in r)n.setRequestHeader(e,r[e]);n.send()}))}(r,s,t)}catch(e){throw new a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:s,cause:e})}if(l.status>=400)throw new a("URL could not be dereferenced: "+l.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:s,httpStatusCode:l.status});let f={contextUrl:null,documentUrl:s,document:l.response},d=null;const h=l.getResponseHeader("Content-Type");let p;c.test(l.getAllResponseHeaders())&&(p=l.getResponseHeader("Link"));if(p&&"application/ld+json"!==h){const e=n(p),t=e[o];if(Array.isArray(t))throw new a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:s});t&&(f.contextUrl=t.target),d=e.alternate,d&&"application/ld+json"==d.type&&!(h||"").match(/^application\/(\w*\+)?json$/)&&(f=await i(u(s,d.target)))}return f}))}},2246:(e,t,r)=>{"use strict";const n=r(2207),{isArray:i}=r(7382),{asArray:o}=r(9263),a={};function s({event:e,handlers:t}){let r=!0;for(let o=0;r&&o{r=!0}});else{if("object"!=typeof a)throw new n("Invalid event handler.","jsonld.InvalidEventHandler",{event:e});e.code in a?a[e.code]({event:e,next:()=>{r=!0}}):r=!0}}return r}e.exports=a,a.defaultEventHandler=null,a.setupEventHandler=({options:e={}})=>{const t=[].concat(e.safe?a.safeEventHandler:[],e.eventHandler?o(e.eventHandler):[],a.defaultEventHandler?a.defaultEventHandler:[]);return 0===t.length?null:t},a.handleEvent=({event:e,options:t})=>{s({event:e,handlers:t.eventHandler})};const u=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);a.safeEventHandler=function({event:e,next:t}){if("warning"===e.level&&u.has(e.code))throw new n("Safe mode validation error.","jsonld.ValidationError",{event:e});t()},a.logEventHandler=function({event:e,next:t}){console.log(`EVENT: ${e.message}`,{event:e}),t()},a.logWarningEventHandler=function({event:e,next:t}){"warning"===e.level&&console.warn(`WARNING: ${e.message}`,{event:e}),t()},a.unhandledEventHandler=function({event:e}){throw new n("No handler for event.","jsonld.UnhandledEvent",{event:e})},a.setDefaultEventHandler=function({eventHandler:e}={}){a.defaultEventHandler=e?o(e):null}},4019:(e,t,r)=>{"use strict";const n=r(2207),{isArray:i,isObject:o,isEmptyObject:a,isString:s,isUndefined:u}=r(7382),{isList:c,isValue:l,isGraph:f,isSubject:d}=r(3978),{expandIri:h,getContextValue:p,isKeyword:y,process:m,processingMode:g}=r(1972),{isAbsolute:b}=r(470),{REGEX_BCP47:v,REGEX_KEYWORD:w,addValue:A,asArray:k,getValues:E,validateTypeValue:S}=r(9263),{handleEvent:x}=r(2246),_={};function P({value:e,count:t,options:r}){if(0===t||"@value"in e||"@list"in e||1===t&&"@id"in e){if(r.eventHandler){let n,i;0===t?(n="empty object",i="Dropping empty object."):"@value"in e?(n="object with only @value",i="Dropping object with only @value."):"@list"in e?(n="object with only @list",i="Dropping object with only @list."):1===t&&"@id"in e&&(n="object with only @id",i="Dropping object with only @id."),x({event:{type:["JsonLdEvent"],code:n,level:"warning",message:i,details:{value:e}},options:r})}return null}return e}async function T({activeCtx:e,activeProperty:t,expandedActiveProperty:r,element:f,expandedParent:w,options:E={},insideList:I,typeKey:C,typeScopedContext:N}){const R=Object.keys(f).sort(),M=[];let U;const L=f[C]&&"@json"===h(e,i(f[C])?f[C][0]:f[C],{vocab:!0},{...E,typeExpansion:!0});for(const T of R){let I,C=f[T];if("@context"===T)continue;const R=h(e,T,{vocab:!0},E);if(null===R||!b(R)&&!y(R)){E.eventHandler&&x({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:T,expandedProperty:R}},options:E});continue}if(y(R)){if("@reverse"===r)throw new n("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:C});if(R in w&&"@included"!==R&&"@type"!==R)throw new n("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:R})}if("@id"===R){if(!s(C)){if(!E.isFrame)throw new n('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:C});if(o(C)){if(!a(C))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C})}else{if(!i(C))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C});if(!C.every((e=>s(e))))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C})}}A(w,"@id",k(C).map((t=>{if(s(t)){const r=h(e,t,{base:!0},E);return E.eventHandler&&(null===r?x(null===t?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:t}},options:E}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:E}):b(r)||x({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:t,expandedId:r}},options:E})),r}return t})),{propertyIsArray:E.isFrame});continue}if("@type"===R){o(C)&&(C=Object.fromEntries(Object.entries(C).map((([e,t])=>[h(N,e,{vocab:!0}),k(t).map((e=>h(N,e,{base:!0,vocab:!0},{...E,typeExpansion:!0})))])))),S(C,E.isFrame),A(w,"@type",k(C).map((e=>{if(s(e)){const t=h(N,e,{base:!0,vocab:!0},{...E,typeExpansion:!0});return"@json"===t||b(t)||E.eventHandler&&x({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:e}},options:E}),t}return e})),{propertyIsArray:!!E.isFrame});continue}if("@included"===R&&g(e,1.1)){const r=k(await _.expand({activeCtx:e,activeProperty:t,element:C,options:E}));if(!r.every((e=>d(e))))throw new n("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:C});A(w,"@included",r,{propertyIsArray:!0});continue}if("@graph"===R&&!o(C)&&!i(C))throw new n('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:C});if("@value"===R){U=C,L&&g(e,1.1)?w["@value"]=C:A(w,"@value",C,{propertyIsArray:E.isFrame});continue}if("@language"===R){if(null===C)continue;if(!s(C)&&!E.isFrame)throw new n('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:C});C=k(C).map((e=>s(e)?e.toLowerCase():e));for(const e of C)s(e)&&!e.match(v)&&E.eventHandler&&x({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:E});A(w,"@language",C,{propertyIsArray:E.isFrame});continue}if("@direction"===R){if(!s(C)&&!E.isFrame)throw new n('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:C});C=k(C);for(const e of C)if(s(e)&&"ltr"!==e&&"rtl"!==e)throw new n('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:C});A(w,"@direction",C,{propertyIsArray:E.isFrame});continue}if("@index"===R){if(!s(C))throw new n('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:C});A(w,"@index",C);continue}if("@reverse"===R){if(!o(C))throw new n('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:C});if(I=await _.expand({activeCtx:e,activeProperty:"@reverse",element:C,options:E}),"@reverse"in I)for(const e in I["@reverse"])A(w,e,I["@reverse"][e],{propertyIsArray:!0});let t=w["@reverse"]||null;for(const e in I){if("@reverse"===e)continue;null===t&&(t=w["@reverse"]={}),A(t,e,[],{propertyIsArray:!0});const r=I[e];for(let i=0;i"@id"===e||"@index"===e))){if(I=k(I),E.isFrame||(I=I.filter((e=>null!==P({value:e,count:Object.keys(e).length,options:E})))),0===I.length)continue;I=I.map((e=>({"@graph":k(e)})))}if(j.mappings.has(T)&&j.mappings.get(T).reverse){const e=w["@reverse"]=w["@reverse"]||{};I=k(I);for(let t=0;t"@value"===h(e,t,{vocab:!0},E))))throw new n("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:i});await T({activeCtx:e,activeProperty:t,expandedActiveProperty:r,element:i,expandedParent:w,options:E,insideList:I,typeScopedContext:N,typeKey:C})}}}function I({activeCtx:e,activeProperty:t,value:r,options:n}){if(null==r)return null;const i=h(e,t,{vocab:!0},n);if("@id"===i)return h(e,r,{base:!0},n);if("@type"===i)return h(e,r,{vocab:!0,base:!0},{...n,typeExpansion:!0});const o=p(e,t,"@type");if(("@id"===o||"@graph"===i)&&s(r)){const i=h(e,r,{base:!0},n);return null===i&&r.match(w)&&n.eventHandler&&x({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:n}),{"@id":i}}if("@vocab"===o&&s(r))return{"@id":h(e,r,{vocab:!0,base:!0},n)};if(y(i))return r;const a={};if(o&&!["@id","@vocab","@none"].includes(o))a["@type"]=o;else if(s(r)){const r=p(e,t,"@language");null!==r&&(a["@language"]=r);const n=p(e,t,"@direction");null!==n&&(a["@direction"]=n)}return["boolean","number","string"].includes(typeof r)||(r=r.toString()),a["@value"]=r,a}function O(e,t,r,o){const a=[],u=Object.keys(t).sort();for(const c of u){const u=h(e,c,{vocab:!0},o);let l=t[c];i(l)||(l=[l]);for(const e of l){if(null===e)continue;if(!s(e))throw new n("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t});const i={"@value":e};"@none"!==u&&(c.match(v)||o.eventHandler&&x({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:c}},options:o}),i["@language"]=c.toLowerCase()),r&&(i["@direction"]=r),a.push(i)}}return a}async function B({activeCtx:e,options:t,activeProperty:r,value:o,asGraph:a,indexKey:s,propertyIndex:c}){const d=[],y=Object.keys(o).sort(),g="@type"===s;for(let b of y){if(g){const r=p(e,b,"@context");u(r)||(e=await m({activeCtx:e,localCtx:r,propagate:!1,options:t}))}let y,v=o[b];i(v)||(v=[v]),v=await _.expand({activeCtx:e,activeProperty:r,element:v,options:t,insideList:!1,insideIndex:!0}),y=c?"@none"===b?"@none":I({activeCtx:e,activeProperty:s,value:b,options:t}):h(e,b,{vocab:!0},t),"@id"===s?b=h(e,b,{base:!0},t):g&&(b=y);for(let e of v){if(a&&!f(e)&&(e={"@graph":[e]}),"@type"===s)"@none"===y||(e["@type"]?e["@type"]=[b].concat(e["@type"]):e["@type"]=[b]);else{if(l(e)&&!["@language","@type","@index"].includes(s))throw new n(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${s}".`,"jsonld.SyntaxError",{code:"invalid value object",value:e});c?"@none"!==y&&A(e,c,y,{propertyIsArray:!0,prependValue:!0}):"@none"===y||s in e||(e[s]=b)}d.push(e)}}return d}e.exports=_,_.expand=async({activeCtx:e,activeProperty:t=null,element:r,options:c={},insideList:l=!1,insideIndex:f=!1,typeScopedContext:d=null})=>{if(null==r)return null;if("@default"===t&&(c=Object.assign({},c,{isFrame:!1})),!i(r)&&!o(r))return l||null!==t&&"@graph"!==h(e,t,{vocab:!0},c)?I({activeCtx:e,activeProperty:t,value:r,options:c}):(c.eventHandler&&x({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:r}},options:c}),null);if(i(r)){let n=[];const o=p(e,t,"@container")||[];l=l||o.includes("@list");for(let o=0;o1?n.slice().sort():n:[n];for(const t of i){const r=p(d,t,"@context");u(r)||(e=await m({activeCtx:e,localCtx:r,options:c,propagate:!1}))}}}let O={};await T({activeCtx:e,activeProperty:t,expandedActiveProperty:y,element:r,expandedParent:O,options:c,insideList:l,typeKey:S,typeScopedContext:d}),w=Object.keys(O);let B=w.length;if("@value"in O){if("@type"in O&&("@language"in O||"@direction"in O))throw new n('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:O});let t=B-1;if("@type"in O&&(t-=1),"@index"in O&&(t-=1),"@language"in O&&(t-=1),"@direction"in O&&(t-=1),0!==t)throw new n('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:O});const r=null===O["@value"]?[]:k(O["@value"]),i=E(O,"@type");if(g(e,1.1)&&i.includes("@json")&&1===i.length);else if(0===r.length)c.eventHandler&&x({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:O}},options:c}),O=null;else{if(!r.every((e=>s(e)||a(e)))&&"@language"in O)throw new n("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:O});if(!i.every((e=>b(e)&&!(s(e)&&0===e.indexOf("_:"))||a(e))))throw new n('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:O})}}else if("@type"in O&&!i(O["@type"]))O["@type"]=[O["@type"]];else if("@set"in O||"@list"in O){if(B>1&&(2!==B||!("@index"in O)))throw new n('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:O});"@set"in O&&(O=O["@set"],w=Object.keys(O),B=w.length)}else 1===B&&"@language"in O&&(c.eventHandler&&x({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:O}},options:c}),O=null);return!o(O)||c.keepFreeFloatingNodes||l||null!==t&&"@graph"!==y&&!(p(e,t,"@container")||[]).includes("@graph")||(O=P({value:O,count:B,options:c})),O}},5229:(e,t,r)=>{"use strict";const{isSubjectReference:n}=r(3978),{createMergedNodeMap:i}=r(9233),o={};e.exports=o,o.flatten=e=>{const t=i(e),r=[],o=Object.keys(t).sort();for(let e=0;e{"use strict";const{isKeyword:n}=r(1972),i=r(3978),o=r(7382),a=r(9263),s=r(470),u=r(2207),{createNodeMap:c,mergeNodeMapGraphs:l}=r(9233),f={};function d(e){const t={};for(const r in e)void 0!==e[r]&&(t["@"+r]=[e[r]]);return[t]}function h(e,t,r){for(let n=r.length-1;n>=0;--n){const i=r[n];if(i.graph===t&&i.subject["@id"]===e["@id"])return!0}return!1}function p(e,t,r){const n="@"+r;let i=n in e?e[n][0]:t[r];if("embed"===r)if(!0===i)i="@once";else if(!1===i)i="@never";else if("@always"!==i&&"@never"!==i&&"@link"!==i&&"@first"!==i&&"@last"!==i&&"@once"!==i)throw new u("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e});return i}function y(e){if(!o.isArray(e)||1!==e.length||!o.isObject(e[0]))throw new u("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e});if("@id"in e[0])for(const t of a.asArray(e[0]["@id"]))if(!o.isObject(t)&&!s.isAbsolute(t)||o.isString(t)&&0===t.indexOf("_:"))throw new u("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e});if("@type"in e[0])for(const t of a.asArray(e[0]["@type"]))if(!o.isObject(t)&&!s.isAbsolute(t)&&"@json"!==t||o.isString(t)&&0===t.indexOf("_:"))throw new u("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}function m(e,t,r,s){let u=!0,c=!1;for(const l in r){let f=!1;const d=a.getValues(t,l),h=0===a.getValues(r,l).length;if("@id"===l){if(o.isEmptyObject(r["@id"][0]||{})?f=!0:r["@id"].length>=0&&(f=r["@id"].includes(d[0])),!s.requireAll)return f}else if("@type"===l){if(u=!1,h){if(d.length>0)return!1;f=!0}else if(1===r["@type"].length&&o.isEmptyObject(r["@type"][0]))f=d.length>0;else for(const e of r["@type"])f=!(!o.isObject(e)||!("@default"in e))||(f||d.some((t=>t===e)));if(!s.requireAll)return f}else{if(n(l))continue;{const t=a.getValues(r,l)[0];let n=!1;if(t&&(y([t]),n="@default"in t),u=!1,0===d.length&&n)continue;if(d.length>0&&h)return!1;if(void 0===t){if(d.length>0)return!1;f=!0}else if(i.isList(t)){const r=t["@list"][0];if(i.isList(d[0])){const t=d[0]["@list"];i.isValue(r)?f=t.some((e=>A(r,e))):(i.isSubject(r)||i.isSubjectReference(r))&&(f=t.some((t=>w(e,r,t,s))))}}else f=i.isValue(t)?d.some((e=>A(t,e))):i.isSubjectReference(t)?d.some((r=>w(e,t,r,s))):!!o.isObject(t)&&d.length>0}}if(!f&&s.requireAll)return!1;c=c||f}return u||c}function g(e,t){const r=e.uniqueEmbeds[e.graph],n=r[t],i=n.parent,s=n.property,u={"@id":t};if(o.isArray(i)){for(let e=0;e{const t=Object.keys(r);for(const n of t)n in r&&o.isObject(r[n].parent)&&r[n].parent["@id"]===e&&(delete r[n],c(n))};c(t)}function b(e,t){if(o.isArray(e))return e.map((e=>b(e,t)));if(o.isObject(e)){if("@preserve"in e)return e["@preserve"][0];if(i.isValue(e))return e;if(i.isList(e))return e["@list"]=b(e["@list"],t),e;if("@id"in e){const r=e["@id"];if(t.link.hasOwnProperty(r)){const n=t.link[r].indexOf(e);if(-1!==n)return t.link[r][n];t.link[r].push(e)}else t.link[r]=[e]}for(const r in e)"@id"===r&&t.bnodesToClear.includes(e[r])?delete e["@id"]:e[r]=b(e[r],t)}return e}function v(e,t,r){o.isObject(e)?a.addValue(e,t,r,{propertyIsArray:!0}):e.push(r)}function w(e,t,r,n){if(!("@id"in r))return!1;const i=e.subjects[r["@id"]];return i&&m(e,i,t,n)}function A(e,t){const r=t["@value"],n=t["@type"],i=t["@language"],a=e["@value"]?o.isArray(e["@value"])?e["@value"]:[e["@value"]]:[],s=e["@type"]?o.isArray(e["@type"])?e["@type"]:[e["@type"]]:[],u=e["@language"]?o.isArray(e["@language"])?e["@language"]:[e["@language"]]:[];return 0===a.length&&0===s.length&&0===u.length||!(!a.includes(r)&&!o.isEmptyObject(a[0]))&&(!!(!n&&0===s.length||s.includes(n)||n&&o.isEmptyObject(s[0]))&&!!(!i&&0===u.length||u.includes(i)||i&&o.isEmptyObject(u[0])))}e.exports=f,f.frameMergedOrDefault=(e,t,r)=>{const n={options:r,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},i=new a.IdentifierIssuer("_:b");c(e,n.graphMap,"@default",i),r.merged&&(n.graphMap["@merged"]=l(n.graphMap),n.graph="@merged"),n.subjects=n.graphMap[n.graph];const o=[];return f.frame(n,Object.keys(n.subjects).sort(),t,o),r.pruneBlankNodeIdentifiers&&(r.bnodesToClear=Object.keys(n.bnodeMap).filter((e=>1===n.bnodeMap[e].length))),r.link={},b(o,r)},f.frame=(e,t,r,s,c=null)=>{y(r),r=r[0];const l=e.options,b={embed:p(r,l,"embed"),explicit:p(r,l,"explicit"),requireAll:p(r,l,"requireAll")};e.link.hasOwnProperty(e.graph)||(e.link[e.graph]={});const w=e.link[e.graph],k=function(e,t,r,n){const i={};for(const o of t){const t=e.graphMap[e.graph][o];m(e,t,r,n)&&(i[o]=t)}return i}(e,t,r,b),E=Object.keys(k).sort();for(const y of E){const m=k[y];if(null===c?e.uniqueEmbeds={[e.graph]:{}}:e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{},"@link"===b.embed&&y in w){v(s,c,w[y]);continue}const E={"@id":y};if(0===y.indexOf("_:")&&a.addValue(e.bnodeMap,y,E,{propertyIsArray:!0}),w[y]=E,("@first"===b.embed||"@last"===b.embed)&&e.is11)throw new u("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:r});if(e.embedded||!e.uniqueEmbeds[e.graph].hasOwnProperty(y))if(!e.embedded||"@never"!==b.embed&&!h(m,e.graph,e.subjectStack))if(!e.embedded||"@first"!=b.embed&&"@once"!=b.embed||!e.uniqueEmbeds[e.graph].hasOwnProperty(y)){if("@last"===b.embed&&y in e.uniqueEmbeds[e.graph]&&g(e,y),e.uniqueEmbeds[e.graph][y]={parent:s,property:c},e.subjectStack.push({subject:m,graph:e.graph}),y in e.graphMap){let t=!1,n=null;"@graph"in r?(n=r["@graph"][0],t=!("@merged"===y||"@default"===y),o.isObject(n)||(n={})):(t="@merged"!==e.graph,n={}),t&&f.frame({...e,graph:y,embedded:!1},Object.keys(e.graphMap[y]).sort(),[n],E,"@graph")}"@included"in r&&f.frame({...e,embedded:!1},t,r["@included"],E,"@included");for(const t of Object.keys(m).sort())if(n(t)){if(E[t]=a.clone(m[t]),"@type"===t)for(const t of m["@type"])0===t.indexOf("_:")&&a.addValue(e.bnodeMap,t,E,{propertyIsArray:!0})}else if(!b.explicit||t in r)for(const n of m[t]){const o=t in r?r[t]:d(b);if(i.isList(n)){const o=r[t]&&r[t][0]&&r[t][0]["@list"]?r[t][0]["@list"]:d(b),s={"@list":[]};v(E,t,s);const u=n["@list"];for(const t of u)i.isSubjectReference(t)?f.frame({...e,embedded:!0},[t["@id"]],o,s,"@list"):v(s,"@list",a.clone(t))}else i.isSubjectReference(n)?f.frame({...e,embedded:!0},[n["@id"]],o,E,t):A(o[0],n)&&v(E,t,a.clone(n))}for(const e of Object.keys(r).sort()){if("@type"===e){if(!o.isObject(r[e][0])||!("@default"in r[e][0]))continue}else if(n(e))continue;const t=r[e][0]||{};if(!p(t,l,"omitDefault")&&!(e in E)){let r="@null";"@default"in t&&(r=a.clone(t["@default"])),o.isArray(r)||(r=[r]),E[e]=[{"@preserve":r}]}}for(const t of Object.keys(r["@reverse"]||{}).sort()){const n=r["@reverse"][t];for(const r of Object.keys(e.subjects)){a.getValues(e.subjects[r],t).some((e=>e["@id"]===y))&&(E["@reverse"]=E["@reverse"]||{},a.addValue(E["@reverse"],t,[],{propertyIsArray:!0}),f.frame({...e,embedded:!0},[r],n,E["@reverse"][t],c))}}v(s,c,E),e.subjectStack.pop()}else v(s,c,E);else v(s,c,E)}},f.cleanupNull=(e,t)=>{if(o.isArray(e)){return e.map((e=>f.cleanupNull(e,t))).filter((e=>e))}if("@null"===e)return null;if(o.isObject(e)){if("@id"in e){const r=e["@id"];if(t.link.hasOwnProperty(r)){const n=t.link[r].indexOf(e);if(-1!==n)return t.link[r][n];t.link[r].push(e)}else t.link[r]=[e]}for(const r in e)e[r]=f.cleanupNull(e[r],t)}return e}},3947:(e,t,r)=>{"use strict";const n=r(2207),i=r(3978),o=r(7382),{REGEX_BCP47:a,addValue:s}=r(9263),{handleEvent:u}=r(2246),{RDF_LIST:c,RDF_FIRST:l,RDF_REST:f,RDF_NIL:d,RDF_TYPE:h,RDF_JSON_LITERAL:p,XSD_BOOLEAN:y,XSD_DOUBLE:m,XSD_INTEGER:g,XSD_STRING:b}=r(9378),v={};function w(e,t,r,i){if(e.termType.endsWith("Node"))return{"@id":e.value};const s={"@value":e.value};if(e.language)e.language.match(a)||i.eventHandler&&u({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e.language}},options:i}),s["@language"]=e.language;else{let c=e.datatype.value;if(c||(c=b),c===p){c="@json";try{s["@value"]=JSON.parse(s["@value"])}catch(e){throw new n("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:s["@value"],cause:e})}}if(t){if(c===y)"true"===s["@value"]?s["@value"]=!0:"false"===s["@value"]&&(s["@value"]=!1);else if(o.isNumeric(s["@value"]))if(c===g){const e=parseInt(s["@value"],10);e.toFixed(0)===s["@value"]&&(s["@value"]=e)}else c===m&&(s["@value"]=parseFloat(s["@value"]));[y,g,m,b].includes(c)||(s["@type"]=c)}else if("i18n-datatype"===r&&c.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=c.split(/[#_]/);e.length>0&&(s["@language"]=e,e.match(a)||i.eventHandler&&u({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:i})),s["@direction"]=t}else c!==b&&(s["@type"]=c)}return s}e.exports=v,v.fromRDF=async(e,t)=>{const{useRdfType:r=!1,useNativeTypes:a=!1,rdfDirection:u=null}=t,p={},y={"@default":p},m={};if(u){if("compound-literal"===u)throw new n("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:u});if("i18n-datatype"!==u)throw new n("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:u})}for(const n of e){const e="DefaultGraph"===n.graph.termType?"@default":n.graph.value;e in y||(y[e]={}),"@default"===e||e in p||(p[e]={"@id":e});const i=y[e],o=n.subject.value,c=n.predicate.value,l=n.object;o in i||(i[o]={"@id":o});const f=i[o],g=l.termType.endsWith("Node");if(g&&!(l.value in i)&&(i[l.value]={"@id":l.value}),c===h&&!r&&g){s(f,"@type",l.value,{propertyIsArray:!0});continue}const b=w(l,a,u,t);if(s(f,c,b,{propertyIsArray:!0}),g)if(l.value===d){const e=i[l.value];"usages"in e||(e.usages=[]),e.usages.push({node:f,property:c,value:b})}else l.value in m?m[l.value]=!1:m[l.value]={node:f,property:c,value:b}}for(const e in y){const t=y[e];if(!(d in t))continue;const r=t[d];if(r.usages){for(let e of r.usages){let r=e.node,n=e.property,a=e.value;const s=[],u=[];let d=Object.keys(r).length;for(;n===f&&o.isObject(m[r["@id"]])&&o.isArray(r[l])&&1===r[l].length&&o.isArray(r[f])&&1===r[f].length&&(3===d||4===d&&o.isArray(r["@type"])&&1===r["@type"].length&&r["@type"][0]===c)&&(s.push(r[l][0]),u.push(r["@id"]),e=m[r["@id"]],r=e.node,n=e.property,a=e.value,d=Object.keys(r).length,i.isBlankNode(r)););delete a["@id"],a["@list"]=s.reverse();for(const e of u)delete t[e]}delete r.usages}}const g=[],b=Object.keys(p).sort();for(const e of b){const t=p[e];if(e in y){const r=t["@graph"]=[],n=y[e],o=Object.keys(n).sort();for(const e of o){const t=n[e];i.isSubjectReference(t)||r.push(t)}}i.isSubjectReference(t)||g.push(t)}return g}},3978:(e,t,r)=>{"use strict";const n=r(7382),i={};e.exports=i,i.isSubject=e=>{if(n.isObject(e)&&!("@value"in e||"@set"in e||"@list"in e)){return Object.keys(e).length>1||!("@id"in e)}return!1},i.isSubjectReference=e=>n.isObject(e)&&1===Object.keys(e).length&&"@id"in e,i.isValue=e=>n.isObject(e)&&"@value"in e,i.isList=e=>n.isObject(e)&&"@list"in e,i.isGraph=e=>n.isObject(e)&&"@graph"in e&&1===Object.keys(e).filter((e=>"@id"!==e&&"@index"!==e)).length,i.isSimpleGraph=e=>i.isGraph(e)&&!("@id"in e),i.isBlankNode=e=>{if(n.isObject(e)){if("@id"in e){const t=e["@id"];return!n.isString(t)||0===t.indexOf("_:")}return 0===Object.keys(e).length||!("@value"in e||"@set"in e||"@list"in e)}return!1}},4841:(e,t,r)=>{const n=r(989),i=r(701),o=r(9263),a=r(7034),s=o.IdentifierIssuer,u=r(2207),c=r(9749),l=r(8229),{expand:f}=r(4019),{flatten:d}=r(5229),{fromRDF:h}=r(3947),{toRDF:p}=r(9180),{frameMergedOrDefault:y,cleanupNull:m}=r(7946),{isArray:g,isObject:b,isString:v}=r(7382),{isSubjectReference:w}=r(3978),{expandIri:A,getInitialContext:k,process:E,processingMode:S}=r(1972),{compact:x,compactIri:_}=r(1058),{createNodeMap:P,createMergedNodeMap:T,mergeNodeMaps:I}=r(9233),{logEventHandler:O,logWarningEventHandler:B,safeEventHandler:C,setDefaultEventHandler:N,setupEventHandler:R,strictEventHandler:M,unhandledEventHandler:U}=r(2246),L=function(e){const t={},L=new c({max:100});function j(t,{documentLoader:r=e.documentLoader,...n}){if(t&&"compactionMap"in t)throw new u('"compactionMap" not supported.',"jsonld.OptionsError");if(t&&"expansionMap"in t)throw new u('"expansionMap" not supported.',"jsonld.OptionsError");return Object.assign({},{documentLoader:r},n,t,{eventHandler:R({options:t})})}return e.compact=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(null===r)throw new u("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(null===t)return null;let i;(n=j(n,{base:v(t)?t:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new s("_:b"),contextResolver:new a({sharedCache:L})})).link&&(n.skipExpansion=!0),n.compactToRelative||delete n.base,i=n.skipExpansion?t:await e.expand(t,n);const c=await e.processContext(k(n),r,n);let l=await x({activeCtx:c,element:i,options:n});n.compactArrays&&!n.graph&&g(l)?1===l.length?l=l[0]:0===l.length&&(l={}):n.graph&&b(l)&&(l=[l]),b(r)&&"@context"in r&&(r=r["@context"]),r=o.clone(r),g(r)||(r=[r]);const f=r;r=[];for(let e=0;e0)&&r.push(f[e]);const d=r.length>0;if(1===r.length&&(r=r[0]),g(l)){const e=_({activeCtx:c,iri:"@graph",relativeTo:{vocab:!0}}),t=l;l={},d&&(l["@context"]=r),l[e]=t}else if(b(l)&&d){const e=l;l={"@context":r};for(const t in e)l[t]=e[t]}return l},e.expand=async function(t,r){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");const n={},i=[];if("expandContext"in(r=j(r,{keepFreeFloatingNodes:!1,contextResolver:new a({sharedCache:L})}))){const e=o.clone(r.expandContext);b(e)&&"@context"in e?n.expandContext=e:n.expandContext={"@context":e},i.push(n.expandContext)}let s;if(v(t)){const o=await e.get(t,r);s=o.documentUrl,n.input=o.document,o.contextUrl&&(n.remoteContext={"@context":o.contextUrl},i.push(n.remoteContext))}else n.input=o.clone(t);"base"in r||(r.base=s||"");let u=k(r);for(const e of i)u=await E({activeCtx:u,localCtx:e,options:r});let c=await f({activeCtx:u,element:n.input,options:r});return b(c)&&"@graph"in c&&1===Object.keys(c).length?c=c["@graph"]:null===c&&(c=[]),g(c)||(c=[c]),c},e.flatten=async function(t,r,n){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");r="function"==typeof r?null:r||null,n=j(n,{base:v(t)?t:"",contextResolver:new a({sharedCache:L})});const i=await e.expand(t,n),o=d(i);if(null===r)return o;n.graph=!0,n.skipExpansion=!0;return await e.compact(o,r,n)},e.frame=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(n=j(n,{base:v(t)?t:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new a({sharedCache:L})}),v(r)){const t=await e.get(r,n);if(r=t.document,t.contextUrl){let e=r["@context"];e?g(e)?e.push(t.contextUrl):e=[e,t.contextUrl]:e=t.contextUrl,r["@context"]=e}}const i=r&&r["@context"]||{},o=await e.processContext(k(n),i,n);n.hasOwnProperty("omitGraph")||(n.omitGraph=S(o,1.1)),n.hasOwnProperty("pruneBlankNodeIdentifiers")||(n.pruneBlankNodeIdentifiers=S(o,1.1));const s=await e.expand(t,n),u={...n};u.isFrame=!0,u.keepFreeFloatingNodes=!0;const c=await e.expand(r,u),l=Object.keys(r).map((e=>A(o,e,{vocab:!0})));u.merged=!l.includes("@graph"),u.is11=S(o,1.1);const f=y(s,c,u);u.graph=!n.omitGraph,u.skipExpansion=!0,u.link={},u.framing=!0;let d=await e.compact(f,i,u);return u.link={},d=m(d,u),d},e.link=async function(t,r,n){const i={};return r&&(i["@context"]=r),i["@embed"]="@link",e.frame(t,i,n)},e.normalize=e.canonize=async function(t,r){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if("inputFormat"in(r=j(r,{base:v(t)?t:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new a({sharedCache:L})}))){if("application/n-quads"!==r.inputFormat&&"application/nquads"!==r.inputFormat)throw new u("Unknown canonicalization input format.","jsonld.CanonizeError");const e=l.parse(t);return n.canonize(e,r)}const i={...r};delete i.format,i.produceGeneralizedRdf=!1;const o=await e.toRDF(t,i);return n.canonize(o,r)},e.fromRDF=async function(e,r){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");r=j(r,{format:v(e)?"application/n-quads":void 0});const{format:n}=r;let{rdfParser:i}=r;if(n){if(i=i||t[n],!i)throw new u("Unknown input format.","jsonld.UnknownFormat",{format:n})}else i=()=>e;const o=await i(e);return h(o,r)},e.toRDF=async function(t,r){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");let n;n=(r=j(r,{base:v(t)?t:"",skipExpansion:!1,contextResolver:new a({sharedCache:L})})).skipExpansion?t:await e.expand(t,r);const i=p(n,r);if(r.format){if("application/n-quads"===r.format||"application/nquads"===r.format)return l.serialize(i);throw new u("Unknown output format.","jsonld.UnknownFormat",{format:r.format})}return i},e.createNodeMap=async function(t,r){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");r=j(r,{base:v(t)?t:"",contextResolver:new a({sharedCache:L})});const n=await e.expand(t,r);return T(n,r)},e.merge=async function(t,r,n){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!g(t))throw new TypeError('Could not merge, "docs" must be an array.');r="function"==typeof r?null:r||null,n=j(n,{contextResolver:new a({sharedCache:L})});const i=await Promise.all(t.map((t=>{const r={...n};return e.expand(t,r)})));let u=!0;"mergeNodes"in n&&(u=n.mergeNodes);const c=n.issuer||new s("_:b"),l={"@default":{}};for(let e=0;ee._documentLoader,set:t=>e._documentLoader=t}),e.documentLoader=async e=>{throw new u("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:e})},e.get=async function(t,r){let n;n="function"==typeof r.documentLoader?r.documentLoader:e.documentLoader;const i=await n(t);try{if(!i.document)throw new u("No remote document found at the given URL.","jsonld.NullRemoteDocument");v(i.document)&&(i.document=JSON.parse(i.document))}catch(e){throw new u("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:i})}return i},e.processContext=async function(e,t,r){return r=j(r,{base:"",contextResolver:new a({sharedCache:L})}),null===t?k(r):(t=o.clone(t),b(t)&&"@context"in t||(t={"@context":t}),E({activeCtx:e,localCtx:t,options:r}))},e.getContextValue=r(1972).getContextValue,e.documentLoaders={},e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new u('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,r){t[e]=r},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser("application/n-quads",l.parse),e.registerRDFParser("application/nquads",l.parse),e.url=r(470),e.logEventHandler=O,e.logWarningEventHandler=B,e.safeEventHandler=C,e.setDefaultEventHandler=N,e.strictEventHandler=M,e.unhandledEventHandler=U,e.util=o,Object.assign(e,o),e.promises=e,e.RequestQueue=r(3743),e.JsonLdProcessor=r(5445)(e),i.setupGlobals(e),i.setupDocumentLoaders(e),e},j=function(){return L((function(){return j()}))};L(j),e.exports=j},9233:(e,t,r)=>{"use strict";const{isKeyword:n}=r(1972),i=r(3978),o=r(7382),a=r(9263),s=r(2207),u={};e.exports=u,u.createMergedNodeMap=(e,t)=>{const r=(t=t||{}).issuer||new a.IdentifierIssuer("_:b"),n={"@default":{}};return u.createNodeMap(e,n,"@default",r),u.mergeNodeMaps(n)},u.createNodeMap=(e,t,r,c,l,f)=>{if(o.isArray(e)){for(const n of e)u.createNodeMap(n,t,r,c,void 0,f);return}if(!o.isObject(e))return void(f&&f.push(e));if(i.isValue(e)){if("@type"in e){let t=e["@type"];0===t.indexOf("_:")&&(e["@type"]=t=c.getId(t))}return void(f&&f.push(e))}if(f&&i.isList(e)){const n=[];return u.createNodeMap(e["@list"],t,r,c,l,n),void f.push({"@list":n})}if("@type"in e){const t=e["@type"];for(const e of t)0===e.indexOf("_:")&&c.getId(e)}o.isUndefined(l)&&(l=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"]),f&&f.push({"@id":l});const d=t[r],h=d[l]=d[l]||{};h["@id"]=l;const p=Object.keys(e).sort();for(let o of p){if("@id"===o)continue;if("@reverse"===o){const n={"@id":l},o=e["@reverse"];for(const e in o){const s=o[e];for(const o of s){let s=o["@id"];i.isBlankNode(o)&&(s=c.getId(s)),u.createNodeMap(o,t,r,c,s),a.addValue(d[s],e,n,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if("@graph"===o){l in t||(t[l]={}),u.createNodeMap(e[o],t,l,c);continue}if("@included"===o){u.createNodeMap(e[o],t,r,c);continue}if("@type"!==o&&n(o)){if("@index"===o&&o in h&&(e[o]!==h[o]||e[o]["@id"]!==h[o]["@id"]))throw new s("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:h});h[o]=e[o];continue}const f=e[o];if(0===o.indexOf("_:")&&(o=c.getId(o)),0!==f.length)for(let e of f)if("@type"===o&&(e=0===e.indexOf("_:")?c.getId(e):e),i.isSubject(e)||i.isSubjectReference(e)){if("@id"in e&&!e["@id"])continue;const n=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"];a.addValue(h,o,{"@id":n},{propertyIsArray:!0,allowDuplicate:!1}),u.createNodeMap(e,t,r,c,n)}else if(i.isValue(e))a.addValue(h,o,e,{propertyIsArray:!0,allowDuplicate:!1});else if(i.isList(e)){const n=[];u.createNodeMap(e["@list"],t,r,c,l,n),e={"@list":n},a.addValue(h,o,e,{propertyIsArray:!0,allowDuplicate:!1})}else u.createNodeMap(e,t,r,c,l),a.addValue(h,o,e,{propertyIsArray:!0,allowDuplicate:!1});else a.addValue(h,o,[],{propertyIsArray:!0})}},u.mergeNodeMapGraphs=e=>{const t={};for(const r of Object.keys(e).sort())for(const i of Object.keys(e[r]).sort()){const o=e[r][i];i in t||(t[i]={"@id":i});const s=t[i];for(const e of Object.keys(o).sort())if(n(e)&&"@type"!==e)s[e]=a.clone(o[e]);else for(const t of o[e])a.addValue(s,e,a.clone(t),{propertyIsArray:!0,allowDuplicate:!1})}return t},u.mergeNodeMaps=e=>{const t=e["@default"],r=Object.keys(e).sort();for(const n of r){if("@default"===n)continue;const r=e[n];let o=t[n];o?"@graph"in o||(o["@graph"]=[]):t[n]=o={"@id":n,"@graph":[]};const a=o["@graph"];for(const e of Object.keys(r).sort()){const t=r[e];i.isSubjectReference(t)||a.push(t)}}return t}},701:(e,t,r)=>{"use strict";const n=r(6957),i={};e.exports=i,i.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=n,e.useDocumentLoader("xhr"))},i.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},9180:(e,t,r)=>{"use strict";const{createNodeMap:n}=r(9233),{isKeyword:i}=r(1972),o=r(3978),a=r(2341),s=r(2207),u=r(7382),c=r(9263),{handleEvent:l}=r(2246),{RDF_FIRST:f,RDF_REST:d,RDF_NIL:h,RDF_TYPE:p,RDF_JSON_LITERAL:y,RDF_LANGSTRING:m,XSD_BOOLEAN:g,XSD_DOUBLE:b,XSD_INTEGER:v,XSD_STRING:w}=r(9378),{isAbsolute:A}=r(470),k={};function E(e,t,r,n,o){const a=Object.keys(t).sort();for(const s of a){const a=t[s],u=Object.keys(a).sort();for(let t of u){const u=a[t];if("@type"===t)t=p;else if(i(t))continue;for(const i of u){const a={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!A(s)){o.eventHandler&&l({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:s}},options:o});continue}const u={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!A(t)){o.eventHandler&&l({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:o});continue}if("BlankNode"===u.termType&&!o.produceGeneralizedRdf){o.eventHandler&&l({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:n.getOldIds().find((e=>n.getId(e)===t))}},options:o});continue}const c=S(i,n,e,r,o.rdfDirection,o);c&&e.push({subject:a,predicate:u,object:c,graph:r})}}}}function S(e,t,r,n,i,c){const p={};if(o.isValue(e)){p.termType="Literal",p.value=void 0,p.datatype={termType:"NamedNode"};let t=e["@value"];const r=e["@type"]||null;if("@json"===r)p.value=a(t),p.datatype.value=y;else if(u.isBoolean(t))p.value=t.toString(),p.datatype.value=r||g;else if(u.isDouble(t)||r===b)u.isDouble(t)||(t=parseFloat(t)),p.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),p.datatype.value=r||b;else if(u.isNumber(t))p.value=t.toFixed(0),p.datatype.value=r||v;else if("@direction"in e&&"i18n-datatype"===i){const r=`https://www.w3.org/ns/i18n#${(e["@language"]||"").toLowerCase()}_${e["@direction"]}`;p.datatype.value=r,p.value=t}else{if("@direction"in e&&"compound-literal"===i)throw new s("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:i});if("@direction"in e&&i)throw new s("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:i});"@language"in e?("@direction"in e&&!i&&c.eventHandler&&l({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:p.value}},options:c}),p.value=t,p.datatype.value=r||m,p.language=e["@language"]):("@direction"in e&&!i&&c.eventHandler&&l({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:p.value}},options:c}),p.value=t,p.datatype.value=r||w)}}else if(o.isList(e)){const o=function(e,t,r,n,i,o){const a={termType:"NamedNode",value:f},s={termType:"NamedNode",value:d},u={termType:"NamedNode",value:h},c=e.pop(),l=c?{termType:"BlankNode",value:t.getId()}:u;let p=l;for(const u of e){const e=S(u,t,r,n,i,o),c={termType:"BlankNode",value:t.getId()};r.push({subject:p,predicate:a,object:e,graph:n}),r.push({subject:p,predicate:s,object:c,graph:n}),p=c}if(c){const e=S(c,t,r,n,i,o);r.push({subject:p,predicate:a,object:e,graph:n}),r.push({subject:p,predicate:s,object:u,graph:n})}return l}(e["@list"],t,r,n,i,c);p.termType=o.termType,p.value=o.value}else{const t=u.isObject(e)?e["@id"]:e;p.termType=t.startsWith("_:")?"BlankNode":"NamedNode",p.value=t}return"NamedNode"!==p.termType||A(p.value)?p:(c.eventHandler&&l({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:p.value}},options:c}),null)}e.exports=k,k.toRDF=(e,t)=>{const r=new c.IdentifierIssuer("_:b"),i={"@default":{}};n(e,i,"@default",r);const o=[],a=Object.keys(i).sort();for(const e of a){let n;if("@default"===e)n={termType:"DefaultGraph",value:""};else{if(!A(e)){t.eventHandler&&l({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t});continue}n=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},n.value=e}E(o,i[e],n,r,t)}return o}},7382:e=>{"use strict";const t={};e.exports=t,t.isArray=Array.isArray,t.isBoolean=e=>"boolean"==typeof e||"[object Boolean]"===Object.prototype.toString.call(e),t.isDouble=e=>t.isNumber(e)&&(-1!==String(e).indexOf(".")||Math.abs(e)>=1e21),t.isEmptyObject=e=>t.isObject(e)&&0===Object.keys(e).length,t.isNumber=e=>"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e),t.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),t.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),t.isString=e=>"string"==typeof e||"[object String]"===Object.prototype.toString.call(e),t.isUndefined=e=>void 0===e},470:(e,t,r)=>{"use strict";const n=r(7382),i={};e.exports=i,i.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([a-zA-Z][a-zA-Z0-9+-.]*):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},i.parse=(e,t)=>{const r={},n=i.parsers[t||"full"],o=n.regex.exec(e);let a=n.keys.length;for(;a--;)r[n.keys[a]]=void 0===o[a]?null:o[a];return("https"===r.scheme&&"443"===r.port||"http"===r.scheme&&"80"===r.port)&&(r.href=r.href.replace(":"+r.port,""),r.authority=r.authority.replace(":"+r.port,""),r.port=null),r.normalizedPath=i.removeDotSegments(r.path),r},i.prependBase=(e,t)=>{if(null===e)return t;if(i.isAbsolute(t))return t;e&&!n.isString(e)||(e=i.parse(e||""));const r=i.parse(t),o={protocol:e.protocol||""};if(null!==r.authority)o.authority=r.authority,o.path=r.path,o.query=r.query;else if(o.authority=e.authority,""===r.path)o.path=e.path,null!==r.query?o.query=r.query:o.query=e.query;else{if(0===r.path.indexOf("/"))o.path=r.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1),(t.length>0||e.authority)&&"/"!==t.substr(-1)&&(t+="/"),t+=r.path,o.path=t}o.query=r.query}""!==r.path&&(o.path=i.removeDotSegments(o.path));let a=o.protocol;return null!==o.authority&&(a+="//"+o.authority),a+=o.path,null!==o.query&&(a+="?"+o.query),null!==r.fragment&&(a+="#"+r.fragment),""===a&&(a="./"),a},i.removeBase=(e,t)=>{if(null===e)return t;e&&!n.isString(e)||(e=i.parse(e||""));let r="";if(""!==e.href?r+=(e.protocol||"")+"//"+(e.authority||""):t.indexOf("//")&&(r+="//"),0!==t.indexOf(r))return t;const o=i.parse(t.substr(r.length)),a=e.normalizedPath.split("/"),s=o.normalizedPath.split("/"),u=o.fragment||o.query?0:1;for(;a.length>0&&s.length>u&&a[0]===s[0];)a.shift(),s.shift();let c="";if(a.length>0){a.pop();for(let e=0;e{if(0===e.length)return"";const t=e.split("/"),r=[];for(;t.length>0;){const e=t.shift(),n=0===t.length;"."!==e?".."!==e?r.push(e):(r.pop(),n&&r.push("")):n&&r.push("")}return"/"===e[0]&&r.length>0&&""!==r[0]&&r.unshift(""),1===r.length&&""===r[0]?"/":r.join("/")};const o=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;i.isAbsolute=e=>n.isString(e)&&o.test(e),i.isRelative=e=>n.isString(e)},9263:(e,t,r)=>{"use strict";const n=r(3978),i=r(7382),o=r(989).IdentifierIssuer,a=r(2207),s=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,u=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,c=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,l={accept:"application/ld+json, application/json"},f={};function d(e,t){if(i.isArray(t))for(let r=0;r{if(Object.keys(e).some((e=>"accept"===e.toLowerCase())))throw new RangeError('Accept header may not be specified; only "'+l.accept+'" is supported.');return Object.assign({Accept:l.accept},e)},f.parseLinkHeader=e=>{const t={},r=e.match(s);for(let e=0;e{if(!(i.isString(e)||i.isArray(e)&&e.every((e=>i.isString(e))))){if(t&&i.isObject(e))switch(Object.keys(e).length){case 0:return;case 1:if("@default"in e&&f.asArray(e["@default"]).every((e=>i.isString(e))))return}throw new a('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:e})}},f.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const r=e[t];return!i.isArray(r)||r.length>0}return!1},f.hasValue=(e,t,r)=>{if(f.hasProperty(e,t)){let o=e[t];const a=n.isList(o);if(i.isArray(o)||a){a&&(o=o["@list"]);for(let e=0;e{if("propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1),"valueIsArray"in n||(n.valueIsArray=!1),"allowDuplicate"in n||(n.allowDuplicate=!0),"prependValue"in n||(n.prependValue=!1),n.valueIsArray)e[t]=r;else if(i.isArray(r)){0===r.length&&n.propertyIsArray&&!e.hasOwnProperty(t)&&(e[t]=[]),n.prependValue&&(r=r.concat(e[t]),e[t]=[]);for(let i=0;i[].concat(e[t]||[]),f.removeProperty=(e,t)=>{delete e[t]},f.removeValue=(e,t,r,n)=>{"propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1);const i=f.getValues(e,t).filter((e=>!f.compareValues(e,r)));0===i.length?f.removeProperty(e,t):1!==i.length||n.propertyIsArray?e[t]=i:e[t]=i[0]},f.relabelBlankNodes=(e,t)=>d((t=t||{}).issuer||new o("_:b"),e),f.compareValues=(e,t)=>e===t||(!(!n.isValue(e)||!n.isValue(t)||e["@value"]!==t["@value"]||e["@type"]!==t["@type"]||e["@language"]!==t["@language"]||e["@index"]!==t["@index"])||!!(i.isObject(e)&&"@id"in e&&i.isObject(t)&&"@id"in t)&&e["@id"]===t["@id"]),f.compareShortestLeast=(e,t)=>e.length{"use strict";const n=r(8799),i=Symbol("max"),o=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),d=Symbol("cache"),h=Symbol("updateAgeOnGet"),p=()=>1;const y=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(m(e,t)){if(b(e,n),!e[s])return}else r&&(e[h]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]},g=e=>{if(e[o]>e[i])for(let t=e[f].tail;e[o]>e[i]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[o]-=r.length,e[d].delete(r.key),e[f].removeNode(t)}};class v{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const w=(e,t,r,n)=>{let i=r.value;m(e,i)&&(b(e,r),e[s]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||p;if(this[a]="function"!=typeof t?p:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,g(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,g(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[a]&&(this[a]=e,this[o]=0,this[f].forEach((e=>{e.length=this[a](e.value,e.key),this[o]+=e.length}))),g(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;w(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;w(this,e,r,t),r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[f]=new n,this[o]=0}dump(){return this[f].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){if((r=r||this[u])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,s=this[a](t,e);if(this[d].has(e)){if(s>this[i])return b(this,this[d].get(e)),!1;const a=this[d].get(e).value;return this[c]&&(this[l]||this[c](e,a.value)),a.now=n,a.maxAge=r,a.value=t,this[o]+=s-a.length,a.length=s,this.get(e),g(this),!0}const h=new v(e,t,s,n,r);return h.length>this[i]?(this[c]&&this[c](e,t),!1):(this[o]+=h.length,this[f].unshift(h),this[d].set(e,this[f].head),g(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!m(this,t)}get(e){return y(this,e,!0)}peek(e){return y(this,e,!1)}pop(){const e=this[f].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach(((e,t)=>y(this,t,!1)))}}},7284:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Base=void 0;const i=r(8287),o=n(r(1396));class a{print(){a.print(this)}bufferIndexOf(e,t,r=!1){if(r)return this.binarySearch(e,t,i.Buffer.compare);return this.linearSearch(e,t,((e,t)=>e.equals(t)))}static binarySearch(e,t,r){let n=0,i=e.length-1;for(;n<=i;){const o=Math.floor((n+i)/2),a=r(e[o],t);if(0===a){for(let n=o-1;n>=0;n--)if(0!==r(e[n],t))return n+1;return 0}a<0?n=o+1:i=o-1}return-1}binarySearch(e,t,r){return a.binarySearch(e,t,r)}static linearSearch(e,t,r){for(let n=0;n{const r=e(t);return i.Buffer.isBuffer(r)?r:this.isHexString(r)?i.Buffer.from(r.replace("0x",""),"hex"):"string"==typeof r?i.Buffer.from(r):"bigint"==typeof r?i.Buffer.from(t.toString(16),"hex"):ArrayBuffer.isView(r)?i.Buffer.from(r.buffer,r.byteOffset,r.byteLength):i.Buffer.from(e(o.default.enc.Hex.parse(t.toString("hex"))).toString(o.default.enc.Hex),"hex")}}isHexString(e){return a.isHexString(e)}log2(e){return 1===e?0:1+this.log2(e/2|0)}zip(e,t){return e.map(((e,r)=>[e,t[r]]))}static hexZeroPad(e,t){return"0x"+e.replace("0x","").padStart(t,"0")}}t.Base=a,t.default=a},9655:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IncrementalMerkleTree=void 0;const i=n(r(7284)),o=n(r(2539));class a extends i.default{constructor(e,t){if(super(),this.hashFn=e,t.depth&&(this.depth=t.depth),t.arity&&(this.arity=t.arity),this.depth<1)throw new Error("depth must be greater than 0");if(this.arity<1)throw new Error("arity must be greater than 0");const r=[];let n=t.zeroValue;if(this.zeroValue=n,this.zeroes=[],this.depth)for(let e=0;e=this.getMaxLeaves())throw new Error("tree is full");let t=e,r=this.nodes[0].length;for(let e=0;e=this.nodes[0].length)throw new Error("out of bounds");let r=t;for(let t=0;tBigInt(e)))}getLayers(){const e=[];for(const t of this.nodes)e.push(this.copyList(t));if(e[0].length=e[r].length&&(e[r][t]=this.zeroes[r]);t=Math.floor(t/this.arity)}}return e.push([this.root]),e}getHexLayers(){return this.getLayers().reduce(((e,t)=>(Array.isArray(t)?e.push(t.map((e=>this.bufferToHex(this.bufferify(e))))):e.push(t),e)),[])}getLayersAsObject(){const e=this.getLayers().map((e=>e.map((e=>this.bufferToHex(this.bufferify(e),!1))))),t=[];for(let r=0;r=this.nodes[0].length)throw new Error("The leaf does not exist in this tree");const t=[],r=[],n=e;for(let n=0;n0&&!(e&1<=t));o--);if(n!==r.length)throw new Error("invalid bit calculation");return r}numOfPeaks(e){let t=e,r=0;for(;t>0;)t%2==1&&r++,t>>=1;return r}peakBagging(e,t){const r=this.getSize(e);if(this.numOfPeaks(e)!==t.length)throw new Error("received invalid number of peaks");return 0!==e||t.length?this.peakBaggingFn?this.bufferify(this.peakBaggingFn(r,t)):this.hashFn(i.Buffer.concat([this.bufferify(r),...t.map(this.bufferify)])):i.Buffer.alloc(0)}getSize(e){return(e<<1)-this.numOfPeaks(e)}getRoot(){return this.root}getHexRoot(){return this.bufferToHex(this.getRoot())}getNode(e){return this.hashes[e]}mountainHeight(e){let t=1;for(;1<r;)t-=(1<this.size)throw new Error("out of range");if(!this.isLeaf(e))throw new Error("not a leaf");const t=this.root,r=this.width,n=this.getPeakIndexes(this.width),i=[];let o=0;for(let t=0;t=e&&0===o&&(o=n[t]);let a=0,s=0,u=this.heightAt(o);const c=[];for(;o!==e;)u--,[a,s]=this.getChildren(o),o=e<=a?a:s,c[u-1]=this.hashes[e<=a?s:a];return{root:t,width:r,peakBagging:i,siblings:c}}verify(e,t,r,n,i,o){n=this.bufferify(n);if(this.getSize(t)=r){a=i[e],s=u[e];break}if(!a)throw new Error("target not found");let c=o.length+1;const l=new Array(c);let f,d=0,h=0;for(;c>0&&(l[--c]=s,s!==r);)[d,h]=this.getChildren(s),s=r>d?h:d;for(;cthis.size)throw new Error("out of range");if(!this.hashes[e]){const[t,r]=this.getChildren(e),n=this._getOrCreateNode(t),i=this._getOrCreateNode(r);this.hashes[e]=this.hashBranch(e,n,i)}return this.hashes[e]}}t.MerkleMountainRange=s,"undefined"!=typeof window&&(window.MerkleMountainRange=s),t.default=s},9232:(e,t,r)=>{"use strict";var n=r(8287).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleSumTree=t.ProofStep=t.Leaf=t.Bucket=void 0;const i=r(7284);class o{constructor(e,t){this.size=BigInt(e),this.hashed=t,this.parent=null,this.left=null,this.right=null}}t.Bucket=o;t.Leaf=class{constructor(e,t,r){this.hashFn=e,this.rng=t.map((e=>BigInt(e))),this.data=r}getBucket(){let e;return e=this.data?this.hashFn(this.data):n.alloc(32),new o(BigInt(this.rng[1])-BigInt(this.rng[0]),e)}};class a{constructor(e,t){this.bucket=e,this.right=t}}t.ProofStep=a;class s extends i.Base{constructor(e,t){super(),this.leaves=e,this.hashFn=t,s.checkConsecutive(e),this.buckets=[];for(const t of e)this.buckets.push(t.getBucket());let r=[];for(const e of this.buckets)r.push(e);for(;1!==r.length;){const e=[];for(;r.length;)if(r.length>=2){const t=r.shift(),i=r.shift(),a=t.size+i.size,s=this.hashFn(n.concat([this.sizeToBuffer(t.size),this.bufferify(t.hashed),this.sizeToBuffer(i.size),this.bufferify(i.hashed)])),u=new o(a,s);i.parent=u,t.parent=i.parent,t.right=i,i.left=t,e.push(u)}else e.push(r.shift());r=e}this.root=r[0]}sizeToBuffer(e){const t=n.alloc(8);return new DataView(t.buffer).setBigInt64(0,BigInt(e),!1),t}static checkConsecutive(e){let t=BigInt(0);for(const r of e){if(r.rng[0]!==t)throw new Error("leaf ranges are invalid");t=BigInt(r.rng[1])}}getProof(e){let t=this.buckets[Number(e)];const r=[];for(;t&&t.parent;){const e=!!t.right,n=t.right?t.right:t.left;t=t.parent,r.push(new a(n,e))}return r}sum(e){let t=BigInt(0);for(const r of e)t+=BigInt(r);return t}verifyProof(e,t,r){const i=[this.sum(r.filter((e=>!e.right)).map((e=>e.bucket.size))),BigInt(e.size)-this.sum(r.filter((e=>e.right)).map((e=>e.bucket.size)))];if(i[0]!==t.rng[0]||i[1]!==t.rng[1])return!1;let a,s=t.getBucket();for(const e of r)a=e.right?this.hashFn(n.concat([this.sizeToBuffer(s.size),this.bufferify(s.hashed),this.sizeToBuffer(e.bucket.size),this.bufferify(e.bucket.hashed)])):this.hashFn(n.concat([this.sizeToBuffer(e.bucket.size),this.bufferify(e.bucket.hashed),this.sizeToBuffer(s.size),this.bufferify(s.hashed)])),s=new o(BigInt(s.size)+BigInt(e.bucket.size),a);return s.size===e.size&&s.hashed.toString("hex")===e.hashed.toString("hex")}}t.MerkleSumTree=s,"undefined"!=typeof window&&(window.MerkleSumTree=s),t.default=s},259:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleTree=void 0;const i=r(8287),o=n(r(8924)),a=n(r(3009)),s=n(r(2539)),u=n(r(7284));class c extends u.default{constructor(e,t=a.default,r={}){if(super(),this.duplicateOdd=!1,this.concatenator=i.Buffer.concat,this.hashLeaves=!1,this.isBitcoinTree=!1,this.leaves=[],this.layers=[],this.sortLeaves=!1,this.sortPairs=!1,this.sort=!1,this.fillDefaultHash=null,this.complete=!1,r.complete){if(r.isBitcoinTree)throw new Error('option "complete" is incompatible with "isBitcoinTree"');if(r.duplicateOdd)throw new Error('option "complete" is incompatible with "duplicateOdd"')}if(this.isBitcoinTree=!!r.isBitcoinTree,this.hashLeaves=!!r.hashLeaves,this.sortLeaves=!!r.sortLeaves,this.sortPairs=!!r.sortPairs,this.complete=!!r.complete,r.fillDefaultHash)if("function"==typeof r.fillDefaultHash)this.fillDefaultHash=r.fillDefaultHash;else{if(!i.Buffer.isBuffer(r.fillDefaultHash)&&"string"!=typeof r.fillDefaultHash)throw new Error('method "fillDefaultHash" must be a function, Buffer, or string');this.fillDefaultHash=(e,t)=>r.fillDefaultHash}this.sort=!!r.sort,this.sort&&(this.sortLeaves=!0,this.sortPairs=!0),this.duplicateOdd=!!r.duplicateOdd,r.concatenator&&(this.concatenator=r.concatenator),this.hashFn=this.bufferifyFn(t),this.processLeaves(e)}getOptions(){var e,t;return{complete:this.complete,isBitcoinTree:this.isBitcoinTree,hashLeaves:this.hashLeaves,sortLeaves:this.sortLeaves,sortPairs:this.sortPairs,sort:this.sort,fillDefaultHash:null!==(t=null===(e=this.fillDefaultHash)||void 0===e?void 0:e.toString())&&void 0!==t?t:null,duplicateOdd:this.duplicateOdd}}processLeaves(e){if(this.hashLeaves&&(e=e.map(this.hashFn)),this.leaves=e.map(this.bufferify),this.sortLeaves&&(this.leaves=this.leaves.sort(i.Buffer.compare)),this.fillDefaultHash)for(let e=this.leaves.length;e1;){const t=this.layers.length;this.layers.push([]);const r=this.complete&&1===t&&!Number.isInteger(Math.log2(e.length))?2*e.length-Math.pow(2,Math.ceil(Math.log2(e.length))):e.length;for(let n=0;n=r){this.layers[t].push(...e.slice(r));break}if(n+1===e.length&&e.length%2==1){const r=e[e.length-1];let i=r;if(this.isBitcoinTree){i=this.hashFn(this.concatenator([o.default(r),o.default(r)])),i=o.default(this.hashFn(i)),this.layers[t].push(i);continue}if(!this.duplicateOdd){this.layers[t].push(e[n]);continue}}const a=e[n],s=n+1===e.length?a:e[n+1];let u=null;u=this.isBitcoinTree?[o.default(a),o.default(s)]:[a,s],this.sortPairs&&u.sort(i.Buffer.compare);let c=this.hashFn(this.concatenator(u));this.isBitcoinTree&&(c=o.default(this.hashFn(c))),this.layers[t].push(c)}e=this.layers[t]}}addLeaf(e,t=!1){t&&(e=this.hashFn(e)),this.processLeaves(this.leaves.concat(e))}addLeaves(e,t=!1){t&&(e=e.map(this.hashFn)),this.processLeaves(this.leaves.concat(e))}getLeaves(e){return Array.isArray(e)?(this.hashLeaves&&(e=e.map(this.hashFn),this.sortLeaves&&(e=e.sort(i.Buffer.compare))),this.leaves.filter((t=>-1!==this.bufferIndexOf(e,t,this.sortLeaves)))):this.leaves}getLeaf(e){return e<0||e>this.leaves.length-1?i.Buffer.from([]):this.leaves[e]}getLeafIndex(e){e=this.bufferify(e);const t=this.getLeaves();for(let r=0;rthis.bufferToHex(e)))}static marshalLeaves(e){return JSON.stringify(e.map((e=>c.bufferToHex(e))),null,2)}static unmarshalLeaves(e){let t=null;if("string"==typeof e)t=JSON.parse(e);else{if(!(e instanceof Object))throw new Error("Expected type of string or object");t=e}if(!t)return[];if(!Array.isArray(t))throw new Error("Expected JSON string to be array");return t.map(c.bufferify)}getLayers(){return this.layers}getHexLayers(){return this.layers.reduce(((e,t)=>(Array.isArray(t)?e.push(t.map((e=>this.bufferToHex(e)))):e.push(t),e)),[])}getLayersFlat(){const e=this.layers.reduce(((e,t)=>(Array.isArray(t)?e.unshift(...t):e.unshift(t),e)),[]);return e.unshift(i.Buffer.from([0])),e}getHexLayersFlat(){return this.getLayersFlat().map((e=>this.bufferToHex(e)))}getLayerCount(){return this.getLayers().length}getRoot(){return 0===this.layers.length?i.Buffer.from([]):this.layers[this.layers.length-1][0]||i.Buffer.from([])}getHexRoot(){return this.bufferToHex(this.getRoot())}getProof(e,t){if(void 0===e)throw new Error("leaf is required");e=this.bufferify(e);const r=[];if(!Number.isInteger(t)){t=-1;for(let r=0;rthis.bufferToHex(e.data)))}getProofs(){const e=[];return this.getProofsDFS(this.layers.length-1,0,[],e),e}getProofsDFS(e,t,r,n){const i=t%2;if(-1===e)return void(i||n.push([...r].reverse()));if(t>=this.layers[e].length)return;const o=this.layers[e],a=i?t-1:t+1;let s=!1;athis.bufferToHex(e.data)))}getPositionalHexProof(e,t){return this.getProof(e,t).map((e=>["left"===e.position?0:1,this.bufferToHex(e.data)]))}static marshalProof(e){const t=e.map((e=>"string"==typeof e?e:i.Buffer.isBuffer(e)?c.bufferToHex(e):{position:e.position,data:c.bufferToHex(e.data)}));return JSON.stringify(t,null,2)}static unmarshalProof(e){let t=null;if("string"==typeof e)t=JSON.parse(e);else{if(!(e instanceof Object))throw new Error("Expected type of string or object");t=e}if(!t)return[];if(!Array.isArray(t))throw new Error("Expected JSON string to be array");return t.map((e=>{if("string"==typeof e)return c.bufferify(e);if(e instanceof Object)return{position:e.position,data:c.bufferify(e.data)};throw new Error("Expected item to be of type string or object")}))}static marshalTree(e){const t=e.getHexRoot(),r=e.leaves.map((e=>c.bufferToHex(e))),n=e.getHexLayers(),i=e.getOptions();return JSON.stringify({options:i,root:t,layers:n,leaves:r},null,2)}static unmarshalTree(e,t=a.default,r={}){let n=null;if("string"==typeof e)n=JSON.parse(e);else{if(!(e instanceof Object))throw new Error("Expected type of string or object");n=e}if(!n)throw new Error("could not parse json");return r=Object.assign({},n.options||{},r),new c(n.leaves,t,r)}getProofIndices(e,t){const r=Math.pow(2,t);let n=new Set;for(const t of e){let e=r+t;for(;e>1;)n.add(1^e),e=e/2|0}const i=e.map((e=>r+e)),o=Array.from(n).sort(((e,t)=>e-t)).reverse();n=i.concat(o);const a=new Set,s=[];for(let e of n)if(!a.has(e))for(s.push(e);e>1&&(a.add(e),a.has(1^e));)e=e/2|0;return s.filter((t=>!e.includes(t-r)))}getProofIndicesForUnevenTree(e,t){const r=Math.ceil(Math.log2(t)),n=[];for(let e=0;ee%2==0?e+1:e-1)).filter((e=>!o.includes(e)));const r=n.find((({index:t})=>t===e));r&&o.includes(r.leavesCount-1)&&(t=t.slice(0,-1)),i.push(t),o=[...new Set(o.map((e=>e%2==0?e/2:e%2==0?(e+1)/2:(e-1)/2)))]}return i}getMultiProof(e,t){this.complete||console.warn("Warning: For correct multiProofs it's strongly recommended to set complete: true"),t||(t=e,e=this.getLayersFlat());if(this.isUnevenTree()&&t.every(Number.isInteger))return this.getMultiProofForUnevenTree(t);if(!t.every(Number.isInteger)){let e=t;this.sortPairs&&(e=e.sort(i.Buffer.compare));let r=e.map((e=>this.bufferIndexOf(this.leaves,e,this.sortLeaves))).sort(((e,t)=>e===t?0:e>t?1:-1));if(!r.every((e=>-1!==e)))throw new Error("Element does not exist in Merkle tree");const n=[],o=[];let a=[];for(let e=0;er.indexOf(e)===t)),a=[]}return o.filter((e=>!n.includes(e)))}return this.getProofIndices(t,Math.log2(e.length/2|0)).map((t=>e[t]))}getMultiProofForUnevenTree(e,t){t||(t=e,e=this.getLayers());let r=[],n=t;for(const t of e){const e=[];for(const r of n){if(r%2==0){const i=r+1;if(!n.includes(i)&&t[i]){e.push(t[i]);continue}}const i=r-1;n.includes(i)||!t[i]||e.push(t[i])}r=r.concat(e);const i=new Set;for(const e of n)e%2!=0?e%2!=0?i.add((e-1)/2):i.add((e+1)/2):i.add(e/2);n=Array.from(i)}return r}getHexMultiProof(e,t){return this.getMultiProof(e,t).map((e=>this.bufferToHex(e)))}getProofFlags(e,t){if(!Array.isArray(e)||e.length<=0)throw new Error("Invalid Inputs!");let r;if(r=e.every(Number.isInteger)?[...e].sort(((e,t)=>e===t?0:e>t?1:-1)):e.map((e=>this.bufferIndexOf(this.leaves,e,this.sortLeaves))).sort(((e,t)=>e===t?0:e>t?1:-1)),!r.every((e=>-1!==e)))throw new Error("Element does not exist in Merkle tree");const n=t.map((e=>this.bufferify(e))),i=[],o=[];for(let e=0;e{if(!i.includes(t[r])){const e=this.getPairNode(t,r),a=n.includes(t[r])||n.includes(e);e&&o.push(!a),i.push(t[r]),i.push(e)}return e.push(r/2|0),e}),[])}return o}verify(e,t,r){let n=this.bufferify(t);if(r=this.bufferify(r),!Array.isArray(e)||!t||!r)return!1;for(let t=0;tthis.bufferify(e))),o=o.map((e=>this.bufferify(e)));const s={};for(const[e,n]of this.zip(t,r))s[Math.pow(2,a)+e]=n;for(const[e,r]of this.zip(this.getProofIndices(t,a),o))s[e]=r;let u=Object.keys(s).map((e=>+e)).sort(((e,t)=>e-t));u=u.slice(0,u.length-1);let c=0;for(;c=2&&{}.hasOwnProperty.call(s,1^e)){let t=[s[e-e%2],s[e-e%2+1]];this.sortPairs&&(t=t.sort(i.Buffer.compare));const r=t[1]?this.hashFn(this.concatenator(t)):t[0];s[e/2|0]=r,u.push(e/2|0)}c+=1}return!t.length||{}.hasOwnProperty.call(s,1)&&s[1].equals(e)}verifyMultiProofWithFlags(e,t,r,n){e=this.bufferify(e),t=t.map(this.bufferify),r=r.map(this.bufferify);const o=t.length,a=n.length,s=[];let u=0,c=0,l=0;for(let e=0;ethis.bufferify(e))),i=i.map((e=>this.bufferify(e)));const o=this.calculateRootForUnevenTree(t,r,n,i);return e.equals(o)}getDepth(){return this.getLayers().length-1}getLayersAsObject(){const e=this.getLayers().map((e=>e.map((e=>this.bufferToHex(e,!1))))),t=[];for(let r=0;re-t)),o=i.map((([e])=>e)),a=this.getProofIndicesForUnevenTree(o,r);let s=0;const u=[];for(let e=0;ee-t)).map((([,e])=>e)),r=c[e].map((([e])=>e)),n=[...new Set(r.map((e=>e%2==0?e/2:e%2==0?(e+1)/2:(e-1)/2)))],i=[];for(let e=0;e{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},5606:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&d())}function d(){if(!c){var e=a(f);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l1)for(var r=1;r{e.exports=r(4005)},2985:e=>{"use strict";e.exports=class e{constructor(e,t=new Map,r=0){this.prefix=e,this._existing=t,this.counter=r}clone(){const{prefix:t,_existing:r,counter:n}=this;return new e(t,new Map(r),n)}getId(e){const t=e&&this._existing.get(e);if(t)return t;const r=this.prefix+this.counter;return this.counter++,e&&this._existing.set(e,r),r}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}},3751:(e,t,r)=>{"use strict";r(2791);const n=self.crypto||self.msCrypto;e.exports=class{constructor(e){if(!n||!n.subtle)throw new Error("crypto.subtle not found.");if("sha256"===e)this.algorithm={name:"SHA-256"};else{if("sha1"!==e)throw new Error(`Unsupported algorithm "${e}".`);this.algorithm={name:"SHA-1"}}this._content=""}update(e){this._content+=e}async digest(){const e=(new TextEncoder).encode(this._content),t=new Uint8Array(await n.subtle.digest(this.algorithm,e));let r="";for(let e=0;e{"use strict";const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",r="http://www.w3.org/2001/XMLSchema#string",n="NamedNode",i="BlankNode",o="Literal",a="DefaultGraph",s={};function u(e,t){return e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType&&(e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value&&(e.object.termType!==o||e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value))}(()=>{const e="(?:<([^:]+:[^>]*)>)",t="A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_",r=t+"0-9-·̀-ͯ‿-⁀",n="(_:(?:["+t+"0-9])(?:(?:["+r+".])*(?:["+r+"]))?)",i="[ \\t]+",o="[ \\t]*",a="(?:"+e+"|"+n+")"+i,u=e+i,c="(?:"+e+"|"+n+"|"+('(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:'+("(?:\\^\\^"+e+")")+"|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?)")+")"+o,l="(?:\\.|(?:(?:"+e+"|"+n+")"+o+"\\.))";s.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,s.empty=new RegExp("^"+o+"$"),s.quad=new RegExp("^"+o+a+u+c+l+o+"$")})(),e.exports=class e{static parse(e){const c=[],f={},d=e.split(s.eoln);let h=0;for(const e of d){if(h++,s.empty.test(e))continue;const d=e.match(s.quad);if(null===d)throw new Error("N-Quads parse error on line "+h+".");const p={subject:null,predicate:null,object:null,graph:null};if(void 0!==d[1]?p.subject={termType:n,value:d[1]}:p.subject={termType:i,value:d[2]},p.predicate={termType:n,value:d[3]},void 0!==d[4]?p.object={termType:n,value:d[4]}:void 0!==d[5]?p.object={termType:i,value:d[5]}:(p.object={termType:o,value:void 0,datatype:{termType:n}},void 0!==d[7]?p.object.datatype.value=d[7]:void 0!==d[8]?(p.object.datatype.value=t,p.object.language=d[8]):p.object.datatype.value=r,p.object.value=d[6].replace(l,(function(e,t,r,n){if(t)switch(t){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(r)return String.fromCharCode(parseInt(r,16));if(n)throw new Error("Unsupported U escape")}))),void 0!==d[9]?p.graph={termType:n,value:d[9]}:void 0!==d[10]?p.graph={termType:i,value:d[10]}:p.graph={termType:a,value:""},p.graph.value in f){let e=!0;const t=f[p.graph.value];for(const r of t)if(u(r,p)){e=!1;break}e&&(t.push(p),c.push(p))}else f[p.graph.value]=[p],c.push(p)}return c}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const r=[];for(const n of t)r.push(e.serializeQuad(n));return r.sort().join("")}static serializeQuadComponents(e,o,a,s){let u="";return e.termType===n?u+=`<${e.value}>`:u+=`${e.value}`,u+=` <${o.value}> `,a.termType===n?u+=`<${a.value}>`:a.termType===i?u+=a.value:(u+=`"${function(e){return e.replace(c,(function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}}))}(a.value)}"`,a.datatype.value===t?a.language&&(u+=`@${a.language}`):a.datatype.value!==r&&(u+=`^^<${a.datatype.value}>`)),s.termType===n?u+=` <${s.value}>`:s.termType===i&&(u+=` ${s.value}`),u+=" .\n",u}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const s=[],u={"blank node":i,IRI:n,literal:o};for(const c in e){e[c].forEach((e=>{const l={};for(const i in e){const a=e[i],s={termType:u[a.type],value:a.value};s.termType===o&&(s.datatype={termType:n},"datatype"in a&&(s.datatype.value=a.datatype),"language"in a?("datatype"in a||(s.datatype.value=t),s.language=a.language):"datatype"in a||(s.datatype.value=r)),l[i]=s}l.graph="@default"===c?{termType:a,value:""}:{termType:c.startsWith("_:")?i:n,value:c},s.push(l)}))}return s}};const c=/["\\\n\r]/g;const l=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g},9925:e=>{"use strict";e.exports=class{constructor(e){this.current=e.sort(),this.done=!1,this.dir=new Map;for(let t=0;tn)&&(s&&r>0&&a>e[r-1]||!s&&re[r+1])&&(n=a,i=r)}if(null===n)this.done=!0;else{const r=t.get(n)?i-1:i+1;e[i]=e[r],e[r]=n;for(const r of e)r>n&&t.set(r,!t.get(r))}return r}}},3513:(e,t,r)=>{"use strict";const n=r(2985),i=r(3751),o=r(9925),a=r(1227);function s(e,t){return e.hasht.hash?1:0}e.exports=class{constructor({createMessageDigest:e=()=>new i("sha256"),canonicalIdMap:t=new Map,maxDeepIterations:r=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n",t),this.createMessageDigest=e,this.maxDeepIterations=r,this.quads=null,this.deepIterations=null}async main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];let i=0;for(const e of r)++i%100==0&&await this._yield(),await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const o=[...t.keys()].sort(),u=[];for(const e of o){const r=t.get(e);if(r.length>1){u.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of u){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=await this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const c=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId(e.subject),e.predicate,this._componentWithCanonicalId(e.object),this._componentWithCanonicalId(e.graph));c.push(t)}return c.sort(),c.join("")}async hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=await i.digest(),r.hash}async hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}async hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=await this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));let u=0;for(;s.hasNext();){const e=s.next();++u%3==0&&await this._yield();let n=t.clone(),i="";const o=[];let c=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){c=!0;break}if(!c){for(const e of o){const t=await this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){c=!0;break}}c||(0===a.length||i`}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n)++i%100==0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:"g",id:e,issuer:t,hashToRelated:r})]);return r}async _hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=await this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}async _addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=await this.hashRelatedBlankNode(a,e,i,r),u=o.get(s);u?u.push(a):o.set(s,[a])}_componentWithCanonicalId(e){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}async _yield(){return new Promise((e=>setImmediate(e)))}}},2438:(e,t,r)=>{"use strict";const n=r(2985),i=r(3751),o=r(9925),a=r(1227);function s(e,t){return e.hasht.hash?1:0}e.exports=class{constructor({createMessageDigest:e=()=>new i("sha256"),canonicalIdMap:t=new Map,maxDeepIterations:r=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n",t),this.createMessageDigest=e,this.maxDeepIterations=r,this.quads=null,this.deepIterations=null}main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];for(const e of r)this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const i=[...t.keys()].sort(),o=[];for(const e of i){const r=t.get(e);if(r.length>1){o.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of o){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const u=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId({component:e.subject}),e.predicate,this._componentWithCanonicalId({component:e.object}),this._componentWithCanonicalId({component:e.graph}));u.push(t)}return u.sort(),u.join("")}hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=i.digest(),r.hash}hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));for(;s.hasNext();){const e=s.next();let n=t.clone(),i="";const o=[];let u=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){u=!0;break}if(!u){for(const e of o){const t=this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){u=!0;break}}u||(0===a.length||i`}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n)this._addRelatedBlankNodeHash({quad:i,component:i.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.graph,position:"g",id:e,issuer:t,hashToRelated:r});return r}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}_addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=this.hashRelatedBlankNode(a,e,i,r),u=o.get(s);u?u.push(a):o.set(s,[a])}_componentWithCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}}},3845:(e,t,r)=>{"use strict";const n=r(3751),i=r(3513);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n){let n,a;if("BlankNode"===o.subject.termType&&o.subject.value!==e)a=o.subject.value,n="p";else{if("BlankNode"!==o.object.termType||o.object.value===e)continue;a=o.object.value,n="r"}++i%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(a,o,t,n),u=r.get(s);u?u.push(a):r.set(s,[a])}return r}}},378:(e,t,r)=>{"use strict";const n=r(3751),i=r(2438);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n){let n,o;if("BlankNode"===i.subject.termType&&i.subject.value!==e)o=i.subject.value,n="p";else{if("BlankNode"!==i.object.termType||i.object.value===e)continue;o=i.object.value,n="r"}const a=this.hashRelatedBlankNode(o,i,t,n),s=r.get(a);s?s.push(o):r.set(a,[o])}return r}}},4005:(e,t,r)=>{"use strict";const n=r(3513),i=r(3845),o=r(2438),a=r(378);let s;try{s=r(7789)}catch(e){}function u(e){return Array.isArray(e)?e:t.NQuads.legacyDatasetToQuads(e)}t.NQuads=r(1227),t.IdentifierIssuer=r(2985),t._rdfCanonizeNative=function(e){return e&&(s=e),s},t.canonize=async function(e,t){const r=u(e);if(t.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return new Promise(((e,n)=>s.canonize(r,t,((t,r)=>t?n(t):e(r)))))}if("URDNA2015"===t.algorithm)return new n(t).main(r);if("URGNA2012"===t.algorithm){if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new i(t).main(r)}if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)},t._canonizeSync=function(e,t){const r=u(e);if(t.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return s.canonizeSync(r,t)}if("URDNA2015"===t.algorithm)return new o(t).main(r);if("URGNA2012"===t.algorithm){if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new a(t).main(r)}if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)}},9983:function(e){"use strict";!function(){const t=2147483647;function r(e){const t=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 r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225;const l=new Uint32Array(64);function f(e){let f=0,d=e.length;for(;d>=64;){let h,p,y,m,g,b=r,v=n,w=i,A=o,k=a,E=s,S=u,x=c;for(p=0;p<16;p++)y=f+4*p,l[p]=(255&e[y])<<24|(255&e[y+1])<<16|(255&e[y+2])<<8|255&e[y+3];for(p=16;p<64;p++)h=l[p-2],m=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,h=l[p-15],g=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,l[p]=(m+l[p-7]|0)+(g+l[p-16]|0)|0;for(p=0;p<64;p++)m=(((k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7))+(k&E^~k&S)|0)+(x+(t[p]+l[p]|0)|0)|0,g=((b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10))+(b&v^b&w^v&w)|0,x=S,S=E,E=k,k=A+m|0,A=w,w=v,v=b,b=m+g|0;r=r+b|0,n=n+v|0,i=i+w|0,o=o+A|0,a=a+k|0,s=s+E|0,u=u+S|0,c=c+x|0,f+=64,d-=64}}f(e);let d,h=e.length%64,p=e.length/536870912|0,y=e.length<<3,m=h<56?56:120,g=e.slice(e.length-h,e.length);for(g.push(128),d=h+1;d>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(y>>>24&255),g.push(y>>>16&255),g.push(y>>>8&255),g.push(y>>>0&255),f(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function n(e,t,n){e=e.length<=64?e:r(e);const i=64+t.length+4,o=new Array(i),a=new Array(64);let s,u=[];for(s=0;s<64;s++)o[s]=54;for(s=0;s=i-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;n>=32;)c(),u=u.concat(r(a.concat(r(o)))),n-=32;return n>0&&(c(),u=u.concat(r(a.concat(r(o))).slice(0,n))),u}function i(e,t,r,n,i){let o;for(u(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)s(e,16*o,i,16),a(i,n),u(i,0,e,t+16*o,16);for(o=0;o>>32-t}function a(e,t){u(e,0,t,0,16);for(let e=8;e>0;e-=2)t[4]^=o(t[0]+t[12],7),t[8]^=o(t[4]+t[0],9),t[12]^=o(t[8]+t[4],13),t[0]^=o(t[12]+t[8],18),t[9]^=o(t[5]+t[1],7),t[13]^=o(t[9]+t[5],9),t[1]^=o(t[13]+t[9],13),t[5]^=o(t[1]+t[13],18),t[14]^=o(t[10]+t[6],7),t[2]^=o(t[14]+t[10],9),t[6]^=o(t[2]+t[14],13),t[10]^=o(t[6]+t[2],18),t[3]^=o(t[15]+t[11],7),t[7]^=o(t[3]+t[15],9),t[11]^=o(t[7]+t[3],13),t[15]^=o(t[11]+t[7],18),t[1]^=o(t[0]+t[3],7),t[2]^=o(t[1]+t[0],9),t[3]^=o(t[2]+t[1],13),t[0]^=o(t[3]+t[2],18),t[6]^=o(t[5]+t[4],7),t[7]^=o(t[6]+t[5],9),t[4]^=o(t[7]+t[6],13),t[5]^=o(t[4]+t[7],18),t[11]^=o(t[10]+t[9],7),t[8]^=o(t[11]+t[10],9),t[9]^=o(t[8]+t[11],13),t[10]^=o(t[9]+t[8],18),t[12]^=o(t[15]+t[14],7),t[13]^=o(t[12]+t[15],9),t[14]^=o(t[13]+t[12],13),t[15]^=o(t[14]+t[13],18);for(let r=0;r<16;++r)e[r]+=t[r]}function s(e,t,r,n){for(let i=0;i=256)return!1}return!0}function l(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function f(e,r,o,a,f,d,h){if(o=l(o,"N"),a=l(a,"r"),f=l(f,"p"),d=l(d,"dkLen"),0===o||o&o-1)throw new Error("N must be power of 2");if(o>t/128/a)throw new Error("N too large");if(a>t/128/f)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);let p=n(e,r,128*f*a);const y=new Uint32Array(32*f*a);for(let e=0;eI&&(t=I);for(let e=0;eI&&(t=I);for(let e=0;e>8&255),p.push(y[e]>>16&255),p.push(y[e]>>24&255);const r=n(e,p,d);return h&&h(null,1,r),r}h&&O(B)};if(!h)for(;;){const e=B();if(null!=e)return e}B()}const d={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(s,u){let c=0;a&&a(0),f(e,t,r,n,i,o,(function(e,t,r){if(e)u(e);else if(r)a&&1!==c&&a(1),s(new Uint8Array(r));else if(a&&t!==c)return c=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(f(e,t,r,n,i,o))}};e.exports=d}()},2791:function(e,t,r){var n=r(5606);!function(e){"use strict";if(!e.setImmediate){var t,r,i,o,a,s=1,u={},c=!1,l=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?t=function(e){n.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},t=function(e){i.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(r=l.documentElement,t=function(e){var t=l.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):t=function(e){setTimeout(h,0,e)}:(o="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),t=function(t){e.postMessage(o+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),n=0;n0&&(a.forEach((function(e,t){t>0&&(d+=(e[1]?" ":"│")+" "),f||e[0]!==i||(f=!0)})),d+=e(n,o)+n,s&&("object"!=typeof i||i instanceof Date)&&(d+=": "+i),f&&(d+=" (circular ref.)"),c(d)),!f&&"object"==typeof i){var y=t(i,u);y.forEach((function(e){l=++h===y.length,r(e,i[e],l,p,s,u,c)}))}}var n={asLines:function(e,t,n,i){r(".",e,!1,[],t,"function"!=typeof n&&n,i||n)},asTree:function(e,t,n){var i="";return r(".",e,!1,[],t,n,(function(e){i+=e+"\n"})),i}};return n}()},6450:e=>{var t;self,t=()=>(()=>{var e={81645:(e,t,r)=>{"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.chains=t._getInitializedChains=void 0;var i=n(r(87295)),o=n(r(31227)),a=n(r(40439)),s=n(r(37098)),u=n(r(17687)),c=n(r(49422));function l(e){var t,r,n={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli",11155111:"sepolia"},l={mainnet:i.default,ropsten:o.default,rinkeby:a.default,kovan:s.default,goerli:u.default,sepolia:c.default};if(e)try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),d=f.next();!d.done;d=f.next()){var h=d.value,p=h.name;n[h.chainId.toString()]=p,l[p]=h}}catch(e){t={error:e}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}return l.names=n,l}t._getInitializedChains=l,t.chains=l()},425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1153:r(96561),1559:r(77523),2315:r(83339),2537:r(26769),2565:r(17897),2718:r(62170),2929:r(88436),2930:r(96213),3198:r(25491),3529:r(20070),3540:r(52256),3541:r(21871),3554:r(47225),3607:r(3968),3651:r(29496),3670:r(74290),3675:r(98571),3855:r(64551),3860:r(94300),4345:r(74818),4399:r(68372),5133:r(4759)}},7002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",r(60114)],["homestead",r(62800)],["dao",r(7197)],["tangerineWhistle",r(22302)],["spuriousDragon",r(90716)],["byzantium",r(26985)],["constantinople",r(35993)],["petersburg",r(4064)],["istanbul",r(83166)],["muirGlacier",r(42946)],["berlin",r(20015)],["london",r(61250)],["shanghai",r(5553)],["arrowGlacier",r(51971)],["grayGlacier",r(31088)],["mergeForkIdTransition",r(49347)],["merge",r(88648)]]},3863:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=r(28847)(r(3355)),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=t.CustomChain=void 0;var c,l,f,d,h,p=r(38291),y=r(64628),m=r(33062),g=r(81645),b=r(7002),v=r(425);!function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.xDaiChain="x-dai-chain",e.OptimisticKovan="optimistic-kovan",e.OptimisticEthereum="optimistic-ethereum"}(c=t.CustomChain||(t.CustomChain={})),(h=t.Chain||(t.Chain={}))[h.Mainnet=1]="Mainnet",h[h.Ropsten=3]="Ropsten",h[h.Rinkeby=4]="Rinkeby",h[h.Kovan=42]="Kovan",h[h.Goerli=5]="Goerli",h[h.Sepolia=11155111]="Sepolia",function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london",e.ArrowGlacier="arrowGlacier",e.GrayGlacier="grayGlacier",e.MergeForkIdTransition="mergeForkIdTransition",e.Merge="merge",e.Shanghai="shanghai"}(l=t.Hardfork||(t.Hardfork={})),(d=t.ConsensusType||(t.ConsensusType={})).ProofOfStake="pos",d.ProofOfWork="pow",d.ProofOfAuthority="poa",(f=t.ConsensusAlgorithm||(t.ConsensusAlgorithm={})).Ethash="ethash",f.Clique="clique",f.Casper="casper";var w=function(e){function t(t){var r,n,i,o,a=this;(a=e.call(this)||this)._supportedHardforks=[],a._eips=[],a._customChains=null!==(i=t.customChains)&&void 0!==i?i:[],a._chainParams=a.setChain(t.chain),a.DEFAULT_HARDFORK=null!==(o=a._chainParams.defaultHardfork)&&void 0!==o?o:l.Istanbul;try{for(var s=u(a._chainParams.hardforks),c=s.next();!c.done;c=s.next()){var f=c.value;f.forkHash||(f.forkHash=a._calcForkHash(f.name))}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return a._hardfork=a.DEFAULT_HARDFORK,t.supportedHardforks&&(a._supportedHardforks=t.supportedHardforks),t.hardfork&&a.setHardfork(t.hardfork),t.eips&&a.setEIPs(t.eips),a}return a(t,e),t.custom=function(e,r){var n;void 0===r&&(r={});var i=null!==(n=r.baseChain)&&void 0!==n?n:"mainnet",o=s({},t._getChainParams(i));if(o.name="custom-chain","string"!=typeof e)return new t(s({chain:s(s({},o),e)},r));if(e===c.PolygonMainnet)return t.custom({name:c.PolygonMainnet,chainId:137,networkId:137},r);if(e===c.PolygonMumbai)return t.custom({name:c.PolygonMumbai,chainId:80001,networkId:80001},r);if(e===c.ArbitrumRinkebyTestnet)return t.custom({name:c.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},r);if(e===c.xDaiChain)return t.custom({name:c.xDaiChain,chainId:100,networkId:100},r);if(e===c.OptimisticKovan)return t.custom({name:c.OptimisticKovan,chainId:69,networkId:69},s({hardfork:l.Berlin},r));if(e===c.OptimisticEthereum)return t.custom({name:c.OptimisticEthereum,chainId:10,networkId:10},s({hardfork:l.Berlin},r));throw new Error("Custom chain ".concat(e," not supported"))},t.forCustomChain=function(e,r,n,i){var o=t._getChainParams(e);return new t({chain:s(s({},o),r),hardfork:n,supportedHardforks:i})},t.isSupportedChainId=function(e){var t=(0,g._getInitializedChains)();return Boolean(t.names[e.toString()])},t._getChainParams=function(e,t){var r=(0,g._getInitializedChains)(t);if("number"==typeof e||m.BN.isBN(e)){if(e=e.toString(),r.names[e])return r[r.names[e]];throw new Error("Chain with ID ".concat(e," not supported"))}if(r[e])return r[e];throw new Error("Chain with name ".concat(e," not supported"))},t.prototype.setChain=function(e){var r,n;if("number"==typeof e||"string"==typeof e||m.BN.isBN(e)){var i;i=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map((function(e){return e[0]})):this._customChains,this._chainParams=t._getChainParams(e,i)}else{if("object"!==(0,o.default)(e))throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var a=u(["networkId","genesis","hardforks","bootstrapNodes"]),s=a.next();!s.done;s=a.next()){var c=s.value;if(void 0===e[c])throw new Error("Missing required chain parameter: ".concat(c))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this._chainParams=e}return this._chainParams},t.prototype.setHardfork=function(e){var t,r;if(!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"));var n=!1;try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next())o.value[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}if(!n)throw new Error("Hardfork with name ".concat(e," not supported"))},t.prototype.getHardforkByBlockNumber=function(e,t){var r,n;e=(0,m.toType)(e,m.TypeOutput.BN),t=(0,m.toType)(t,m.TypeOutput.BN);var i,o,a,s=l.Chainstart;try{for(var c=u(this.hardforks()),f=c.next();!f.done;f=c.next()){var d=f.value;if(null!==d.block)e.gte(new m.BN(d.block))&&(s=d.name),t&&d.td&&(t.gte(new m.BN(d.td))?i=d.name:o=a),a=d.name;else if(null!=t&&void 0!==d.td&&null!==d.td&&t.gte(new m.BN(d.td)))return d.name}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}if(t){var h="block number: ".concat(e," (-> ").concat(s,"), ");if(i&&!this.hardforkGteHardfork(s,i)){var p="HF determined by block number is lower than the minimum total difficulty HF";throw h+="total difficulty: ".concat(t," (-> ").concat(i,")"),new Error("".concat(p,": ").concat(h))}if(o&&!this.hardforkGteHardfork(o,s))throw p="Maximum HF determined by total difficulty is lower than the block number HF",h+="total difficulty: ".concat(t," (-> ").concat(o,")"),new Error("".concat(p,": ").concat(h))}return s},t.prototype.setHardforkByBlockNumber=function(e,t){var r=this.getHardforkByBlockNumber(e,t);return this.setHardfork(r),r},t.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"))}else e=this._hardfork;return e},t.prototype._getHardfork=function(e){var t,r,n=this.hardforks();try{for(var i=u(n),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.name===e)return a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}throw new Error("Hardfork ".concat(e," not defined for chain ").concat(this.chainName()))},t.prototype._isSupportedHardfork=function(e){var t,r;if(!(this._supportedHardforks.length>0))return!0;try{for(var n=u(this._supportedHardforks),i=n.next();!i.done;i=n.next())if(e===i.value)return!0}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.setEIPs=function(e){var t,r,n=this;void 0===e&&(e=[]);var i=function(t){if(!(t in v.EIPs))throw new Error("".concat(t," not supported"));var r=o.gteHardfork(v.EIPs[t].minimumHardfork);if(!r)throw new Error("".concat(t," cannot be activated on hardfork ").concat(o.hardfork(),", minimumHardfork: ").concat(r));v.EIPs[t].requiredEIPs&&v.EIPs[t].requiredEIPs.forEach((function(r){if(!e.includes(r)&&!n.isActivatedEIP(r))throw new Error("".concat(t," requires EIP ").concat(r,", but is not included in the EIP list"))}))},o=this;try{for(var a=u(e),s=a.next();!s.done;s=a.next())i(s.value)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}this._eips=e},t.prototype.param=function(e,t){var r,n,i=null;try{for(var o=u(this._eips),a=o.next();!a.done;a=o.next()){var s=a.value;if(null!==(i=this.paramByEIP(e,t,s)))return i}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this.paramByHardfork(e,t,this._hardfork)},t.prototype.paramByHardfork=function(e,t,r){var n,i,o,a;r=this._chooseHardfork(r);var s=null;try{for(var c=u(b.hardforks),l=c.next();!l.done;l=c.next()){var f=l.value;if("eips"in f[1]){var d=f[1].eips;try{for(var h=(o=void 0,u(d)),p=h.next();!p.done;p=h.next()){var y=p.value,m=this.paramByEIP(e,t,y);s=null!==m?m:s}}catch(e){o={error:e}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}else{if(!f[1][e])throw new Error("Topic ".concat(e," not defined"));void 0!==f[1][e][t]&&(s=f[1][e][t].v)}if(f[0]===r)break}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return s},t.prototype.paramByEIP=function(e,t,r){if(!(r in v.EIPs))throw new Error("".concat(r," not supported"));var n=v.EIPs[r];if(!(e in n))throw new Error("Topic ".concat(e," not defined"));return void 0===n[e][t]?null:n[e][t].v},t.prototype.paramByBlock=function(e,t,r){var n=this.activeHardforks(r),i=n[n.length-1].name;return this.paramByHardfork(e,t,i)},t.prototype.isActivatedEIP=function(e){var t,r;if(this.eips().includes(e))return!0;try{for(var n=u(b.hardforks),i=n.next();!i.done;i=n.next()){var o=i.value[1];if(this.gteHardfork(o.name)&&"eips"in o&&o.eips.includes(e))return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.hardforkIsActiveOnBlock=function(e,t,r){var n;void 0===r&&(r={}),t=(0,m.toType)(t,m.TypeOutput.BN);var i=null!==(n=r.onlySupported)&&void 0!==n&&n;e=this._chooseHardfork(e,i);var o=this.hardforkBlockBN(e);return!(!o||!t.gte(o))},t.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},t.prototype.hardforkGteHardfork=function(e,t,r){var n,i;void 0===r&&(r={});var o,a=void 0!==r.onlyActive&&r.onlyActive;e=this._chooseHardfork(e,r.onlySupported),o=a?this.activeHardforks(null,r):this.hardforks();var s=-1,c=-1,l=0;try{for(var f=u(o),d=f.next();!d.done;d=f.next()){var h=d.value;h.name===e&&(s=l),h.name===t&&(c=l),l+=1}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return s>=c&&-1!==c},t.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},t.prototype.hardforkIsActiveOnChain=function(e,t){var r,n,i;void 0===t&&(t={});var o=null!==(i=t.onlySupported)&&void 0!==i&&i;e=this._chooseHardfork(e,o);try{for(var a=u(this.hardforks()),s=a.next();!s.done;s=a.next()){var c=s.value;if(c.name===e&&null!==c.block)return!0}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!1},t.prototype.activeHardforks=function(e,t){var r,n;void 0===t&&(t={});var i=[],o=this.hardforks();try{for(var a=u(o),s=a.next();!s.done;s=a.next()){var c=s.value;if(null!==c.block){if(null!=e&&e0)return r[r.length-1].name;throw new Error("No (supported) active hardfork found")},t.prototype.hardforkBlock=function(e){var t=this.hardforkBlockBN(e);return(0,m.toType)(t,m.TypeOutput.Number)},t.prototype.hardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).block;return null==t?null:new m.BN(t)},t.prototype.hardforkTD=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).td;return null==t?null:new m.BN(t)},t.prototype.isHardforkBlock=function(e,t){e=(0,m.toType)(e,m.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.hardforkBlockBN(t);return!!r&&r.eq(e)},t.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return(0,m.toType)(t,m.TypeOutput.Number)},t.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);return null===t?null:this.hardforks().reduce((function(e,r){var n=new m.BN(r.block);return n.gt(t)&&null===e?n:e}),null)},t.prototype.isNextHardforkBlock=function(e,t){e=(0,m.toType)(e,m.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.nextHardforkBlockBN(t);return null!==r&&r.eq(e)},t.prototype._calcForkHash=function(e){var t,r,n=i.from(this.genesis().hash.substr(2),"hex"),o=i.alloc(0),a=0;try{for(var s=u(this.hardforks()),c=s.next();!c.done;c=s.next()){var l=c.value,f=l.block;if(0!==f&&null!==f&&f!==a){var d=i.from(f.toString(16).padStart(16,"0"),"hex");o=i.concat([o,d])}if(l.name===e)break;null!==f&&(a=f)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}var h=i.concat([n,o]),p=(0,m.intToBuffer)((0,y.buf)(h)>>>0).toString("hex");return"0x".concat(p)},t.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t.block&&void 0===t.td)throw new Error("No fork hash calculation possible for future hardfork");return void 0!==t.forkHash?t.forkHash:this._calcForkHash(e)},t.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},t.prototype.genesis=function(){return this._chainParams.genesis},t.prototype.genesisState=function(){var e,t;switch(this.chainName()){case"mainnet":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/mainnet.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"ropsten":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/ropsten.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"rinkeby":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/rinkeby.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"kovan":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/kovan.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"goerli":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/goerli.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"sepolia":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/sepolia.json'");throw e.code="MODULE_NOT_FOUND",e}()))}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var n=u(this._customChains),i=n.next();!i.done;i=n.next()){var o=i.value;if(o[0].name===this.chainName())return o[1]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return{}},t.prototype.hardforks=function(){return this._chainParams.hardforks},t.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},t.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},t.prototype.hardfork=function(){return this._hardfork},t.prototype.chainId=function(){return(0,m.toType)(this.chainIdBN(),m.TypeOutput.Number)},t.prototype.chainIdBN=function(){return new m.BN(this._chainParams.chainId)},t.prototype.chainName=function(){return this._chainParams.name},t.prototype.networkId=function(){return(0,m.toType)(this.networkIdBN(),m.TypeOutput.Number)},t.prototype.networkIdBN=function(){return new m.BN(this._chainParams.networkId)},t.prototype.eips=function(){return this._eips},t.prototype.consensusType=function(){var e,t,r,n=this.hardfork();try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.type),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.type},t.prototype.consensusAlgorithm=function(){var e,t,r,n=this.hardfork();try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.algorithm),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.algorithm},t.prototype.consensusConfig=function(){var e,t,r,n=this.hardfork();try{for(var i=u(b.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus[a[1].consensus.algorithm]),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}if(r)return r;var s=this.consensusAlgorithm();return this._chainParams.consensus[s]},t.prototype.copy=function(){var e=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return e.removeAllListeners(),e},t}(p.EventEmitter);t.default=w},89658:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));function i(e){if(Array.isArray(e)){for(var t=[],r=0,n=0;ne.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function a(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return d(f(e))}function s(e,t){if(e<56)return Uint8Array.from([e+t]);var r=m(e),n=m(t+55+r.length/2);return Uint8Array.from(h(n+r))}function u(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e||0===e.length)return Uint8Array.from([]);var r=c(b(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function c(e){var t,r,n,i,s,u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,n=128===l?Uint8Array.from([]):o(e,1,t),2===t&&n[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:n,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1e.length)throw new Error("invalid RLP: total length is larger than the data");for(i=o(e,r,f);i.length;)s=c(i),u.push(s.data),i=s.remainder;return{data:u,remainder:e.slice(f)}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=i,t.decode=u;var l=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));function f(e){for(var t="",r=0;r=2&&"0"===e[0]&&"x"===e[1]}function b(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return g(e)?h((t="string"!=typeof(r=e)?r:g(r)?r.slice(2):r).length%2?"0".concat(t):t):y(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?h(m(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+(0,n.default)(e))}t.utils={bytesToHex:f,concatBytes:p,hexToBytes:h,utf8ToBytes:y},t.RLP={encode:i,decode:u}},75058:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransaction=void 0;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t}(r(3863)),s=r(33062),u=r(87325),c=function(){function e(e,t){this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=a.Chain.Mainnet,this.DEFAULT_HARDFORK=a.Hardfork.Istanbul;var r=e.nonce,n=e.gasLimit,i=e.to,o=e.value,u=e.data,c=e.v,l=e.r,f=e.s,d=e.type;this._type=new s.BN((0,s.toBuffer)(d)).toNumber(),this.txOptions=t;var h=(0,s.toBuffer)(""===i?"0x":i),p=(0,s.toBuffer)(""===c?"0x":c),y=(0,s.toBuffer)(""===l?"0x":l),m=(0,s.toBuffer)(""===f?"0x":f);this.nonce=new s.BN((0,s.toBuffer)(""===r?"0x":r)),this.gasLimit=new s.BN((0,s.toBuffer)(""===n?"0x":n)),this.to=h.length>0?new s.Address(h):void 0,this.value=new s.BN((0,s.toBuffer)(""===o?"0x":o)),this.data=(0,s.toBuffer)(""===u?"0x":u),this.v=p.length>0?new s.BN(p):void 0,this.r=y.length>0?new s.BN(y):void 0,this.s=m.length>0?new s.BN(m):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0)}return Object.defineProperty(e.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.supports=function(e){return this.activeCapabilities.includes(e)},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.getBaseFee().gt(this.gasLimit)&&t.push("gasLimit is too low. given ".concat(this.gasLimit,", need at least ").concat(this.getBaseFee())),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length},e.prototype.getBaseFee=function(){var e=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this.common.param("gasPrices","txCreation")),e},e.prototype.getDataFee=function(){for(var e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),r=0,n=0;n-1&&this.activeCapabilities.splice(f,1)}return l},e.prototype._getCommon=function(e,t){var r;if(t){var n=new s.BN((0,s.toBuffer)(t));if(e){if(!e.chainIdBN().eq(n)){var i=this._errorMsg("The chain ID does not match the chain ID of Common");throw new Error(i)}return e.copy()}return a.default.isSupportedChainId(n)?new a.default({chain:n,hardfork:this.DEFAULT_HARDFORK}):a.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:n,chainId:n},this.DEFAULT_HARDFORK)}return null!==(r=null==e?void 0:e.copy())&&void 0!==r?r:new a.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},e.prototype._validateCannotExceedMaxInteger=function(e,t,r){var n,i;void 0===t&&(t=256),void 0===r&&(r=!1);try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),u=a.next();!u.done;u=a.next()){var c=o(u.value,2),l=c[0],f=c[1];switch(t){case 64:if(r){if(null==f?void 0:f.gte(s.MAX_UINT64)){var d=this._errorMsg("".concat(l," cannot equal or exceed MAX_UINT64 (2^64-1), given ").concat(f));throw new Error(d)}}else if(null==f?void 0:f.gt(s.MAX_UINT64))throw d=this._errorMsg("".concat(l," cannot exceed MAX_UINT64 (2^64-1), given ").concat(f)),new Error(d);break;case 256:if(r){if(null==f?void 0:f.gte(s.MAX_INTEGER))throw d=this._errorMsg("".concat(l," cannot equal or exceed MAX_INTEGER (2^256-1), given ").concat(f)),new Error(d)}else if(null==f?void 0:f.gt(s.MAX_INTEGER))throw d=this._errorMsg("".concat(l," cannot exceed MAX_INTEGER (2^256-1), given ").concat(f)),new Error(d);break;default:throw d=this._errorMsg("unimplemented bits value"),new Error(d)}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype._getSharedErrorPostfix=function(){var e="";try{e=this.isSigned()?(0,s.bufferToHex)(this.hash()):"not available (unsigned)"}catch(t){e="error"}var t="";try{t=this.isSigned().toString()}catch(t){e="error"}var r="";try{r=this.common.hardfork()}catch(e){r="error"}return"tx type=".concat(this.type," hash=").concat(e," nonce=").concat(this.nonce," value=").concat(this.value," ")+"signed=".concat(t," hf=").concat(r)},e}();t.BaseTransaction=c},660:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,12),i=n[0],o=n[1],a=n[2],u=n[3],c=n[4],l=n[5],f=n[6],d=n[7],h=n[8],p=n[9],y=n[10],m=n[11];return(0,s.validateNoLeadingZeroes)({nonce:o,maxPriorityFeePerGas:a,maxFeePerGas:u,gasLimit:c,value:f,v:p,r:y,s:m}),new t({chainId:new s.BN(i),nonce:o,maxPriorityFeePerGas:a,maxFeePerGas:u,gasLimit:c,to:l,value:f,data:d,accessList:null!=h?h:[],v:void 0!==p?new s.BN(p):void 0,r:y,s:m},r)},t.prototype.getDataFee=function(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;var t=e.prototype.getDataFee.call(this);return t.iaddn(l.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t},t.prototype.getUpfrontCost=function(e){void 0===e&&(e=new s.BN(0));var t=s.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(e)).add(e);return this.gasLimit.mul(t).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,s.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){var e=this.raw();return i.concat([f,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,9),r=i.concat([f,s.rlp.encode(t)]);return e?(0,s.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned()){var e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned()){var t=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(t)}var r=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(c.N_DIV_2)))throw t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid"),new Error(t);var n=this,i=n.v,o=n.r,a=n.s;try{return(0,s.ecrecover)(r,i.addn(27),(0,s.bnToUnpaddedBuffer)(o),(0,s.bnToUnpaddedBuffer)(a))}catch(e){throw t=this._errorMsg("Invalid Signature"),new Error(t)}},t.prototype._processSignature=function(e,r,n){var i=a(a({},this.txOptions),{common:this.common});return t.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(r),s:new s.BN(n)},i)},t.prototype.toJSON=function(){var e=l.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,s.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,s.bnToHex)(this.maxFeePerGas),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype.errorStr=function(){return this._getSharedErrorPostfix()+" maxFeePerGas=".concat(this.maxFeePerGas," maxPriorityFeePerGas=").concat(this.maxPriorityFeePerGas)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(u.BaseTransaction);t.default=d},97613:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,11),i=n[0],o=n[1],a=n[2],u=n[3],c=n[4],l=n[5],f=n[6],d=n[7],h=n[8],p=n[9],y=n[10];return(0,s.validateNoLeadingZeroes)({nonce:o,gasPrice:a,gasLimit:u,value:l,v:h,r:p,s:y}),new t({chainId:new s.BN(i),nonce:o,gasPrice:a,gasLimit:u,to:c,value:l,data:f,accessList:null!=d?d:[],v:void 0!==h?new s.BN(h):void 0,r:p,s:y},r)},t.prototype.getDataFee=function(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;var t=e.prototype.getDataFee.call(this);return t.iaddn(l.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){var e=this.raw();return i.concat([f,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,8),r=i.concat([f,s.rlp.encode(t)]);return e?(0,s.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned()){var e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned()){var t=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(t)}var r=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(c.N_DIV_2)))throw t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid"),new Error(t);var n=this,i=n.yParity,o=n.r,a=n.s;try{return(0,s.ecrecover)(r,i.addn(27),(0,s.bnToUnpaddedBuffer)(o),(0,s.bnToUnpaddedBuffer)(a))}catch(e){throw t=this._errorMsg("Invalid Signature"),new Error(t)}},t.prototype._processSignature=function(e,r,n){var i=a(a({},this.txOptions),{common:this.common});return t.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(r),s:new s.BN(n)},i)},t.prototype.toJSON=function(){var e=l.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype.errorStr=function(){var e,t;return this._getSharedErrorPostfix()+" gasPrice=".concat(this.gasPrice," accessListCount=").concat(null!==(t=null===(e=this.accessList)||void 0===e?void 0:e.length)&&void 0!==t?t:0)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(u.BaseTransaction);t.default=d},42339:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeeMarketEIP1559Transaction=t.TransactionFactory=t.AccessListEIP2930Transaction=t.Transaction=void 0;var o=r(53088);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i(o).default}});var a=r(97613);Object.defineProperty(t,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return i(a).default}});var s=r(89562);Object.defineProperty(t,"TransactionFactory",{enumerable:!0,get:function(){return i(s).default}});var u=r(660);Object.defineProperty(t,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return i(u).default}}),function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)}(r(87325),t)},53088:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,9),i=n[0],o=n[1],a=n[2],u=n[3],c=n[4],l=n[5],f=n[6],d=n[7],h=n[8];return(0,s.validateNoLeadingZeroes)({nonce:i,gasPrice:o,gasLimit:a,value:c,v:f,r:d,s:h}),new t({nonce:i,gasPrice:o,gasLimit:a,to:u,value:c,data:l,v:f,r:d,s:h},r)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){return s.rlp.encode(this.raw())},t.prototype._getMessageToSign=function(){var e=[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(u.Capability.EIP155ReplayProtection)&&(e.push((0,s.toBuffer)(this.common.chainIdBN())),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0))),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0)))),e},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this._getMessageToSign();return e?(0,s.rlphash)(t):t},t.prototype.getDataFee=function(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:e.prototype.getDataFee.call(this),hardfork:this.common.hardfork()}),e.prototype.getDataFee.call(this))},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.rlphash)(this.raw())),this.cache.hash):(0,s.rlphash)(this.raw())},t.prototype.getMessageToVerifySignature=function(){if(!this.isSigned()){var e=this._errorMsg("This transaction is not signed");throw new Error(e)}var t=this._getMessageToSign();return(0,s.rlphash)(t)},t.prototype.getSenderPublicKey=function(){var e,t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2))){var r=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(r)}var n=this,i=n.v,o=n.r,a=n.s;try{return(0,s.ecrecover)(t,i,(0,s.bnToUnpaddedBuffer)(o),(0,s.bnToUnpaddedBuffer)(a),this.supports(u.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch(e){throw r=this._errorMsg("Invalid Signature"),new Error(r)}},t.prototype._processSignature=function(e,r,n){var i=new s.BN(e);this.supports(u.Capability.EIP155ReplayProtection)&&i.iadd(this.common.chainIdBN().muln(2).addn(8));var o=a(a({},this.txOptions),{common:this.common});return t.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:i,r:new s.BN(r),s:new s.BN(n)},o)},t.prototype.toJSON=function(){return{nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype._validateTxV=function(e,t){if(void 0!==e&&e.ltn(37)&&!e.eqn(27)&&!e.eqn(28))throw new Error("Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ".concat(e));var r;if(void 0!==e&&(!t||t.gteHardfork("spuriousDragon"))&&!e.eqn(27)&&!e.eqn(28))if(t){var n=t.chainIdBN().muln(2);if(!e.eq(n.addn(35))&&!e.eq(n.addn(36)))throw new Error("Incompatible EIP155-based V ".concat(e," and chain id ").concat(t.chainIdBN(),". See the Common parameter of the Transaction constructor to set the chain id."))}else{var i;i=e.subn(35).isEven()?35:36,r=e.subn(i).divn(2)}return this._getCommon(t,r)},t.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},t.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned()){var e=this._errorMsg("This transaction is not signed");throw new Error(e)}var t=this.common.gteHardfork("spuriousDragon"),r=this.v,n=this.common.chainIdBN().muln(2);return(r.eq(n.addn(35))||r.eq(n.addn(36)))&&t},t.prototype.errorStr=function(){return this._getSharedErrorPostfix()+" gasPrice=".concat(this.gasPrice)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(c.BaseTransaction);t.default=f},89562:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var i=r(33062),o=r(42339),a=function(){function e(){}return e.fromTxData=function(e,t){if(void 0===t&&(t={}),"type"in e&&void 0!==e.type){var r=new i.BN((0,i.toBuffer)(e.type)).toNumber();if(0===r)return o.Transaction.fromTxData(e,t);if(1===r)return o.AccessListEIP2930Transaction.fromTxData(e,t);if(2===r)return o.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error("Tx instantiation with type ".concat(r," not supported"))}return o.Transaction.fromTxData(e,t)},e.fromSerializedData=function(e,t){if(void 0===t&&(t={}),e[0]<=127){var r=void 0;switch(e[0]){case 1:r=2930;break;case 2:r=1559;break;default:throw new Error("TypedTransaction with ID ".concat(e[0]," unknown"))}return 1559===r?o.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):o.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return o.Transaction.fromSerializedTx(e,t)},e.fromBlockBodyData=function(e,t){if(void 0===t&&(t={}),n.isBuffer(e))return this.fromSerializedData(e,t);if(Array.isArray(e))return o.Transaction.fromValuesArray(e,t);throw new Error("Cannot decode transaction: unknown type input")},e.getTransactionClass=function(e,t){if(void 0===e&&(e=0),0==e||e>=128&&e<=255)return o.Transaction;switch(e){case 1:return o.AccessListEIP2930Transaction;case 2:return o.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID ".concat(e," unknown"))}},e}();t.default=a},87325:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.N_DIV_2=t.isAccessList=t.isAccessListBuffer=t.Capability=void 0;var n,i=r(33062);function o(e){if(0===e.length)return!0;var t=e[0];return!!Array.isArray(t)}(n=t.Capability||(t.Capability={}))[n.EIP155ReplayProtection=155]="EIP155ReplayProtection",n[n.EIP1559FeeMarket=1559]="EIP1559FeeMarket",n[n.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",n[n.EIP2930AccessLists=2930]="EIP2930AccessLists",t.isAccessListBuffer=o,t.isAccessList=function(e){return!o(e)},t.N_DIV_2=new i.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16)},53789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessLists=t.checkMaxInitCodeSize=void 0;var n=r(33062),i=r(87325);t.checkMaxInitCodeSize=function(e,t){if(t>e.param("vm","maxInitCodeSize"))throw new Error("the initcode size of this transaction is too large: it is ".concat(t," while the max is ").concat(e.param("vm","maxInitCodeSize")))};var o=function(){function e(){}return e.getAccessListData=function(e){var t,r;if(e&&(0,i.isAccessList)(e)){t=e;for(var o=[],a=0;a{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(74519)),a=i(r(69721)),s=i(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var u=r(89658),c=r(1243),l=r(86992),f=r(40890),d=r(55803),h=r(21449),p=r(99047),y=r(72560),m=BigInt(0),g=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.KECCAK256_RLP,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h.KECCAK256_NULL;(0,a.default)(this,e),this.nonce=t,this.balance=r,this.storageRoot=n,this.codeHash=i,this._validate()}return(0,s.default)(e,[{key:"_validate",value:function(){if(this.nonce=8?s+=r[u].toUpperCase():s+=r[u];return s},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,p.assertIsBuffer)(e),(0,p.assertIsBuffer)(t),(0,d.bufferToBigInt)(t)===BigInt(0)?n.from((0,c.keccak256)(u.RLP.encode((0,d.bufArrToArr)([e,null])))).slice(-20):n.from((0,c.keccak256)(u.RLP.encode((0,d.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,p.assertIsBuffer)(e),(0,p.assertIsBuffer)(t),(0,p.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");var i=(0,c.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,c.keccak256)(r)]));return(0,d.toBuffer)(i).slice(-20)},t.isValidPrivate=function(e){return l.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,p.assertIsBuffer)(e),64===e.length)try{return l.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return l.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,p.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from(l.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return n.from((0,c.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,p.assertIsBuffer)(e),n.from(l.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,p.assertIsBuffer)(e),64!==e.length&&(e=n.from(l.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){var e=(0,d.zeros)(20);return(0,d.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,p.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=b;var v=new Uint8Array(0);t.accountBodyToSlim=function(e){var t=(0,o.default)(e,4),r=t[0],n=t[1],i=t[2],a=t[3];return[r,n,(0,d.arrToBufArr)(i).equals(h.KECCAK256_RLP)?v:i,(0,d.arrToBufArr)(a).equals(h.KECCAK256_NULL)?v:a]},t.accountBodyToRLP=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:b(e);return(0,d.arrToBufArr)(u.RLP.encode(t))}},78718:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(69721)),a=i(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var s=r(59786),u=r(55803),c=function(){function e(t){if((0,o.default)(this,e),20!==t.length)throw new Error("Invalid address length");this.buf=t}return(0,a.default)(e,[{key:"equals",value:function(e){return this.buf.equals(e.buf)}},{key:"isZero",value:function(){return this.equals(e.zero())}},{key:"isPrecompileOrSystemAddress",value:function(){var e=(0,u.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}},{key:"toString",value:function(){return"0x"+this.buf.toString("hex")}},{key:"toBuffer",value:function(){return n.from(this.buf)}}],[{key:"zero",value:function(){return new e((0,u.zeros)(20))}},{key:"fromString",value:function(t){if(!(0,s.isValidAddress)(t))throw new Error("Invalid address");return new e((0,u.toBuffer)(t))}},{key:"fromPublicKey",value:function(t){if(!n.isBuffer(t))throw new Error("Public key should be Buffer");return new e((0,s.pubToAddress)(t))}},{key:"fromPrivateKey",value:function(t){if(!n.isBuffer(t))throw new Error("Private key should be Buffer");return new e((0,s.privateToAddress)(t))}},{key:"generate",value:function(t,r){if("bigint"!=typeof r)throw new Error("Expected nonce to be a bigint");return new e((0,s.generateAddress)(t.buf,(0,u.bigIntToBuffer)(r)))}},{key:"generate2",value:function(t,r,i){if(!n.isBuffer(r))throw new Error("Expected salt to be a Buffer");if(!n.isBuffer(i))throw new Error("Expected initCode to be a Buffer");return new e((0,s.generateAddress2)(t.buf,r,i))}}]),e}();t.Address=c},77692:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(69721)),a=n(r(58985)),s=n(r(119)),u=n(r(15163)),c=n(r(34650)),l=n(r(21949)),f=n(r(94571));function d(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new h(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function h(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return h=function(e){this.s=e,this.n=e.next},h.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new h(e)}function p(){return(p=(0,f.default)(i.default.mark((function e(t,r,n){var o,a,s,u,c,l,f;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=!1,s=!1,e.prev=2,c=i.default.mark((function e(){var r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=f.value,e.prev=1,!(r.length<2)){e.next=6;break}r.call(t,n),e.next=8;break;case 6:return e.next=8,new Promise((function(e,i){r.call(t,n,(function(t){t?i(t):e()}))}));case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),o=e.t0;case 13:case"end":return e.stop()}}),e,null,[[1,10]])})),l=d(r);case 5:return e.next=7,l.next();case 7:if(!(a=!(f=e.sent).done)){e.next=12;break}return e.delegateYield(c(),"t0",9);case 9:a=!1,e.next=5;break;case 12:e.next=18;break;case 14:e.prev=14,e.t1=e.catch(2),s=!0,u=e.t1;case 18:if(e.prev=18,e.prev=19,!a||null==l.return){e.next=23;break}return e.next=23,l.return();case 23:if(e.prev=23,!s){e.next=26;break}throw u;case 26:return e.finish(23);case 27:return e.finish(18);case 28:if(!o){e.next=30;break}throw o;case 30:case"end":return e.stop()}}),e,null,[[2,14,18,28],[19,,23,27]])})))).apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;var y=function(e){(0,u.default)(i,e);var t,r,n=(t=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,l.default)(t);if(r){var i=(0,l.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,c.default)(this,e)});function i(){return(0,o.default)(this,i),n.apply(this,arguments)}return(0,a.default)(i,[{key:"emit",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i0}},{key:"once",value:function(e,t){var r,n=this;if("function"!=typeof t)throw new TypeError("listener must be a function");return r=t.length>=2?function(i,o){n.removeListener(e,r),t(i,o)}:function(i){n.removeListener(e,r),t(i,r)},n.on(e,r),n}},{key:"first",value:function(e,t){var r,n=null!==(r=this._events[e])&&void 0!==r?r:[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[e]=n=[n]),n.unshift(t),this}},{key:"before",value:function(e,t,r){return this.beforeOrAfter(e,t,r)}},{key:"after",value:function(e,t,r){return this.beforeOrAfter(e,t,r,"after")}},{key:"beforeOrAfter",value:function(e,t,r,n){var i,o,a,s=null!==(i=this._events[e])&&void 0!==i?i:[],u="after"===n?1:0;if("function"!=typeof r)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[e]=s=[s]),a=s.length,o=s.length;o--;)if(s[o]===t){a=o+u;break}return s.splice(a,0,r),this}},{key:"on",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"on",this).call(this,e,t)}},{key:"addListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"addListener",this).call(this,e,t)}},{key:"prependListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"prependListener",this).call(this,e,t)}},{key:"prependOnceListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"prependOnceListener",this).call(this,e,t)}},{key:"removeAllListeners",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"removeAllListeners",this).call(this,e)}},{key:"removeListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"removeListener",this).call(this,e,t)}},{key:"eventNames",value:function(){return(0,s.default)((0,l.default)(i.prototype),"eventNames",this).call(this)}},{key:"listeners",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"listeners",this).call(this,e)}},{key:"listenerCount",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"listenerCount",this).call(this,e)}},{key:"getMaxListeners",value:function(){return(0,s.default)((0,l.default)(i.prototype),"getMaxListeners",this).call(this)}},{key:"setMaxListeners",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"setMaxListeners",this).call(this,e)}}]),i}(r(38291).EventEmitter);t.AsyncEventEmitter=y},55803:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(74519));Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var o=r(99047),a=r(72560);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))},t.intToBuffer=function(e){var r=(0,t.intToHex)(e);return n.from((0,a.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};var s=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function c(e){var r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function l(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,o.assertIsBuffer)(e),u(e)},t.unpadArray=function(e){return(0,o.assertIsArray)(e),u(e)},t.unpadHexString=function(e){return(0,o.assertIsHexString)(e),e=(0,a.stripHexPrefix)(e),"0x"+u(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,a.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,a.padToEven)((0,a.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e1&&void 0!==arguments[1]?arguments[1]:50,r=n.isBuffer(e)?e.toString("hex"):e;return r.length<=t?r:r.slice(0,t)+"…"},t.toUtf8=function(e){if((e=(0,a.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],i=0;i0&&0===a[0])throw new Error("".concat(o," cannot have leading zeroes, received: ").concat(a.toString("hex")))}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!=t?t:[])},t.bigIntToHex=function(e){return"0x"+e.toString(16)},t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(l(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},21449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(29033),i=r(86992);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=i.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},89890:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=function(e){return e.length>0&&16===e[e.length-1]},t.nibblesToBytes=function(e,t){for(var r=0,n=0;n{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var i=r(72560);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}},t.assertIsBuffer=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}},t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}},t.assertIsString=function(e){if("string"!=typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},65907:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=void 0,i(r(21449),t),i(r(44205),t),i(r(59786),t),i(r(78718),t),i(r(1313),t),i(r(65404),t),i(r(55803),t),i(r(62198),t),i(r(89890),t),i(r(77692),t);var o=r(72560);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),i(r(35651),t),i(r(6449),t)},72560:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(3355));function o(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,i.default)(e)));return"0"===e[0]&&"x"===e[1]}function a(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat((0,i.default)(t)));return t.length%2&&(t="0".concat(t)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=o,t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,i.default)(e)));return o(e)?e.slice(2):e},t.padToEven=a,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received ".concat((0,i.default)(e)));return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,i.default)(e),"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,i.default)(t),"'"));return t[!0===r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r0&&e.length!==2+2*t)}},35651:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571)),a=n(r(69721)),s=n(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0;var u=function(){function e(){(0,a.default)(this,e),this.permits=1,this.promiseResolverQueue=[]}var t;return(0,s.default)(e,[{key:"acquire",value:(t=(0,o.default)(i.default.mark((function e(){var t=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.permits>0)){e.next=3;break}return this.permits-=1,e.abrupt("return",Promise.resolve(!0));case 3:return e.abrupt("return",new Promise((function(e){return t.promiseResolverQueue.push(e)})));case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"release",value:function(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;var e=this.promiseResolverQueue.shift();e&&e(!0)}}}]),e}();t.Lock=u},6449:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571));Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;var a=r(37441),s=function(){var e=(0,o.default)(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.default)(t,{headers:{"content-type":"application/json"},type:"json",data:{method:r.method,params:r.params,jsonrpc:"2.0",id:1}});case 2:return n=e.sent,e.abrupt("return",n.result);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.fetchFromProvider=s,t.getProvider=function(e){var t;if("string"==typeof e)return e;if(void 0!==(null==e||null===(t=e.connection)||void 0===t?void 0:t.url))return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},65404:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var i=r(1243),o=r(86992),a=r(55803),s=r(21449),u=r(99047);function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function l(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){var i=o.secp256k1.sign(e,t),a=i.toCompactRawBytes();return{r:n.from(a.slice(0,32)),s:n.from(a.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,i,s){var u=n.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(i,32)],64),f=c(t,s);if(!l(f))throw new Error("Invalid signature v value");var d=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return n.from(d.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!l(c(e,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(r,32),(0,a.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!l(c(e,i)))throw new Error("Invalid signature v value");var o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&((o=n.from(r))[0]|=128),(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(o,32)]))},t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToBigInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=BigInt((0,a.bufferToInt)(i.slice(32,33))>>7),r[0]&=127}return n<27&&(n+=BigInt(27)),{v:n,r:t,s:r}},t.isValidSignature=function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4?arguments[4]:void 0;if(32!==t.length||32!==r.length)return!1;if(!l(c(e,i)))return!1;var o=(0,a.bufferToBigInt)(t),u=(0,a.bufferToBigInt)(r);return!(o===BigInt(0)||o>=s.SECP256K1_ORDER||u===BigInt(0)||u>=s.SECP256K1_ORDER||n&&u>=s.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,u.assertIsBuffer)(e);var t=n.from("Ethereum Signed Message:\n".concat(e.length),"utf-8");return n.from((0,i.keccak256)(n.concat([t,e])))}},62198:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;var n,i=r(55803),o=r(72560);!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(n=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,o.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,i.toBuffer)(e);switch(t){case n.Buffer:return r;case n.BigInt:return(0,i.bufferToBigInt)(r);case n.Number:var a=(0,i.bufferToBigInt)(r);if(a>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(a);case n.PrefixedHexString:return(0,i.bufferToHex)(r);default:throw new Error("unknown outputType")}}}},44205:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},1313:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(74519)),a=i(r(69721)),s=i(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;var u=r(78718),c=r(55803),l=r(62198),f=function(){function e(t,r,n,i){(0,a.default)(this,e),this.index=t,this.validatorIndex=r,this.address=n,this.amount=i}return(0,s.default)(e,[{key:"raw",value:function(){return e.toBufferArray(this)}},{key:"toValue",value:function(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}},{key:"toJSON",value:function(){return{index:(0,c.bigIntToHex)(this.index),validatorIndex:(0,c.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,c.bigIntToHex)(this.amount)}}}],[{key:"fromWithdrawalData",value:function(t){var r=t.index,n=t.validatorIndex,i=t.address,o=t.amount;return new e((0,l.toType)(r,l.TypeOutput.BigInt),(0,l.toType)(n,l.TypeOutput.BigInt),new u.Address((0,l.toType)(i,l.TypeOutput.Buffer)),(0,l.toType)(o,l.TypeOutput.BigInt))}},{key:"fromValuesArray",value:function(t){if(4!==t.length)throw Error("Invalid withdrawalArray length expected=4 actual=".concat(t.length));var r=(0,o.default)(t,4),n=r[0],i=r[1],a=r[2],s=r[3];return e.fromWithdrawalData({index:n,validatorIndex:i,address:a,amount:s})}},{key:"toBufferArray",value:function(e){var t=e.index,r=e.validatorIndex,i=e.address,o=e.amount;return[(0,l.toType)(t,l.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,l.toType)(t,l.TypeOutput.Buffer),(0,l.toType)(r,l.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,l.toType)(r,l.TypeOutput.Buffer),i instanceof u.Address?i.buf:(0,l.toType)(i,l.TypeOutput.Buffer),(0,l.toType)(o,l.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,l.toType)(o,l.TypeOutput.Buffer)]}}]),e}();t.Withdrawal=f},98067:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="abi/5.7.0"},44937:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.defaultAbiCoder=t.AbiCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=r(908),s=r(23694),u=r(64327),c=r(98067),l=r(17316),f=r(49146),d=r(4341),h=r(30024),p=r(53861),y=r(90028),m=r(4522),g=r(88287),b=r(48040),v=r(52010),w=r(60800),A=new u.Logger(c.version),k=new RegExp(/^bytes([0-9]*)$/),E=new RegExp(/^(u?int)([0-9]*)$/),S=function(){function e(t){(0,i.default)(this,e),(0,s.defineReadOnly)(this,"coerceFunc",t||null)}return(0,o.default)(e,[{key:"_getCoder",value:function(e){var t=this;switch(e.baseType){case"address":return new f.AddressCoder(e.name);case"bool":return new h.BooleanCoder(e.name);case"string":return new b.StringCoder(e.name);case"bytes":return new p.BytesCoder(e.name);case"array":return new d.ArrayCoder(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new v.TupleCoder((e.components||[]).map((function(e){return t._getCoder(e)})),e.name);case"":return new m.NullCoder(e.name)}var r=e.type.match(E);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!=0)&&A.throwArgumentError("invalid "+r[1]+" bit length","param",e),new g.NumberCoder(n/8,"int"===r[1],e.name)}if(r=e.type.match(k)){var i=parseInt(r[1]);return(0===i||i>32)&&A.throwArgumentError("invalid bytes length","param",e),new y.FixedBytesCoder(i,e.name)}return A.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new l.Reader(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new l.Writer(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(w.ParamType.from(e))}));return new v.TupleCoder(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&A.throwError("types/values length mismatch",u.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(w.ParamType.from(e))})),i=new v.TupleCoder(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,r){var n=this,i=e.map((function(e){return n._getCoder(w.ParamType.from(e))}));return new v.TupleCoder(i,"_").decode(this._getReader((0,a.arrayify)(t),r))}}]),e}();t.AbiCoder=S;var x=new S;t.defaultAbiCoder=x},17316:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.Writer=t.Reader=t.Coder=void 0,t.checkResultErrors=function(e){var t=[];return function e(r,n){if(Array.isArray(n))for(var i in n){var o=r.slice();o.push(i);try{e(o,n[i])}catch(e){t.push({path:o,error:e})}}}([],e),t};var i=n(r(69721)),o=n(r(58985)),a=r(908),s=r(34952),u=r(23694),c=r(64327),l=r(98067),f=new c.Logger(l.version),d=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.type=r,this.localName=n,this.dynamic=o}return(0,o.default)(e,[{key:"_throwError",value:function(e,t){f.throwArgumentError(e,this.localName,t)}}]),e}();t.Coder=d;var h=function(){function e(t){(0,i.default)(this,e),(0,u.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData((0,a.concat)(e._data))}},{key:"writeBytes",value:function(e){var t=(0,a.arrayify)(e),r=t.length%this.wordSize;return r&&(t=(0,a.concat)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=(0,a.arrayify)(s.BigNumber.from(e));return t.length>this.wordSize&&f.throwError("value out-of-bounds",c.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,a.concat)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}();t.Writer=h;var p=function(){function e(t,r,n,o){(0,i.default)(this,e),(0,u.defineReadOnly)(this,"_data",(0,a.arrayify)(t)),(0,u.defineReadOnly)(this,"wordSize",r||32),(0,u.defineReadOnly)(this,"_coerceFunc",n),(0,u.defineReadOnly)(this,"allowLoose",o),this._offset=0}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:f.throwError("data out-of-bounds",c.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return s.BigNumber.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}();t.Reader=p},49146:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=r(77921),l=r(908),f=function(e){(0,a.default)(f,e);var t,r,n=(t=f,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function f(e){return(0,i.default)(this,f),n.call(this,"address","address",e,!1)}return(0,o.default)(f,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=(0,c.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return(0,c.getAddress)((0,l.hexZeroPad)(e.readValue().toHexString(),20))}}]),f}(r(17316).Coder);t.AddressCoder=f},58090:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e){var t;return(0,i.default)(this,c),(t=n.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,t}return(0,o.default)(c,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),c}(r(17316).Coder);t.AnonymousCoder=c},4341:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=void 0,t.pack=y,t.unpack=m;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=n(r(3355)),l=r(64327),f=r(98067),d=r(17316),h=r(58090),p=new l.Logger(f.version);function y(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===(0,c.default)(r)){var i={};n=t.map((function(e){var t=e.localName;return t||p.throwError("cannot encode object for signature with missing names",l.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]&&p.throwError("cannot encode object for signature with duplicate names",l.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]=!0,r[t]}))}else p.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&p.throwArgumentError("types/value length mismatch","tuple",r);var o=new d.Writer(e.wordSize),a=new d.Writer(e.wordSize),s=[];return t.forEach((function(e,t){var r=n[t];if(e.dynamic){var i=a.length;e.encode(a,r);var u=o.writeUpdatableValue();s.push((function(e){u(e+i)}))}else e.encode(o,r)})),s.forEach((function(e){e(o.length)})),e.appendWriter(o)+e.appendWriter(a)}function m(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var i=null;if(t.dynamic){var o=e.readValue(),a=n.subReader(o.toNumber());try{i=t.decode(a)}catch(e){if(e.code===l.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===l.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));var i=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===i[n]&&("length"===n&&(n="_length"),null==r[n])){var o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw o}}):r[n]=o}}));for(var o=function(e){var t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:function(){throw t}})},a=0;a=0?t:"")+"]",s=-1===t||e.dynamic;return(o=n.call(this,"array",a,r,s)).coder=e,o.length=t,o}return(0,o.default)(c,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&p.throwError("insufficient data length",l.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e){return(0,i.default)(this,c),n.call(this,"bool","bool",e,!1)}return(0,o.default)(c,[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(e,t){return e.writeValue(t?1:0)}},{key:"decode",value:function(e){return e.coerce(this.type,!e.readValue().isZero())}}]),c}(r(17316).Coder);t.BooleanCoder=c},53861:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicBytesCoder=t.BytesCoder=void 0;var i=n(r(119)),o=n(r(69721)),a=n(r(58985)),s=n(r(15163)),u=n(r(34650)),c=n(r(21949)),l=r(908);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,c.default)(e);if(t){var i=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,u.default)(this,r)}}var d=function(e){(0,s.default)(r,e);var t=f(r);function r(e,n){return(0,o.default)(this,r),t.call(this,e,e,n,!0)}return(0,a.default)(r,[{key:"defaultValue",value:function(){return"0x"}},{key:"encode",value:function(e,t){return t=(0,l.arrayify)(t),e.writeValue(t.length)+e.writeBytes(t)}},{key:"decode",value:function(e){return e.readBytes(e.readValue().toNumber(),!0)}}]),r}(r(17316).Coder);t.DynamicBytesCoder=d;var h=function(e){(0,s.default)(r,e);var t=f(r);function r(e){return(0,o.default)(this,r),t.call(this,"bytes",e)}return(0,a.default)(r,[{key:"decode",value:function(e){return e.coerce(this.name,(0,l.hexlify)((0,i.default)((0,c.default)(r.prototype),"decode",this).call(this,e)))}}]),r}(d);t.BytesCoder=h},90028:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=r(908),l=function(e){(0,a.default)(l,e);var t,r,n=(t=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function l(e,t){var r;(0,i.default)(this,l);var o="bytes"+String(e);return(r=n.call(this,o,o,t,!1)).size=e,r}return(0,o.default)(l,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(e,t){var r=(0,c.arrayify)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}},{key:"decode",value:function(e){return e.coerce(this.name,(0,c.hexlify)(e.readBytes(this.size)))}}]),l}(r(17316).Coder);t.FixedBytesCoder=l},4522:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e){return(0,i.default)(this,c),n.call(this,"null","",e,!1)}return(0,o.default)(c,[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}},{key:"decode",value:function(e){return e.readBytes(0),e.coerce(this.name,null)}}]),c}(r(17316).Coder);t.NullCoder=c},88287:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=r(34952),l=r(5465),f=function(e){(0,a.default)(f,e);var t,r,n=(t=f,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function f(e,t,r){var o;(0,i.default)(this,f);var a=(t?"int":"uint")+8*e;return(o=n.call(this,a,a,r,!1)).size=e,o.signed=t,o}return(0,o.default)(f,[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(e,t){var r=c.BigNumber.from(t),n=l.MaxUint256.mask(8*e.wordSize);if(this.signed){var i=n.mask(8*this.size-1);(r.gt(i)||r.lt(i.add(l.One).mul(l.NegativeOne)))&&this._throwError("value out-of-bounds",t)}else(r.lt(l.Zero)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}},{key:"decode",value:function(e){var t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}]),f}(r(17316).Coder);t.NumberCoder=f},48040:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(119)),s=n(r(15163)),u=n(r(34650)),c=n(r(21949)),l=r(78627),f=function(e){(0,s.default)(f,e);var t,r,n=(t=f,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,u.default)(this,e)});function f(e){return(0,i.default)(this,f),n.call(this,"string",e)}return(0,o.default)(f,[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(e,t){return(0,a.default)((0,c.default)(f.prototype),"encode",this).call(this,e,(0,l.toUtf8Bytes)(t))}},{key:"decode",value:function(e){return(0,l.toUtf8String)((0,a.default)((0,c.default)(f.prototype),"decode",this).call(this,e))}}]),f}(r(53861).DynamicBytesCoder);t.StringCoder=f},52010:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.TupleCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=r(17316),l=r(4341),f=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e,t){var r;(0,i.default)(this,c);var o=!1,a=[];e.forEach((function(e){e.dynamic&&(o=!0),a.push(e.type)}));var s="tuple("+a.join(",")+")";return(r=n.call(this,"tuple",s,t,o)).coders=e,r}return(0,o.default)(c,[{key:"defaultValue",value:function(){var e=[];this.coders.forEach((function(t){e.push(t.defaultValue())}));var t=this.coders.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach((function(r,n){var i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}},{key:"encode",value:function(e,t){return(0,l.pack)(e,this.coders,t)}},{key:"decode",value:function(e){return e.coerce(this.name,(0,l.unpack)(e,this.coders))}}]),c}(c.Coder);t.TupleCoder=f},60800:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.ParamType=t.FunctionFragment=t.Fragment=t.FormatTypes=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=void 0;var i=n(r(15163)),o=n(r(34650)),a=n(r(21949)),s=n(r(69721)),u=n(r(58985)),c=r(34952),l=r(23694),f=r(64327),d=r(98067);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,a.default)(e);if(t){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}var p=new f.Logger(d.version),y={},m={calldata:!0,memory:!0,storage:!0},g={calldata:!0,memory:!0};function b(e,t){if("bytes"===e||"string"===e){if(m[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&g[t])return!0;return(m[t]||"payable"===t)&&p.throwArgumentError("invalid modifier","name",t),!1}function v(e,t){for(var r in t)(0,l.defineReadOnly)(e,r,t[r])}var w=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});t.FormatTypes=w;var A=new RegExp(/^(.*)\[([0-9]*)\]$/),k=function(){function e(t,r){(0,s.default)(this,e),t!==y&&p.throwError("use fromString",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),v(this,r);var n=this.type.match(A);v(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return(0,u.default)(e,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==w.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+")"):r+=this.type,e!==w.sighash&&(!0===this.indexed&&(r+=" indexed"),e===w.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"==typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(y,{name:t.name||null,type:N(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return n=function(e,t){var r=e;function n(t){p.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s2&&p.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||p.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=c.BigNumber.from(r[1]),r[0]):e}function P(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function T(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&p.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&p.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||p.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&p.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&p.throwArgumentError("unable to determine stateMutability","value",e),t}t.EventFragment=x;var I=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,u.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===w.sighash&&p.throwError("cannot format a constructor for sighash",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&p.throwArgumentError("invalid constructor object","value",e);var t=T(e);t.constant&&p.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(k.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?c.BigNumber.from(e.gas):null};return new r(y,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=_(e,t)).match(U);return n&&"constructor"===n[1].trim()||p.throwArgumentError("invalid constructor string","value",e),t.inputs=E(n[2].trim(),!1),P(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(S);t.ConstructorFragment=I;var O=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,u.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ",e!==w.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&p.throwArgumentError("invalid function object","value",e);var t=T(e),n={type:e.type,name:M(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(k.fromObject):[],outputs:e.outputs?e.outputs.map(k.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?c.BigNumber.from(e.gas):null};return new r(y,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=_(e,t)).split(" returns ");n.length>2&&p.throwArgumentError("invalid function string","value",e);var i=n[0].match(U);if(i||p.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&M(t.name),t.inputs=E(i[2],!1),P(i[3].trim(),t),n.length>1){var o=n[1].match(U);""==o[1].trim()&&""==o[3].trim()||p.throwArgumentError("unexpected tokens","value",e),t.outputs=E(o[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(I);function B(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||p.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}t.FunctionFragment=O;var C=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,u.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&p.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:M(e.name),inputs:e.inputs?e.inputs.map(k.fromObject):[]};return B(new r(y,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(U);return n||p.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&M(t.name),t.inputs=E(n[2],!1),B(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(S);function N(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}t.ErrorFragment=C;var R=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function M(e){return e&&e.match(R)||p.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var U=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},62914:(e,t,r)=>{"use strict";Object.defineProperty(t,"RQ",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"_R",{enumerable:!0,get:function(){return n.ParamType}});var n=r(60800),i=r(44937);r(69044)},69044:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDescription=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=void 0,Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return m.checkResultErrors}});var i=n(r(58985)),o=n(r(69721)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=r(77921),l=r(34952),f=r(908),d=r(37515),h=r(64642),p=r(23694),y=r(44937),m=r(17316),g=r(60800),b=r(64327),v=r(98067);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.default)(e);if(t){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var A=new b.Logger(v.version),k=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.LogDescription=k;var E=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.TransactionDescription=E;var S=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.ErrorDescription=S;var x=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),r}(p.Description);t.Indexed=x;var _={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function P(e,t){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}var T=function(){function e(t){var r=this;(0,o.default)(this,e);var n=[];n="string"==typeof t?JSON.parse(t):t,(0,p.defineReadOnly)(this,"fragments",n.map((function(e){return g.Fragment.from(e)})).filter((function(e){return null!=e}))),(0,p.defineReadOnly)(this,"_abiCoder",(0,p.getStatic)(this instanceof e?this.constructor:void 0,"getAbiCoder")()),(0,p.defineReadOnly)(this,"functions",{}),(0,p.defineReadOnly)(this,"errors",{}),(0,p.defineReadOnly)(this,"events",{}),(0,p.defineReadOnly)(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return r.deploy?void A.warn("duplicate definition - constructor"):void(0,p.defineReadOnly)(r,"deploy",e);case"function":t=r.functions;break;case"event":t=r.events;break;case"error":t=r.errors;break;default:return}var n=e.format();t[n]?A.warn("duplicate definition - "+n):t[n]=e})),this.deploy||(0,p.defineReadOnly)(this,"deploy",g.ConstructorFragment.from({payable:!1,type:"constructor"})),(0,p.defineReadOnly)(this,"_isInterface",!0)}return(0,i.default)(e,[{key:"format",value:function(e){e||(e=g.FormatTypes.full),e===g.FormatTypes.sighash&&A.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===g.FormatTypes.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if((0,f.isHexString)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];A.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var r=e.trim(),n=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===r}));return 0===n.length?A.throwArgumentError("no matching function","name",r):n.length>1&&A.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var i=this.functions[g.FunctionFragment.fromString(e).format()];return i||A.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if((0,f.isHexString)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];A.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?A.throwArgumentError("no matching event","name",n):i.length>1&&A.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}var o=this.events[g.EventFragment.fromString(e).format()];return o||A.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if((0,f.isHexString)(e)){var t=(0,p.getStatic)(this.constructor,"getSighash");for(var r in this.errors)if(e===t(this.errors[r]))return this.errors[r];A.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?A.throwArgumentError("no matching error","name",n):i.length>1&&A.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}var o=this.errors[g.FunctionFragment.fromString(e).format()];return o||A.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,p.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,p.getStatic)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"==typeof e&&(e=this.getError(e));var r=(0,f.arrayify)(t);return(0,f.hexlify)(r.slice(0,4))!==this.getSighash(e)&&A.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,f.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,f.hexlify)((0,f.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,f.arrayify)(t);return(0,f.hexlify)(r.slice(0,4))!==this.getSighash(e)&&A.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,f.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,f.hexlify)((0,f.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,f.arrayify)(t),n=null,i="",o=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(l){}break;case 4:var u=(0,f.hexlify)(r.slice(0,4)),c=_[u];if(c)o=this._abiCoder.decode(c.inputs,r.slice(4)),a=c.name,s=c.signature,c.reason&&(n=o[0]),"Error"===a?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===a&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{var l=this.getError(u);o=this._abiCoder.decode(l.inputs,r.slice(4)),a=l.name,s=l.format()}catch(l){}}return A.throwError("call revert exception"+i,b.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,f.hexlify)(t),errorArgs:o,errorName:a,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,f.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&A.throwError("too many arguments for "+e.format(),b.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?(0,d.id)(t):"bytes"===e.type?(0,h.keccak256)((0,f.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=l.BigNumber.from(t).toHexString()),"address"===e.type&&r._abiCoder.encode(["address"],[t]),(0,f.hexZeroPad)((0,f.hexlify)(t),32))};for(t.forEach((function(t,r){var o=e.inputs[r];o.indexed?null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?A.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map((function(e){return i(o,e)}))):n.push(i(o,t)):null!=t&&A.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e));var n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&A.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)n.push((0,d.id)(s));else if("bytes"===e.type)n.push((0,h.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);(0,f.isHexString)(r[0],32)&&r[0].toLowerCase()===n||A.throwError("fragment/topic mismatch",b.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(g.ParamType.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=r?this._abiCoder.decode(i,(0,f.concat)(r)):null,u=this._abiCoder.decode(o,t,!0),c=[],l=0,d=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)c[t]=new x({_isIndexed:!0,hash:null});else if(a[t])c[t]=new x({_isIndexed:!0,hash:s[d++]});else try{c[t]=s[d++]}catch(e){c[t]=e}else try{c[t]=u[l++]}catch(e){c[t]=e}if(e.name&&null==c[e.name]){var r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:function(){throw P("property ".concat(JSON.stringify(e.name)),r)}}):c[e.name]=r}}));for(var h=function(e){var t=c[e];t instanceof Error&&Object.defineProperty(c,e,{enumerable:!0,get:function(){throw P("index ".concat(e),t)}})},p=0;p{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="address/5.7.0"},77921:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=g,t.getContractAddress=function(e){var t=null;try{t=g(e.from)}catch(t){c.throwArgumentError("missing from address","transaction",e)}var r=(0,n.stripZeros)((0,n.arrayify)(i.BigNumber.from(e.nonce).toHexString()));return g((0,n.hexDataSlice)((0,o.keccak256)((0,a.encode)([t,r])),12))},t.getCreate2Address=function(e,t,r){return 32!==(0,n.hexDataLength)(t)&&c.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.hexDataLength)(r)&&c.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),g((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",g(e),t,r])),12))},t.getIcapAddress=function(e){for(var t=(0,i._base16To36)(g(e).substring(2)).toUpperCase();t.length<30;)t="0"+t;return"XE"+m("XE00"+t)+t},t.isAddress=function(e){try{return g(e),!0}catch(e){}return!1};var n=r(908),i=r(34952),o=r(64642),a=r(55265),s=r(64327),u=r(88222),c=new s.Logger(u.version);function l(e){(0,n.isHexString)(e,20)||c.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),i=0;i<40;i++)r[i]=t[i].charCodeAt(0);for(var a=(0,n.arrayify)((0,o.keccak256)(r)),s=0;s<40;s+=2)a[s>>1]>>4>=8&&(t[s]=t[s].toUpperCase()),(15&a[s>>1])>=8&&(t[s+1]=t[s+1].toUpperCase());return"0x"+t.join("")}for(var f={},d=0;d<10;d++)f[String(d)]=String(d);for(var h=0;h<26;h++)f[String.fromCharCode(65+h)]=String(10+h);var p,y=Math.floor((p=9007199254740991,Math.log10?Math.log10(p):Math.log(p)/Math.LN10));function m(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return f[e]})).join("");t.length>=y;){var r=t.substring(0,y);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function g(e){var t=null;if("string"!=typeof e&&c.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=l(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&c.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==m(e)&&c.throwArgumentError("bad icap checksum","address",e),t=(0,i._base36To16)(e.substring(4));t.length<40;)t="0"+t;t=l("0x"+t)}else c.throwArgumentError("invalid address","address",e);return t}},75798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){e=atob(e);for(var t=[],r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"decode",{enumerable:!0,get:function(){return n.decode}}),Object.defineProperty(t,"encode",{enumerable:!0,get:function(){return n.encode}});var n=r(75798)},3042:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="bignumber/5.7.0"},1872:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.BigNumber=void 0,t._base16To36=function(e){return new l(e,16).toString(36)},t._base36To16=function(e){return new l(e,36).toString(16)},t.isBigNumberish=function(e){return null!=e&&(y.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,s.isHexString)(e)||"bigint"==typeof e||(0,s.isBytes)(e))};var i=n(r(69721)),o=n(r(58985)),a=n(r(31734)),s=r(908),u=r(64327),c=r(3042),l=a.default.BN,f=new u.Logger(c.version),d={},h=9007199254740991,p=!1,y=function(){function e(t,r){(0,i.default)(this,e),t!==d&&f.throwError("cannot call constructor directly; use BigNumber.from",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return(0,o.default)(e,[{key:"fromTwos",value:function(e){return g(b(this).fromTwos(e))}},{key:"toTwos",value:function(e){return g(b(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return g(b(this).add(b(e)))}},{key:"sub",value:function(e){return g(b(this).sub(b(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&v("division-by-zero","div"),g(b(this).div(b(t)))}},{key:"mul",value:function(e){return g(b(this).mul(b(e)))}},{key:"mod",value:function(e){var t=b(e);return t.isNeg()&&v("division-by-zero","mod"),g(b(this).umod(t))}},{key:"pow",value:function(e){var t=b(e);return t.isNeg()&&v("negative-power","pow"),g(b(this).pow(t))}},{key:"and",value:function(e){var t=b(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","and"),g(b(this).and(t))}},{key:"or",value:function(e){var t=b(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","or"),g(b(this).or(t))}},{key:"xor",value:function(e){var t=b(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","xor"),g(b(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","mask"),g(b(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shl"),g(b(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shr"),g(b(this).shrn(e))}},{key:"eq",value:function(e){return b(this).eq(b(e))}},{key:"lt",value:function(e){return b(this).lt(b(e))}},{key:"lte",value:function(e){return b(this).lte(b(e))}},{key:"gt",value:function(e){return b(this).gt(b(e))}},{key:"gte",value:function(e){return b(this).gte(b(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return b(this).isZero()}},{key:"toNumber",value:function(){try{return b(this).toNumber()}catch(e){v("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return f.throwError("this platform does not support BigInt",u.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?p||(p=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?f.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.Logger.errors.UNEXPECTED_ARGUMENT,{}):f.throwError("BigNumber.toString does not accept parameters",u.Logger.errors.UNEXPECTED_ARGUMENT,{})),b(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(d,m(t)):t.match(/^-?[0-9]+$/)?new e(d,m(new l(t))):f.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=h||t<=-h)&&v("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"==typeof r)return e.from(r.toString());if((0,s.isBytes)(r))return e.from((0,s.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"==typeof i&&((0,s.isHexString)(i)||"-"===i[0]&&(0,s.isHexString)(i.substring(1))))return e.from(i)}return f.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function m(e){if("string"!=typeof e)return m(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&f.throwArgumentError("invalid hex","value",e),"0x00"===(e=m(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function g(e){return y.from(m(e))}function b(e){var t=y.from(e).toHexString();return"-"===t[0]?new l("-"+t.substring(3),16):new l(t.substring(2),16)}function v(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),f.throwError(e,u.Logger.errors.NUMERIC_FAULT,n)}t.BigNumber=y},68390:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=t.FixedFormat=void 0,t.formatFixed=b,t.parseFixed=v;var i=n(r(3355)),o=n(r(69721)),a=n(r(58985)),s=r(908),u=r(64327),c=r(3042),l=r(1872),f=new u.Logger(c.version),d={},h=l.BigNumber.from(0),p=l.BigNumber.from(-1);function y(e,t,r,n){var i={fault:t,operation:r};return void 0!==n&&(i.value=n),f.throwError(e,u.Logger.errors.NUMERIC_FAULT,i)}for(var m="0";m.length<256;)m+=m;function g(e){if("number"!=typeof e)try{e=l.BigNumber.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+m.substring(0,e):f.throwArgumentError("invalid decimal size","decimals",e)}function b(e,t){null==t&&(t=0);var r=g(t),n=(e=l.BigNumber.from(e)).lt(h);n&&(e=e.mul(p));for(var i=e.mod(r).toString();i.length2&&f.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&y("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&f.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new e(d,r,n,o)}}]),e}();t.FixedFormat=w;var A=function(){function e(t,r,n,i){(0,o.default)(this,e),t!==d&&f.throwError("cannot use FixedNumber constructor; use FixedNumber.from",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return(0,a.default)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&f.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=v(this._value,this.format.decimals),n=v(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=v(this._value,this.format.decimals),n=v(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=v(this._value,this.format.decimals),n=v(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=v(this._value,this.format.decimals),n=v(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(k.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(k.toFormat(r.format))),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&f.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+m.substring(0,t),this.format),i=E.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&f.throwArgumentError("invalid byte width","width",e);var t=l.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,s.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||(0,l.isBigNumberish)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(b(t,r),w.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=w.from(r),i=v(t,n.decimals);!n.signed&&i.lt(h)&&y("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=(0,s.hexZeroPad)(o,n.width/8));var a=b(i,n.decimals);return new e(d,o,a,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=w.from(r);if((0,s.arrayify)(t).length>n.width/8)throw new Error("overflow");var i=l.BigNumber.from(t);n.signed&&(i=i.fromTwos(n.width));var o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=b(i,n.decimals);return new e(d,o,a,n)}},{key:"from",value:function(t,r){if("string"==typeof t)return e.fromString(t,r);if((0,s.isBytes)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(e){if(e.code!==u.Logger.errors.INVALID_ARGUMENT)throw e}return f.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}();t.FixedNumber=A;var k=A.from(1),E=A.from("0.5")},34952:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BigNumber",{enumerable:!0,get:function(){return n.BigNumber}}),Object.defineProperty(t,"FixedFormat",{enumerable:!0,get:function(){return i.FixedFormat}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return i.FixedNumber}}),Object.defineProperty(t,"_base16To36",{enumerable:!0,get:function(){return n._base16To36}}),Object.defineProperty(t,"_base36To16",{enumerable:!0,get:function(){return n._base36To16}}),Object.defineProperty(t,"formatFixed",{enumerable:!0,get:function(){return i.formatFixed}}),Object.defineProperty(t,"parseFixed",{enumerable:!0,get:function(){return i.parseFixed}});var n=r(1872),i=r(68390)},8729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="bytes/5.7.0"},908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayify=f,t.concat=d,t.hexConcat=function(e){var t="0x";return e.forEach((function(e){t+=m(e).substring(2)})),t},t.hexDataLength=function(e){if("string"!=typeof e)e=m(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2},t.hexDataSlice=function(e,t,r){return"string"!=typeof e?e=m(e):(!p(e)||e.length%2)&&o.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)},t.hexStripZeros=g,t.hexValue=function(e){var t=g(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t},t.hexZeroPad=b,t.hexlify=m,t.isBytes=l,t.isBytesLike=u,t.isHexString=p,t.joinSignature=function(e){return m(d([(e=v(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))},t.splitSignature=v,t.stripZeros=function(e){var t=f(e);if(0===t.length)return t;for(var r=0;r=256)return!1}return!0}function f(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),p(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":o.throwArgumentError("hex data is odd-length","value",e));for(var i=[],u=0;ut&&o.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}var y="0123456789abcdef";function m(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r=y[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":o.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(l(e)){for(var n="0x",i=0;i>4]+y[15&s]}return n}return o.throwArgumentError("invalid hexlify value","value",e)}function g(e){"string"!=typeof e&&(e=m(e)),p(e)||o.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&o.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function v(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(u(e)){var r=f(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64))):65===r.length?(t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64)),t.v=r[64]):o.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:o.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=m(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var n=h(f(t._vs),32);t._vs=m(n);var i=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&o.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;var a=m(n);null==t.s?t.s=a:t.s!==a&&o.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?o.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var s=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==s&&o.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=b(t.r,32):o.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=b(t.s,32):o.throwArgumentError("signature missing or invalid s","signature",e);var c=f(t.s);c[0]>=128&&o.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(c[0]|=128);var l=m(c);t._vs&&(p(t._vs)||o.throwArgumentError("signature invalid _vs","signature",e),t._vs=b(t._vs,32)),null==t._vs?t._vs=l:t._vs!==l&&o.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},48721:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressZero=void 0,t.AddressZero="0x0000000000000000000000000000000000000000"},22997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Zero=t.WeiPerEther=t.Two=t.One=t.NegativeOne=t.MinInt256=t.MaxUint256=t.MaxInt256=void 0;var n=r(34952),i=n.BigNumber.from(-1);t.NegativeOne=i;var o=n.BigNumber.from(0);t.Zero=o;var a=n.BigNumber.from(1);t.One=a;var s=n.BigNumber.from(2);t.Two=s;var u=n.BigNumber.from("1000000000000000000");t.WeiPerEther=u;var c=n.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxUint256=c;var l=n.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");t.MinInt256=l;var f=n.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxInt256=f},90396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashZero=void 0,t.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},5465:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AddressZero",{enumerable:!0,get:function(){return n.AddressZero}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return a.EtherSymbol}}),Object.defineProperty(t,"HashZero",{enumerable:!0,get:function(){return o.HashZero}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return i.MaxInt256}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return i.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return i.MinInt256}}),Object.defineProperty(t,"NegativeOne",{enumerable:!0,get:function(){return i.NegativeOne}}),Object.defineProperty(t,"One",{enumerable:!0,get:function(){return i.One}}),Object.defineProperty(t,"Two",{enumerable:!0,get:function(){return i.Two}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return i.WeiPerEther}}),Object.defineProperty(t,"Zero",{enumerable:!0,get:function(){return i.Zero}});var n=r(48721),i=r(22997),o=r(90396),a=r(68347)},68347:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherSymbol=void 0,t.EtherSymbol="Ξ"},33989:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="hash/5.7.0"},33731:(e,t)=>{"use strict";function r(e,t){null==t&&(t=1);var r=[],n=r.forEach;return function e(t,i){n.call(t,(function(t){i>0&&Array.isArray(t)?e(t,i-1):r.push(t)}))}(e,t),r}function n(e){var t=0;function r(){return e[t++]<<8|e[t++]}for(var n=r(),i=1,o=[0,1],a=1;a>--c&1}for(var d=Math.pow(2,31),h=d>>>1,p=h>>1,y=d-1,m=0,g=0;g<31;g++)m=m<<1|f();for(var b=[],v=0,w=d;;){for(var A=Math.floor(((m-v+1)*i-1)/w),k=0,E=n;E-k>1;){var S=k+E>>>1;A>>1|f(),x=x<<1^h,_=(_^h)<<1|h|1;v=x,w=1+_-x}var P=n-4;return b.map((function(t){switch(t-P){case 3:return P+65792+(e[u++]<<16|e[u++]<<8|e[u++]);case 2:return P+256+(e[u++]<<8|e[u++]);case 1:return P+e[u++];default:return t-1}}))}function i(e){var t=0;return function(){return e[t++]}}function o(e){return 1&e?~e>>1:e>>1}function a(e,t){for(var r=Array(e),n=0,i=-1;n>=1),check:2==o}}()},t.read_mapped_map=function(e){for(var t=[];;){var n=e();if(0==n)break;t.push(f(n,e))}for(;;){var i=e()-1;if(i<0)break;t.push(d(i,e))}return function(e){for(var t={},r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=function(){return(0,i.read_compressed_payload)((0,n.decode)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))};var n=r(80997),i=r(33731)},17032:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.ens_normalize=function(e){return b(function(e,t){for(var r=m(e).reverse(),n=[];r.length;){var o=v(r);if(o)n.push.apply(n,(0,i.default)(t(o)));else{var a=r.pop();if(l.has(a))n.push(a);else if(!f.has(a)){var s=d[a];if(!s)throw new Error("Disallowed codepoint: 0x".concat(a.toString(16).toUpperCase()));n.push.apply(n,(0,i.default)(s))}}}return b(String.fromCodePoint.apply(String,n).normalize("NFC"))}(e,g))},t.ens_normalize_post_check=b;var i=n(r(93106)),o=r(78627),a=r(63961),s=r(33731);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e.split("."));try{for(r.s();!(t=r.n()).done;){var n=t.value,i=m(n);try{for(var o=i.lastIndexOf(y)-1;o>=0;o--)if(i[o]!==y)throw new Error("underscore only allowed at start");if(i.length>=4&&i.every((function(e){return e<128}))&&i[2]===p&&i[3]===p)throw new Error("invalid label extension")}catch(e){throw new Error('Invalid label "'.concat(n,'": ').concat(e.message))}}}catch(e){r.e(e)}finally{r.f()}return e}function v(e,t){var r,n,o,a=h,s=[],u=e.length;t&&(t.length=0);for(var c=function(){var c=e[--u];if(!(a=null===(r=a.branches.find((function(e){return e.set.has(c)})))||void 0===r?void 0:r.node))return"break";if(a.save)o=c;else if(a.check&&c===o)return"break";s.push(c),a.fe0f&&(s.push(65039),u>0&&65039==e[u-1]&&u--),a.valid&&(n=s.slice(),2==a.valid&&n.splice(1,1),t&&t.push.apply(t,(0,i.default)(e.slice(u).reverse())),e.length=u)};u&&"break"!==c(););return n}},57901:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=function(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))};var n=r(64642),i=r(78627)},37515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return a.TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return i.dnsEncode}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return i.ensNormalize}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return o.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return n.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return i.isValidName}}),Object.defineProperty(t,"messagePrefix",{enumerable:!0,get:function(){return o.messagePrefix}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return i.namehash}});var n=r(57901),i=r(84898),o=r(34443),a=r(12171)},34443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=function(e){return"string"==typeof e&&(e=(0,o.toUtf8Bytes)(e)),(0,i.keccak256)((0,n.concat)([(0,o.toUtf8Bytes)(a),(0,o.toUtf8Bytes)(String(e.length)),e]))},t.messagePrefix=void 0;var n=r(908),i=r(64642),o=r(78627),a="Ethereum Signed Message:\n";t.messagePrefix=a},84898:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=function(e){return(0,n.hexlify)((0,n.concat)(d(e).map((function(e){if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"},t.ensNormalize=function(e){return d(e).map((function(e){return(0,i.toUtf8String)(e)})).join(".")},t.isValidName=function(e){try{return 0!==d(e).length}catch(e){}return!1},t.namehash=function(e){"string"!=typeof e&&c.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=l,r=d(e);r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)};var n=r(908),i=r(78627),o=r(64642),a=r(64327),s=r(33989),u=r(17032),c=new a.Logger(s.version),l=new Uint8Array(32);function f(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function d(e){var t=(0,i.toUtf8Bytes)((0,u.ens_normalize)(e)),r=[];if(0===e.length)return r;for(var n=0,o=0;o=t.length)throw new Error("invalid ENS name; empty component");return r.push(f(t.slice(n))),r}l.fill(0)},12171:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.TypedDataEncoder=void 0;var i=n(r(82247)),o=n(r(69721)),a=n(r(58985)),s=r(77921),u=r(34952),c=r(908),l=r(64642),f=r(23694),d=r(64327),h=r(33989),p=r(57901),y=new d.Logger(h.version),m=new Uint8Array(32);m.fill(0);var g=u.BigNumber.from(-1),b=u.BigNumber.from(0),v=u.BigNumber.from(1),w=u.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),A=(0,c.hexZeroPad)(v.toHexString(),32),k=(0,c.hexZeroPad)(b.toHexString(),32),E={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},S=["name","version","chainId","verifyingContract","salt"];function x(e){return function(t){return"string"!=typeof t&&y.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var _={name:x("name"),version:x("version"),chainId:function(e){try{return u.BigNumber.from(e).toString()}catch(e){}return y.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,s.getAddress)(e).toLowerCase()}catch(e){}return y.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=(0,c.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,c.hexlify)(t)}catch(e){}return y.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function P(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&y.throwArgumentError("invalid numeric width","type",e);var i=w.mask(r?n-1:n),o=r?i.add(v).mul(g):b;return function(t){var r=u.BigNumber.from(t);return(r.lt(o)||r.gt(i))&&y.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,c.hexZeroPad)(r.toTwos(256).toHexString(),32)}}var a=e.match(/^bytes(\d+)$/);if(a){var f=parseInt(a[1]);return(0===f||f>32||a[1]!==String(f))&&y.throwArgumentError("invalid bytes width","type",e),function(t){return(0,c.arrayify)(t).length!==f&&y.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=(0,c.arrayify)(e),r=t.length%32;return r?(0,c.hexConcat)([t,m.slice(r)]):(0,c.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return(0,c.hexZeroPad)((0,s.getAddress)(e),32)};case"bool":return function(e){return e?A:k};case"bytes":return function(e){return(0,l.keccak256)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function T(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var I=function(){function e(t){(0,o.default)(this,e),(0,f.defineReadOnly)(this,"types",Object.freeze((0,f.deepCopy)(t))),(0,f.defineReadOnly)(this,"_encoderCache",{}),(0,f.defineReadOnly)(this,"_types",{});var r={},n={},i={};Object.keys(t).forEach((function(e){r[e]={},n[e]=[],i[e]={}}));var a=function(e){var i={};t[e].forEach((function(o){i[o.name]&&y.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&y.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),P(a)||(n[a]||y.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),n[a].push(e),r[e][a]=!0)}))};for(var s in t)a(s);var u=Object.keys(n).filter((function(e){return 0===n[e].length}));for(var c in 0===u.length?y.throwArgumentError("missing primary type","types",t):u.length>1&&y.throwArgumentError("ambiguous primary types or unused types: ".concat(u.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),(0,f.defineReadOnly)(this,"primaryType",u[0]),function e(o,a){a[o]&&y.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),a[o]=!0,Object.keys(r[o]).forEach((function(t){n[t]&&(e(t,a),Object.keys(a).forEach((function(e){i[e][t]=!0})))})),delete a[o]}(this.primaryType,{}),i){var l=Object.keys(i[c]);l.sort(),this._types[c]=T(c,t[c])+l.map((function(e){return T(e,t[e])})).join("")}}return(0,a.default)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=P(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var i=n[1],o=this.getEncoder(i),a=parseInt(n[3]);return function(e){a>=0&&e.length!==a&&y.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(o);return t._types[i]&&(r=r.map(l.keccak256)),(0,l.keccak256)((0,c.hexConcat)(r))}}var s=this.types[e];if(s){var u=(0,p.id)(this._types[e]);return function(e){var r=s.map((function(r){var n=r.name,i=r.type,o=t.getEncoder(i)(e[n]);return t._types[i]?(0,l.keccak256)(o):o}));return r.unshift(u),(0,c.hexConcat)(r)}}return y.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||y.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return(0,l.keccak256)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(P(e))return r(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&y.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(o,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=n._visit(a,t[o],r),e}),{}):y.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var i=E[n];i||y.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:i})}return r.sort((function(e,t){return S.indexOf(e.name)-S.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return(0,c.hexConcat)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return(0,l.keccak256)(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,o){return a=this,s=void 0,u=i.default.mark((function a(){var s,u,l;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=(0,f.shallowCopy)(t),s={},t.verifyingContract&&!(0,c.isHexString)(t.verifyingContract,20)&&(s[t.verifyingContract]="0x"),(u=e.from(r)).visit(n,(function(e,t){return"address"!==e||(0,c.isHexString)(t,20)||(s[t]="0x"),t})),a.t0=i.default.keys(s);case 6:if((a.t1=a.t0()).done){a.next=13;break}return l=a.t1.value,a.next=10,o(l);case 10:s[l]=a.sent,a.next=6;break;case 13:return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),n=u.visit(n,(function(e,t){return"address"===e&&s[t]?s[t]:t})),a.abrupt("return",{domain:t,value:n});case 16:case"end":return a.stop()}}),a)})),new(s||(s=Promise))((function(e,t){function r(e){try{i(u.next(e))}catch(e){t(e)}}function n(e){try{i(u.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(r,n)}i((u=u.apply(a,[])).next())}));var a,s,u}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var i={},o=[];S.forEach((function(e){var r=t[e];null!=r&&(i[e]=_[e](r),o.push({name:e,type:E[e]}))}));var a=e.from(r),s=(0,f.shallowCopy)(r);return s.EIP712Domain?y.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=o,a.encode(n),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return(0,c.hexlify)((0,c.arrayify)(t));if(e.match(/^u?int/))return u.BigNumber.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&y.throwArgumentError("invalid string","value",t),t}return y.throwArgumentError("unsupported type","type",e)}))}}}]),e}();t.TypedDataEncoder=I},64642:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e){return"0x"+i.default.keccak_256((0,o.arrayify)(e))};var i=n(r(95975)),o=r(908)},95975:(e,t,r)=>{"use strict";e=r.nmd(e);var n,i=r(19142),o=r(28847)(r(3355));!function(){var a="input is invalid type",s="object"===("undefined"==typeof window?"undefined":(0,o.default)(window)),u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"===("undefined"==typeof self?"undefined":(0,o.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===i?"undefined":(0,o.default)(i))&&i.versions&&i.versions.node?u=r.g:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,o.default)(e)&&e.exports,f=r.amdO,d=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),p=[4,1024,262144,67108864],y=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],b=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!d||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,o.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var A=function(e,t,r){return function(n){return new U(e,t,e).update(n)[r]()}},k=function(e,t,r){return function(n,i){return new U(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,o){return T["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return T["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){U.call(this,e,t,r)}U.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var n,i,s=this.blocks,u=this.byteCount,c=e.length,l=this.blockCount,f=0,h=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=u){for(this.start=n-u,this.block=s[l],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},U.prototype.encodeString=function(e){var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}var n=0,i=e.length;if(t)n=i;else for(var s=0;s=57344?n+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},U.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];a%t==0&&(j(r),o=0)}return i&&(e=r[o],s+=h[e>>4&15]+h[15&e],i>1&&(s+=h[e>>12&15]+h[e>>8&15]),i>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},U.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&j(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},L.prototype=new U,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),U.prototype.finalize.call(this)};var j=function(e){var t,r,n,i,o,a,s,u,c,l,f,d,h,p,y,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(d<<1|h>>>31),r=c^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],y=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=p^~g&v,e[1]=y^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&p,e[7]=k^~S&y,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~p&g,e[9]=S^~y&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(l)e.exports=T;else{for(O=0;O{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="logger/5.7.0"},64327:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=t.ErrorCode=void 0;var i,o,a=n(r(69721)),s=n(r(58985)),u=r(37252),c=!1,l=!1,f={debug:1,default:2,info:2,warning:3,error:4,off:5},d=f.default,h=null,p=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();t.LogLevel=i,function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(i||(t.LogLevel=i={})),t.ErrorCode=o,function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(o||(t.ErrorCode=o={}));var y="0123456789abcdef",m=function(){function e(t){(0,a.default)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return(0,s.default)(e,[{key:"_log",value:function(e,t){var r=e.toLowerCase();null==f[r]&&this.throwArgumentError("invalid log level name","logLevel",e),d>f[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=y[15&t[o]];i.push(e+"=Uint8Array(0x"+r+")")}else i.push(e+"="+JSON.stringify(t))}catch(t){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var a=t,s="";switch(r){case o.NUMERIC_FAULT:s="NUMERIC_FAULT";var u=t;switch(u){case"overflow":case"underflow":case"division-by-zero":s+="-"+u;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case o.CALL_EXCEPTION:case o.INSUFFICIENT_FUNDS:case o.MISSING_NEW:case o.NONCE_EXPIRED:case o.REPLACEMENT_UNDERPRICED:case o.TRANSACTION_REPLACED:case o.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var c=new Error(t);return c.reason=a,c.code=r,Object.keys(n).forEach((function(e){c[e]=n[e]})),c}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}},{key:"checkSafeUint53",value:function(t,r){"number"==typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return h||(h=new e(u.version)),h}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),c){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}l=!!t,c=!!r}},{key:"setLogLevel",value:function(t){var r=f[t.toLowerCase()];null!=r?d=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();t.Logger=m,m.errors=o,m.levels=i},64071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="properties/5.7.0"},23694:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.Description=void 0,t.checkProperties=function(e,t){e&&"object"===(0,s.default)(e)||f.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(r){t[r]||f.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))},t.deepCopy=m,t.defineReadOnly=d,t.getStatic=function(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==(0,s.default)(e.prototype))break;e=Object.getPrototypeOf(e.prototype).constructor}return null},t.resolveProperties=function(e){return l(this,void 0,void 0,i.default.mark((function t(){var r,n;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))},t.shallowCopy=function(e){var t={};for(var r in e)t[r]=e[r];return t};var i=n(r(82247)),o=n(r(58985)),a=n(r(69721)),s=n(r(3355)),u=r(64327),c=r(64071),l=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},f=new u.Logger(c.version);function d(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}var h={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function p(e){if(null==e||h[(0,s.default)(e)])return!0;if(Array.isArray(e)||"object"===(0,s.default)(e)){if(!Object.isFrozen(e))return!1;for(var t=Object.keys(e),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="rlp/5.7.0"},55265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){var t=(0,n.arrayify)(e),r=f(t,0);return r.consumed!==t.length&&a.throwArgumentError("invalid rlp data","data",e),r.result},t.encode=function(e){return(0,n.hexlify)(c(e))};var n=r(908),i=r(64327),o=r(61466),a=new i.Logger(o.version);function s(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function u(e,t,r){for(var n=0,i=0;it+1+n&&a.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function f(e,t){if(0===e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&a.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});var o=u(e,t+1,r);return t+1+r+o>e.length&&a.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),l(e,t,t+1+r,r+o)}if(e[t]>=192){var s=e[t]-192;return t+1+s>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),l(e,t,t+1,s)}if(e[t]>=184){var c=e[t]-183;t+1+c>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});var f=u(e,t+1,c);return t+1+c+f>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+c+f,result:(0,n.hexlify)(e.slice(t+1+c,t+1+c+f))}}if(e[t]>=128){var d=e[t]-128;return t+1+d>e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+d,result:(0,n.hexlify)(e.slice(t+1,t+1+d))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}},48100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="signing-key/5.7.0"},36918:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.EC=void 0;var i=n(r(3355)),o=n(r(31734)),a=n(r(37198));function s(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var u=c;function c(e,t){if(!e)throw new Error(t||"Assertion failed")}c.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var l=s((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),f=s((function(e,t){var r=t;r.assert=u,r.toArray=l.toArray,r.zero2=l.zero2,r.toHex=l.toHex,r.encode=l.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=1&u?3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u:0,r[0].push(a),s=1&c?3!=(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c:0,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new o.default(e,"hex","le")}})),d=f.getNAF,h=f.getJSF,p=f.assert;function y(e,t){this.type=e,this.p=new o.default(t.p,16),this.red=t.prime?o.default.red(t.prime):o.default.mont(this.p),this.zero=new o.default(0).toRed(this.red),this.one=new o.default(1).toRed(this.red),this.two=new o.default(2).toRed(this.red),this.n=t.n&&new o.default(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var m=y;function g(e,t){this.curve=e,this.type=t,this.precomputed=null}y.prototype.point=function(){throw new Error("Not implemented")},y.prototype.validate=function(){throw new Error("Not implemented")},y.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=d(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=i;f>0;f--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];p(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},y.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,f=0;for(o=0;o=1;o-=2){var y=o-1,m=o;if(1===u[y]&&1===u[m]){var g=[t[y],null,null,t[m]];0===t[y].y.cmp(t[m].y)?(g[1]=t[y].add(t[m]),g[2]=t[y].toJ().mixedAdd(t[m].neg())):0===t[y].y.cmp(t[m].y.redNeg())?(g[1]=t[y].toJ().mixedAdd(t[m]),g[2]=t[y].add(t[m].neg())):(g[1]=t[y].toJ().mixedAdd(t[m]),g[2]=t[y].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=h(r[y],r[m]);for(f=Math.max(v[0].length,f),l[y]=new Array(f),l[m]=new Array(f),a=0;a=0;o--){for(var S=0;o>=0;){var x=!0;for(a=0;a=0&&S++,k=k.dblp(S),o<0)break;for(a=0;a0?s=c[a][_-1>>1]:_<0&&(s=c[a][-_-1>>1].neg()),k="affine"===s.type?k.mixedAdd(s):k.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},g.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(a=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new o.default(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},k.prototype.isInfinity=function(){return this.inf},k.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},k.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},k.prototype.getX=function(){return this.x.fromRed()},k.prototype.getY=function(){return this.y.fromRed()},k.prototype.mul=function(e){return e=new o.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},k.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},k.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},k.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},k.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},k.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},b(E,m.BasePoint),w.prototype.jpoint=function(e,t,r){return new E(this,e,t,r)},E.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},E.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},E.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),f=n.redMul(c),d=u.redSqr().redIAdd(l).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},E.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),d=s.redMul(l.redISub(f)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},E.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},E.prototype.inspect=function(){return this.isInfinity()?"":""},E.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var S=s((function(e,t){var r=t;r.base=m,r.short=A,r.mont=null,r.edwards=null})),x=s((function(e,t){var r,n=t,i=f.assert;function o(e){"short"===e.type?this.curve=new S.short(e):"edwards"===e.type?this.curve=new S.edwards(e):this.curve=new S.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.default.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function _(e){if(!(this instanceof _))return new _(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=l.toArray(e.entropy,e.entropyEnc||"hex"),r=l.toArray(e.nonce,e.nonceEnc||"hex"),n=l.toArray(e.pers,e.persEnc||"hex");u(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var P=_;_.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},_.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=l.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var B=f.assert;function C(e,t){if(e instanceof C)return e;this._importDER(e,t)||(B(e.r&&e.s,"Signature without r or s"),this.r=new o.default(e.r,16),this.s=new o.default(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var N=C;function R(){this.place=0}function M(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function U(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}C.prototype._importDER=function(e,t){e=f.toArray(e,t);var r=new R;if(48!==e[r.place++])return!1;var n=M(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=M(e,r);if(!1===i)return!1;var a=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var s=M(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var u=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new o.default(a),this.s=new o.default(u),this.recoveryParam=null,!0},C.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=U(t),r=U(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];L(n,t.length),(n=n.concat(t)).push(2),L(n,r.length);var i=n.concat(r),o=[48];return L(o,i.length),o=o.concat(i),f.encode(o,e)};var j=function(){throw new Error("unsupported")},F=f.assert;function D(e){if(!(this instanceof D))return new D(e);"string"==typeof e&&(F(Object.prototype.hasOwnProperty.call(x,e),"Unknown curve "+e),e=x[e]),e instanceof x.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var H=D;D.prototype.keyPair=function(e){return new O(this,e)},D.prototype.keyFromPrivate=function(e,t){return O.fromPrivate(this,e,t)},D.prototype.keyFromPublic=function(e,t){return O.fromPublic(this,e,t)},D.prototype.genKeyPair=function(e){e||(e={});for(var t=new P({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||j(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new o.default(2));;){var i=new o.default(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},D.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},D.prototype.sign=function(e,t,r,n){"object"===(0,i.default)(r)&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new o.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new P({hash:this.hash,entropy:s,nonce:u,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new o.default(1)),f=0;;f++){var d=n.k?n.k(f):new o.default(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var h=this.g.mul(d);if(!h.isInfinity()){var p=h.getX(),y=p.umod(this.n);if(0!==y.cmpn(0)){var m=d.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(h.getY().isOdd()?1:0)|(0!==p.cmp(y)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new N({r:y,s:m,recoveryParam:g})}}}}}},D.prototype.verify=function(e,t,r,n){e=this._truncateToN(new o.default(e,16)),r=this.keyFromPublic(r,n);var i=(t=new N(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},D.prototype.recoverPubKey=function(e,t,r,n){F((3&r)===r,"The recovery param is more than two bits"),t=new N(t,n);var i=this.n,a=new o.default(e),s=t.r,u=t.s,c=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var f=t.r.invm(i),d=i.sub(a).mul(f).umod(i),h=u.mul(f).umod(i);return this.g.mulAdd(d,s,h)},D.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new N(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var z=s((function(e,t){var r=t;r.version="6.5.4",r.utils=f,r.rand=function(){throw new Error("unsupported")},r.curve=S,r.curves=x,r.ec=H,r.eddsa=null})),q=z.ec;t.EC=q},17612:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0,t.computePublicKey=y,t.recoverPublicKey=function(e,t){var r=(0,s.splitSignature)(t),n={r:(0,s.arrayify)(r.r),s:(0,s.arrayify)(r.s)};return"0x"+h().recoverPubKey((0,s.arrayify)(e),n,r.recoveryParam).encode("hex",!1)};var i=n(r(69721)),o=n(r(58985)),a=r(36918),s=r(908),u=r(23694),c=r(64327),l=r(48100),f=new c.Logger(l.version),d=null;function h(){return d||(d=new a.EC("secp256k1")),d}var p=function(){function e(t){(0,i.default)(this,e),(0,u.defineReadOnly)(this,"curve","secp256k1"),(0,u.defineReadOnly)(this,"privateKey",(0,s.hexlify)(t)),32!==(0,s.hexDataLength)(this.privateKey)&&f.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=h().keyFromPrivate((0,s.arrayify)(this.privateKey));(0,u.defineReadOnly)(this,"publicKey","0x"+r.getPublic(!1,"hex")),(0,u.defineReadOnly)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),(0,u.defineReadOnly)(this,"_isSigningKey",!0)}return(0,o.default)(e,[{key:"_addPoint",value:function(e){var t=h().keyFromPublic((0,s.arrayify)(this.publicKey)),r=h().keyFromPublic((0,s.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=h().keyFromPrivate((0,s.arrayify)(this.privateKey)),r=(0,s.arrayify)(e);32!==r.length&&f.throwArgumentError("bad digest length","digest",e);var n=t.sign(r,{canonical:!0});return(0,s.splitSignature)({recoveryParam:n.recoveryParam,r:(0,s.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,s.hexZeroPad)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=h().keyFromPrivate((0,s.arrayify)(this.privateKey)),r=h().keyFromPublic((0,s.arrayify)(y(e)));return(0,s.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function y(e,t){var r=(0,s.arrayify)(e);if(32===r.length){var n=new p(r);return t?"0x"+h().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?t?(0,s.hexlify)(r):"0x"+h().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+h().keyFromPublic(r).getPublic(!0,"hex"):(0,s.hexlify)(r):f.throwArgumentError("invalid public or private key","key","[REDACTED]")}t.SigningKey=p},56518:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="strings/5.7.0"},95856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=function(e){var t=(0,o.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.HashZero]).slice(0,32))},t.parseBytes32String=function(e){var t=(0,i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===t[r-1];)r--;return(0,o.toUtf8String)(t.slice(0,r))};var n=r(5465),i=r(908),o=r(34997)},68645:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._nameprepTableA1=p,t._nameprepTableB2=y,t._nameprepTableC=m,t.nameprep=function(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();var t,r=(0,n.toUtf8CodePoints)(e);t=r.map((function(e){return u.indexOf(e)>=0||e>=65024&&e<=65039?[]:y(e)||[e]})),r=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(r=(0,n.toUtf8CodePoints)((0,n._toUtf8String)(r),n.UnicodeNormalizationForm.NFKC)).forEach((function(e){if(m(e))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(e){if(p(e))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var i=(0,n._toUtf8String)(r);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");return i};var n=r(34997);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function o(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function a(e,t){for(var r=0,n=0;n=(r+=i.l)&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}var s=o("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),u="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),c=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],l=i("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),f=i("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),d=i("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");for(var t=[],r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return o.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return o.Utf8ErrorFuncs}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return o.Utf8ErrorReason}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return o._toEscapedUtf8String}}),Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return n.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return i.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return n.parseBytes32String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return o.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return o.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return o.toUtf8String}});var n=r(95856),i=r(68645),o=r(34997)},34997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ErrorReason=t.Utf8ErrorFuncs=t.UnicodeNormalizationForm=void 0,t._toEscapedUtf8String=function(e,t){return'"'+f(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?h(e):h(55296+((e-=65536)>>10&1023))+h(56320+(1023&e))})).join("")+'"'},t._toUtf8String=p,t.toUtf8Bytes=d,t.toUtf8CodePoints=function(e){return f(d(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current))},t.toUtf8String=function(e,t){return p(f(e,t))};var n,i,o=r(908),a=r(64327),s=r(56518),u=new a.Logger(s.version);function c(e,t,r,n,o){if(e===i.BAD_PREFIX||e===i.UNEXPECTED_CONTINUE){for(var a=0,s=t+1;s>6==2;s++)a++;return a}return e===i.OVERRUN?r.length-t-1:0}t.UnicodeNormalizationForm=n,function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(t.UnicodeNormalizationForm=n={})),t.Utf8ErrorReason=i,function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(i||(t.Utf8ErrorReason=i={}));var l=Object.freeze({error:function(e,t,r,n,i){return u.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:c,replace:function(e,t,r,n,o){return e===i.OVERLONG?(n.push(o),0):(n.push(65533),c(e,t,r))}});function f(e,t){null==t&&(t=l.error),e=(0,o.arrayify)(e);for(var r=[],n=0;n>7){var s=null,u=null;if(192==(224&a))s=1,u=127;else if(224==(240&a))s=2,u=2047;else{if(240!=(248&a)){n+=t(128==(192&a)?i.UNEXPECTED_CONTINUE:i.BAD_PREFIX,n-1,e,r);continue}s=3,u=65535}if(n-1+s>=e.length)n+=t(i.OVERRUN,n-1,e,r);else{for(var c=a&(1<<8-s-1)-1,f=0;f1114111?n+=t(i.OUT_OF_RANGE,n-1-s,e,r,c):c>=55296&&c<=57343?n+=t(i.UTF16_SURROGATE,n-1-s,e,r,c):c<=u?n+=t(i.OVERLONG,n-1-s,e,r,c):r.push(c))}}else r.push(a)}return r}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(u.checkNormalize(),e=e.normalize(t));for(var r=[],i=0;i>6|192),r.push(63&a|128);else if(55296==(64512&a)){i++;var s=e.charCodeAt(i);if(i>=e.length||56320!=(64512&s))throw new Error("invalid utf-8 string");var c=65536+((1023&a)<<10)+(1023&s);r.push(c>>18|240),r.push(c>>12&63|128),r.push(c>>6&63|128),r.push(63&c|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return(0,o.arrayify)(r)}function h(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function p(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}t.Utf8ErrorFuncs=l},96783:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="transactions/5.7.0"},21936:(e,t,r)=>{"use strict";var n=r(3355);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionTypes=void 0,t.accessListify=x,t.computeAddress=A,t.parse=function(e){var t=(0,a.arrayify)(e);if(t[0]>127)return function(e){var t=l.decode(e);9!==t.length&&6!==t.length&&m.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:b(t[0]).toNumber(),gasPrice:b(t[1]),gasLimit:b(t[2]),to:g(t[3]),value:b(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=o.BigNumber.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,a.hexZeroPad)(t[7],32),r.s=(0,a.hexZeroPad)(t[8],32),o.BigNumber.from(r.r).isZero()&&o.BigNumber.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,i=t.slice(0,6);0!==r.chainId&&(i.push((0,a.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);var s=(0,u.keccak256)(l.encode(i));try{r.from=k(s,{r:(0,a.hexlify)(r.r),s:(0,a.hexlify)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,u.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=l.decode(e.slice(1));8!==t.length&&11!==t.length&&m.throwArgumentError("invalid component count for transaction type: 1","payload",(0,a.hexlify)(e));var r={type:1,chainId:b(t[0]).toNumber(),nonce:b(t[1]).toNumber(),gasPrice:b(t[2]),gasLimit:b(t[3]),to:g(t[4]),value:b(t[5]),data:t[6],accessList:x(t[7])};return 8===t.length||(r.hash=(0,u.keccak256)(e),I(r,t.slice(8),T)),r}(t);case 2:return function(e){var t=l.decode(e.slice(1));9!==t.length&&12!==t.length&&m.throwArgumentError("invalid component count for transaction type: 2","payload",(0,a.hexlify)(e));var r=b(t[2]),n=b(t[3]),i={type:2,chainId:b(t[0]).toNumber(),nonce:b(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:b(t[4]),to:g(t[5]),value:b(t[6]),data:t[7],accessList:x(t[8])};return 9===t.length||(i.hash=(0,u.keccak256)(e),I(i,t.slice(9),P)),i}(t)}return m.throwError("unsupported transaction type: ".concat(t[0]),d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})},t.recoverAddress=k,t.serialize=function(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&m.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,c.checkProperties)(e,w);var r=[];v.forEach((function(t){var n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=(0,a.arrayify)((0,a.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&m.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,a.stripZeros)(n)).length>t.maxLength&&m.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push((0,a.hexlify)(n))}));var n=0;if(null!=e.chainId?"number"!=typeof(n=e.chainId)&&m.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,a.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,a.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return l.encode(r);var i=(0,a.splitSignature)(t),o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&m.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&m.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,a.hexlify)(o)),r.push((0,a.stripZeros)((0,a.arrayify)(i.r))),r.push((0,a.stripZeros)((0,a.arrayify)(i.s))),l.encode(r)}(e,t);switch(e.type){case 1:return T(e,t);case 2:return P(e,t)}return m.throwError("unsupported transaction type: ".concat(e.type),d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})};var i=r(77921),o=r(34952),a=r(908),s=r(5465),u=r(64642),c=r(23694),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=p(void 0);if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}(r(55265)),f=r(17612),d=r(64327),h=r(96783);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}var y,m=new d.Logger(h.version);function g(e){return"0x"===e?null:(0,i.getAddress)(e)}function b(e){return"0x"===e?s.Zero:o.BigNumber.from(e)}t.TransactionTypes=y,function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(y||(t.TransactionTypes=y={}));var v=[{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 A(e){var t=(0,f.computePublicKey)(e);return(0,i.getAddress)((0,a.hexDataSlice)((0,u.keccak256)((0,a.hexDataSlice)(t,1)),12))}function k(e,t){return A((0,f.recoverPublicKey)((0,a.arrayify)(e),t))}function E(e,t){var r=(0,a.stripZeros)(o.BigNumber.from(e).toHexString());return r.length>32&&m.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function S(e,t){return{address:(0,i.getAddress)(e),storageKeys:(t||[]).map((function(t,r){return 32!==(0,a.hexDataLength)(t)&&m.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function x(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&m.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),S(e[0],e[1])):S(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return S(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function _(e){return x(e).map((function(e){return[e.address,e.storageKeys]}))}function P(e,t){if(null!=e.gasPrice){var r=o.BigNumber.from(e.gasPrice),n=o.BigNumber.from(e.maxFeePerGas||0);r.eq(n)||m.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var s=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),E(e.maxFeePerGas||0,"maxFeePerGas"),E(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){var u=(0,a.splitSignature)(t);s.push(E(u.recoveryParam,"recoveryParam")),s.push((0,a.stripZeros)(u.r)),s.push((0,a.stripZeros)(u.s))}return(0,a.hexConcat)(["0x02",l.encode(s)])}function T(e,t){var r=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.gasPrice||0,"gasPrice"),E(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){var n=(0,a.splitSignature)(t);r.push(E(n.recoveryParam,"recoveryParam")),r.push((0,a.stripZeros)(n.r)),r.push((0,a.stripZeros)(n.s))}return(0,a.hexConcat)(["0x01",l.encode(r)])}function I(e,t,r){try{var n=b(t[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");e.v=n}catch(e){m.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,a.hexZeroPad)(t[1],32),e.s=(0,a.hexZeroPad)(t[2],32);try{var i=(0,u.keccak256)(r(e));e.from=k(i,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}},96546:(e,t,r)=>{"use strict";var n=r(28847)(r(90775));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t1?r-1:0),i=1;i{"use strict";var n=r(28847)(r(90775));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;tu;)r&c&&(n=n.add(i)),i=i.double(),r>>=c;return n},precomputeWindow:function(e,t){for(var r=n(t),i=r.windows,o=r.windowSize,a=[],s=e,u=s,c=0;c>=p,g>u&&(g-=h,o+=c);var b=m,v=m+Math.abs(g)-1,w=y%2!=0,A=g<0;0===g?f=f.add(r(w,i[b])):l=l.add(r(A,i[v]))}return{p:l,f}},wNAFCached:function(e,t,r,n){var i=e._WINDOW_SIZE||1,o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,a.validateField)(e.Fp),(0,s.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze(o(o(o({},(0,a.nLength)(e.n,e.nBitLength)),e),{p:e.Fp.ORDER}))}},19751:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(90775)),o=n(r(74519));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=1<<8*t)throw new Error("bad I2OSP call: value=".concat(e," length=").concat(t));for(var r=Array.from({length:t}).fill(0),n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function d(e,t){for(var r=new Uint8Array(e.length),n=0;n255&&(t=n((0,c.concatBytes)((0,c.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));var i=n.outputLen,o=n.blockLen,a=Math.ceil(r/i);if(a>255)throw new Error("Invalid xmd length");var s=(0,c.concatBytes)(t,f(t.length,1)),u=f(0,o),l=f(r,2),y=new Array(a),m=n((0,c.concatBytes)(u,e,l,f(0,1),s));y[0]=n((0,c.concatBytes)(m,f(1,1),s));for(var g=1;g<=a;g++){var b=[d(m,y[g-1]),f(g+1,1),s];y[g]=n(c.concatBytes.apply(void 0,b))}return c.concatBytes.apply(void 0,y).slice(0,r)}function m(e,t,r,n,i){if(h(e),h(t),p(r),t.length>255){var o=Math.ceil(2*n/8);t=i.create({dkLen:o}).update((0,c.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(e).update(f(r,2)).update(t).update(f(t.length,1)).digest()}function g(e,t,r){(0,c.validateObject)(r,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});var n=r.p,i=r.k,o=r.m,a=r.hash,s=r.expand,f=r.DST;h(e),p(t);var d,g=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,c.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(f),b=n.toString(2).length,v=Math.ceil((b+i)/8),w=t*o*v;if("xmd"===s)d=y(e,g,w,a);else if("xof"===s)d=m(e,g,w,i,a);else{if("_internal_pass"!==s)throw new Error('expand must be "xmd" or "xof"');d=e}for(var A=new Array(t),k=0;k{"use strict";var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;var i=r(46928),o=BigInt(0),a=BigInt(1),s=BigInt(2),u=BigInt(3),c=BigInt(4),l=BigInt(5),f=BigInt(8);function d(e,t){var r=e%t;return r>=o?r:t+r}function h(e,t,r){if(r<=o||t 0");if(r===a)return o;for(var n=a;t>o;)t&a&&(n=n*e%r),e=e*e%r,t>>=a;return n}function p(e,t){if(e===o||t<=o)throw new Error("invert: expected positive integers, got n=".concat(e," mod=").concat(t));for(var r=d(e,t),n=t,i=o,s=a,u=a,c=o;r!==o;){var l=n/r,f=n%r,h=i-u*l,p=s-c*l;n=r,r=f,i=u,s=c,u=h,c=p}if(n!==a)throw new Error("invert: does not exist");return d(i,t)}function y(e){var t,r,n,i=(e-a)/s;for(t=e-a,r=0;t%s===o;t/=s,r++);for(n=s;no;)n*=n,n%=r;return n},t.invert=p,t.tonelliShanks=y,t.FpSqrt=m,t.isNegativeLE=function(e,t){return(d(e,t)&a)===a};var g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function b(e,t,r){if(r 0");if(r===o)return e.ONE;if(r===a)return t;for(var n=e.ONE,i=t;r>o;)r&a&&(n=e.mul(n,i)),i=e.sqr(i),r>>=a;return n}function v(e,t){var r=new Array(t.length),n=t.reduce((function(t,n,i){return e.is0(n)?t:(r[i]=t,e.mul(t,n))}),e.ONE),i=e.inv(n);return t.reduceRight((function(t,n,i){return e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))}),i),r}function w(e,t){var r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}t.validateField=function(e){var t=g.reduce((function(e,t){return e[t]="function",e}),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,i.validateObject)(e,t)},t.FpPow=b,t.FpInvertBatch=v,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?p(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){var t=(e.ORDER-a)/s;return function(r){var n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=w,t.Field=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=o)throw new Error("Expected Fp ORDER > 0, got ".concat(e));var u=w(e,t),c=u.nBitLength,l=u.nByteLength;if(l>2048)throw new Error("Field lengths over 2048 bytes are not supported");var f=m(e),h=Object.freeze({ORDER:e,BITS:c,BYTES:l,MASK:(0,i.bitMask)(c),ZERO:o,ONE:a,create:function(t){return d(t,e)},isValid:function(t){if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got ".concat((0,n.default)(t)));return o<=t&&t2&&void 0!==arguments[2]&&arguments[2],n=(e=(0,i.ensureBytes)("privateHash",e)).length,o=w(t).nByteLength+8;if(o<24||n1024)throw new Error("hashToPrivateScalar: expected ".concat(o,"-1024 bytes of input, got ").concat(n));return d(r?(0,i.bytesToNumberLE)(e):(0,i.bytesToNumberBE)(e),t-a)+a}},46928:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(74519)),o=n(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;var a=BigInt(0),s=BigInt(1),u=BigInt(2),c=function(e){return e instanceof Uint8Array},l=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));function f(e){if(!c(e))throw new Error("Uint8Array expected");for(var t="",r=0;ra;e>>=s,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&s},t.bitSet=function(e,t,r){return e|(r?s:a)<0&&void 0!==arguments[0]?arguments[0]:g();i=s(b([0]),e),n=s(),0!==e.length&&(i=s(b([1]),e),n=s())},c=function(){if(o++>=1e3)throw new Error("drbg: tried 1000 values");for(var e=0,r=[];e2&&void 0!==arguments[2]?arguments[2]:{},n=function(t,r,n){var i=v[r];if("function"!=typeof i)throw new Error('Invalid validator "'.concat(r,'", expected function'));var a=e[t];if(!(n&&void 0===a||i(a,e)))throw new Error("Invalid param ".concat(String(t),"=").concat(a," (").concat((0,o.default)(a),"), expected ").concat(r))},a=0,s=Object.entries(t);a{"use strict";var n=r(28847),i=n(r(58985)),o=n(r(69721)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=n(r(22940)),l=n(r(90775)),f=n(r(3355));function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return(0,o.default)(this,c),n.call(this,e)}return(0,i.default)(c)}((0,c.default)(Error)),_parseInt:function(e){var r=t.DER.Err;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");var n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:b(i),l:e.subarray(n+2)}},toSig:function(e){var r=t.DER.Err,n="string"==typeof e?v(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");var i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");var o=t.DER._parseInt(n.subarray(2)),a=o.d,s=o.l,u=t.DER._parseInt(s),c=u.d;if(u.l.length)throw new r("Invalid signature: left bytes after parsing");return{r:a,s:c}},hexFromSig:function(e){var t=function(e){return 8&Number.parseInt(e[0],16)?"00"+e:e},r=function(e){var t=e.toString(16);return 1&t.length?"0".concat(t):t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,a=i.length/2,s=r(o),u=r(a);return"30".concat(r(a+o+4),"02").concat(u).concat(i,"02").concat(s).concat(n)}};var w=BigInt(0),A=BigInt(1),k=BigInt(2),E=BigInt(3),S=BigInt(4);function x(e){var t=function(e){var t=(0,g.validateBasic)(e);y.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});var r=t.endo,n=t.Fp,i=t.a;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==(0,f.default)(r)||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze(h({},t))}(e),r=t.Fp,n=t.toBytes||function(e,t,n){var i=t.toAffine();return y.concatBytes(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))},a=t.fromBytes||function(e){var t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}};function s(e){var n=t.a,i=t.b,o=r.sqr(e),a=r.mul(o,e);return r.add(r.add(a,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function u(e){return"bigint"==typeof e&&ww||f>w;)u&A&&(d=d.add(p)),f&A&&(h=h.add(p)),p=p.double(),u>>=A,f>>=A;return s&&(d=d.negate()),l&&(h=h.negate()),h=new e(r.mul(h.px,o.beta),h.py,h.pz),d.add(h)}},{key:"multiply",value:function(n){c(n);var i,o,a=n,s=t.endo;if(s){var u=s.splitScalar(a),l=u.k1neg,f=u.k1,d=u.k2neg,h=u.k2,p=this.wNAF(f),y=p.p,m=p.f,g=this.wNAF(h),b=g.p,v=g.f;y=S.constTimeNegate(l,y),b=S.constTimeNegate(d,b),b=new e(r.mul(b.px,s.beta),b.py,b.pz),i=y.add(b),o=m.add(v)}else{var w=this.wNAF(a);i=w.p,o=w.f}return e.normalizeZ([i,o])[0]}},{key:"multiplyAndAddUnsafe",value:function(t,r,n){var i=e.BASE,o=function(e,t){return t!==w&&t!==A&&e.equals(i)?e.multiply(t):e.multiplyUnsafe(t)},a=o(this,r).add(o(t,n));return a.is0()?void 0:a}},{key:"toAffine",value:function(e){var t=this.px,n=this.py,i=this.pz,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));var a=r.mul(t,e),s=r.mul(n,e),u=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:a,y:s}}},{key:"isTorsionFree",value:function(){var r=t.h,n=t.isTorsionFree;if(r===A)return!0;if(n)return n(e,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}},{key:"clearCofactor",value:function(){var r=t.h,n=t.clearCofactor;return r===A?this:n?n(e,this):this.multiplyUnsafe(t.h)}},{key:"toRawBytes",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),n(e,this,t)}},{key:"toHex",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return y.bytesToHex(this.toRawBytes(e))}}],[{key:"fromAffine",value:function(t){var n=t||{},i=n.x,o=n.y;if(!t||!r.isValid(i)||!r.isValid(o))throw new Error("invalid affine point");if(t instanceof e)throw new Error("projective point not allowed");var a=function(e){return r.eql(e,r.ZERO)};return a(i)&&a(o)?e.ZERO:new e(i,o,r.ONE)}},{key:"normalizeZ",value:function(t){var n=r.invertBatch(t.map((function(e){return e.pz})));return t.map((function(e,t){return e.toAffine(n[t])})).map(e.fromAffine)}},{key:"fromHex",value:function(t){var r=e.fromAffine(a((0,m.ensureBytes)("pointHex",t)));return r.assertValidity(),r}},{key:"fromPrivateKey",value:function(t){return e.BASE.multiply(l(t))}}]),e}();v.BASE=new v(t.Gx,t.Gy,r.ONE),v.ZERO=new v(r.ZERO,r.ONE,r.ZERO);var k=t.nBitLength,S=(0,g.wNAF)(v,t.endo?Math.ceil(k/2):k);return{CURVE:t,ProjectivePoint:v,normPrivateKeyToScalar:l,weierstrassEquation:s,isWithinCurveOrder:u}}function _(e,t){for(var r=e.ORDER,n=w,i=r-A;i%k===w;i/=k)n+=A;var o=n,a=k<A;y--){var m=y-k;m=k<u>>A}var I=function(e,t,r){return y.bytesToNumberBE(e.slice(t,r))},O=function(){function e(t,r,n){(0,o.default)(this,e),this.r=t,this.s=r,this.recovery=n,this.assertValidity()}return(0,i.default)(e,[{key:"assertValidity",value:function(){if(!_(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!_(this.s))throw new Error("s must be 0 < s < CURVE.n")}},{key:"addRecoveryBit",value:function(t){return new e(this.r,this.s,t)}},{key:"recoverPublicKey",value:function(e){var t=this.r,r=this.s,n=this.recovery,i=R((0,m.ensureBytes)("msgHash",e));if(null==n||![0,1,2,3].includes(n))throw new Error("recovery id invalid");var o=2===n||3===n?t+a.n:t;if(o>=s.ORDER)throw new Error("recovery id 2 or 3 invalid");var u=1&n?"03":"02",c=k.fromHex(u+P(o)),l=b(o),f=d(-i*l),h=d(r*l),p=k.BASE.multiplyAndAddUnsafe(c,f,h);if(!p)throw new Error("point at infinify");return p.assertValidity(),p}},{key:"hasHighS",value:function(){return T(this.s)}},{key:"normalizeS",value:function(){return this.hasHighS()?new e(this.r,d(-this.s),this.recovery):this}},{key:"toDERRawBytes",value:function(){return y.hexToBytes(this.toDERHex())}},{key:"toDERHex",value:function(){return t.DER.hexFromSig({r:this.r,s:this.s})}},{key:"toCompactRawBytes",value:function(){return y.hexToBytes(this.toCompactHex())}},{key:"toCompactHex",value:function(){return P(this.r)+P(this.s)}}],[{key:"fromCompact",value:function(t){var r=a.nByteLength;return t=(0,m.ensureBytes)("compactSignature",t,2*r),new e(I(t,0,r),I(t,r,2*r))}},{key:"fromDER",value:function(r){var n=t.DER.toSig((0,m.ensureBytes)("DER",r));return new e(n.r,n.s)}}]),e}(),B={isValidPrivateKey:function(e){try{return E(e),!0}catch(e){return!1}},normPrivateKeyToScalar:E,randomPrivateKey:function(){var e=a.randomBytes(s.BYTES+8),t=p.hashToPrivateScalar(e,u);return y.numberToBytesBE(t,a.nByteLength)},precompute:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k.BASE;return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function C(e){var t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===c||n===l:r?n===2*c||n===2*l:e instanceof k}var N=a.bits2int||function(e){var t=y.bytesToNumberBE(e),r=8*e.length-a.nBitLength;return r>0?t>>BigInt(r):t},R=a.bits2int_modN||function(e){return d(N(e))},M=y.bitMask(a.nBitLength);function U(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(w<=e&&e1&&void 0!==arguments[1])||arguments[1];return k.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(C(e))throw new Error("first arg must be private key");if(!C(t))throw new Error("second arg must be public key");return k.fromHex(t).multiply(E(e)).toRawBytes(r)},sign:function(e,t){var r=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:L;if(["recovered","canonical"].some((function(e){return e in r})))throw new Error("sign() legacy options not supported");var n=a.hash,i=a.randomBytes,o=r.lowS,u=r.prehash,c=r.extraEntropy;null==o&&(o=!0),e=(0,m.ensureBytes)("msgHash",e),u&&(e=(0,m.ensureBytes)("prehashed msgHash",n(e)));var l=R(e),f=E(t),h=[U(f),U(l)];if(null!=c){var p=!0===c?i(s.BYTES):c;h.push((0,m.ensureBytes)("extraEntropy",p,s.BYTES))}var g=y.concatBytes.apply(y,h),v=l;return{seed:g,k2sig:function(e){var t=N(e);if(_(t)){var r=b(t),n=k.BASE.multiply(t).toAffine(),i=d(n.x);if(i!==w){var a=d(r*d(v+i*f));if(a!==w){var s=(n.x===i?0:2)|Number(n.y&A),u=a;return o&&T(a)&&(u=function(e){return T(e)?d(-e):e}(a),s^=1),new O(i,u,s)}}}}}}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:L),n=r.seed,i=r.k2sig,o=a;return y.createHmacDrbg(o.hash.outputLen,o.nByteLength,o.hmac)(n,i)},verify:function(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,s=e;if(r=(0,m.ensureBytes)("msgHash",r),n=(0,m.ensureBytes)("publicKey",n),"strict"in o)throw new Error("options.strict was renamed to lowS");var u,c=o.lowS,l=o.prehash,h=void 0;try{if("string"==typeof s||s instanceof Uint8Array)try{h=O.fromDER(s)}catch(e){if(!(e instanceof t.DER.Err))throw e;h=O.fromCompact(s)}else{if("object"!==(0,f.default)(s)||"bigint"!=typeof s.r||"bigint"!=typeof s.s)throw new Error("PARSE");var p=s.r,y=s.s;h=new O(p,y)}u=k.fromHex(n)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&h.hasHighS())return!1;l&&(r=a.hash(r));var g=h,v=g.r,w=g.s,A=R(r),E=b(w),S=d(A*E),x=d(v*E),_=null===(i=k.BASE.multiplyAndAddUnsafe(u,S,x))||void 0===i?void 0:i.toAffine();return!!_&&d(_.x)===v},ProjectivePoint:k,Signature:O,utils:B}},t.SWUFpSqrtRatio=_,t.mapToCurveSimpleSWU=function(e,t){if(p.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");var r=_(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return function(n){var i,o,a,s,u,c,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),a=e.add(o,e.ONE),a=e.mul(a,t.B),s=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),s=e.mul(s,t.A),o=e.sqr(a),c=e.sqr(s),u=e.mul(c,t.A),o=e.add(o,u),o=e.mul(o,a),c=e.mul(c,s),u=e.mul(c,t.B),o=e.add(o,u),l=e.mul(i,a);var d=r(o,c),h=d.isValid,p=d.value;f=e.mul(i,n),f=e.mul(f,p),l=e.cmov(l,a,h),f=e.cmov(f,p,h);var y=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,y),{x:l=e.div(l,s),y:f}}}},4158:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;var n=r(61241),i=r(72434),o=r(3970),a=r(16573),s=r(46928),u=r(19751),c=r(96546),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),d=BigInt(1),h=BigInt(2),p=function(e,t){return(e+t/h)/t};function y(e){var t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),a=BigInt(22),s=BigInt(23),u=BigInt(44),c=BigInt(88),f=e*e*e%t,d=f*f*e%t,p=(0,o.pow2)(d,r,t)*d%t,y=(0,o.pow2)(p,r,t)*d%t,g=(0,o.pow2)(y,h,t)*f%t,b=(0,o.pow2)(g,i,t)*g%t,v=(0,o.pow2)(b,a,t)*b%t,w=(0,o.pow2)(v,u,t)*v%t,A=(0,o.pow2)(w,c,t)*w%t,k=(0,o.pow2)(A,u,t)*v%t,E=(0,o.pow2)(k,r,t)*d%t,S=(0,o.pow2)(E,s,t)*b%t,x=(0,o.pow2)(S,n,t)*f%t,_=(0,o.pow2)(x,h,t);if(!m.eql(m.sqr(_),e))throw new Error("Cannot find square root");return _}var m=(0,o.Field)(l,void 0,void 0,{sqrt:y});t.secp256k1=(0,c.createCurve)({a:BigInt(0),b:BigInt(7),Fp:m,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:function(e){var t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-d*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=BigInt("0x100000000000000000000000000000000"),u=p(a*e,t),c=p(-n*e,t),l=(0,o.mod)(e-u*r-c*i,t),h=(0,o.mod)(-u*n-c*a,t),y=l>s,m=h>s;if(y&&(l=t-l),m&&(h=t-h),l>s||h>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:y,k1:l,k2neg:m,k2:h}}}},n.sha256);var g=BigInt(0),b=function(e){return"bigint"==typeof e&&g1?i-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:(0,i.randomBytes)(32),n=(0,s.ensureBytes)("message",e),o=P(t),a=o.bytes,u=o.scalar,c=(0,s.ensureBytes)("auxRand",r,32),l=E(u^(0,s.bytesToNumberBE)(A("BIP0340/aux",c))),f=A("BIP0340/nonce",l,a,n),d=x((0,s.bytesToNumberBE)(f));if(d===g)throw new Error("sign failed: k is zero");var h=P(d),p=h.bytes,y=h.scalar,m=I(p,a,n),b=new Uint8Array(64);if(b.set(p,0),b.set(E(x(y+m*u)),32),!O(b,n,a))throw new Error("sign: Invalid signature produced");return b},verify:O,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:T,pointToBytes:k,numberToBytesBE:s.numberToBytesBE,bytesToNumberBE:s.bytesToNumberBE,taggedHash:A,mod:o.mod}};var B=(0,u.isogenyMap)(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((function(e){return e.map((function(e){return BigInt(e)}))}))),C=(0,a.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))}),N=(0,u.createHasher)(t.secp256k1.ProjectivePoint,(function(e){var t=C(m.create(e[0])),r=t.x,n=t.y;return B(r,n)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256});t.hashToCurve=N.hashToCurve,t.encodeToCurve=N.encodeToCurve},96822:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Wrong positive integer: ".concat(e))}function n(e){if("boolean"!=typeof e)throw new Error("Expected boolean, not ".concat(e))}function i(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&!r.includes(e.length))throw new Error("Expected Uint8Array of length ".concat(r,", not of length=").concat(e.length))}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){i(e);var r=t.outputLen;if(e.length{"use strict";var n=r(28847),i=n(r(93106)),o=n(r(69721)),a=n(r(58985)),s=n(r(15163)),u=n(r(34650)),c=n(r(21949));Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;var l=r(96822),f=r(72434),d=function(e){(0,s.default)(d,e);var t,r,n=(t=d,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,u.default)(this,e)});function d(e,t,r,i){var a;return(0,o.default)(this,d),(a=n.call(this)).blockLen=e,a.outputLen=t,a.padOffset=r,a.isLE=i,a.finished=!1,a.length=0,a.pos=0,a.destroyed=!1,a.buffer=new Uint8Array(e),a.view=(0,f.createView)(a.buffer),a}return(0,a.default)(d,[{key:"update",value:function(e){l.default.exists(this);for(var t=this.view,r=this.buffer,n=this.blockLen,i=(e=(0,f.toBytes)(e)).length,o=0;on-o&&(this.process(r,0),o=0);for(var a=o;a>i&o),s=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,a,n),e.setUint32(t+c,s,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);var s=(0,f.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");var c=u/4,d=this.get();if(c>d.length)throw new Error("_sha2: outputLen bigger than state");for(var h=0;h{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.toBig=t.split=t.fromBig=void 0;var r=BigInt(Math.pow(2,32)-1),n=BigInt(32);function i(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(e.length),n=new Uint32Array(e.length),o=0;o>>0)+(n>>>0);return{h:e+r+(i/Math.pow(2,32)|0)|0,l:0|i}}t.fromBig=i,t.split=o,t.toBig=function(e,t){return BigInt(e>>>0)<>>0)},t.add=a;var s={fromBig:i,split:o,toBig:t.toBig,shrSH:function(e,t,r){return e>>>r},shrSL:function(e,t,r){return e<<32-r|t>>>r},rotrSH:function(e,t,r){return e>>>r|t<<32-r},rotrSL:function(e,t,r){return e<<32-r|t>>>r},rotrBH:function(e,t,r){return e<<64-r|t>>>r-32},rotrBL:function(e,t,r){return e>>>r-32|t<<64-r},rotr32H:function(e,t){return t},rotr32L:function(e,t){return e},rotlSH:function(e,t,r){return e<>>32-r},rotlSL:function(e,t,r){return t<>>32-r},rotlBH:function(e,t,r){return t<>>64-r},rotlBL:function(e,t,r){return e<>>64-r},add:a,add3L:function(e,t,r){return(e>>>0)+(t>>>0)+(r>>>0)},add3H:function(e,t,r,n){return t+r+n+(e/Math.pow(2,32)|0)|0},add4L:function(e,t,r,n){return(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)},add4H:function(e,t,r,n,i){return t+r+n+i+(e/Math.pow(2,32)|0)|0},add5H:function(e,t,r,n,i,o){return t+r+n+i+o+(e/Math.pow(2,32)|0)|0},add5L:function(e,t,r,n,i){return(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)}};t.default=s},39712:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))&&"crypto"in globalThis?globalThis.crypto:void 0},45896:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949));Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;var c=r(96822),l=r(72434),f=function(e){(0,a.default)(f,e);var t,r,n=(t=f,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function f(e,t){var r;(0,i.default)(this,f),(r=n.call(this)).finished=!1,r.destroyed=!1,c.default.hash(e);var o=(0,l.toBytes)(t);if(r.iHash=e.create(),"function"!=typeof r.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");r.blockLen=r.iHash.blockLen,r.outputLen=r.iHash.outputLen;var a=r.blockLen,s=new Uint8Array(a);s.set(o.length>a?e.create().update(o).digest():o);for(var u=0;u{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949));function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.default)(e);if(t){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;var l=r(20330),f=r(72434),d=function(e,t,r){return e&t^e&r^t&r},h=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]),p=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),y=new Uint32Array(64),m=function(e){(0,a.default)(r,e);var t=c(r);function r(){var e;return(0,i.default)(this,r),(e=t.call(this,64,32,8,!1)).A=0|p[0],e.B=0|p[1],e.C=0|p[2],e.D=0|p[3],e.E=0|p[4],e.F=0|p[5],e.G=0|p[6],e.H=0|p[7],e}return(0,o.default)(r,[{key:"get",value:function(){return[this.A,this.B,this.C,this.D,this.E,this.F,this.G,this.H]}},{key:"set",value:function(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}},{key:"process",value:function(e,t){for(var r=0;r<16;r++,t+=4)y[r]=e.getUint32(t,!1);for(var n=16;n<64;n++){var i=y[n-15],o=y[n-2],a=(0,f.rotr)(i,7)^(0,f.rotr)(i,18)^i>>>3,s=(0,f.rotr)(o,17)^(0,f.rotr)(o,19)^o>>>10;y[n]=s+y[n-7]+a+y[n-16]|0}var u,c=this.A,l=this.B,p=this.C,m=this.D,g=this.E,b=this.F,v=this.G,w=this.H;for(r=0;r<64;r++){var A=w+((0,f.rotr)(g,6)^(0,f.rotr)(g,11)^(0,f.rotr)(g,25))+((u=g)&b^~u&v)+h[r]+y[r]|0,k=((0,f.rotr)(c,2)^(0,f.rotr)(c,13)^(0,f.rotr)(c,22))+d(c,l,p)|0;w=v,v=b,b=g,g=m+A|0,m=p,p=l,l=c,c=A+k|0}c=c+this.A|0,l=l+this.B|0,p=p+this.C|0,m=m+this.D|0,g=g+this.E|0,b=b+this.F|0,v=v+this.G|0,w=w+this.H|0,this.set(c,l,p,m,g,b,v,w)}},{key:"roundClean",value:function(){y.fill(0)}},{key:"destroy",value:function(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}]),r}(l.SHA2),g=function(e){(0,a.default)(r,e);var t=c(r);function r(){var e;return(0,i.default)(this,r),(e=t.call(this)).A=-1056596264,e.B=914150663,e.C=812702999,e.D=-150054599,e.E=-4191439,e.F=1750603025,e.G=1694076839,e.H=-1090891868,e.outputLen=28,e}return(0,o.default)(r)}(m);t.sha256=(0,f.wrapConstructor)((function(){return new m})),t.sha224=(0,f.wrapConstructor)((function(){return new g}))},64376:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),u=n(r(21949)),c=n(r(74519));Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;for(var l=r(96822),f=r(64356),d=r(72434),h=[],p=[],y=[],m=BigInt(0),g=BigInt(1),b=BigInt(2),v=BigInt(7),w=BigInt(256),A=BigInt(113),k=0,E=g,S=1,x=0;k<24;k++){var _=[x,(2*S+3*x)%5];S=_[0],x=_[1],h.push(2*(5*x+S)),p.push((k+1)*(k+2)/2%64);for(var P=m,T=0;T<7;T++)(E=(E<>v)*A)%w)&b&&(P^=g<<(g<32?f.default.rotlBH(e,t,r):f.default.rotlSH(e,t,r)},R=function(e,t,r){return r>32?f.default.rotlBL(e,t,r):f.default.rotlSL(e,t,r)};function M(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,r=new Uint32Array(10),n=24-t;n<24;n++){for(var i=0;i<10;i++)r[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(var o=0;o<10;o+=2)for(var a=(o+8)%10,s=(o+2)%10,u=r[s],c=r[s+1],l=N(u,c,1)^r[a],f=R(u,c,1)^r[a+1],d=0;d<50;d+=10)e[o+d]^=l,e[o+d+1]^=f;for(var y=e[2],m=e[3],g=0;g<24;g++){var b=p[g],v=N(y,m,b),w=R(y,m,b),A=h[g];y=e[A],m=e[A+1],e[A]=v,e[A+1]=w}for(var k=0;k<50;k+=10){for(var E=0;E<10;E++)r[E]=e[k+E];for(var S=0;S<10;S++)e[k+S]^=~r[(S+2)%10]&r[(S+4)%10]}e[0]^=B[n],e[1]^=C[n]}r.fill(0)}t.keccakP=M;var U=function(e){(0,a.default)(c,e);var t,r,n=(t=c,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function c(e,t,r){var o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if((0,i.default)(this,c),(o=n.call(this)).blockLen=e,o.suffix=t,o.outputLen=r,o.enableXOF=a,o.rounds=s,o.pos=0,o.posOut=0,o.finished=!1,o.destroyed=!1,l.default.number(r),0>=o.blockLen||o.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");return o.state=new Uint8Array(200),o.state32=(0,d.u32)(o.state),o}return(0,o.default)(c,[{key:"keccak",value:function(){M(this.state32,this.rounds),this.posOut=0,this.pos=0}},{key:"update",value:function(e){l.default.exists(this);for(var t=this.blockLen,r=this.state,n=(e=(0,d.toBytes)(e)).length,i=0;i=r&&this.keccak();var o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}},{key:"xofInto",value:function(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}},{key:"xof",value:function(e){return l.default.number(e),this.xofInto(new Uint8Array(e))}},{key:"digestInto",value:function(e){if(l.default.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}},{key:"digest",value:function(){return this.digestInto(new Uint8Array(this.outputLen))}},{key:"destroy",value:function(){this.destroyed=!0,this.state.fill(0)}},{key:"_cloneInto",value:function(e){var t=this.blockLen,r=this.suffix,n=this.outputLen,i=this.rounds,o=this.enableXOF;return e||(e=new c(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}]),c}(d.Hash);t.Keccak=U;var L=function(e,t,r){return(0,d.wrapConstructor)((function(){return new U(t,e,r)}))};t.sha3_224=L(6,144,28),t.sha3_256=L(6,136,32),t.sha3_384=L(6,104,48),t.sha3_512=L(6,72,64),t.keccak_224=L(1,144,28),t.keccak_256=L(1,136,32),t.keccak_384=L(1,104,48),t.keccak_512=L(1,72,64);var j=function(e,t,r){return(0,d.wrapXOFConstructorWithOpts)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new U(t,e,void 0===n.dkLen?r:n.dkLen,!0)}))};t.shake128=j(31,168,16),t.shake256=j(31,136,32)},72434:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(69721)),a=n(r(58985)),s=n(r(94571)),u=n(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;var c=r(39712),l=function(e){return e instanceof Uint8Array};if(t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");var f=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));t.bytesToHex=function(e){if(!l(e))throw new Error("Uint8Array expected");for(var t="",r=0;r=0&&u0&&void 0!==arguments[0]?arguments[0]:32;if(c.crypto&&"function"==typeof c.crypto.getRandomValues)return c.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},53368:(e,t,r)=>{"use strict";var n,i,o=r(28847)(r(3355));void 0===(i="function"==typeof(n=function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r{"use strict";var n=t;n.bignum=r(31734),n.define=r(41568).define,n.base=r(12412),n.constants=r(79387),n.decoders=r(61500),n.encoders=r(47506)},41568:(e,t,r)=>{"use strict";var n=r(47506),i=r(61500),o=r(41736);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){var t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},90585:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(41736),o=r(32719).b,a=r(11755).Buffer;function s(e,t){o.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function u(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return u.isEncoderBuffer(e)||(e=new u(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+(0,n.default)(e));this.value=e,this.length=e.length}}i(s,o),t.C=s,s.isDecoderBuffer=function(e){return e instanceof s||"object"===(0,n.default)(e)&&a.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=u,u.isEncoderBuffer=function(e){return e instanceof u||"object"===(0,n.default)(e)&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},u.prototype.join=function(e,t){return e||(e=a.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},12412:(e,t,r)=>{"use strict";var n=t;n.Reporter=r(32719).b,n.DecoderBuffer=r(90585).C,n.EncoderBuffer=r(90585).R,n.Node=r(51371)},51371:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(32719).b,o=r(90585).R,a=r(90585).C,s=r(94504),u=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u);function l(e,t,r){var n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=l;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){var e=this._baseState,t={};f.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},l.prototype._wrap=function(){var e=this._baseState;c.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},l.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==(0,n.default)(e)||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){l.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),u.forEach((function(e){l.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),l.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},l.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,o=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(o=this._peekTag(e,u,r.any),e.isError(o))return o}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(c)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){var l=this._decodeTag(e,r.explicit);if(e.isError(l))return l;e=l}var f=e.offset;if(null===r.use&&null===r.choice){var d;r.any&&(d=e.save());var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?i=e.raw(d):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),f,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},l.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},l.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=e.save(),s=r.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;n={type:o,value:u},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},l.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},l.prototype._encodeValue=function(e,t,r){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new i);var a=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var s=null,u=!1;if(o.any)a=this._createEncoderBuffer(e);else if(o.choice)a=this._encodeChoice(e,t);else if(o.contains)s=this._getUse(o.contains,r)._encode(e,t),u=!0;else if(o.children)s=o.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if("object"!==(0,n.default)(e))return t.error("Child expected, but input is not object");var o=r._encode(e[r._baseState.key],t,e);return t.leaveKey(i),o}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),c))}else null!==o.use?a=this._getUse(o.use,r)._encode(e,t):(s=this._encodePrimitive(o.tag,e),u=!0);if(!o.any&&null===o.choice){var l=null!==o.implicit?o.implicit:o.tag,f=null===o.implicit?"universal":"context";null===l?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(a=this._encodeComposite(l,u,f,s))}return null!==o.explicit&&(a=this._encodeComposite(o.explicit,!1,"context",a)),a},l.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},32719:(e,t,r)=>{"use strict";var n=r(41736);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},6520:(e,t)=>{"use strict";function r(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},79387:(e,t,r)=>{"use strict";var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(6520)},92387:(e,t,r)=>{"use strict";var n=r(41736),i=r(31734),o=r(90585).C,a=r(51371),s=r(6520);function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.call(this,"der",e)}function l(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=!(32&r);if(31&~r)r&=31;else{var o=r;for(r=0;!(128&~o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function f(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(!(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o{"use strict";var n=t;n.der=r(92387),n.pem=r(50529)},50529:(e,t,r)=>{"use strict";var n=r(41736),i=r(11755).Buffer,o=r(92387);function a(e){o.call(this,e),this.enc="pem"}n(a,o),e.exports=a,a.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,u=-1,c=0;c{"use strict";var n=r(41736),i=r(11755).Buffer,o=r(51371),a=r(6520);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(u,o),u.prototype._encodeComposite=function(e,t,r,n){var o=function(e,t,r,n){var i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[r||"universal"]<<6)}(e,t,r,this.reporter);if(n.length<128){var s=i.alloc(2);return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var u=1,c=n.length;c>=256;c>>=8)u++;var l=i.alloc(2+u);l[0]=o,l[1]=128|u;for(var f=1+u,d=n.length;d>0;f--,d>>=8)l[f]=255&d;return this._createEncoderBuffer([l,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=i.alloc(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s=128;u>>=7)a++}for(var c=i.alloc(a),l=c.length-1,f=e.length-1;f>=0;f--){var d=e[f];for(c[l--]=127&d;(d>>=7)>0;)c[l--]=128|127&d}return this._createEncoderBuffer(c)},u.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=i.from(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=i.alloc(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var a=1,s=e;s>=256;s>>=8)a++;for(var u=new Array(a),c=u.length-1;c>=0;c--)u[c]=255&e,e>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(i.from(u))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n{"use strict";var n=t;n.der=r(11068),n.pem=r(38520)},38520:(e,t,r)=>{"use strict";var n=r(41736),i=r(11068);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],o=0;o{"use strict";var n=r(28847)(r(3355)),i=r(33103);function o(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(!w(e[a=l[u]],t[a],r,n))return!1;return!0}(e,t,r,i))}return r?e===t:e==t}function A(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function k(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&b(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!e&&i&&!r;if((!e&&s.isError(i)&&o&&k(i,r)||a)&&b(i,r,"Got unwanted exception"+n),e&&i&&r&&!k(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=y(t),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},s.inherits(h.AssertionError,Error),h.fail=b,h.ok=v,h.equal=function(e,t,r){e!=t&&b(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&b(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){w(e,t,!1)||b(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){w(e,t,!0)||b(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){w(e,t,!1)&&b(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){w(t,r,!0)&&b(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&b(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&b(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){E(!0,e,t,r)},h.doesNotThrow=function(e,t,r){E(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=i((function e(t,r){t||b(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var S=Object.keys||function(e){var t=[];for(var r in e)u.call(e,r)&&t.push(r);return t}},94074:e=>{"use strict";"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},86732:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},69954:(e,t,r)=>{"use strict";var n=r(19142),i=r(28847)(r(3355)),o=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),f(n,e,n.depth)}function c(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function l(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=f(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),E(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(r);if(0===a.length){if(S(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return d(r)}var c,l="",A=!1,x=["{","}"];return p(r)&&(A=!0,x=["[","]"]),S(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(l=" "+RegExp.prototype.toString.call(r)),k(r)&&(l=" "+Date.prototype.toUTCString.call(r)),E(r)&&(l=" "+d(r)),0!==a.length||A&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=A?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,x)):x[0]+l+x[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),T(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=m(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function v(e){return void 0===e}function w(e){return A(e)&&"[object RegExp]"===x(e)}function A(e){return"object"===(0,i.default)(e)&&null!==e}function k(e){return A(e)&&"[object Date]"===x(e)}function E(e){return A(e)&&("[object Error]"===x(e)||e instanceof Error)}function S(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(v(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=y,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=b,t.isSymbol=function(e){return"symbol"===(0,i.default)(e)},t.isUndefined=v,t.isRegExp=w,t.isObject=A,t.isDate=k,t.isError=E,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,i.default)(e)||void 0===e},t.isBuffer=r(86732);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[_((e=new Date).getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),P[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(94074),t._extend=function(e,t){if(!t||!A(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},27548:(e,t,r)=>{"use strict";var n=r(48850).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,l=new Uint8Array(a);e[r];){var f=t[e.charCodeAt(r)];if(255===f)return;for(var d=0,h=a-1;(0!==f||d>>0,l[h]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");o=d,r++}for(var p=a-o;p!==a&&0===l[p];)p++;var y=n.allocUnsafe(i+(a-p));y.fill(0,0,i);for(var m=i;p!==a;)y[m++]=l[p++];return y}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,r++;for(var c=(a-o)*l+1>>>0,f=new Uint8Array(c);o!==a;){for(var d=t[o],h=0,p=c-1;(0!==d||h>>0,f[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");i=h,o++}for(var y=c-i;y!==c&&0===f[y];)y++;for(var m=u.repeat(r);y{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},31734:(e,t,r)=>{"use strict";e=r.nmd(e);var n=r(28847)(r(3355));!function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===(0,n.default)(e)?e.exports=o:(void 0).BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(29033).Buffer}catch(e){}function s(e,r){var n=e.charCodeAt(r);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void t(!1,"Invalid character in "+e)}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,r,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=r;u=49?c-49+10:c>=17?c-17+10:c,t(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,r,i){if("number"==typeof e)return this._initNumber(e,r,i);if("object"===(0,n.default)(e))return this._initArray(e,r,i);"hex"===r&&(r=16),t(r===(0|r)&&r>=2&&r<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=u(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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"],h=[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],p=[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];function y(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,r){var n;if(r=0|r||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?d[6-u.length]+u+n:u+n}for(0!==o&&(n=o.toString(16)+n);n.length%r!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],l=p[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var y=f.modrn(l).toString(e);n=(f=f.idivn(l)).isZero()?y+n:d[c-y.length]+y+n}for(this.isZero()&&(n="0"+n);n.length%r!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}t(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,r,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);t(i<=o,"byte array longer than desired length"),t(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===r?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return!(8191&t)&&(r+=13,t>>>=13),!(127&t)&&(r+=7,t>>>=7),!(15&t)&&(r+=4,t>>>=4),!(3&t)&&(r+=2,t>>>=2),!(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){t("number"==typeof e&&e>=0);var r=0|Math.ceil(e/26),n=e%26;this._expand(r),n>0&&r--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,r){t("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=r?this.words[n]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,y=h>>>13,m=0|a[2],g=8191&m,b=m>>>13,v=0|a[3],w=8191&v,A=v>>>13,k=0|a[4],E=8191&k,S=k>>>13,x=0|a[5],_=8191&x,P=x>>>13,T=0|a[6],I=8191&T,O=T>>>13,B=0|a[7],C=8191&B,N=B>>>13,R=0|a[8],M=8191&R,U=R>>>13,L=0|a[9],j=8191&L,F=L>>>13,D=0|s[0],H=8191&D,z=D>>>13,q=0|s[1],G=8191&q,K=q>>>13,V=0|s[2],J=8191&V,W=V>>>13,Q=0|s[3],Z=8191&Q,Y=Q>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(d,H)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(y,H)|0,o=Math.imul(y,z);var ge=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,H),i=(i=Math.imul(g,z))+Math.imul(b,H)|0,o=Math.imul(b,z),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,K)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,z))+Math.imul(A,H)|0,o=Math.imul(A,z),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,W)|0;var ve=(c+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,z))+Math.imul(S,H)|0,o=Math.imul(S,z),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Y)|0;var we=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(_,H),i=(i=Math.imul(_,z))+Math.imul(P,H)|0,o=Math.imul(P,z),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,K)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0;var Ae=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,z))+Math.imul(O,H)|0,o=Math.imul(O,z),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var ke=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,z))+Math.imul(N,H)|0,o=Math.imul(N,z),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0;var Ee=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,z))+Math.imul(U,H)|0,o=Math.imul(U,z),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,K)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0;var Se=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,z))+Math.imul(F,H)|0,o=Math.imul(F,z),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(U,G)|0,o=o+Math.imul(U,K)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(N,J)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ye)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,K))+Math.imul(F,G)|0,o=Math.imul(F,K),n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(U,J)|0,o=o+Math.imul(U,W)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var _e=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,W))+Math.imul(F,J)|0,o=Math.imul(F,W),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Pe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,Y))+Math.imul(F,Z)|0,o=Math.imul(F,Y),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Te=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Ie=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ye)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(U,ue)|0,o=o+Math.imul(U,ce)|0,n=n+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(N,fe)|0,o=o+Math.imul(N,de)|0;var Be=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(U,fe)|0,o=o+Math.imul(U,de)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ye)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ne=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ye)|0)+Math.imul(U,pe)|0))<<13)|0;c=((o=o+Math.imul(U,ye)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Re=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ye))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,u[0]=me,u[1]=ge,u[2]=be,u[3]=ve,u[4]=we,u[5]=Ae,u[6]=ke,u[7]=Ee,u[8]=Se,u[9]=xe,u[10]=_e,u[11]=Pe,u[12]=Te,u[13]=Ie,u[14]=Oe,u[15]=Be,u[16]=Ce,u[17]=Ne,u[18]=Re,0!==c&&(u[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(m=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?y(this,e,t):r<1024?g(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*r;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),r?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var r,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(r=0;r>>26-n}a&&(this.words[r]=a,this.length++)}if(0!==i){for(r=this.length-1;r>=0;r--)this.words[r+i]=this.words[r];for(r=0;r=0),i=r?(r-r%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,r,n){return t(0===this.negative),this.iushrn(e,r,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){t("number"==typeof e&&e>=0);var r=e%26,n=(e-r)/26,i=1<=0);var r=e%26,n=(e-r)/26;if(t(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==r&&n++,this.length=Math.min(n,this.length),0!==r){var i=67108863^67108863>>>r<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(t("number"==typeof e),t(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var r=0;r>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(t(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,r,n){return t(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,r),"mod"!==r&&(i=s.div.neg()),"div"!==r&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),r),"mod"!==r&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),r),"div"!==r&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===r?{div:this.divn(e.words[0]),mod:null}:"mod"===r?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,r);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var r=e<0;r&&(e=-e),t(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return r?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var r=e<0;r&&(e=-e),t(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),r?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){t(0===e.negative),t(!e.isZero());var r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;r.isEven()&&n.isEven();)r.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),f=r.clone();!r.isZero();){for(var d=0,h=1;!(r.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,y=1;!(n.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);r.cmp(n)>=0?(r.isub(n),i.isub(s),a.isub(u)):(n.isub(r),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(e){t(0===e.negative),t(!e.isZero());var r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();r.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;!(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;!(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);r.cmp(n)>=0?(r.isub(n),a.isub(s)):(n.isub(r),s.isub(a))}return(i=0===r.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){t("number"==typeof e);var r=e%26,n=(e-r)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var r,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)r=1;else{n&&(e=-e),t(e<=67108863,"Number is too big");var i=0|this.words[0];r=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return t(!this.red,"Already a number in reduction context"),t(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return t(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return t(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var r=o._prime(e);this.m=r.p,this.prime=r}else t(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function P(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(k,A),k.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new E;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return w[e]=t,t},_.prototype._verify1=function(e){t(0===e.negative,"red works only with positives"),t(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,r){t(!(e.negative|r.negative),"red works only with positives"),t(e.red&&e.red===r.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var r=this.m.andln(3);if(t(r%2==1),3===r){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);t(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var y=h,m=0;0!==y.cmp(s);m++)y=y.redSqr();t(m=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new P(e)},i(P,_),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},P.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},P.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},P.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e)},82202:(e,t,r)=>{"use strict";var n,i=r(28847)(r(3355));function o(e){this.rand=e}if(e.exports=function(e){return n||(n=new o(null)),n.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r{"use strict";var n=r(48850).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i>>24]^l[p>>>16&255]^f[y>>>8&255]^d[255&m]^t[g++],a=c[p>>>24]^l[y>>>16&255]^f[m>>>8&255]^d[255&h]^t[g++],s=c[y>>>24]^l[m>>>16&255]^f[h>>>8&255]^d[255&p]^t[g++],u=c[m>>>24]^l[h>>>16&255]^f[p>>>8&255]^d[255&y]^t[g++],h=o,p=a,y=s,m=u;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[y>>>8&255]<<8|n[255&m])^t[g++],a=(n[p>>>24]<<24|n[y>>>16&255]<<16|n[m>>>8&255]<<8|n[255&h])^t[g++],s=(n[y>>>24]<<24|n[m>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[g++],u=(n[m>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&y])^t[g++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var l=e[a],f=e[l],d=e[f],h=257*e[c]^16843008*c;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*d^65537*f^257*l^16843008*a,o[0][c]=h<<24|h>>>8,o[1][c]=h<<16|h>>>16,o[2][c]=h<<8|h>>>24,o[3][c]=h,0===a?a=s=1:(a=l^e[e[e[d^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],l=0;l>>24]]^u.INV_SUB_MIX[1][u.SBOX[d>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[d>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&d]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},10426:(e,t,r)=>{"use strict";var n=r(37494),i=r(48850).Buffer,o=r(93013),a=r(41736),s=r(26626),u=r(96316),c=r(67557);function l(e,t,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var l=this._cipher.encryptBlock(u);this._ghash=new s(l),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,l=i.alloc(8);l.writeUIntBE(u,0,8),n.update(l),e._finID=n.state;var f=i.from(e._finID);return c(f),f}(this,r,l),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(l,o),l.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i{"use strict";var n=r(85478),i=r(32184),o=r(44946);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},32184:(e,t,r)=>{"use strict";var n=r(10426),i=r(48850).Buffer,o=r(58408),a=r(21408),s=r(93013),u=r(37494),c=r(27085);function l(e,t,r){s.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function d(e,t,r){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new l(s.module,t,r)}r(41736)(l,s),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return d(e,n.key,n.iv)},t.createDecipheriv=d},85478:(e,t,r)=>{"use strict";var n=r(58408),i=r(10426),o=r(48850).Buffer,a=r(21408),s=r(93013),u=r(37494),c=r(27085);function l(e,t,r){s.call(this),this._cache=new d,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(41736)(l,s),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var f=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function h(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new l(s.module,t,r)}l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r{"use strict";var n=r(48850).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},67557:e=>{"use strict";e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},77427:(e,t,r)=>{"use strict";var n=r(96316);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},44030:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(96316);function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},13206:(e,t,r)=>{"use strict";var n=r(48850).Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s{"use strict";var n=r(48850).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s{"use strict";var n=r(96316),i=r(48850).Buffer,o=r(67557);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;s{"use strict";t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},58408:(e,t,r)=>{"use strict";var n={ECB:r(59297),CBC:r(77427),CFB:r(44030),CFB8:r(14726),CFB1:r(13206),OFB:r(91962),CTR:r(32802),GCM:r(32802)},i=r(44946);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},91962:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(96316);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length{"use strict";var n=r(37494),i=r(48850).Buffer,o=r(93013);function a(e,t,r,a){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}r(41736)(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},56805:(e,t,r)=>{"use strict";var n=r(19120),i=r(98073),o=r(58408),a=r(30867),s=r(27085);function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function c(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return u(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=u,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return c(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},19120:(e,t,r)=>{"use strict";var n=r(93013),i=r(75626),o=r(41736),a=r(48850).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var u=e.iv;a.isBuffer(u)||(u=a.from(u)),this._des=i.create({key:o,iv:u,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=u,o(u,n),u.prototype._update=function(e){return a.from(this._des.update(e))},u.prototype._final=function(){return a.from(this._des.final())}},30867:(e,t)=>{"use strict";t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},99782:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(31734),o=r(75010);function a(e){var t,r=e.modulus.byteLength();do{t=new i(o(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var r=function(e){var t=a(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),s=new i(e).mul(r.blinder).umod(t.modulus),u=s.toRed(i.mont(t.prime1)),c=s.toRed(i.mont(t.prime2)),l=t.coefficient,f=t.prime1,d=t.prime2,h=u.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),y=h.isub(p).imul(l).umod(f).imul(d);return p.iadd(y).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",o)}s.getr=a,e.exports=s},26561:(e,t,r)=>{"use strict";e.exports=r(75207)},79527:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(35866),o=r(86505),a=r(41736),s=r(11628),u=r(15410),c=r(75207);function l(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new l(e)}function h(e){return new f(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),a(l,o.Writable),l.prototype._write=function(e,t,r){this._hash.update(e),r()},l.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},l.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},f.prototype.verify=function(e,t,r){var i="string"==typeof t?n.from(t,r):t;this.end();var o=this._hash.digest();return u(i,o,e,this._signType,this._tag)},e.exports={Sign:d,Verify:h,createSign:d,createVerify:h}},11628:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(34424),o=r(99782),a=r(36597).ec,s=r(31734),u=r(27552),c=r(1308);function l(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function d(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length{"use strict";var n=r(48850).Buffer,i=r(31734),o=r(36597).ec,a=r(27552),s=r(1308);function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,r,c,l){var f=a(r);if("ec"===f.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,f)}if("dsa"===f.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,l=a.signature.decode(e,"der"),f=l.s,d=l.r;u(f,o),u(d,o);var h=i.mont(n),p=f.invm(o);return 0===s.toRed(h).redPow(new i(t).mul(p).mod(o)).fromRed().mul(c.toRed(h).redPow(d.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(d)}(e,t,f)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([l,t]);for(var d=f.modulus.byteLength(),h=[1],p=0;t.length+h.length+2{"use strict";var n=r(29033).Buffer,i=r(19142),o=r(3894),a=r(47563),s=r(54151),u=r(63534),c=r(29806);for(var l in c)t[l]=c[l];function f(e){if("number"!=typeof e||et.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,f.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?s.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||u.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},f.prototype.write=function(e,t,r,n,i,o,a){return this._write(!0,e,t,r,n,i,o,a)},f.prototype.writeSync=function(e,t,r,n,i,o,a){return this._write(!1,e,t,r,n,i,o,a)},f.prototype._write=function(e,r,a,s,u,c,l,f){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==t.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===r,"must provide flush value"),this.write_in_progress=!0,r!==t.Z_NO_FLUSH&&r!==t.Z_PARTIAL_FLUSH&&r!==t.Z_SYNC_FLUSH&&r!==t.Z_FULL_FLUSH&&r!==t.Z_FINISH&&r!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==a&&(a=n.alloc(0),u=0,s=0),this.strm.avail_in=u,this.strm.input=a,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=c,this.strm.next_out=l,this.flush=r,!e)return this._process(),this._checkError()?this._afterSync():void 0;var d=this;return i.nextTick((function(){d._process(),d._after()})),this},f.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},f.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=u.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=u.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=u.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=u.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},f.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},f.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},f.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},f.prototype.init=function(e,r,n,i,a){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(e>=8&&e<=15,"invalid windowBits"),o(r>=-1&&r<=9,"invalid compression level"),o(n>=1&&n<=9,"invalid memlevel"),o(i===t.Z_FILTERED||i===t.Z_HUFFMAN_ONLY||i===t.Z_RLE||i===t.Z_FIXED||i===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,n,i,a),this._setDictionary()},f.prototype.params=function(){throw new Error("deflateParams Not supported")},f.prototype.reset=function(){this._reset(),this._setDictionary()},f.prototype._init=function(e,r,n,i,o){switch(this.level=e,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=u.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=o,this.write_in_progress=!1,this.init_done=!0},f.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},f.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=s.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=u.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=f},77611:(e,t,r)=>{"use strict";var n=r(19142),i=r(29033).Buffer,o=r(57245).Transform,a=r(19626),s=r(45058),u=r(3894).ok,c=r(29033).kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+c.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var f=Object.keys(a),d=0;d=c?a=new RangeError(l):t=i.concat(n,o),n=[],e.close(),r(a,t)}e.on("error",(function(t){e.removeListener("end",s),e.removeListener("readable",a),r(t)})),e.on("end",s),e.end(t),a()}function v(e,t){if("string"==typeof t&&(t=i.from(t)),!i.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function w(e){if(!(this instanceof w))return new w(e);T.call(this,e,a.DEFLATE)}function A(e){if(!(this instanceof A))return new A(e);T.call(this,e,a.INFLATE)}function k(e){if(!(this instanceof k))return new k(e);T.call(this,e,a.GZIP)}function E(e){if(!(this instanceof E))return new E(e);T.call(this,e,a.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);T.call(this,e,a.DEFLATERAW)}function x(e){if(!(this instanceof x))return new x(e);T.call(this,e,a.INFLATERAW)}function _(e){if(!(this instanceof _))return new _(e);T.call(this,e,a.UNZIP)}function P(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function T(e,r){var n=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,o.call(this,e),e.flush&&!P(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!P(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSizet.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitst.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelt.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelt.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!i.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(e,r){I(s),s._hadError=!0;var n=new Error(e);n.errno=r,n.code=t.codes[r],s.emit("error",n)};var u=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(u=e.level);var c=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(c=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,u,e.memLevel||t.Z_DEFAULT_MEMLEVEL,c,e.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!n._handle},configurable:!0,enumerable:!0})}function I(e,t){t&&n.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function O(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=w,t.Inflate=A,t.Gzip=k,t.Gunzip=E,t.DeflateRaw=S,t.InflateRaw=x,t.Unzip=_,t.createDeflate=function(e){return new w(e)},t.createInflate=function(e){return new A(e)},t.createDeflateRaw=function(e){return new S(e)},t.createInflateRaw=function(e){return new x(e)},t.createGzip=function(e){return new k(e)},t.createGunzip=function(e){return new E(e)},t.createUnzip=function(e){return new _(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new w(t),e,r)},t.deflateSync=function(e,t){return v(new w(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new k(t),e,r)},t.gzipSync=function(e,t){return v(new k(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new S(t),e,r)},t.deflateRawSync=function(e,t){return v(new S(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new _(t),e,r)},t.unzipSync=function(e,t){return v(new _(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new A(t),e,r)},t.inflateSync=function(e,t){return v(new A(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new E(t),e,r)},t.gunzipSync=function(e,t){return v(new E(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new x(t),e,r)},t.inflateRawSync=function(e,t){return v(new x(t),e)},s.inherits(T,o),T.prototype.params=function(e,r,i){if(et.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var o=this;this.flush(a.Z_SYNC_FLUSH,(function(){u(o._handle,"zlib binding closed"),o._handle.params(e,r),o._hadError||(o._level=e,o._strategy=r,i&&i())}))}else n.nextTick(i)},T.prototype.reset=function(){return u(this._handle,"zlib binding closed"),this._handle.reset()},T.prototype._flush=function(e){this._transform(i.alloc(0),"",e)},T.prototype.flush=function(e,t){var r=this,o=this._writableState;("function"==typeof e||void 0===e&&!t)&&(t=e,e=a.Z_FULL_FLUSH),o.ended?t&&n.nextTick(t):o.ending?t&&this.once("end",t):o.needDrain?t&&this.once("drain",(function(){return r.flush(e,t)})):(this._flushFlag=e,this.write(i.alloc(0),"",t))},T.prototype.close=function(e){I(this,e),n.nextTick(O,this)},T.prototype._transform=function(e,t,r){var n,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||i.isBuffer(e)?this._handle?(s?n=this._finishFlushFlag:(n=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(e,n,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},T.prototype._processChunk=function(e,t,r){var n=e&&e.length,o=this._chunkSize-this._offset,a=0,s=this,f="function"==typeof r;if(!f){var d,h=[],p=0;this.on("error",(function(e){d=e})),u(this._handle,"zlib binding closed");do{var y=this._handle.writeSync(t,e,a,n,this._buffer,this._offset,o)}while(!this._hadError&&b(y[0],y[1]));if(this._hadError)throw d;if(p>=c)throw I(this),new RangeError(l);var m=i.concat(h,p);return I(this),m}u(this._handle,"zlib binding closed");var g=this._handle.write(t,e,a,n,this._buffer,this._offset,o);function b(c,l){if(this&&(this.buffer=null,this.callback=null),!s._hadError){var d=o-l;if(u(d>=0,"have should not go down"),d>0){var y=s._buffer.slice(s._offset,s._offset+d);s._offset+=d,f?s.push(y):(h.push(y),p+=y.length)}if((0===l||s._offset>=s._chunkSize)&&(o=s._chunkSize,s._offset=0,s._buffer=i.allocUnsafe(s._chunkSize)),0===l){if(a+=n-c,n=c,!f)return!0;var m=s._handle.write(t,e,a,n,s._buffer,s._offset,s._chunkSize);return m.callback=b,void(m.buffer=e)}if(!f)return!1;r()}}g.buffer=e,g.callback=b},s.inherits(w,T),s.inherits(A,T),s.inherits(k,T),s.inherits(E,T),s.inherits(S,T),s.inherits(x,T),s.inherits(_,T)},96316:(e,t,r)=>{"use strict";var n=r(29033).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),o=0;o{"use strict";var n=r(34919),i=r(83226),o=r(39484);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(n)return D(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var f=!0,d=0;di&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);for(var r="",n=0;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r),f=0;fi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return A(this,e,t,r);case"latin1":case"binary":return k(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;ii)&&(r=i);for(var o="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function M(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}},83675:e=>{"use strict";e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},80593:(e,t,r)=>{"use strict";var n=r(57701),i=r(24373),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},24373:(e,t,r)=>{"use strict";var n=r(3767),i=r(57701),o=r(77990),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(u,s),l=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return o(t,1+f(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(n,s,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d},47759:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(83630),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(29033).Buffer,i=r(26657),o=r(55262),a=r(71842),s=r(40779);(t=e.exports).addPrefix=function(e,t){var r;if(n.isBuffer(e))r=s.varintBufferEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");r=a[e]}return n.concat([r,t])},t.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},t.getCodec=function(e){var t=i.decode(e),r=o.get(t);if(void 0===r)throw new Error("Code ".concat(t," not found"));return r},t.getName=function(e){return o.get(e)},t.getNumber=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return s.varintBufferDecode(t)[0]},t.getCode=function(e){return i.decode(e)},t.getCodeVarint=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=function(e){return i.encode(e)};var u=r(47759);Object.assign(t,u),t.print=r(29268)},55262:(e,t,r)=>{"use strict";var n=r(83630),i=new Map;for(var o in n){var a=n[o];i.set(a,o)}e.exports=Object.freeze(i)},29268:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(83630),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(26657),i=r(29033).Buffer;function o(e){return parseInt(e.toString("hex"),16)}function a(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),i.from(t,"hex")}e.exports={numberToBuffer:a,bufferToNumber:o,varintBufferEncode:function(e){return i.from(n.encode(o(e)))},varintBufferDecode:function(e){return a(n.decode(e))},varintEncode:function(e){return i.from(n.encode(e))}}},71842:(e,t,r)=>{"use strict";var n=r(83630),i=r(40779).varintEncode,o={};for(var a in n){var s=n[a];o[a]=i(s)}e.exports=Object.freeze(o)},59976:(e,t,r)=>{"use strict";var n=r(77748),i=r(29033).Buffer,o={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!i.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){var t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=o},72753:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=r(29033).Buffer,s=r(77748),u=r(6086),c=r(97223),l=r(83630),f=r(59976),d=r(83162)(function(e){function t(e,r,n,o){if((0,i.default)(this,t),d.isCID(e)){var l=e;return this.version=l.version,this.codec=l.codec,this.multihash=a.from(l.multihash),void(this.multibaseName=l.multibaseName||(0===l.version?"base58btc":"base32"))}if("string"==typeof e){var f=u.isEncoded(e);if(f){var h=u.decode(e);this.version=parseInt(h.slice(0,1).toString("hex"),16),this.codec=c.getCodec(h.slice(1)),this.multihash=c.rmPrefix(h.slice(1)),this.multibaseName=f}else this.version=0,this.codec="dag-pb",this.multihash=s.fromB58String(e),this.multibaseName="base58btc";return t.validateCID(this),void Object.defineProperty(this,"string",{value:e})}if(a.isBuffer(e)){var p=e.slice(0,1),y=parseInt(p.toString("hex"),16);if(1===y){var m=e;this.version=y,this.codec=c.getCodec(m.slice(1)),this.multihash=c.rmPrefix(m.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";t.validateCID(this)}else this.version=e,this.codec=r,this.multihash=n,this.multibaseName=o||(0===e?"base58btc":"base32"),t.validateCID(this)}return(0,o.default)(t,[{key:"buffer",get:function(){var e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=a.concat([a.from("01","hex"),c.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}},{key:"prefix",get:function(){return a.concat([a.from("0".concat(this.version),"hex"),c.getCodeVarint(this.codec),s.prefix(this.multihash)])}},{key:"toV0",value:function(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");var e=s.decode(this.multihash),t=e.name,r=e.length;if("sha2-256"!==t)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==r)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new d(0,this.codec,this.multihash)}},{key:"toV1",value:function(){return new d(1,this.codec,this.multihash)}},{key:"toBaseEncodedString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&e===this.multibaseName)return this.string;var t=null;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=s.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=u.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}},{key:e,value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}}],[{key:"validateCID",value:function(e){var t=f.checkCIDComponents(e);if(t)throw new Error(t)}}]),t}(Symbol.for("nodejs.util.inspect.custom")),{className:"CID",symbolName:"@ipld/js-cid/CID"});d.codecs=l,e.exports=d},93013:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(57245).Transform,o=r(23462).s;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(41736)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},83162:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(14727)),o=n(r(90775)),a=n(r(69721)),s=n(r(58985)),u=n(r(58975)),c=n(r(15163)),l=n(r(34650)),f=n(r(21949));e.exports=function(e,t){var r=t.className,n=t.symbolName,i=Symbol.for(n),d=(0,o.default)({},r,function(e,t){(0,c.default)(h,e);var n,o,d=(n=h,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,f.default)(n);if(o){var r=(0,f.default)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,l.default)(this,e)});function h(){var e;(0,a.default)(this,h);for(var t=arguments.length,r=new Array(t),n=0;n{"use strict";var n=r(72753);t.cidV0ToV1Base32=function(e){var t=new n(e);return 0===t.version&&(t=t.toV1()),t.toString("base32")}},94308:(e,t,r)=>{"use strict";var n=r(69206),i=r(39512),o=i.hexStringToBuffer,a=i.profiles,s=r(36834).cidV0ToV1Base32;e.exports={helpers:{cidV0ToV1Base32:s},decode:function(e){var t=o(e),r=n.getCodec(t),i=n.rmPrefix(t),s=a[r];return s||(s=a.default),s.decode(i)},fromIpfs:function(e){return this.encode("ipfs-ns",e)},fromSwarm:function(e){return this.encode("swarm-ns",e)},encode:function(e,t){var r=a[e];r||(r=a.default);var i=r.encode(t);return n.addPrefix(e,i).toString("hex")},getCodec:function(e){var t=o(e);return n.getCodec(t)}}},39512:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(72753),o=r(77748),a=function(e){var t,r=e.slice(0,2),n=e.slice(2);return t="0x"===r?n:e,o.fromHexString(t)},s={swarm:function(e){var t=o.encode(a(e),"keccak-256");return new i(1,"swarm-manifest",t).buffer},ipfs:function(e){var t=o.fromB58String(e);return new i(1,"dag-pb",t).buffer},utf8:function(e){return n.from(e,"utf8")}},u={hexMultiHash:function(e){var t=new i(e);return o.decode(t.multihash).digest.toString("hex")},b58MultiHash:function(e){var t=new i(e);return o.toB58String(t.multihash)},utf8:function(e){return e.toString("utf8")}},c={"swarm-ns":{encode:s.swarm,decode:u.hexMultiHash},"ipfs-ns":{encode:s.ipfs,decode:u.b58MultiHash},"ipns-ns":{encode:s.ipfs,decode:u.b58MultiHash},default:{encode:s.utf8,decode:u.utf8}};t.hexStringToBuffer=a,t.profiles=c},64628:(e,t,r)=>{"use strict";var n,i,o=r(28847)(r(3355));i=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=i[t]=r>>>8^e[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(t),n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],c=r[6],l=r[7],f=r[8],d=r[9],h=r[10],p=r[11],y=r[12],m=r[13],g=r[14];e.table=t,e.bstr=function(e,r){for(var n=~r,i=0,o=e.length;i>>8^t[255&(n^e.charCodeAt(i++))];return~n},e.buf=function(e,r){for(var b=~r,v=e.length-15,w=0;w>8&255]^y[e[w++]^b>>16&255]^p[e[w++]^b>>>24]^h[e[w++]]^d[e[w++]]^f[e[w++]]^l[e[w++]]^c[e[w++]]^u[e[w++]]^s[e[w++]]^a[e[w++]]^o[e[w++]]^i[e[w++]]^n[e[w++]]^t[e[w++]];for(v+=15;w>>8^t[255&(b^e[w++])];return~b},e.str=function(e,r){for(var n=~r,i=0,o=e.length,a=0,s=0;i>>8^t[255&(n^a)]:a<2048?n=(n=n>>>8^t[255&(n^(192|a>>6&31))])>>>8^t[255&(n^(128|63&a))]:a>=55296&&a<57344?(a=64+(1023&a),s=1023&e.charCodeAt(i++),n=(n=(n=(n=n>>>8^t[255&(n^(240|a>>8&7))])>>>8^t[255&(n^(128|a>>2&63))])>>>8^t[255&(n^(128|s>>6&15|(3&a)<<4))])>>>8^t[255&(n^(128|63&s))]):n=(n=(n=n>>>8^t[255&(n^(224|a>>12&15))])>>>8^t[255&(n^(128|a>>6&63))])>>>8^t[255&(n^(128|63&a))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===(0,o.default)(t)?i(t):(n=function(){var e={};return i(e),e}.call(t,r,t,e),void 0===n||(e.exports=n)):i({})},75102:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(36597),o=r(31734);e.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length{"use strict";var n=r(41736),i=r(50807),o=r(26707),a=r(51708),s=r(93013);function u(e){s.call(this,"digest"),this._hash=e}n(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(a(e))}},55349:(e,t,r)=>{"use strict";var n=r(50807);e.exports=function(e){return(new n).update(e).digest()}},34424:(e,t,r)=>{"use strict";var n=r(41736),i=r(19956),o=r(93013),a=r(48850).Buffer,s=r(55349),u=r(26707),c=r(51708),l=a.alloc(128);function f(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new u:c(e)).update(t).digest():t.length{"use strict";var n=r(41736),i=r(48850).Buffer,o=r(93013),a=i.alloc(128),s=64;function u(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length{"use strict";var n=r(28847)(r(3355)),i="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,i="URLSearchParams"in r,o="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in r,u="ArrayBuffer"in r;if(u)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function y(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=m(t);return t.readAsArrayBuffer(e),r}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=y(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,r,n=y(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=m(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function k(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function E(e,t){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})},v.call(A.prototype),v.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function x(e,i){return new Promise((function(o,s){var c=new A(e,i);if(c.signal&&c.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function f(){l.abort()}l.onload=function(){var e,t,r={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in l?l.responseURL:r.headers.get("X-Request-URL");var n="response"in l?l.response:l.responseText;setTimeout((function(){o(new E(n,r))}),0)},l.onerror=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},l.ontimeout=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},l.onabort=function(){setTimeout((function(){s(new t.DOMException("Aborted","AbortError"))}),0)},l.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?l.withCredentials=!0:"omit"===c.credentials&&(l.withCredentials=!1),"responseType"in l&&(a?l.responseType="blob":u&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(l.responseType="arraybuffer")),!i||"object"!==(0,n.default)(i.headers)||i.headers instanceof p?c.headers.forEach((function(e,t){l.setRequestHeader(t,e)})):Object.getOwnPropertyNames(i.headers).forEach((function(e){l.setRequestHeader(e,d(i.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",f),l.onreadystatechange=function(){4===l.readyState&&c.signal.removeEventListener("abort",f)}),l.send(void 0===c._bodyInit?null:c._bodyInit)}))}x.polyfill=!0,r.fetch||(r.fetch=x,r.Headers=p,r.Request=A,r.Response=E),t.Headers=p,t.Request=A,t.Response=E,t.fetch=x}({})}(o),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var a=i.fetch?i:o;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t},24293:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(75010),t.createHash=t.Hash=r(35866),t.createHmac=t.Hmac=r(34424);var n=r(26561),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(54192);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(56805);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var u=r(28333);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=r(79527);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=r(75102);var l=r(86991);t.publicEncrypt=l.publicEncrypt,t.privateEncrypt=l.privateEncrypt,t.publicDecrypt=l.publicDecrypt,t.privateDecrypt=l.privateDecrypt;var f=r(36509);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},80034:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i="%[a-f0-9]{2}",o=new RegExp("("+i+")|([^%]+?)","gi"),a=new RegExp("("+i+")+","gi");function s(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],s(r),s(n))}function u(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(o)||[],r=1;r{"use strict";var n=r(28847)(r(3355)),i=r(1020)(),o=r(57701),a=i&&o("%Object.defineProperty%",!0);if(a)try{a({},"a",{value:1})}catch(e){a=!1}var s=o("%SyntaxError%"),u=o("%TypeError%"),c=r(53820);e.exports=function(e,t,r){if(!e||"object"!==(0,n.default)(e)&&"function"!=typeof e)throw new u("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!==(0,n.default)(t))throw new u("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new u("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new u("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new u("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new u("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],d=!!c&&c(e,t);if(a)a(e,t,{configurable:null===l&&d?d.configurable:!l,enumerable:null===i&&d?d.enumerable:!i,value:r,writable:null===o&&d?d.writable:!o});else{if(!f&&(i||o||l))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},75626:(e,t,r)=>{"use strict";t.utils=r(43349),t.Cipher=r(19591),t.DES=r(63049),t.CBC=r(4375),t.EDE=r(9413)},4375:(e,t,r)=>{"use strict";var n=r(94504),i=r(41736),o={};function a(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t{"use strict";var n=r(94504);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t{"use strict";var n=r(94504),i=r(41736),o=r(43349),a=r(19591);function s(){this.tmp=new Array(2),this.keys=null}function u(e){a.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(u,a),e.exports=u,u.create=function(e){return new u(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var a=0;a>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},u.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=d}o.rip(s,a,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],l=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],l^=e.tmp[1];var f=o.substitute(c,l),d=a;a=(s^o.permute(f))>>>0,s=d}o.rip(a,s,n,i)}},9413:(e,t,r)=>{"use strict";var n=r(94504),i=r(41736),o=r(19591),a=r(63049);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function u(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},43349:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u>>r[u]&1;for(u=s;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)];return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length{"use strict";var n=r(29033).Buffer,i=r(78557),o=r(29799),a=r(51592),s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new n(o[e].prime,"hex"),r=new n(o[e].gen,"hex");return new a(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,o,u){return n.isBuffer(r)||void 0===s[r]?e(t,"binary",r,o):(r=r||"binary",u=u||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,u)),"number"==typeof t?new a(i(t,o),o,!0):(n.isBuffer(t)||(t=new n(t,r)),new a(t,o,!0)))}},51592:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(31734),o=new(r(31962)),a=new i(24),s=new i(11),u=new i(10),c=new i(3),l=new i(7),f=r(78557),d=r(75010);function h(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new i(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new i(e),this}e.exports=m;var y={};function m(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=h,this.setPrivateKey=p):this._primeCode=8}function g(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in y)return y[n];var i,d=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!o.test(e))return d+=1,d+="02"===r||"05"===r?8:4,y[n]=d,d;switch(o.test(e.shrn(1))||(d+=2),r){case"02":e.mod(a).cmp(s)&&(d+=8);break;case"05":(i=e.mod(u)).cmp(c)&&i.cmp(l)&&(d+=8);break;default:d+=4}return y[n]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new i(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(t.toArray()),o=this.getPrime();if(r.length{"use strict";var n=r(75010);e.exports=g,g.simpleSieve=y,g.fermatTest=m;var i=r(31734),o=new i(24),a=new(r(31962)),s=new i(1),u=new i(2),c=new i(5),l=(new i(16),new i(8),new i(10)),f=new i(3),d=(new i(7),new i(11)),h=new i(4),p=(new i(12),null);function y(e){for(var t=function(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;ie;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(l).cmp(f);)r.iadd(h)}else for(;r.mod(o).cmp(d);)r.iadd(h);if(y(p=r.shrn(1))&&y(r)&&m(p)&&m(r)&&a.test(p)&&a.test(r))return r}}},36597:(e,t,r)=>{"use strict";var n=t;n.version=r(18597).i8,n.utils=r(7528),n.rand=r(82202),n.curve=r(76063),n.curves=r(40506),n.ec=r(28320),n.eddsa=r(68027)},11249:(e,t,r)=>{"use strict";var n=r(31734),i=r(7528),o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;l--)u=(u<<1)+n[l];c.push(u)}for(var f=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;c--){for(var l=0;c>=0&&0===a[c];c--)l++;if(c>=0&&l++,u=u.dblp(l),c<0)break;var f=a[c];s(0!==f),u="affine"===e.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var s,u,c,l=this._wnafT1,f=this._wnafT2,d=this._wnafT3,h=0;for(s=0;s=1;s-=2){var y=s-1,m=s;if(1===l[y]&&1===l[m]){var g=[t[y],null,null,t[m]];0===t[y].y.cmp(t[m].y)?(g[1]=t[y].add(t[m]),g[2]=t[y].toJ().mixedAdd(t[m].neg())):0===t[y].y.cmp(t[m].y.redNeg())?(g[1]=t[y].toJ().mixedAdd(t[m]),g[2]=t[y].add(t[m].neg())):(g[1]=t[y].toJ().mixedAdd(t[m]),g[2]=t[y].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=a(r[y],r[m]);for(h=Math.max(v[0].length,h),d[y]=new Array(h),d[m]=new Array(h),u=0;u=0;s--){for(var S=0;s>=0;){var x=!0;for(u=0;u=0&&S++,k=k.dblp(S),s<0)break;for(u=0;u0?c=f[u][_-1>>1]:_<0&&(c=f[u][-_-1>>1].neg()),k="affine"===c.type?k.mixedAdd(c):k.add(c))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i{"use strict";var n=r(7528),i=r(31734),o=r(41736),a=r(11249),s=n.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(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 i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,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()))))}o(u,a),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(t&&!u||!t&&u)&&(s=s.redNeg()),this.point(e,s)},u.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(c,a.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),l=i.redMul(s),f=a.redMul(o);return this.curve.point(u,c,f,l)},c.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(u)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),l=s.redMul(u),f=o.redMul(u),d=a.redMul(s);return this.curve.point(c,l,d,f)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),f=n.redMul(u).redMul(l);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(f,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},76063:(e,t,r)=>{"use strict";var n=t;n.base=r(11249),n.short=r(53148),n.mont=r(51105),n.edwards=r(81123)},51105:(e,t,r)=>{"use strict";var n=r(31734),i=r(41736),o=r(11249),a=r(7528);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},53148:(e,t,r)=>{"use strict";var n=r(7528),i=r(31734),o=r(41736),a=r(11249),s=n.assert;function u(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,u,c,l,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new i(1),y=new i(0),m=new i(0),g=new i(1),b=0;0!==d.cmpn(0);){var v=h.div(d);c=h.sub(v.mul(d)),l=m.sub(v.mul(p));var w=g.sub(v.mul(y));if(!n&&c.cmp(f)<0)t=u.neg(),r=p,n=c.neg(),o=l;else if(n&&2==++b)break;u=c,h=d,d=c,m=p,p=l,g=y,y=w}a=c.neg(),s=l;var A=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(A)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),f=n.redMul(c),d=u.redSqr().redIAdd(l).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),d=s.redMul(l.redISub(f)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},40506:(e,t,r)=>{"use strict";var n,i=t,o=r(37198),a=r(76063),s=r(7528).assert;function u(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,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:o.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:o.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:o.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:o.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:o.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:o.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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(46401)}catch(e){n=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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},28320:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(29410),a=r(7528),s=r(40506),u=r(82202),c=a.assert,l=r(37791),f=r(30488);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(c(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new l(this,e)},d.prototype.keyFromPrivate=function(e,t){return l.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return l.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||u(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var a=new i(t.generate(r));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,a){"object"===(0,n.default)(r)&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),u=t.getPrivate().toArray("be",s),c=e.toArray("be",s),l=new o({hash:this.hash,entropy:u,nonce:c,pers:a.pers,persEnc:a.persEnc||"utf8"}),d=this.n.sub(new i(1)),h=0;;h++){var p=a.k?a.k(h):new i(l.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(d)>=0)){var y=this.g.mul(p);if(!y.isInfinity()){var m=y.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var b=p.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(y.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new f({r:g,s:b,recoveryParam:v})}}}}}},d.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var o=(t=new f(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,n){c((3&r)===r,"The recovery param is more than two bits"),t=new f(t,n);var o=this.n,a=new i(e),s=t.r,u=t.s,l=1&r,d=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),y=u.mul(h).umod(o);return this.g.mulAdd(p,s,y)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},37791:(e,t,r)=>{"use strict";var n=r(31734),i=r(7528).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},30488:(e,t,r)=>{"use strict";var n=r(31734),i=r(7528),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var l=u(e,r);if(!1===l)return!1;if(e.length!==l+r.place)return!1;var f=e.slice(r.place,l+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(c),this.s=new n(f),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];l(n,t.length),(n=n.concat(t)).push(2),l(n,r.length);var o=n.concat(r),a=[48];return l(a,o.length),a=a.concat(o),i.encode(a,e)}},68027:(e,t,r)=>{"use strict";var n=r(37198),i=r(40506),o=r(7528),a=o.assert,s=o.parseBytes,u=r(27303),c=r(36646);function l(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=l,l.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},l.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var n=r(7528),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},36646:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(7528),a=o.assert,s=o.cachedProperty,u=o.parseBytes;function c(e,t){this.eddsa=e,"object"!==(0,n.default)(t)&&(t=u(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(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()},e.exports=c},46401:e=>{"use strict";e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},7528:(e,t,r)=>{"use strict";var n=t,i=r(31734),o=r(94504),a=r(96580);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=1&u?3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u:0,r[0].push(a),s=1&c?3!=(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c:0,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},26464:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=function(){if("object"===("undefined"==typeof self?"undefined":(0,n.default)(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":(0,n.default)(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return i()}try{return __global__||i()}finally{delete Object.prototype.__global__}}()},54258:(e,t,r)=>{"use strict";var n,i,o,a=r(19142),s=r(28847)(r(3355));o=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,i=void 0,o=void 0,u=function(e,t){y[n]=e,y[n+1]=t,2===(n+=2)&&(o?o(m):A())},c="undefined"!=typeof window?window:void 0,l=c||{},f=l.MutationObserver||l.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==a&&"[object process]"==={}.toString.call(a),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(m,1)}}var y=new Array(1e3);function m(){for(var e=0;e{"use strict";var n=r(29033).Buffer,i=r(24858).keccak_256,o=r(3956);function a(e){return e?o.toUnicode(e,{useStd3ASCII:!0,transitional:!1}):e}t.hash=function(e){for(var t="",r=0;r<32;r++)t+="00";if(name=a(e),name){var o=name.split(".");for(r=o.length-1;r>=0;r--){var s=i(o[r]);t=i(new n(t+s,"hex"))}}return"0x"+t},t.normalize=a},53058:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(74519)),o=r(58320),a=r(88645),s=r(36597),u=(r(46740),new s.ec("secp256k1")),c=r(22922),l=c.keccak256,f=c.keccak256s,d=function(e){for(var t=f(e.slice(2)),r="0x",n=0;n<40;n++)r+=parseInt(t[n+2],16)>7?e[n+2].toUpperCase():e[n+2];return r},h=function(e){var t=new n(e.slice(2),"hex"),r="0x"+u.keyFromPrivate(t).getPublic(!1,"hex").slice(2),i=l(r);return{address:d("0x"+i.slice(-40)),privateKey:e}},p=function(e){var t=(0,i.default)(e,3),r=t[0],n=t[1],a=t[2];return o.flatten([n,a,r])},y=function(e){return[o.slice(64,o.length(e),e),o.slice(0,32,e),o.slice(32,64,e)]},m=function(e){return function(t,r){var i=u.keyFromPrivate(new n(r.slice(2),"hex")).sign(new n(t.slice(2),"hex"),{canonical:!0});return p([a.fromString(o.fromNumber(e+i.recoveryParam)),o.pad(32,o.fromNat("0x"+i.r.toString(16))),o.pad(32,o.fromNat("0x"+i.s.toString(16)))])}},g=m(27);e.exports={create:function(e){var t=l(o.concat(o.random(32),e||o.random(32))),r=o.concat(o.concat(o.random(32),t),o.random(32)),n=l(r);return h(n)},toChecksum:d,fromPrivate:h,sign:g,makeSigner:m,recover:function(e,t){var r=y(t),i={v:o.toNumber(r[0]),r:r[1].slice(2),s:r[2].slice(2)},a="0x"+u.recoverPubKey(new n(e.slice(2),"hex"),i,i.v<2?i.v:1-i.v%2).encode("hex",!1).slice(2),s=l(a);return d("0x"+s.slice(-40))},encodeSignature:p,decodeSignature:y}},51376:e=>{"use strict";var t=function(e,t){for(var r=[],n=0;n{"use strict";r(51376);var n=function(e,t){return parseInt(e.slice(2*t+2,2*t+4),16)},i=function(e){return(e.length-2)/2},o=function(e){for(var t=[],r=2,n=e.length;r>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},22922:e=>{"use strict";var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],i=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],o=function(e){var t,r,n,o,a,s,u,c,l,f,d,h,p,y,m,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(c<<1|l>>>31),r=a^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(f<<1|d>>>31),r=u^(d<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(h<<1|p>>>31),r=l^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(o<<1|a>>>31),r=d^(a<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,y=e[0],m=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=y^~g&v,e[1]=m^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&y,e[7]=k^~S&m,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~y&g,e[9]=S^~m&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=i[n],e[1]^=i[n+1]},a=function(e){return function(i){var a;if("0x"===i.slice(0,2)){a=[];for(var s=2,u=i.length;s>2]|=i[h]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(u[m>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=c){for(e.start=m-c,e.block=u[l],m=0;m>2]|=r[3&m],e.lastByteIndex===c)for(u[0]=u[l],m=1;m>4&15]+t[15&p]+t[p>>12&15]+t[p>>8&15]+t[p>>20&15]+t[p>>16&15]+t[p>>28&15]+t[p>>24&15];g%l==0&&(o(d),m=0)}return"0x"+y}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),a)}};e.exports={keccak256:a(256),keccak512:a(512),keccak256s:a(256),keccak512s:a(512)}},88645:(e,t,r)=>{"use strict";var n=r(31734),i=r(58320),o=function(e){return new n(e.slice(2),16)},a=function(e){var t="0x"+("0x"===e.slice(0,2)?new n(e.slice(2),16):new n(e,10)).toString("hex");return"0x0"===t?"0x":t},s=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new n(e).toString("hex")},u=function(e){return o(e).toNumber()},c=function(e){return function(t,r){return"0x"+o(t)[e](o(r)).toString("hex")}},l=c("add"),f=c("mul"),d=c("div"),h=c("sub");e.exports={toString:function(e){return o(e).toString(10)},fromString:a,toNumber:u,fromNumber:s,toEther:function(e){return u(d(e,a("10000000000")))/1e8},fromEther:function(e){return f(s(Math.floor(1e8*e)),a("10000000000"))},toUint256:function(e){return i.pad(32,e)},add:l,mul:f,div:d,sub:h}},46740:e=>{"use strict";e.exports={encode:function(e){var t=function(e){return(t=e.toString(16)).length%2==0?t:"0"+t;var t},r=function(e,r){return e<56?t(r+e):t(r+t(e).length/2+55)+t(e)};return"0x"+function e(t){if("string"==typeof t){var n=t.slice(2);return(2!=n.length||n>="80"?r(n.length/2,128):"")+n}var i=t.map(e).join("");return r(i.length/2,192)+i}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return r<"80"?(t+=2,"0x"+r):r<"c0"?i():o()},n=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return r<56?r:parseInt(e.slice(t,t+=2*(r-55)),16)},i=function(){var r=n();return"0x"+e.slice(t,t+=2*r)},o=function(){for(var e=2*n()+t,i=[];t{"use strict";var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0});var i=r(78179);function o(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{512}$/i.test(e)||!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e))}function a(e,t){"object"===(0,n.default)(t)&&t.constructor===Uint8Array&&(t=i.bytesToHex(t));for(var r=i.keccak256(t).replace("0x",""),o=0;o<12;o+=4){var a=(parseInt(r.substr(o,2),16)<<8)+parseInt(r.substr(o+2,2),16)&2047,u=1<=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom")}function u(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{64}$/i.test(e)||!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))}function c(e){return!("string"!=typeof e||!e.match(/^(0x)?[0-9a-fA-F]{40}$/)&&!e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}t.isBloom=o,t.isInBloom=a,t.isUserEthereumAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!c(t))throw new Error('Invalid ethereum address given: "'.concat(t,'"'));return a(e,i.padLeft(t,64))},t.isContractAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!c(t))throw new Error('Invalid contract address given: "'.concat(t,'"'));return a(e,t)},t.isTopicInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error("Invalid topic");return a(e,t)},t.isTopic=u,t.isAddress=c},78179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34477);function i(e){if(null==e)throw new Error("cannot convert null value to array");if("string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if("0x"!==t[1])throw new Error("hex string must have 0x prefix");(e=e.substring(2)).length%2&&(e="0"+e);for(var r=[],n=0;n=256||parseInt(String(r))!=r)return!1}return!0}(e))return o(new Uint8Array(e));throw new Error("invalid arrayify value")}function o(e){var t=arguments;return void 0!==e.slice||(e.slice=function(){var r=Array.prototype.slice.call(t);return o(new Uint8Array(Array.prototype.slice.apply(e,r)))}),e}t.keccak256=function(e){return"0x"+n.keccak_256(i(e))},t.padLeft=function(e,t){var r=/^0x/i.test(e)||"number"==typeof e,n=t-(e=e.toString().replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(n).join("0")+e},t.bytesToHex=function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x".concat(t.join("").replace(/^0+/,""))},t.toByteArray=i},34477:(e,t,r)=>{"use strict";e=r.nmd(e);var n,i=r(19142),o=r(28847)(r(3355));!function(){var a="input is invalid type",s="object"===("undefined"==typeof window?"undefined":(0,o.default)(window)),u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"===("undefined"==typeof self?"undefined":(0,o.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===i?"undefined":(0,o.default)(i))&&i.versions&&i.versions.node?u=r.g:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,o.default)(e)&&e.exports,f=r.amdO,d=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),p=[4,1024,262144,67108864],y=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],b=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!d||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,o.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var A=function(e,t,r){return function(n){return new U(e,t,e).update(n)[r]()}},k=function(e,t,r){return function(n,i){return new U(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,o){return T["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return T["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){U.call(this,e,t,r)}U.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var n,i,s=this.blocks,u=this.byteCount,c=e.length,l=this.blockCount,f=0,h=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=u){for(this.start=n-u,this.block=s[l],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},U.prototype.encodeString=function(e){var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}var n=0,i=e.length;if(t)n=i;else for(var s=0;s=57344?n+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},U.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];a%t==0&&(j(r),o=0)}return i&&(e=r[o],s+=h[e>>4&15]+h[15&e],i>1&&(s+=h[e>>12&15]+h[e>>8&15]),i>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},U.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&j(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},L.prototype=new U,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),U.prototype.finalize.call(this)};var j=function(e){var t,r,n,i,o,a,s,u,c,l,f,d,h,p,y,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(d<<1|h>>>31),r=c^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],y=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=p^~g&v,e[1]=y^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&p,e[7]=k^~S&y,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~p&g,e[9]=S^~y&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(l)e.exports=T;else{for(O=0;O{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;var n,i=r(64376),o=r(40890);t.keccak224=(0,o.wrapHash)(i.keccak_224),t.keccak256=((n=(0,o.wrapHash)(i.keccak_256)).create=i.keccak_256.create,n),t.keccak384=(0,o.wrapHash)(i.keccak_384),t.keccak512=(0,o.wrapHash)(i.keccak_512)},86992:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(4158);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},40890:(e,t,r)=>{"use strict";e=r.nmd(e);var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;var i,o=(i=r(96822))&&i.__esModule?i:{default:i},a=r(72434),s=o.default.bool;t.assertBool=s;var u=o.default.bytes;t.assertBytes=u;var c,l,f=r(72434);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return f.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return f.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return f.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return f.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return f.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got ".concat((0,n.default)(e)));return(new TextDecoder).decode(e)},t.hexToBytes=function(e){var t=e.startsWith("0x")?e.substring(2):e;return(0,a.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(var r=0;r{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var i,o=(i=r(3894))&&i.__esModule?i:{default:i},a=r(49100),s=r(31439),u=r(23271),c=r(60986),l=r(13464),f=r(39808),d=r(5725),h=r(35513),p=function(){function e(e,t,r,n){void 0===e&&(e=new a.BN(0)),void 0===t&&(t=new a.BN(0)),void 0===r&&(r=c.KECCAK256_RLP),void 0===n&&(n=c.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,i=t.stateRoot,o=t.codeHash;return new e(r?new a.BN((0,l.toBuffer)(r)):void 0,n?new a.BN((0,l.toBuffer)(n)):void 0,i?(0,l.toBuffer)(i):void 0,o?(0,l.toBuffer)(o):void 0)},e.fromRlpSerializedAccount=function(e){var t=a.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(t,4),n=r[0],i=r[1],o=r[2],s=r[3];return new e(new a.BN(n),new a.BN(i),o,s)},e.prototype._validate=function(){if(this.nonce.lt(new a.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new a.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,h.bnToUnpaddedBuffer)(this.nonce),(0,h.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return a.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(c.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(c.KECCAK256_NULL)},e}();t.Account=p,t.isValidAddress=function(e){try{(0,d.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,d.assertIsHexString)(e);var r=(0,u.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,h.toType)(t,h.TypeOutput.BN).toString()+"0x");for(var i=(0,f.keccakFromString)(n+r).toString("hex"),o="0x",a=0;a=8?o+=r[a].toUpperCase():o+=r[a];return o},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){(0,d.assertIsBuffer)(e),(0,d.assertIsBuffer)(t);var r=new a.BN(t);return r.isZero()?(0,f.rlphash)([e,null]).slice(-20):(0,f.rlphash)([e,n.from(r.toArray())]).slice(-20)},t.generateAddress2=function(e,t,r){return(0,d.assertIsBuffer)(e),(0,d.assertIsBuffer)(t),(0,d.assertIsBuffer)(r),(0,o.default)(20===e.length),(0,o.default)(32===t.length),(0,f.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,f.keccak256)(r)])).slice(-20)},t.isValidPrivate=function(e){return(0,s.privateKeyVerify)(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),(0,d.assertIsBuffer)(e),64===e.length?(0,s.publicKeyVerify)(n.concat([n.from([4]),e])):!!t&&(0,s.publicKeyVerify)(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),(0,d.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),(0,o.default)(64===e.length),(0,f.keccak)(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,d.assertIsBuffer)(e),n.from((0,s.publicKeyCreate)(e,!1)).slice(1)},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,d.assertIsBuffer)(e),64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),e},t.zeroAddress=function(){var e=(0,l.zeros)(20);return(0,l.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,d.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}},41984:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var i,o=(i=r(3894))&&i.__esModule?i:{default:i},a=r(49100),s=r(13464),u=r(21968),c=function(){function e(e){(0,o.default)(20===e.length,"Invalid address length"),this.buf=e}return e.zero=function(){return new e((0,s.zeros)(20))},e.fromString=function(t){return(0,o.default)((0,u.isValidAddress)(t),"Invalid address"),new e((0,s.toBuffer)(t))},e.fromPublicKey=function(t){return(0,o.default)(n.isBuffer(t),"Public key should be Buffer"),new e((0,u.pubToAddress)(t))},e.fromPrivateKey=function(t){return(0,o.default)(n.isBuffer(t),"Private key should be Buffer"),new e((0,u.privateToAddress)(t))},e.generate=function(t,r){return(0,o.default)(a.BN.isBN(r)),new e((0,u.generateAddress)(t.buf,r.toArrayLike(n)))},e.generate2=function(t,r,i){return(0,o.default)(n.isBuffer(r)),(0,o.default)(n.isBuffer(i)),new e((0,u.generateAddress2)(t.buf,r,i))},e.prototype.equals=function(e){return this.buf.equals(e.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var e=new a.BN(this.buf),t=new a.BN(0),r=new a.BN("ffff","hex");return e.gte(t)&&e.lte(r)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return n.from(this.buf)},e}();t.Address=c},13464:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var o=r(49100),a=r(23271),s=r(5725);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))},t.intToBuffer=function(e){var r=(0,t.intToHex)(e);return n.from((0,a.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};var u=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,s.assertIsBuffer)(e),c(e)},t.unpadArray=function(e){return(0,s.assertIsArray)(e),c(e)},t.unpadHexString=function(e){return(0,s.assertIsHexString)(e),e=(0,a.stripHexPrefix)(e),c(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,a.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,a.padToEven)((0,a.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if(o.BN.isBN(e)){if(e.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(e));return e.toArrayLike(n)}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToInt=function(e){return new o.BN((0,t.toBuffer)(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.fromSigned=function(e){return new o.BN(e).fromTwos(256)},t.toUnsigned=function(e){return n.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||(0,a.isHexPrefixed)(e)?e:"0x"+e},t.toUtf8=function(e){if((e=(0,a.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],i=0;i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=n.next();!o.done;o=n.next()){var a=i(o.value,2),s=a[0],u=a[1];if(void 0!==u&&u.length>0&&0===u[0])throw new Error("".concat(s," cannot have leading zeroes, received: ").concat(u.toString("hex")))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!=t?t:[])}},60986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(29033),i=r(49100);t.MAX_UINT64=new i.BN("ffffffffffffffff",16),t.MAX_INTEGER=new i.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new i.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},49100:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var o,a=(o=r(31734))&&o.__esModule?o:{default:o};t.BN=a.default;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t}(r(6905));t.rlp=s},39808:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var i=r(8235),o=r(35866),a=r(49100),s=r(13464),u=r(5725);t.keccak=function(e,t){switch(void 0===t&&(t=256),(0,u.assertIsBuffer)(e),t){case 224:return(0,i.keccak224)(e);case 256:return(0,i.keccak256)(e);case 384:return(0,i.keccak384)(e);case 512:return(0,i.keccak512)(e);default:throw new Error("Invald algorithm: keccak".concat(t))}},t.keccak256=function(e){return(0,t.keccak)(e)},t.keccakFromString=function(e,r){void 0===r&&(r=256),(0,u.assertIsString)(e);var i=n.from(e,"utf8");return(0,t.keccak)(i,r)},t.keccakFromHexString=function(e,r){return void 0===r&&(r=256),(0,u.assertIsHexString)(e),(0,t.keccak)((0,s.toBuffer)(e),r)},t.keccakFromArray=function(e,r){return void 0===r&&(r=256),(0,u.assertIsArray)(e),(0,t.keccak)((0,s.toBuffer)(e),r)};var c=function(e){return e=(0,s.toBuffer)(e),o("sha256").update(e).digest()};t.sha256=function(e){return(0,u.assertIsBuffer)(e),c(e)},t.sha256FromString=function(e){return(0,u.assertIsString)(e),c(e)},t.sha256FromArray=function(e){return(0,u.assertIsArray)(e),c(e)};var l=function(e,t){e=(0,s.toBuffer)(e);var r=o("rmd160").update(e).digest();return!0===t?(0,s.setLengthLeft)(r,32):r};t.ripemd160=function(e,t){return(0,u.assertIsBuffer)(e),l(e,t)},t.ripemd160FromString=function(e,t){return(0,u.assertIsString)(e),l(e,t)},t.ripemd160FromArray=function(e,t){return(0,u.assertIsArray)(e),l(e,t)},t.rlphash=function(e){return(0,t.keccak)(a.rlp.encode(e))}},5725:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var i=r(23271);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}},t.assertIsBuffer=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}},t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}},t.assertIsString=function(e){if("string"!=typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},33062:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,i(r(60986),t),i(r(21968),t),i(r(41984),t),i(r(39808),t),i(r(86081),t),i(r(13464),t),i(r(41677),t),i(r(49100),t),i(r(35513),t);var o=r(23271);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},23271:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(3355));function o(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,i.default)(e)));return"0"===e[0]&&"x"===e[1]}function a(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat((0,i.default)(t)));return t.length%2&&(t="0".concat(t)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=o,t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,i.default)(e)));return o(e)?e.slice(2):e},t.padToEven=a,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat((0,i.default)(e)));return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,i.default)(e),"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,i.default)(t),"'"));return t[r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r{"use strict";var n=r(29033).Buffer,i=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var o,a=(o=r(3894))&&o.__esModule?o:{default:o},s=r(23271),u=r(49100),c=r(13464);t.defineProperties=function(e,t,r){if(e.raw=[],e._fields=[],e.toJSON=function(t){if(void 0===t&&(t=!1),t){var r={};return e._fields.forEach((function(t){r[t]="0x".concat(e[t].toString("hex"))})),r}return(0,c.baToJSON)(e.raw)},e.serialize=function(){return u.rlp.encode(e.raw)},t.forEach((function(t,r){function i(){return e.raw[r]}function o(i){"00"!==(i=(0,c.toBuffer)(i)).toString("hex")||t.allowZero||(i=n.allocUnsafe(0)),t.allowLess&&t.length?(i=(0,c.unpadBuffer)(i),(0,a.default)(t.length>=i.length,"The field ".concat(t.name," must not have more ").concat(t.length," bytes"))):t.allowZero&&0===i.length||!t.length||(0,a.default)(t.length===i.length,"The field ".concat(t.name," must have byte length of ").concat(t.length)),e.raw[r]=i}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:i,set:o}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),r)if("string"==typeof r&&(r=n.from((0,s.stripHexPrefix)(r),"hex")),n.isBuffer(r)&&(r=u.rlp.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(t,r){e[e._fields[r]]=(0,c.toBuffer)(t)}))}else{if("object"!==(0,i.default)(r))throw new Error("invalid data");var o=Object.keys(r);t.forEach((function(t){-1!==o.indexOf(t.name)&&(e[t.name]=r[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=r[t.alias])}))}}},86081:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var i=r(31439),o=r(49100),a=r(13464),s=r(39808),u=r(5725),c=r(35513);function l(e,t){var r=(0,c.toType)(e,c.TypeOutput.BN);if(r.eqn(0)||r.eqn(1))return(0,c.toType)(e,c.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,c.toType)(t,c.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function f(e){var t=new o.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(e,t,r){var o=(0,i.ecdsaSign)(e,t),a=o.signature,s=o.recid,u=n.from(a.slice(0,32)),l=n.from(a.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:u,s:l,v:r?s+(2*r+35):s+27}}return{r:u,s:l,v:(0,c.toType)(r,c.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(n)}},t.ecrecover=function(e,t,r,o,s){var u=n.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(o,32)],64),c=l(t,s);if(!f(c))throw new Error("Invalid signature v value");var d=(0,i.ecdsaRecover)(u,c.toNumber(),e);return n.from((0,i.publicKeyConvert)(d,!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!f(l(e,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(r,32),(0,a.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!f(l(e,i)))throw new Error("Invalid signature v value");var o=(0,c.toType)(e,c.TypeOutput.Number),s=r;return(o>28&&o%2==1||1===o||28===o)&&((s=n.from(r))[0]|=128),(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(s,32)]))},t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}},t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var a=new o.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new o.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!f(l(e,i)))return!1;var u=new o.BN(t),c=new o.BN(r);return!(u.isZero()||u.gt(s)||c.isZero()||c.gt(s)||n&&1===c.cmp(a))},t.hashPersonalMessage=function(e){(0,u.assertIsBuffer)(e);var t=n.from("Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,s.keccak)(n.concat([t,e]))}},35513:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var i,o=r(49100),a=r(23271),s=r(13464);function u(e){return(0,s.unpadBuffer)(e.toArrayLike(n))}t.bnToHex=function(e){return"0x".concat(e.toString(16))},t.bnToUnpaddedBuffer=u,t.bnToRlp=function(e){return u(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,a.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,s.toBuffer)(e);if(t===i.Buffer)return r;if(t===i.BN)return new o.BN(r);if(t===i.Number){var n=new o.BN(r),u=new o.BN(Number.MAX_SAFE_INTEGER.toString());if(n.gt(u))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return n.toNumber()}return"0x".concat(r.toString("hex"))}}},73303:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createHashFunction=function(e){return function(t){var r=e();return r.update(t),n.from(r.digest())}}},8235:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(73303),i=r(93135);t.keccak224=n.createHashFunction((function(){return i("keccak224")})),t.keccak256=n.createHashFunction((function(){return i("keccak256")})),t.keccak384=n.createHashFunction((function(){return i("keccak384")})),t.keccak512=n.createHashFunction((function(){return i("keccak512")}))},40739:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(75010);t.getRandomBytes=function(e){return new Promise((function(t,r){n(e,(function(e,n){e?r(e):t(n)}))}))},t.getRandomBytesSync=function(e){return n(e)}},31439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(57902),i=r(40739);t.createPrivateKey=function(){return e=this,r=function(){var e;return function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(77277),a=new i(0),s=new i(-1),u={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function c(e){var t=e?e.toLowerCase():"ether",r=u[t];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(u,null,2));return new i(r,10)}function l(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"===(0,n.default)(e)&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+(0,n.default)(e)+".")}e.exports={unitMap:u,numberToString:l,getValueOfUnit:c,fromWei:function(e,t,r){var n=o(e),i=n.lt(a),l=c(t),f=u[t].length-1||1,d=r||{};i&&(n=n.mul(s));for(var h=n.mod(l).toString(10);h.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var d=f[0],h=f[1];if(d||(d="0"),h||(h="0"),h.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;h.length{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i{"use strict";var n=r(28847)(r(3355)),i=Object.create||function(e){var t=function(){};return t.prototype=e,new t},o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var u,c=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),u=0===l.x}catch(e){u=!1}function f(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,r,o){var a,s,u;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),u=s[t]):(s=e._events=i(null),e._eventsCount=0),u){if("function"==typeof u?u=s[t]=o?[r,u]:[u,r]:o?u.unshift(r):u.push(r),!u.warned&&(a=f(e))&&a>0&&u.length>a){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=u.length,"object"===("undefined"==typeof console?"undefined":(0,n.default)(console))&&console.warn&&console.warn("%s: %s",c.name,c.message)}}else u=s[t]=r,++e._eventsCount;return e}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(r=a[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=g(e,n),o=0;o=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,o=a;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return y(this,e,!0)},s.prototype.rawListeners=function(e){return y(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},27085:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(50807);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var l=new i;l.update(c),l.update(e),t&&l.update(t),c=l.digest();var f=0;if(a>0){var d=s.length-a;f=Math.min(a,c.length),c.copy(s,d,0,f),a-=f}if(f0){var h=u.length-o,p=Math.min(o,c.length-f);c.copy(u,h,f,f+p),o-=p}}return c.fill(0),{key:s,iv:u}}},48184:(e,t,r)=>{"use strict";var n=r(41493),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n{"use strict";var n=r(83161);e.exports=Function.prototype.bind||n},57701:(e,t,r)=>{"use strict";var n,i=r(28847)(r(3355)),o=SyntaxError,a=Function,s=TypeError,u=function(e){try{return a('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var l=function(){throw new s},f=c?function(){try{return l}catch(e){try{return c(arguments,"callee").get}catch(e){return l}}}():l,d=r(58489)(),h=r(61593)(),p=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),y={},m="undefined"!=typeof Uint8Array&&p?p(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d&&p?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&p?p(p([][Symbol.iterator]())):n,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":(0,i.default)(JSON))?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d&&p?p((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d&&p?p((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&p?p(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":f,"%TypedArray%":m,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(p)try{null.error}catch(e){var b=p(p(e));g["%Error.prototype%"]=b}var v=function e(t){var r;if("%AsyncFunction%"===t)r=u("async function () {}");else if("%GeneratorFunction%"===t)r=u("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=u("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&p&&(r=p(i.prototype))}return g[t]=r,r},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=r(3767),k=r(2383),E=A.call(Function.call,Array.prototype.concat),S=A.call(Function.apply,Array.prototype.splice),x=A.call(Function.call,String.prototype.replace),_=A.call(Function.call,String.prototype.slice),P=A.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,O=function(e,t){var r,n=e;if(k(w,n)&&(n="%"+(r=w[n])[0]+"%"),k(g,n)){var i=g[n];if(i===y&&(i=v(n)),void 0===i&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_(e,0,1),r=_(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return x(e,T,(function(e,t,r,i){n[n.length]=r?x(i,I,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=O("%"+n+"%",t),a=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],S(r,E([0,1],f)));for(var d=1,h=!0;d=r.length){var b=c(u,p);u=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[p]}else h=k(u,p),u=u[p];h&&!l&&(g[a]=u)}}return u}},92948:(e,t,r)=>{"use strict";var n;n="undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},e.exports=n},53820:(e,t,r)=>{"use strict";var n=r(57701)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},1020:(e,t,r)=>{"use strict";var n=r(57701)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},61593:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},58489:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i="undefined"!=typeof Symbol&&Symbol,o=r(47027);e.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"===(0,n.default)(i("foo"))&&"symbol"===(0,n.default)(Symbol("bar"))&&o()}},47027:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===(0,n.default)(Symbol.iterator))return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},11191:(e,t,r)=>{"use strict";var n=r(47027);e.exports=function(){return n()&&!!Symbol.toStringTag}},22353:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(86505).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(41736)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},37198:(e,t,r)=>{"use strict";var n=t;n.utils=r(84268),n.common=r(64696),n.sha=r(39310),n.ripemd=r(69294),n.hmac=r(53201),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},64696:(e,t,r)=>{"use strict";var n=r(84268),i=r(94504);function o(){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}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o{"use strict";var n=r(84268),i=r(94504);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(84268),i=r(64696),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,c),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],b=r,v=n,w=i,A=c,k=l,E=0;E<80;E++){var S=a(o(u(r,f(E,n,i,c),e[p[E]+t],d(E)),m[E]),l);r=l,l=c,c=o(i,10),i=n,n=S,S=a(o(u(b,f(79-E,v,w,A),e[y[E]+t],h(E)),g[E]),k),b=k,k=A,A=o(w,10),w=v,v=S}S=s(this.h[1],i,A),this.h[1]=s(this.h[2],c,k),this.h[2]=s(this.h[3],l,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,w),this.h[0]=S},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],y=[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],m=[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],g=[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]},39310:(e,t,r)=>{"use strict";t.sha1=r(38142),t.sha224=r(14909),t.sha256=r(87682),t.sha384=r(74532),t.sha512=r(36515)},38142:(e,t,r)=>{"use strict";var n=r(84268),i=r(64696),o=r(90070),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,l=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,l),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(84268),i=r(87682);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},87682:(e,t,r)=>{"use strict";var n=r(84268),i=r(64696),o=r(90070),a=r(94504),s=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,f=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,y=o.g1_256,m=i.BlockHash,g=[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 b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(b,m),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(84268),i=r(36515);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},36515:(e,t,r)=>{"use strict";var n=r(84268),i=r(64696),o=r(94504),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,f=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,y=n.sum64_5_hi,m=n.sum64_5_lo,g=i.BlockHash,b=[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 v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function k(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function S(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function _(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,g),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(84268).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},84268:(e,t,r)=>{"use strict";var n=r(94504),i=r(41736);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var l=0,f=t;return l+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},2383:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(3767);e.exports=o.call(n,i)},29410:(e,t,r)=>{"use strict";var n=r(37198),i=r(96580),o=r(94504);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length{"use strict";var n=r(29519),i=r(51143),o=e.exports;for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a]);function s(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),n.request.call(this,e,t)},o.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},32996:(e,t,r)=>{"use strict";var n;r(28847)(r(3355)),void 0===(n=function(){return e=[new Uint32Array([2157250,2157314,2157378,2157442,2157506,2157570,2157634,0,2157698,2157762,2157826,2157890,2157954,0,2158018,0]),new Uint32Array([2179041,6291456,2179073,6291456,2179105,6291456,2179137,6291456,2179169,6291456,2179201,6291456,2179233,6291456,2179265,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,2113729,2197345,2197377,2113825,2197409,2197441,2113921,2197473,2114017,2197505,2197537,2197569,2197601,2197633,2197665]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672,23068672,0,0,0,0,23068672]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064]),new Uint32Array([2196001,2196033,2196065,2196097,2196129,2196161,2196193,2196225,2196257,2196289,2196321,2196353,2196385,2196417,2196449,2196481]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2177025,6291456,2177057,6291456,2177089,6291456,2177121,6291456,2177153,6291456,2177185,6291456,2177217,6291456,2177249,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456]),new Uint32Array([2134435,2134531,2134627,2134723,2134723,2134819,2134819,2134915,2134915,2135011,2105987,2135107,2135203,2135299,2131587,2135395]),new Uint32Array([0,0,0,0,0,0,0,6291456,2168673,2169249,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354,2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354]),new Uint32Array([2125219,2125315,2152834,2152898,2125411,2152962,2153026,2125506,2125507,2125603,2153090,2153154,2153218,2153282,2153346,2105348]),new Uint32Array([2203393,6291456,2203425,6291456,2203457,6291456,2203489,6291456,6291456,6291456,6291456,2203521,6291456,2181281,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,6291456,2145538,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,6291456]),new Uint32Array([2139426,2160834,2160898,2160962,2134242,2161026,2161090,2161154,2161218,2161282,2161346,2161410,2138658,2161474,2161538,2134722]),new Uint32Array([2119939,2124930,2125026,2106658,2125218,2128962,2129058,2129154,2129250,2129346,2129442,2108866,2108770,2150466,2150530,2150594]),new Uint32Array([2201601,6291456,2201633,6291456,2201665,6291456,2201697,6291456,2201729,6291456,2201761,6291456,2201793,6291456,2201825,6291456]),new Uint32Array([2193537,2193569,2193601,2193633,2193665,2193697,2193729,2193761,2193793,2193825,2193857,2193889,2193921,2193953,2193985,2194017]),new Uint32Array([6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2190561,6291456,2190593,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2190625,6291456,2190657,6291456,23068672]),new Uint32Array([2215905,2215937,2215969,2216001,2216033,2216065,2216097,2216129,2216161,2216193,2216225,2216257,2105441,2216289,2216321,2216353]),new Uint32Array([23068672,18884130,23068672,23068672,23068672,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2191233,2191265,2191297,2191329,2191361,2191393,2191425,2117377,2191457,2191489,2191521,2191553,2191585,2191617,2191649,2117953]),new Uint32Array([2132227,2132323,2132419,2132419,2132515,2132515,2132611,2132707,2132707,2132803,2132899,2132899,2132995,2132995,2133091,2133187]),new Uint32Array([0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10609889,10610785,10609921,10610817,2222241]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([2219969,2157121,2157441,2157505,2157889,2157953,2220001,2158465,2158529,10575617,2156994,2157058,2129923,2130019,2157122,2157186]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2185249,6291456,2185281,6291456,2185313,6291456,2185345,6291456,2185377,6291456,2185409,6291456,2185441,6291456,2185473,6291456]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,6291456,0]),new Uint32Array([2183361,6291456,2183393,6291456,2183425,6291456,2183457,6291456,2183489,6291456,2183521,6291456,2183553,6291456,2183585,6291456]),new Uint32Array([2192161,2192193,2192225,2192257,2192289,2192321,2192353,2192385,2192417,2192449,2192481,2192513,2192545,2192577,2192609,2192641]),new Uint32Array([2212001,2212033,2212065,2212097,2212129,2212161,2212193,2212225,2212257,2212289,2212321,2212353,2212385,2212417,2212449,2207265]),new Uint32Array([2249825,2249857,2249889,2249921,2249954,2250018,2250082,2250145,2250177,2250209,2250241,2250274,2250337,2250370,2250433,2250465]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147905,2147969,2148033,2148097,2148161,2148225,2148289,2148353]),new Uint32Array([10485857,6291456,2197217,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2180353,2180385,2144033,2180417,2180449,2180481,2180513,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10610209,10610465,10610241,10610753,10609857]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2223842,2223906,2223970,2224034,2224098,2224162,2224226,2224290,2224354,2224418,2224482,2224546,2224610,2224674,2224738,2224802]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,18923650,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,18923714,23068672,23068672]),new Uint32Array([2126179,2125538,2126275,2126371,2126467,2125634,2126563,2105603,2105604,2125346,2126659,2126755,2126851,2098179,2098181,2098182]),new Uint32Array([2227426,2227490,2227554,2227618,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2192353,2240642,2240642,2240705,2240737,2240737,2240769,2240802,2240866,2240929,2240961,2240993,2241025,2241057,2241089,2241121]),new Uint32Array([6291456,2170881,2170913,2170945,6291456,2170977,6291456,2171009,2171041,6291456,6291456,6291456,2171073,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2132226,2132514,2163586,2132610,2160386,2133090,2133186,2160450,2160514,2160578,2133570,2106178,2160642,2133858,2160706,2160770]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10532162,10532226,10532290,10532354,10532418,10532482,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2098209,2108353,2108193,2108481,2170241,2111713,2105473,2105569,2105601,2112289,2112481,2098305,2108321,0,0,0]),new Uint32Array([2209121,2209153,2209185,2209217,2209249,2209281,2209313,2209345,2209377,2209409,2209441,2209473,2207265,2209505,2209537,2209569]),new Uint32Array([2189025,6291456,2189057,6291456,2189089,6291456,2189121,6291456,2189153,6291456,2189185,6291456,2189217,6291456,2189249,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2165764,2140004]),new Uint32Array([2215105,6291456,2215137,6291456,6291456,2215169,2215201,6291456,6291456,6291456,2215233,2215265,2215297,2215329,2215361,2215393]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,23068672,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([10505091,10505187,10505283,10505379,10505475,10505571,10505667,10505763,10505859,10505955,10506051,10506147,10506243,10506339,10506435,10506531]),new Uint32Array([2229730,2229794,2229858,2229922,2229986,2230050,2230114,2230178,2230242,2230306,2230370,2230434,2230498,2230562,2230626,2230690]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,0,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([6291456,6291456,6291456,6291456,10502115,10502178,10502211,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2190305,6291456,2190337,6291456,2190369,6291456,2190401,6291456,2190433,6291456,2190465,6291456,2190497,6291456,2190529,6291456]),new Uint32Array([2173793,2173985,2174017,6291456,2173761,2173697,6291456,2174689,6291456,2174017,2174721,6291456,6291456,2174753,2174785,2174817]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609,2100033]),new Uint32Array([2132898,2163842,2163906,2133282,2132034,2131938,2137410,2132802,2132706,2164866,2133282,2160578,2165186,2165186,6291456,6291456]),new Uint32Array([10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059,10501155,10501251,10501347,10501443]),new Uint32Array([2163458,2130978,2131074,2131266,2131362,2163522,2160130,2132066,2131010,2131106,2106018,2131618,2131298,2132034,2131938,2137410]),new Uint32Array([2212961,2116993,2212993,2213025,2213057,2213089,2213121,2213153,2213185,2213217,2213249,2209633,2213281,2213313,2213345,2213377]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2113729,2113825,2113921,2114017,2114113,2114209,2114305,2114401,2114497,2114593,2114689,2114785,2114881,2114977,2115073,2115169]),new Uint32Array([2238177,2238209,2238241,2238273,2238305,2238337,2238337,2217537,2238369,2238401,2238433,2238465,2215649,2238497,2238529,2238561]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0]),new Uint32Array([6291456,0,6291456,2145026,0,6291456,2145090,0,6291456,6291456,0,0,23068672,0,23068672,23068672]),new Uint32Array([2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129,2100289]),new Uint32Array([6291456,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0]),new Uint32Array([2187681,2187713,2187745,2187777,2187809,2187841,2187873,2187905,2187937,2187969,2188001,2188033,2188065,2188097,2188129,2188161]),new Uint32Array([0,10554498,10554562,10554626,10554690,10554754,10554818,10554882,10554946,10555010,10555074,6291456,6291456,0,0,0]),new Uint32Array([2235170,2235234,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0]),new Uint32Array([2181153,6291456,2188897,6291456,6291456,2188929,6291456,6291456,6291456,6291456,6291456,6291456,2111905,2100865,2188961,2188993]),new Uint32Array([2100833,2100897,0,0,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,2112289]),new Uint32Array([6291456,2172833,6291456,2172865,2172897,2172929,2172961,6291456,2172993,6291456,2173025,6291456,2173057,6291456,2173089,6291456]),new Uint32Array([6291456,0,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,2190721]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456]),new Uint32Array([2184993,6291456,2185025,6291456,2185057,6291456,2185089,6291456,2185121,6291456,2185153,6291456,2185185,6291456,2185217,6291456]),new Uint32Array([2115265,2115361,2115457,2115553,2115649,2115745,2115841,2115937,2116033,2116129,2116225,2116321,2150658,2150722,2200225,6291456]),new Uint32Array([2168321,6291456,2168353,6291456,2168385,6291456,2168417,6291456,2168449,6291456,2168481,6291456,2168513,6291456,2168545,6291456]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,0,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2186625,0,0,6291456,6291456,2186657,2186689,2186721,2173505,0,10496067,10496163,10496259]),new Uint32Array([2178785,6291456,2178817,6291456,2178849,6291456,2178881,6291456,2178913,6291456,2178945,6291456,2178977,6291456,2179009,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2097152,0,0,0,2097152,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2197857,2197889,2197921,2197953,2197985,2198017,0,0,2198049,2198081,2198113,2198145,2198177,2198209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2098209,2167297,2111137,6291456]),new Uint32Array([2171393,6291456,2171425,6291456,2171457,6291456,2171489,6291456,2171521,6291456,2171553,6291456,2171585,6291456,2171617,6291456]),new Uint32Array([2206753,2206785,2195457,2206817,2206849,2206881,2206913,2197153,2197153,2206945,2117857,2206977,2207009,2207041,2207073,2207105]),new Uint32Array([0,0,0,0,0,0,0,23068672,0,0,0,0,2144834,2144898,0,2144962]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,0,2105505,2098241]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,2202049,6291456,2202081,6291456,2202113,6291456,2202145,6291456,2202177,6291456,2202209,6291456,2202241,6291456]),new Uint32Array([10501155,10501251,10501347,10501443,10501539,10501635,10501731,10501827,10501923,10502019,2141731,2105505,2098177,2155586,2166530,0]),new Uint32Array([2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441]),new Uint32Array([2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330,2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10502307,10502403,10502499,10502595,10502691,10502787,10502883,10502979,10503075,10503171,10503267,10503363,10503459,10503555,10503651,10503747]),new Uint32Array([2179937,2179969,2180001,2180033,2156545,2180065,2156577,2180097,2180129,2180161,2180193,2180225,2180257,2180289,2156737,2180321]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,0,0,6291456,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([2227682,2227746,2227810,2227874,2227938,2228002,2228066,2228130,2228194,2228258,2228322,2228386,2228450,2228514,2228578,2228642]),new Uint32Array([2105601,2169121,2108193,2170049,2181025,2181057,2112481,2108321,2108289,2181089,2170497,2100865,2181121,2173601,2173633,2173665]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180641,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,6291456,0,6291456,0,6291456,0,0,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2178273,6291456,2178305,6291456,2178337,6291456,2178369,6291456,2178401,6291456,2178433,6291456,2178465,6291456,2178497,6291456]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2237377,2237409,2236225,2237441,2237473,2217441,2215521,2215553,2217473,2237505,2237537,2209697,2237569,2215585,2237601,2237633]),new Uint32Array([2221985,2165601,2165601,2165665,2165665,2222017,2222017,2165729,2165729,2158913,2158913,2158913,2158913,2097281,2097281,2105921]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2149634,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2176897,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2176929,6291456,2176961,6291456,2176993,6291456]),new Uint32Array([2172641,6291456,2172673,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2172705,2172737,6291456,2172769,2172801,6291456]),new Uint32Array([2099173,2104196,2121667,2099395,2121763,2152258,2152322,2098946,2152386,2121859,2121955,2099333,2122051,2104324,2099493,2122147]),new Uint32Array([6291456,6291456,6291456,2145794,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2145858,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,0,0,6291456,0]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,0,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2239074,2239138,2239201,2239233,2239265,2239297,2239329,2239361,0,2239393,2239425,2239425,2239458,2239521,2239553,2209569]),new Uint32Array([14680064,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,6291456,23068672]),new Uint32Array([2108321,2108289,2113153,2098209,2180897,2180929,2180961,2111137,2098241,2108353,2170241,2170273,2180993,2105825,6291456,2105473]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146114,6291456,6291456,6291456,0,0,0]),new Uint32Array([2105921,2105921,2105921,2222049,2222049,2130977,2130977,2130977,2130977,2160065,2160065,2160065,2160065,2097729,2097729,2097729]),new Uint32Array([2218145,2214785,2207937,2218177,2218209,2192993,2210113,2212769,2218241,2218273,2216129,2218305,2216161,2218337,2218369,2218401]),new Uint32Array([0,0,0,2156546,2156610,2156674,2156738,2156802,0,0,0,0,0,2156866,23068672,2156930]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2213409,2213441,2213473,2213505,2213537,2213569,2213601,2213633,2213665,2195681,2213697,2213729,2213761,2213793,2213825,2213857]),new Uint32Array([2100033,2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2201857,6291456,2201889,6291456,2201921,6291456,2201953,6291456,2201985,6291456,2202017,6291456,2176193,2176257,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2188193,2188225,2188257,2188289,2188321,2188353,2188385,2188417,2188449,2188481,2188513,2188545,2188577,2188609,2188641,0]),new Uint32Array([10554529,2221089,0,10502113,10562017,10537921,10538049,2221121,2221153,0,0,0,0,0,0,0]),new Uint32Array([2213889,2213921,2213953,2213985,2214017,2214049,2214081,2194177,2214113,2214145,2214177,2214209,2214241,2214273,2214305,2214337]),new Uint32Array([2166978,2167042,2099169,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180545,6291456,6291456,6291456]),new Uint32Array([10518915,10519011,10519107,10519203,2162242,2162306,2159554,2162370,2159362,2159618,2105922,2162434,2159746,2162498,2159810,2159874]),new Uint32Array([2161730,2161794,2135586,2161858,2161922,2137186,2131810,2160290,2135170,2161986,2137954,2162050,2162114,2162178,10518723,10518819]),new Uint32Array([10506627,10506723,10506819,10506915,10507011,10507107,10507203,10507299,10507395,10507491,10507587,10507683,10507779,10507875,10507971,10508067]),new Uint32Array([6291456,23068672,23068672,23068672,0,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2175873,2175905,2175937,2175969,2176001,2176033,2176065,2176097,2176129,2176161,2176193,2176225,2176257,2176289,2176321,2176353]),new Uint32Array([2140006,2140198,2140390,2140582,2140774,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241]),new Uint32Array([0,23068672,0,0,0,0,0,0,0,2145154,2145218,2145282,6291456,0,2145346,0]),new Uint32Array([0,0,0,0,10531458,10495395,2148545,2143201,2173473,2148865,2173505,0,2173537,0,2173569,2149121]),new Uint32Array([10537282,10495683,2148738,2148802,2148866,0,6291456,2148930,2186593,2173473,2148737,2148865,2148802,10495779,10495875,10495971]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2215425,2215457,2215489,2215521,2215553,2215585,2215617,2215649,2215681,2215713,2215745,2215777,2192033,2215809,2215841,2215873]),new Uint32Array([2242049,2242081,2242113,2242145,2242177,2242209,2242241,2242273,2215937,2242305,2242338,2242401,2242433,2242465,2242497,2216001]),new Uint32Array([10554529,2221089,0,0,10562017,10502113,10538049,10537921,2221185,10489601,10489697,10609889,10609921,2141729,2141793,10610273]),new Uint32Array([2141923,2142019,2142115,2142211,2142307,2142403,2142499,2142595,2142691,0,0,0,0,0,0,0]),new Uint32Array([0,2221185,2221217,10609857,10609857,10489601,10489697,10609889,10609921,2141729,2141793,2221345,2221377,2221409,2221441,2187105]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18923970,23068672,23068672,23068672,0,6291456,6291456]),new Uint32Array([2183105,6291456,2183137,6291456,2183169,6291456,2183201,6291456,2183233,6291456,2183265,6291456,2183297,6291456,2183329,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2134434,2134818,2097666,2097186,2097474,2097698,2105986,2131586,2132450,2131874,2131778,2135970,2135778,2161602,2136162,2161666]),new Uint32Array([2236865,2236897,2236930,2236993,2237025,2235681,2237058,2237121,2237153,2237185,2237217,2217281,2237250,2191233,2237313,2237345]),new Uint32Array([2190049,6291456,2190081,6291456,2190113,6291456,2190145,6291456,2190177,6291456,2190209,6291456,2190241,6291456,2190273,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2101922,2102050,2102178,2102306,10498755,10498851,10498947,10499043,10499139,10499235,10499331,10499427,10499523,10489604,10489732,10489860]),new Uint32Array([2166914,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2181601,2170561,2181633,2181665,2170753,2181697,2172897,2170881,2181729,2170913,2172929,2113441,2181761,2181793,2171009,2173761]),new Uint32Array([0,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2248001,2248033,2248066,2248130,2248193,2248226,2248289,2248322,2248385,2248417,2216673,2248450,2248514,2248577,2248610,2248673]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([2169729,6291456,2169761,6291456,2169793,6291456,2169825,6291456,2169857,2169889,6291456,2169921,6291456,2143329,6291456,2098305]),new Uint32Array([2162178,2163202,2163266,2135170,2136226,2161986,2137954,2159426,2159490,2163330,2159554,2163394,2159682,2139522,2136450,2159746]),new Uint32Array([2173953,2173985,0,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2174209,2174241,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,4271169,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2174273]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,2190785,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2189793,6291456,2189825,6291456,2189857,6291456,2189889,6291456,2189921,6291456,2189953,6291456,2189985,6291456,2190017,6291456]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,0,2098305,2108321,2108289,2100865,2113153,2108481,2113345,0,2098209,2111137]),new Uint32Array([2172129,6291456,2172161,6291456,2172193,6291456,2172225,6291456,2172257,6291456,2172289,6291456,2172321,6291456,2172353,6291456]),new Uint32Array([2214753,6291456,2214785,6291456,6291456,2214817,2214849,2214881,2214913,2214945,2214977,2215009,2215041,2215073,2194401,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([10610305,10610337,10575617,2221761,10610401,10610433,10502177,0,10610465,10610497,10610529,10610561,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2187105,2187137,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2199393,2199425,2199457,2199489,2199521,2199553,2199585,2199617,2199649,2199681,2199713,2199745,2199777,2199809,2199841,0]),new Uint32Array([2217249,2217281,2217313,2217345,2217377,2217409,2217441,2217473,2215617,2217505,2217537,2217569,2214753,2217601,2217633,2217665]),new Uint32Array([2170273,2170305,6291456,2170337,2170369,6291456,2170401,2170433,2170465,6291456,6291456,6291456,2170497,2170529,6291456,2170561]),new Uint32Array([2188673,6291456,2188705,2188737,2188769,6291456,6291456,2188801,6291456,2188833,6291456,2188865,6291456,2180929,2181505,2180897]),new Uint32Array([10489988,10490116,10490244,10490372,10490500,10490628,10490756,10490884,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147393,2147457,2147521,2147585,2147649,2147713,2147777,2147841]),new Uint32Array([23068672,23068672,0,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2241153,2241185,2241217,2215809,2241250,2241313,2241345,2241377,2217921,2241377,2241409,2215873,2241441,2241473,2241505,2241537]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220417,2220417,2220449,2220449,2220481,2220481,2220513,2220513,2220545,2220545,2220577,2220577,2220609,2220609,2220641,2220641]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2144002,0,6291456,6291456,0,0,6291456,6291456,6291456]),new Uint32Array([2167105,2167137,2167169,2167201,2167233,2167265,2167297,2167329,2167361,2167393,2167425,2167457,2167489,2167521,2167553,2167585]),new Uint32Array([10575521,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2234146,2234210,2234274,2234338,2234402,2234466,2234530,2234594,2234658,2234722,2234786,2234850,2234914,2234978,2235042,2235106]),new Uint32Array([0,0,0,0,0,0,0,2180577,0,0,0,0,0,2180609,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456]),new Uint32Array([2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2242529,2242561,2242593,2242625,2242657,2242689,2242721,2242753,2207937,2218177,2242785,2242817,2242849,2242882,2242945,2242977]),new Uint32Array([2118049,2105345,2118241,2105441,2118433,2118529,2118625,2118721,2118817,2200257,2200289,2191809,2200321,2200353,2200385,2200417]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2185505,6291456,2185537,6291456,2185569,6291456,2185601,6291456,2185633,6291456,2185665,6291456,2185697,6291456,2185729,6291456]),new Uint32Array([2231970,2232034,2232098,2232162,2232226,2232290,2232354,2232418,2232482,2232546,2232610,2232674,2232738,2232802,2232866,2232930]),new Uint32Array([2218625,2246402,2246466,2246530,2246594,2246657,2246689,2246689,2218657,2219681,2246721,2246753,2246785,2246818,2246881,2208481]),new Uint32Array([2197025,2197057,2197089,2197121,2197153,2197185,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2219137,2216961,2219169,2219201,2219233,2219265,2219297,2217025,2215041,2219329,2217057,2219361,2217089,2219393,2197153,2219426]),new Uint32Array([23068672,23068672,23068672,0,0,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713]),new Uint32Array([2243522,2243585,2243617,2243649,2243681,2210113,2243713,2243746,2243810,2243874,2243937,2243970,2244033,2244065,2244097,2244129]),new Uint32Array([2178017,6291456,2178049,6291456,2178081,6291456,2178113,6291456,2178145,6291456,2178177,6291456,2178209,6291456,2178241,6291456]),new Uint32Array([10553858,2165314,10518722,6291456,10518818,0,10518914,2130690,10519010,2130786,10519106,2130882,10519202,2165378,10554050,2165506]),new Uint32Array([0,0,2135491,2135587,2135683,2135779,2135875,2135971,2135971,2136067,2136163,2136259,2136355,2136355,2136451,2136547]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2220033,2220033,2220065,2220065,2220065,2220065,2220097,2220097,2220097,2220097,2220129,2220129,2220129,2220129,2220161,2220161]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2100897,2100898,2100899,2150018,2100865,2100866,2100867,2100868,2150082,2108481,2109858,2109859,2105569,2105505,2098241,2105601]),new Uint32Array([2097217,2097505,2097505,2097505,2097505,2165570,2165570,2165634,2165634,2165698,2165698,2097858,2097858,0,0,2097152]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10503843,10503939,10504035,10504131,10504227,10504323,10504419,10504515,10504611,10504707,10504803,10504899,10504995,10491140,10491268,0]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,2235297,2220769,2235329,2235361]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2222401,2222433,2222465,10531394,2222497,2222529,2222561,0,2222593,2222625,2222657,2222689,2222721,2222753,2222785,0]),new Uint32Array([2184481,6291456,2184513,6291456,2184545,6291456,2184577,6291456,2184609,6291456,2184641,6291456,2184673,6291456,2184705,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2105570,2156034,2126947,2156098,2153666,2127043,2127139,2156162,0,2127235,2156226,2156290,2156354,2156418,2127331,2127427]),new Uint32Array([2215905,2207041,2153185,2241569,2241601,2241633,2241665,2241697,2241730,2241793,2241825,2241857,2241889,2241921,2241954,2242017]),new Uint32Array([2203777,6291456,2203809,6291456,2203841,6291456,2203873,6291456,2203905,6291456,2173121,2180993,2181249,2203937,2181313,0]),new Uint32Array([2168577,6291456,2168609,6291456,2168641,6291456,2168673,6291456,2168705,6291456,2168737,6291456,2168769,6291456,2168801,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,0,0]),new Uint32Array([2210113,2195521,2210145,2210177,2210209,2210241,2210273,2210305,2210337,2210369,2210401,2210433,2210465,2210497,2210529,2210561]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2228706,2228770,2228834,2228898,2228962,2229026,2229090,2229154,2229218,2229282,2229346,2229410,2229474,2229538,2229602,2229666]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,18874368,18874368,18874368,0,0]),new Uint32Array([2133089,2133281,2133281,2133281,2133281,2160577,2160577,2160577,2160577,2097441,2097441,2097441,2097441,2133857,2133857,2133857]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089]),new Uint32Array([2178529,6291456,2178561,6291456,2178593,6291456,2178625,6291456,2178657,6291456,2178689,6291456,2178721,6291456,2178753,6291456]),new Uint32Array([2221025,2221025,2221057,2221057,2159329,2159329,2159329,2159329,2097217,2097217,2158914,2158914,2158978,2158978,2159042,2159042]),new Uint32Array([2208161,2208193,2208225,2208257,2194433,2208289,2208321,2208353,2208385,2208417,2208449,2208481,2208513,2208545,2208577,2208609]),new Uint32Array([2169217,6291456,2169249,6291456,2169281,6291456,2169313,6291456,2169345,6291456,2169377,6291456,2169409,6291456,2169441,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2133187,2133283,2133283,2133379,2133475,2133571,2133667,2133667,2133763,2133859,2133955,2134051,2134147,2134147,2134243,2134339]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,0]),new Uint32Array([2193089,2193121,2193153,2193185,2117665,2117569,2193217,2193249,2193281,2193313,2193345,2193377,2193409,2193441,2193473,2193505]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184225,6291456,2184257,6291456,2184289,6291456,2184321,6291456,2184353,6291456,2184385,6291456,2184417,6291456,2184449,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2100833,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2200801,2200833,2200865,0]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2181153,2105505,2181185,2167617,2180993]),new Uint32Array([2160002,2160066,2160130,2160194,2160258,2132066,2131010,2131106,2106018,2131618,2160322,2131298,2132034,2131938,2137410,2132226]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2183617,6291456,2183649,6291456,2183681,6291456,2183713,6291456,2183745,6291456,2183777,6291456,2183809,6291456,2183841,6291456]),new Uint32Array([0,6291456,6291456,0,6291456,0,0,6291456,6291456,0,6291456,0,0,6291456,0,0]),new Uint32Array([2250977,2251009,2251041,2251073,2195009,2251106,2251169,2251201,2251233,2251265,2251297,2251330,2251394,2251457,2251489,2251521]),new Uint32Array([2205729,2205761,2205793,2205825,2205857,2205889,2205921,2205953,2205985,2206017,2206049,2206081,2206113,2206145,2206177,2206209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2143170,2168993,6291456,2169025,6291456,2169057,6291456,2169089,6291456,2143234,2169121,6291456,2169153,6291456,2169185,6291456]),new Uint32Array([23068672,23068672,2190689,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2248706,2248769,2248801,2248833,2248865,2248897,2248929,2248962,2249026,2249090,2249154,2240705,2249217,2249249,2249281,2249313]),new Uint32Array([10485857,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10495394,6291456,2098209,6291456,6291456,2097152,6291456,10531394]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([6291456,2186977,6291456,6291456,6291456,6291456,6291456,10537858,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2209601,2209633,2209665,2209697,2209729,2209761,2209793,2209825,2209857,2209889,2209921,2209953,2209985,2210017,2210049,2210081]),new Uint32Array([10501539,10501635,10501731,10501827,10501923,10502019,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2194561,2194593,2194625,2119777,2119873,2194657,2194689,2194721,2194753,2194785,2194817,2194849,2194881,2194913,2194945,2194977]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569]),new Uint32Array([2222818,2222882,2222946,2223010,2223074,2223138,2223202,2223266,2223330,2223394,2223458,2223522,2223586,2223650,2223714,2223778]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672]),new Uint32Array([0,2179553,2179585,2179617,2179649,2144001,2179681,2179713,2179745,2179777,2179809,2156705,2179841,2156833,2179873,2179905]),new Uint32Array([6291456,23068672,6291456,2145602,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,6291456,0,0]),new Uint32Array([2196513,2196545,2196577,2196609,2196641,2196673,2196705,2196737,2196769,2196801,2196833,2196865,2196897,2196929,2196961,2196993]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2177281,6291456,2177313,6291456,2177345,6291456,2177377,6291456,2177409,6291456,2177441,6291456,2177473,6291456,2177505,6291456]),new Uint32Array([2187137,2221473,2221505,2221537,2221569,6291456,6291456,10610209,10610241,10537986,10537986,10537986,10537986,10609857,10609857,10609857]),new Uint32Array([2243009,2243041,2216033,2243074,2243137,2243169,2243201,2219617,2243233,2243265,2243297,2243329,2243362,2243425,2243457,2243489]),new Uint32Array([10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,2097152,4194304,4194304,0,0]),new Uint32Array([2143042,6291456,2143106,2143106,2168833,6291456,2168865,6291456,6291456,2168897,6291456,2168929,6291456,2168961,6291456,2143170]),new Uint32Array([6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2204193,2204225,2204257,2204289,2204321,2204353,2204385,2204417,2204449,2204481,2204513,2204545,2204577,2204609,2204641,2204673]),new Uint32Array([2202753,6291456,2202785,6291456,2202817,6291456,2202849,6291456,2202881,6291456,2202913,6291456,2202945,6291456,2202977,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321]),new Uint32Array([2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842,2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842]),new Uint32Array([2253313,2253346,2253409,2253441,2253473,2253505,2253537,2253569,2253601,2253634,2219393,2253697,2253729,2253761,2253793,2253825]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([2162562,2162626,2131362,2162690,2159938,2160002,2162754,2162818,2160130,2162882,2160194,2160258,2160834,2160898,2161026,2161090]),new Uint32Array([2175361,2175393,2175425,2175457,2175489,2175521,2175553,2175585,2175617,2175649,2175681,2175713,2175745,2175777,2175809,2175841]),new Uint32Array([2253858,2253921,2253954,2254018,2254082,2196737,2254145,2196865,2254177,2254209,2254241,2254273,2197025,2254306,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2202113,2204129,2188705,2204161]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953]),new Uint32Array([2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,0,2108417,0,2111713,2100897,2111905]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2175425,2175489,2175809,2175905,2175937,2175937,2176193,2176417,2180865,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,2143298,2143298,2143298,2143362,2143362,2143362,2143426,2143426,2143426,2171105,6291456,2171137]),new Uint32Array([2120162,2120258,2151618,2151682,2151746,2151810,2151874,2151938,2152002,2120035,2120131,2120227,2152066,2120323,2152130,2120419]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2195361,2142433,2236065,2236097,2236129,2236161,2118241,2117473,2236193,2236225,2236257,2236289,0,0,0,0]),new Uint32Array([2189281,6291456,2189313,6291456,2189345,6291456,2189377,6291456,2189409,6291456,2189441,6291456,2189473,6291456,2189505,6291456]),new Uint32Array([6291456,6291456,2145922,6291456,6291456,6291456,6291456,2145986,6291456,6291456,6291456,6291456,2146050,6291456,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10502113,10562017,10610401,10502177,10610433,10538049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,2186401,0,2186433,0,2186465,0,2186497]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,23068672,23068672]),new Uint32Array([0,0,2198241,2198273,2198305,2198337,2198369,2198401,0,0,2198433,2198465,2198497,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,0,23068672,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,2133281,2097505,2105889,0,2097697,2135777,2097633,2097441]),new Uint32Array([2197889,2197921,2197953,2197985,2198017,2198049,2198081,2198113,2198145,2198177,2198209,2198241,2198273,2198305,2198337,2198369]),new Uint32Array([2132514,2132610,2160386,2133090,2133186,2160450,2160514,2133282,2160578,2133570,2106178,2160642,2133858,2160706,2160770,2134146]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,6291456,23068672,23068672,6291456,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2184737,6291456,2184769,6291456,2184801,6291456,2184833,6291456,2184865,6291456,2184897,6291456,2184929,6291456,2184961,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,2186753,6291456,6291456,6291456,6291456,2186785,2186817,2186849,2173569,2186881,10496355,10495395,10575521]),new Uint32Array([0,0,2097729,0,0,0,0,2106017,0,2097505,0,2097185,0,2135777,2097633,2097441]),new Uint32Array([2189537,6291456,2189569,6291456,2189601,6291456,2189633,6291456,2189665,6291456,2189697,6291456,2189729,6291456,2189761,6291456]),new Uint32Array([2202497,6291456,2202529,6291456,2202561,6291456,2202593,6291456,2202625,6291456,2202657,6291456,2202689,6291456,2202721,6291456]),new Uint32Array([2245217,2218369,2245249,2245282,2245345,2245377,2245410,2245474,2245537,2245569,2245601,2245633,2245665,2245665,2245697,2245729]),new Uint32Array([6291456,0,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,23068672,6291456,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,2097377,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2176641,6291456,2176673,6291456,2176705,6291456,2176737,6291456,2176769,6291456,2176801,6291456,2176833,6291456,2176865,6291456]),new Uint32Array([2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2174369,2174369,0,0,2100833,2100737]),new Uint32Array([2116513,2190817,2190849,2190881,2190913,2190945,2116609,2190977,2191009,2191041,2191073,2117185,2191105,2191137,2191169,2191201]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2167617,2167649,2167681,2167713,2167745,2167777,2167809,6291456,2167841,2167873,2167905,2167937,2167969,2168001,2168033,4240130]),new Uint32Array([2165122,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122,2134562,2132162,2132834,2136866]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2186209,2186241,2186273,2186305,2186337,2186369,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,0,23068672,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([0,10537921,10610689,10610273,10610497,10610529,10610305,10610721,10489601,10489697,10610337,10575617,10554529,2221761,2197217,10496577]),new Uint32Array([2105473,2105569,2105601,2112289,0,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2125346,2153410,2153474,2127394,2153538,2153602,2153666,2153730,2105507,2105476,2153794,2153858,2153922,2153986,2154050,2105794]),new Uint32Array([2200449,2119681,2200481,2153313,2199873,2199905,2199937,2200513,2200545,2200577,2200609,2119105,2119201,2119297,2119393,2119489]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2175777,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2222273,2197217,2221473,2221505,2221089,2222305,2200865,2099681,2104481,2222337,2099905,2120737,2222369,2103713,2100225,2098785]),new Uint32Array([2201377,6291456,2201409,6291456,2201441,6291456,2201473,6291456,2201505,6291456,2201537,6291456,2201569,6291456,6291456,23068672]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([2200897,6291456,2200929,6291456,2200961,6291456,2200993,6291456,2201025,6291456,2180865,6291456,2201057,6291456,2201089,6291456]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2161154,2161410,2138658,2161474,2161538,2097666,2097186,2097474,2162946,2132450,2163010,2163074,2136162,2163138,2161666,2161730]),new Uint32Array([2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953]),new Uint32Array([0,0,0,0,0,0,23068672,23068672,0,0,0,0,2145410,2145474,0,6291456]),new Uint32Array([2244161,2216065,2212769,2244193,2244225,2244257,2244290,2244353,2244385,2244417,2244449,2218273,2244481,2244514,2244577,2244609]),new Uint32Array([2125730,2125699,2125795,2125891,2125987,2154114,2154178,2154242,2154306,2154370,2154434,2154498,2126082,2126178,2126274,2126083]),new Uint32Array([2237665,2237697,2237697,2237697,2237730,2237793,2237825,2237857,2237890,2237953,2237985,2238017,2238049,2238081,2238113,2238145]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150146,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2214369,2238593,2238625,2238657,2238689,2238721,2238753,2238785,2238817,2238850,2238913,2238945,2238977,2235457,2239009,2239041]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2252066,2252130,2252193,2252225,2252257,2252290,2252353,2252385,2252417,2252449,2252481,2252513,2252545,2252578,2252641,2252673]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,2197857]),new Uint32Array([2224866,2224930,2224994,2225058,2225122,2225186,2225250,2225314,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2219490,2219554,2219617,2219649,2219681,2219714,2219778,2219842,2219905,2219937,0,0,0,0,0,0]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665]),new Uint32Array([2220161,2220161,2220193,2220193,2220193,2220193,2220225,2220225,2220225,2220225,2220257,2220257,2220257,2220257,2220289,2220289]),new Uint32Array([2192673,2192705,2192737,2192769,2192801,2192833,2192865,2118049,2192897,2117473,2117761,2192929,2192961,2192993,2193025,2193057]),new Uint32Array([2179297,6291456,2179329,6291456,2179361,6291456,2179393,6291456,2179425,6291456,2179457,6291456,2179489,6291456,2179521,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2235745,2235777,2193633,2235809,2235841,2235873,2235905,2235937,2235969,2116513,2116705,2236001,2200513,2199905,2200545,2236033]),new Uint32Array([2113153,2108481,2113345,2113441,2232993,2233025,0,0,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761]),new Uint32Array([2170593,6291456,2170625,6291456,2170657,6291456,2170689,2170721,6291456,2170753,6291456,6291456,2170785,6291456,2170817,2170849]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2166786,2166850,0,0,0,0]),new Uint32Array([23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,0]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2134562,2132162,2132834,2136866,2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058]),new Uint32Array([6291456,6291456,2098337,2101441,10531458,2153473,6291456,6291456,10531522,2100737,2108193,6291456,2106499,2106595,2106691,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2233122,2233186,2233250,2233314,2233378,2233442,2233506,2233570,2233634,2233698,2233762,2233826,2233890,2233954,2234018,2234082]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2205217,2205249,2205281,2205313,2205345,2205377,2205409,2205441,2205473,2205505,2205537,2205569,2205601,2205633,2205665,2205697]),new Uint32Array([6291456,0,6291456,0,0,0,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([2173601,2173761,2174081,2173569,2174241,2174113,2173953,6291456,2174305,6291456,2174337,6291456,2174369,6291456,2174401,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2152450,2152514,2099653,2104452,2099813,2122243,2099973,2152578,2122339,2122435,2122531,2122627,2122723,2104580,2122819,2152642]),new Uint32Array([2236385,2236417,2236449,2236482,2236545,2215425,2236577,2236609,2236641,2236673,2215457,2236705,2236737,2236770,2215489,2236833]),new Uint32Array([2163394,2159746,2163458,2131362,2163522,2160130,2163778,2132226,2163842,2132898,2163906,2161410,2138658,2097666,2136162,2163650]),new Uint32Array([2218721,2246913,2246946,2216385,2247010,2247074,2215009,2247137,2247169,2216481,2247201,2247233,2247266,2247330,2247330,0]),new Uint32Array([2129730,2129762,2129858,2129731,2129827,2156482,2156482,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0,0,0,0,6291456,0,0]),new Uint32Array([2203969,2204001,2181377,2204033,2204065,6291456,2204097,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2169473,6291456,2169505,6291456,2169537,6291456,2169569,6291456,2169601,6291456,2169633,6291456,2169665,6291456,2169697,6291456]),new Uint32Array([2141542,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220801,2220801,2220801,2220801,2220833,2220833,2220865,2220865,2220865,2220865,2220897,2220897,2220897,2220897,2139873,2139873]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,0,0,0,0,0,0,6291456,0]),new Uint32Array([2214849,2218433,2218465,2218497,2218529,2218561,2214881,2218593,2218625,2218657,2218689,2218721,2218753,2216545,2218785,2218817]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058,2165122,2132802,2132706,2164866]),new Uint32Array([2207649,2207681,2207713,2207745,2207777,2207809,2207841,2207873,2207905,2207937,2207969,2208001,2208033,2208065,2208097,2208129]),new Uint32Array([2123683,2105092,2152706,2123779,2105220,2152770,2100453,2098755,2123906,2124002,2124098,2124194,2124290,2124386,2124482,2124578]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,0,0,0,0,0,0,0,10485857]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([10508163,10508259,10508355,10508451,2200129,2200161,2192737,2200193,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203553,6291456,2203585,6291456,6291456,6291456,2203617,6291456,2203649,6291456,2203681,6291456,2203713,6291456,2203745,6291456]),new Uint32Array([18884449,18884065,23068672,18884417,18884034,18921185,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18874368]),new Uint32Array([2247393,2247426,2247489,2247521,2247553,2247586,2247649,2247681,2247713,2247745,2247777,2247810,2247873,2247905,2247937,2247969]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,2160577,2133857,2235297,0,2235329,0]),new Uint32Array([2182593,6291456,2182625,6291456,2182657,6291456,2182689,6291456,2182721,6291456,2182753,6291456,2182785,6291456,2182817,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102402,2102403,6291456,2110050]),new Uint32Array([2149890,2108323,2149954,6291456,2113441,6291456,2149057,6291456,2113441,6291456,2105473,2167265,2111137,2105505,6291456,2108353]),new Uint32Array([2219105,2219137,2195233,2251554,2251617,2251649,2251681,2251713,2251746,2251810,2251873,2251905,2251937,2251970,2252033,2219169]),new Uint32Array([2203009,6291456,2203041,6291456,2203073,6291456,2203105,6291456,2203137,6291456,2203169,6291456,2203201,6291456,2203233,6291456]),new Uint32Array([2128195,2128291,2128387,2128483,2128579,2128675,2128771,2128867,2128963,2129059,2129155,2129251,2129347,2129443,2129539,2129635]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2140964,2141156,2140966,2141158,2141350]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2225378,2225442,2225506,2225570,2225634,2225698,2225762,2225826,2225890,2225954,2226018,2226082,2226146,2226210,2226274,2226338]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417]),new Uint32Array([2108353,2108417,0,2105601,2108193,2157121,2157313,2157377,2157441,2100897,6291456,2108419,2173953,2173633,2173633,2173953]),new Uint32Array([2111713,2173121,2111905,2098177,2173153,2173185,2173217,2113153,2113345,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2190753]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,2197249,6291456,2117377,2197281,2197313,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,23068672]),new Uint32Array([2173281,6291456,2173313,6291456,2173345,6291456,2173377,6291456,0,0,10532546,6291456,6291456,6291456,10562017,2173441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2159426,2159490,2159554,2159362,2159618,2159682,2139522,2136450,2159746,2159810,2159874,2130978,2131074,2131266,2131362,2159938]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203233,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2203265,6291456,2203297,6291456,2203329,2203361,6291456]),new Uint32Array([6291456,6291456,2148418,2148482,2148546,0,6291456,2148610,2186529,2186561,2148417,2148545,2148482,10495778,2143969,10495778]),new Uint32Array([2134146,2139426,2160962,2134242,2161218,2161282,2161346,2161410,2138658,2134722,2134434,2134818,2097666,2097346,2097698,2105986]),new Uint32Array([2198881,2198913,2198945,2198977,2199009,2199041,2199073,2199105,2199137,2199169,2199201,2199233,2199265,2199297,2199329,2199361]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([10610561,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2183873,6291456,2183905,6291456,2183937,6291456,2183969,6291456,2184001,6291456,2184033,6291456,2184065,6291456,2184097,6291456]),new Uint32Array([2244642,2244706,2244769,2244801,2218305,2244833,2244865,2244897,2244929,2244961,2244993,2245026,2245089,2245122,2245185,0]),new Uint32Array([6291456,6291456,2116513,2116609,2116705,2116801,2199873,2199905,2199937,2199969,2190913,2200001,2200033,2200065,2200097,2191009]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2180673,2180705,2180737,2180769,2180801,2180833,0,0]),new Uint32Array([2098081,2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150402]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,2145666,2145730,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665]),new Uint32Array([2187073,6291456,6291456,6291456,6291456,2098241,2098241,2108353,2100897,2111905,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102404,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2100612,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10485857]),new Uint32Array([2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([2217697,2217729,2217761,2217793,2217825,2217857,2217889,2217921,2217953,2215873,2217985,2215905,2218017,2218049,2218081,2218113]),new Uint32Array([2211233,2218849,2216673,2218881,2218913,2218945,2218977,2219009,2216833,2219041,2215137,2219073,2216865,2209505,2219105,2216897]),new Uint32Array([2240097,2240129,2240161,2240193,2240225,2240257,2240289,2240321,2240353,2240386,2240449,2240481,2240513,2240545,2207905,2240578]),new Uint32Array([6291456,6291456,2202273,6291456,2202305,6291456,2202337,6291456,2202369,6291456,2202401,6291456,2202433,6291456,2202465,6291456]),new Uint32Array([0,23068672,23068672,18923394,23068672,18923458,18923522,18884099,18923586,18884195,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2201121,6291456,2201153,6291456,2201185,6291456,2201217,6291456,2201249,6291456,2201281,6291456,2201313,6291456,2201345,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2211041,2211073,2211105,2211137,2211169,2211201,2211233,2211265,2211297,2211329,2211361,2211393,2211425,2211457,2211489,2211521]),new Uint32Array([2181825,6291456,2181857,6291456,2181889,6291456,2181921,6291456,2181953,6291456,2181985,6291456,2182017,6291456,2182049,6291456]),new Uint32Array([2162337,2097633,2097633,2097633,2097633,2132705,2132705,2132705,2132705,2097153,2097153,2097153,2097153,2133089,2133089,2133089]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,2148545,6291456,2173473,6291456,2148865,6291456,2173505,6291456,2173537,6291456,2173569,6291456,2149121,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2207137,2207169,2207201,2207233,2207265,2207297,2207329,2207361,2207393,2207425,2207457,2207489,2207521,2207553,2207585,2207617]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,23068672,23068672,0,0,0,0,0,0]),new Uint32Array([2198401,2198433,2198465,2198497,0,2198529,2198561,2198593,2198625,2198657,2198689,2198721,2198753,2198785,2198817,2198849]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2216385,2118721,2216417,2216449,2216481,2216513,2216545,2211233,2216577,2216609,2216641,2216673,2216705,2216737,2216737,2216769]),new Uint32Array([2216801,2216833,2216865,2216897,2216929,2216961,2216993,2215169,2217025,2217057,2217089,2217121,2217154,2217217,0,0]),new Uint32Array([2210593,2191809,2210625,2210657,2210689,2210721,2210753,2210785,2210817,2210849,2191297,2210881,2210913,2210945,2210977,2211009]),new Uint32Array([0,0,2105825,0,0,2111905,2105473,0,0,2112289,2108193,2112481,2112577,0,2098305,2108321]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,2097153,2134241,0,2132705,0,0,2131297,0,2133089,0,2133857,0,2220769,0,2235361]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,6291456,6291456,14680064]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2171873,6291456,2171905,6291456,2171937,6291456,2171969,6291456,2172001,6291456,2172033,6291456,2172065,6291456,2172097,6291456]),new Uint32Array([2220929,2220929,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2133857,2134145,2134145,2134145,2134145,2134241,2134241,2134241,2134241,2105889,2105889,2105889,2105889,2097185,2097185,2097185]),new Uint32Array([2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,10499619,10499715,10499811,10499907]),new Uint32Array([0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2144322,2144386,2144450,2144514,2144578,2144642,2144706,2144770]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0,0,2111905,2105473,2105569]),new Uint32Array([2236321,2236353,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2152194,2121283,2103684,2103812,2097986,2098533,2097990,2098693,2098595,2098853,2099013,2103940,2121379,2121475,2121571,2104068]),new Uint32Array([2206241,2206273,2206305,2206337,2206369,2206401,2206433,2206465,2206497,2206529,2206561,2206593,2206625,2206657,2206689,2206721]),new Uint32Array([6291456,6291456,6291456,6291456,16777216,16777216,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,10538818,10538882,6291456,6291456,2150338]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2214369,2214401,2214433,2214465,2214497,2214529,2214561,2214593,2194977,2214625,2195073,2214657,2214689,2214721,6291456,6291456]),new Uint32Array([2097152,2097152,2097152,2097152,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2182081,6291456,2182113,6291456,2182145,6291456,2182177,6291456,2182209,6291456,2182241,6291456,2182273,6291456,2182305,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146881,2146945,2147009,2147073,2147137,2147201,2147265,2147329]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672]),new Uint32Array([0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2122915,2123011,2123107,2104708,2123203,2123299,2123395,2100133,2104836,2100290,2100293,2104962,2104964,2098052,2123491,2123587]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,2171169,6291456,2171201,6291456,2171233,6291456,2171265,6291456,2171297,6291456,2171329,6291456,6291456,2171361,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2148994,2149058,2149122,0,6291456,2149186,2186945,2173537,2148993,2149121,2149058,10531458,10496066,0]),new Uint32Array([2195009,2195041,2195073,2195105,2195137,2195169,2195201,2195233,2195265,2195297,2195329,2195361,2195393,2195425,2195457,2195489]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,0,0,6291456,6291456]),new Uint32Array([2182849,6291456,2182881,6291456,2182913,6291456,2182945,6291456,2182977,6291456,2183009,6291456,2183041,6291456,2183073,6291456]),new Uint32Array([2211553,2210081,2211585,2211617,2211649,2211681,2211713,2211745,2211777,2211809,2209569,2211841,2211873,2211905,2211937,2211969]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2166594,2127298,2166658,2142978,2141827,2166722]),new Uint32Array([2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2185761,2185793,2185825,2185857,2185889,2185921,0,0]),new Uint32Array([6291456,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456]),new Uint32Array([0,0,0,2220961,2220961,2220961,2220961,2144193,2144193,2159201,2159201,2159265,2159265,2144194,2220993,2220993]),new Uint32Array([2192641,2235393,2235425,2152257,2116609,2235457,2235489,2200065,2235521,2235553,2235585,2212449,2235617,2235649,2235681,2235713]),new Uint32Array([2194049,2194081,2194113,2194145,2194177,2194209,2194241,2194273,2194305,2194337,2194369,2194401,2194433,2194465,2194497,2194529]),new Uint32Array([2196673,2208641,2208673,2208705,2208737,2208769,2208801,2208833,2208865,2208897,2208929,2208961,2208993,2209025,2209057,2209089]),new Uint32Array([2191681,2191713,2191745,2191777,2153281,2191809,2191841,2191873,2191905,2191937,2191969,2192001,2192033,2192065,2192097,2192129]),new Uint32Array([2230946,2231010,2231074,2231138,2231202,2231266,2231330,2231394,2231458,2231522,2231586,2231650,2231714,2231778,2231842,2231906]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2185953,2185985,2186017,2186049,2186081,2186113,2186145,2186177]),new Uint32Array([2139811,2139907,2097284,2105860,2105988,2106116,2106244,2097444,2097604,2097155,10485778,10486344,2106372,6291456,0,0]),new Uint32Array([2110051,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2172385,6291456,2172417,6291456,2172449,6291456,2172481,6291456,2172513,6291456,2172545,6291456,2172577,6291456,2172609,6291456]),new Uint32Array([0,0,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2249345,2249377,2249409,2249441,2249473,2249505,2249537,2249570,2210209,2249633,2249665,2249697,2249729,2249761,2249793,2216769]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2187169,2187201,2187233,2187265,2187297,2187329,2187361,2187393,2187425,2187457,2187489,2187521,2187553,2187585,2187617,2187649]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,6291456,6291456,0,0,0,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2182337,6291456,2182369,6291456,2182401,6291456,2182433,6291456,2182465,6291456,2182497,6291456,2182529,6291456,2182561,6291456]),new Uint32Array([2138179,2138275,2138371,2138467,2134243,2134435,2138563,2138659,2138755,2138851,2138947,2139043,2138947,2138755,2139139,2139235]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2250498,2250562,2250625,2250657,2208321,2250689,2250721,2250753,2250785,2250817,2250849,2218945,2250881,2250913,2250945,0]),new Uint32Array([2170369,2105569,2098305,2108481,2173249,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,0,2108193,0,0,0,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2100897,2100897,2105569,2105569,6291456,2112289,2149826,6291456,6291456,2112481,2112577,2098177,2098177,2098177,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,2169953,2169985,6291456,2170017,6291456,2170049,2170081,6291456,2170113,2170145,2170177,6291456,6291456,2170209,2170241]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220641,2220641,2220673,2220673,2220673,2220673,2220705,2220705,2220705,2220705,2220737,2220737,2220737,2220737,2220769,2220769]),new Uint32Array([2127650,2127746,2127842,2127938,2128034,2128130,2128226,2128322,2128418,2127523,2127619,2127715,2127811,2127907,2128003,2128099]),new Uint32Array([2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177]),new Uint32Array([0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2204705,2204737,2204769,2204801,2204833,2204865,2204897,2204929,2204961,2204993,2205025,2205057,2205089,2205121,2205153,2205185]),new Uint32Array([2176385,6291456,2176417,6291456,2176449,6291456,2176481,6291456,2176513,6291456,2176545,6291456,2176577,6291456,2176609,6291456]),new Uint32Array([2195521,2195553,2195585,2195617,2195649,2195681,2117857,2195713,2195745,2195777,2195809,2195841,2195873,2195905,2195937,2195969]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113]),new Uint32Array([2131586,2132450,2135970,2135778,2161602,2136162,2163650,2161794,2135586,2163714,2137186,2131810,2160290,2135170,2097506,2159554]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,0,0,0,0]),new Uint32Array([2116513,2116609,2116705,2116801,2116897,2116993,2117089,2117185,2117281,2117377,2117473,2117569,2117665,2117761,2117857,2117953]),new Uint32Array([2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100802,2101154,2101282,2101410,2101538,2101666,2101794]),new Uint32Array([2100289,2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2098977,2150241,2150305]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,2109955,6291456,6291456,0,0,0,0]),new Uint32Array([18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,0,0]),new Uint32Array([2130979,2131075,2131075,2131171,2131267,2131363,2131459,2131555,2131651,2131651,2131747,2131843,2131939,2132035,2132131,2132227]),new Uint32Array([0,2177793,6291456,2177825,6291456,2177857,6291456,2177889,6291456,2177921,6291456,2177953,6291456,2177985,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2113345,0,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2136643,2136739,2136835,2136931,2137027,2137123,2137219,2137315,2137411,2137507,2137603,2137699,2137795,2137891,2137987,2138083]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2174433,6291456,2174465,6291456,2174497,6291456,2174529,6291456,2174561,6291456,2174593,6291456,2174625,6291456,2174657,6291456]),new Uint32Array([0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([10496547,10496643,2105505,2149698,6291456,10496739,10496835,2170273,6291456,2149762,2105825,2111713,2111713,2111713,2111713,2168673]),new Uint32Array([6291456,2143490,2143490,2143490,2171649,6291456,2171681,2171713,2171745,6291456,2171777,6291456,2171809,6291456,2171841,6291456]),new Uint32Array([2159106,2159106,2159170,2159170,2159234,2159234,2159298,2159298,2159298,2159362,2159362,2159362,2106401,2106401,2106401,2106401]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137]),new Uint32Array([2108417,2181217,2181249,2181281,2170433,2170401,2181313,2181345,2181377,2181409,2181441,2181473,2181505,2181537,2170529,2181569]),new Uint32Array([2218433,2245761,2245793,2245825,2245857,2245890,2245953,2245986,2209665,2246050,2246113,2246146,2246210,2246274,2246337,2246369]),new Uint32Array([2230754,2230818,2230882,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184129,6291456,2184161,6291456,2184193,6291456,6291456,6291456,6291456,6291456,2146818,2183361,6291456,6291456,2142978,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2135170,2097506,2130691,2130787,2130883,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122]),new Uint32Array([2108515,2108611,2100740,2108707,2108803,2108899,2108995,2109091,2109187,2109283,2109379,2109475,2109571,2109667,2109763,2100738]),new Uint32Array([2102788,2102916,2103044,2120515,2103172,2120611,2120707,2098373,2103300,2120803,2120899,2120995,2103428,2103556,2121091,2121187]),new Uint32Array([2158082,2158146,0,2158210,2158274,0,2158338,2158402,2158466,2129922,2158530,2158594,2158658,2158722,2158786,2158850]),new Uint32Array([10499619,10499715,10499811,10499907,10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059]),new Uint32Array([2239585,2239618,2239681,2239713,0,2191969,2239745,2239777,2192033,2239809,2239841,2239874,2239937,2239970,2240033,2240065]),new Uint32Array([2252705,2252738,2252801,2252833,2252865,2252897,2252930,2252994,2253057,2253089,2253121,2253154,2253217,2253250,2219361,2219361]),new Uint32Array([2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,10538050,10538114,10538178,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2226402,2226466,2226530,2226594,2226658,2226722,2226786,2226850,2226914,2226978,2227042,2227106,2227170,2227234,2227298,2227362]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,2144066,2144130,2144194,2144258,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2124674,2124770,2123875,2123971,2124067,2124163,2124259,2124355,2124451,2124547,2124643,2124739,2124835,2124931,2125027,2125123]),new Uint32Array([2168065,6291456,2168097,6291456,2168129,6291456,2168161,6291456,2168193,6291456,2168225,6291456,2168257,6291456,2168289,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2100610,2100611,6291456,2107842,2107843,6291456,6291456,6291456,6291456,10537922,6291456,10537986,6291456]),new Uint32Array([2174849,2174881,2174913,2174945,2174977,2175009,2175041,2175073,2175105,2175137,2175169,2175201,2175233,2175265,2175297,2175329]),new Uint32Array([2154562,2154626,2154690,2154754,2141858,2154818,2154882,2127298,2154946,2127298,2155010,2155074,2155138,2155202,2155266,2155202]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0]),new Uint32Array([2200641,2150786,2150850,2150914,2150978,2151042,2106562,2151106,2150562,2151170,2151234,2151298,2151362,2151426,2151490,2151554]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456]),new Uint32Array([2220289,2220289,2220321,2220321,2220321,2220321,2220353,2220353,2220353,2220353,2220385,2220385,2220385,2220385,2220417,2220417]),new Uint32Array([2155330,2155394,0,2155458,2155522,2155586,2105732,0,2155650,2155714,2155778,2125314,2155842,2155906,2126274,2155970]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0]),new Uint32Array([2097729,2106017,2106017,2106017,2106017,2131297,2131297,2131297,2131297,2106081,2106081,2162049,2162049,2105953,2105953,2162337]),new Uint32Array([2097185,2097697,2097697,2097697,2097697,2135777,2135777,2135777,2135777,2097377,2097377,2097377,2097377,2097601,2097601,2097217]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([2139331,2139427,2139523,2139043,2133571,2132611,2139619,2139715,0,0,0,0,0,0,0,0]),new Uint32Array([2174113,2174145,2100897,2098177,2108289,2100865,2173601,2173633,2173985,2174113,2174145,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,23068672,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,18923778,23068672,23068672,23068672,23068672,18923842,23068672,23068672,23068672,23068672,18923906,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,0,2133857,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2177537,6291456,2177569,6291456,2177601,6291456,2177633,6291456,2177665,6291456,2177697,6291456,2177729,6291456,2177761,6291456]),new Uint32Array([2212481,2212513,2212545,2212577,2197121,2212609,2212641,2212673,2212705,2212737,2212769,2212801,2212833,2212865,2212897,2212929]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2098241,2108353,2170209,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,6291456,2108193,2172417,2112481,2098177]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456])],t=new Uint16Array([616,616,565,147,161,411,330,2,131,131,328,454,241,408,86,86,696,113,285,350,325,301,473,214,639,232,447,64,369,598,124,672,567,223,621,154,107,86,86,86,86,86,86,505,86,68,634,86,218,218,218,218,486,218,218,513,188,608,216,86,217,463,668,85,700,360,184,86,86,86,647,402,153,10,346,718,662,260,145,298,117,1,443,342,138,54,563,86,240,572,218,70,387,86,118,460,641,602,86,86,306,218,86,692,86,86,86,86,86,162,707,86,458,26,86,218,638,86,86,86,86,86,65,449,86,86,306,183,86,58,391,667,86,157,131,131,131,131,86,433,131,406,31,218,247,86,86,693,218,581,351,86,438,295,69,462,45,126,173,650,14,295,69,97,168,187,641,78,523,390,69,108,287,664,173,219,83,295,69,108,431,426,173,694,412,115,628,52,257,398,641,118,501,121,69,579,151,423,173,620,464,121,69,382,151,476,173,27,53,121,86,594,578,226,173,86,632,130,86,96,228,268,641,622,563,86,86,21,148,650,131,131,321,43,144,343,381,531,131,131,178,20,86,399,156,375,164,541,30,60,715,198,92,118,131,131,86,86,306,407,86,280,457,196,488,358,131,131,244,86,86,143,86,86,86,86,86,667,563,86,86,86,86,86,86,86,86,86,86,86,86,86,336,363,86,86,336,86,86,380,678,67,86,86,86,678,86,86,86,512,86,307,86,708,86,86,86,86,86,528,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,563,307,86,86,86,86,86,104,450,337,86,720,86,32,450,397,86,86,86,587,218,558,708,708,293,708,86,86,86,86,86,694,205,86,8,86,86,86,86,549,86,667,697,697,679,86,458,460,86,86,650,86,708,543,86,86,86,245,86,86,86,140,218,127,708,708,458,197,131,131,131,131,500,86,86,483,251,86,306,510,515,86,722,86,86,86,65,201,86,86,483,580,470,86,86,86,368,131,131,131,694,114,110,555,86,86,123,721,163,142,713,418,86,317,675,209,218,218,218,371,545,592,629,490,603,199,46,320,525,680,310,279,388,111,42,252,593,607,235,617,410,377,50,548,135,356,17,520,189,116,392,600,349,332,482,699,690,535,119,106,451,71,152,667,131,218,218,265,671,637,492,504,533,683,269,269,658,86,86,86,86,86,86,86,86,86,491,619,86,86,6,86,86,86,86,86,86,86,86,86,86,86,229,86,86,86,86,86,86,86,86,86,86,86,86,667,86,86,171,131,118,131,656,206,234,571,89,334,670,246,311,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,534,86,86,86,86,86,86,82,86,86,86,86,86,430,86,86,86,86,86,86,86,86,86,599,86,324,86,470,69,640,264,131,626,101,174,86,86,667,233,105,73,374,394,221,204,84,28,326,86,86,471,86,86,86,109,573,86,171,200,200,200,200,218,218,86,86,86,86,460,131,131,131,86,506,86,86,86,86,86,220,404,34,614,47,442,305,25,612,338,601,648,7,344,255,131,131,51,86,312,507,563,86,86,86,86,588,86,86,86,86,86,530,511,86,458,3,435,384,556,522,230,527,86,118,86,86,717,86,137,273,79,181,484,23,93,112,655,249,417,703,370,87,98,313,684,585,155,465,596,481,695,18,416,428,61,701,706,282,643,495,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,86,86,86,171,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,650,131,422,542,420,263,24,172,86,86,86,86,86,566,86,86,132,540,395,353,494,519,19,485,284,472,131,131,131,16,714,86,211,708,86,86,86,694,698,86,86,483,704,708,218,272,86,86,120,86,159,478,86,307,247,86,86,663,597,459,627,667,86,86,277,455,39,302,86,250,86,86,86,271,99,452,306,281,329,400,200,86,86,362,549,352,646,461,323,586,86,86,4,708,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,717,86,518,86,86,650,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,125,554,480,300,613,72,333,288,561,544,604,48,719,91,169,176,590,224,76,191,29,559,560,231,537,166,477,538,256,437,131,131,469,167,40,0,685,266,441,705,239,642,475,568,640,610,299,673,517,318,385,22,202,180,179,359,424,215,90,66,521,653,467,682,453,409,479,88,131,661,35,303,15,262,666,630,712,131,131,618,659,175,218,195,347,193,227,261,150,165,709,546,294,569,710,270,413,376,524,55,242,38,419,529,170,657,3,304,122,379,278,131,651,86,67,576,458,458,131,131,86,86,86,86,86,86,86,118,309,86,86,547,86,86,86,86,667,650,664,131,131,86,86,56,131,131,131,131,131,131,131,131,86,307,86,86,86,664,238,650,86,86,717,86,118,86,86,315,86,59,86,86,574,549,131,131,340,57,436,86,86,86,86,86,86,458,708,499,691,62,86,650,86,86,694,86,86,86,319,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,86,549,694,131,131,131,131,131,131,131,131,131,77,86,86,139,86,502,86,86,86,667,595,131,131,131,86,12,86,13,86,609,131,131,131,131,86,86,86,625,86,669,86,86,182,129,86,5,694,104,86,86,86,86,131,131,86,86,386,171,86,86,86,345,86,324,86,589,86,213,36,131,131,131,131,131,86,86,86,86,104,131,131,131,141,290,80,677,86,86,86,267,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,515,86,86,33,136,669,86,711,515,86,86,550,640,86,104,708,515,86,159,372,717,86,86,444,515,86,86,663,37,86,563,460,86,390,624,702,131,131,131,131,389,59,708,86,86,341,208,708,635,295,69,108,431,508,100,190,131,131,131,131,131,131,131,131,86,86,86,649,516,660,131,131,86,86,86,218,631,708,131,131,131,131,131,131,131,131,131,131,86,86,341,575,238,514,131,131,86,86,86,218,291,708,307,131,86,86,306,367,708,131,131,131,86,378,697,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,615,253,86,86,86,292,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,104,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,69,86,341,553,549,86,307,86,86,645,275,455,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,708,131,131,131,131,131,131,86,86,86,86,86,86,667,460,86,86,86,86,86,86,86,86,86,86,86,86,717,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,104,86,667,459,131,131,131,131,131,131,86,458,225,86,86,86,516,549,11,390,405,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,460,44,218,197,711,515,131,131,131,131,664,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,118,307,104,286,591,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,681,86,86,75,185,314,582,86,358,496,474,86,104,131,86,86,86,86,146,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,171,86,640,131,131,131,131,131,131,131,131,246,503,689,339,674,81,258,415,439,128,562,366,414,246,503,689,583,222,557,316,636,665,186,355,95,670,246,503,689,339,674,557,258,415,439,186,355,95,670,246,503,689,446,644,536,652,331,532,335,440,274,421,297,570,74,425,364,425,606,552,403,509,134,365,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,218,218,218,498,218,218,577,627,551,497,572,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,553,354,236,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,296,455,131,131,456,243,103,86,41,459,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,9,276,158,716,393,564,383,489,401,654,210,654,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,650,86,86,86,86,86,86,717,667,563,563,563,86,549,102,686,133,246,605,86,448,86,86,207,307,131,131,131,641,86,177,611,445,373,194,584,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,307,171,86,86,86,86,86,86,86,717,86,86,86,86,86,460,131,131,650,86,86,86,694,708,86,86,694,86,458,131,131,131,131,131,131,667,694,289,650,667,131,131,86,640,131,131,664,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,460,86,86,86,86,86,86,86,86,86,86,86,86,86,458,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,466,203,149,429,94,432,160,687,539,63,237,283,192,248,348,259,427,526,396,676,254,468,487,212,327,623,49,633,322,493,434,688,357,361,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]),{mapStr:"صلى الله عليه وسلمجل جلالهキロメートルrad∕s2エスクードキログラムキロワットグラムトンクルゼイロサンチームパーセントピアストルファラッドブッシェルヘクタールマンションミリバールレントゲン′′′′1⁄10viii(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)∫∫∫∫(오전)(오후)アパートアルファアンペアイニングエーカーカラットカロリーキュリーギルダークローネサイクルシリングバーレルフィートポイントマイクロミクロンメガトンリットルルーブル株式会社kcalm∕s2c∕kgاكبرمحمدصلعمرسولریال1⁄41⁄23⁄4 ̈́ྲཱྀླཱྀ ̈͂ ̓̀ ̓́ ̓͂ ̔̀ ̔́ ̔͂ ̈̀‵‵‵a/ca/sc/oc/utelfax1⁄71⁄91⁄32⁄31⁄52⁄53⁄54⁄51⁄65⁄61⁄83⁄85⁄87⁄8xii0⁄3∮∮∮(1)(2)(3)(4)(5)(6)(7)(8)(9)(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)::====(ᄀ)(ᄂ)(ᄃ)(ᄅ)(ᄆ)(ᄇ)(ᄉ)(ᄋ)(ᄌ)(ᄎ)(ᄏ)(ᄐ)(ᄑ)(ᄒ)(가)(나)(다)(라)(마)(바)(사)(아)(자)(차)(카)(타)(파)(하)(주)(一)(二)(三)(四)(五)(六)(七)(八)(九)(十)(月)(火)(水)(木)(金)(土)(日)(株)(有)(社)(名)(特)(財)(祝)(労)(代)(呼)(学)(監)(企)(資)(協)(祭)(休)(自)(至)pte10月11月12月ergltdアールインチウォンオンスオームカイリガロンガンマギニーケースコルナコーポセンチダースノットハイツパーツピクルフランペニヒヘルツペンスページベータボルトポンドホールホーンマイルマッハマルクヤードヤールユアンルピー10点11点12点13点14点15点16点17点18点19点20点21点22点23点24点hpabardm2dm3khzmhzghzthzmm2cm2km2mm3cm3km3kpampagpalogmilmolppmv∕ma∕m10日11日12日13日14日15日16日17日18日19日20日21日22日23日24日25日26日27日28日29日30日31日galffifflשּׁשּׂ ٌّ ٍّ َّ ُّ ِّ ّٰـَّـُّـِّتجمتحجتحمتخمتمجتمحتمخجمححميحمىسحجسجحسجىسمحسمجسممصححصممشحمشجيشمخشممضحىضخمطمحطممطميعجمعممعمىغممغميغمىفخمقمحقمملحملحيلحىلججلخملمحمحجمحيمجحمجممخممجخهمجهممنحمنحىنجمنجىنمينمىيممبخيتجيتجىتخيتخىتميتمىجميجحىجمىسخىصحيشحيضحيلجيلمييحييجييميمميقمينحيعميكمينجحمخيلجمكممجحيحجيمجيفميبحيسخينجيصلےقلے𝅘𝅥𝅮𝅘𝅥𝅯𝅘𝅥𝅰𝅘𝅥𝅱𝅘𝅥𝅲𝆹𝅥𝅮𝆺𝅥𝅮𝆹𝅥𝅯𝆺𝅥𝅯〔s〕ppv〔本〕〔三〕〔二〕〔安〕〔点〕〔打〕〔盗〕〔勝〕〔敗〕 ̄ ́ ̧ssi̇ijl·ʼndžljnjdz ̆ ̇ ̊ ̨ ̃ ̋ ιեւاٴوٴۇٴيٴक़ख़ग़ज़ड़ढ़फ़य़ড়ঢ়য়ਲ਼ਸ਼ਖ਼ਗ਼ਜ਼ਫ਼ଡ଼ଢ଼ําໍາຫນຫມགྷཌྷདྷབྷཛྷཀྵཱཱིུྲྀླྀྒྷྜྷྡྷྦྷྫྷྐྵaʾἀιἁιἂιἃιἄιἅιἆιἇιἠιἡιἢιἣιἤιἥιἦιἧιὠιὡιὢιὣιὤιὥιὦιὧιὰιαιάιᾶι ͂ὴιηιήιῆιὼιωιώιῶι ̳!! ̅???!!?rs°c°fnosmtmivix⫝̸ ゙ ゚よりコト333435참고주의363738394042444546474849503月4月5月6月7月8月9月hgevギガデシドルナノピコビルペソホンリラレムdaauovpciu平成昭和大正明治naμakakbmbgbpfnfμfμgmgμlmldlklfmnmμmpsnsμsmsnvμvkvpwnwμwmwkwkωmωbqcccddbgyhainkkktlnlxphprsrsvwbstմնմեմիվնմխיִײַשׁשׂאַאָאּבּגּדּהּוּזּטּיּךּכּלּמּנּסּףּפּצּקּרּתּוֹבֿכֿפֿאלئائەئوئۇئۆئۈئېئىئجئحئمئيبجبمبىبيتىتيثجثمثىثيخحضجضمطحظمغجفجفحفىفيقحقىقيكاكجكحكخكلكىكينخنىنيهجهىهييىذٰرٰىٰئرئزئنبزبنترتزتنثرثزثنمانرنزننيريزئخئهبهتهصخنههٰثهسهشهطىطيعىعيغىغيسىسيشىشيصىصيضىضيشخشرسرصرضراً ًـًـّ ْـْلآلألإ𝅗𝅥0,1,2,3,4,5,6,7,8,9,wzhvsdwcmcmddjほかココàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįĵķĺļľłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷÿźżɓƃƅɔƈɖɗƌǝəɛƒɠɣɩɨƙɯɲɵơƣƥʀƨʃƭʈưʊʋƴƶʒƹƽǎǐǒǔǖǘǚǜǟǡǣǥǧǩǫǭǯǵƕƿǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟƞȣȥȧȩȫȭȯȱȳⱥȼƚⱦɂƀʉʌɇɉɋɍɏɦɹɻʁʕͱͳʹͷ;ϳέίόύβγδεζθκλνξοπρστυφχψϊϋϗϙϛϝϟϡϣϥϧϩϫϭϯϸϻͻͼͽѐёђѓєѕіїјљњћќѝўџабвгдежзийклмнопрстуфхцчшщъыьэюяѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯաբգդզէըթժլծկհձղճյշոչպջռստրցփքօֆ་ⴧⴭნᏰᏱᏲᏳᏴᏵꙋɐɑᴂɜᴖᴗᴝᴥɒɕɟɡɥɪᵻʝɭᶅʟɱɰɳɴɸʂƫᴜʐʑḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿἐἑἒἓἔἕἰἱἲἳἴἵἶἷὀὁὂὃὄὅὑὓὕὗᾰᾱὲΐῐῑὶΰῠῡὺῥ`ὸ‐+−∑〈〉ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞⱡɫᵽɽⱨⱪⱬⱳⱶȿɀⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳬⳮⳳⵡ母龟丨丶丿乙亅亠人儿入冂冖冫几凵刀力勹匕匚匸卜卩厂厶又口囗士夂夊夕女子宀寸小尢尸屮山巛工己巾干幺广廴廾弋弓彐彡彳心戈戶手支攴文斗斤方无曰欠止歹殳毋比毛氏气爪父爻爿片牙牛犬玄玉瓜瓦甘生用田疋疒癶白皮皿目矛矢石示禸禾穴立竹米糸缶网羊羽老而耒耳聿肉臣臼舌舛舟艮色艸虍虫血行衣襾見角言谷豆豕豸貝赤走足身車辛辰辵邑酉釆里長門阜隶隹雨靑非面革韋韭音頁風飛食首香馬骨高髟鬥鬯鬲鬼魚鳥鹵鹿麥麻黃黍黑黹黽鼎鼓鼠鼻齊齒龍龜龠.〒卄卅ᄁᆪᆬᆭᄄᆰᆱᆲᆳᆴᆵᄚᄈᄡᄊ짜ᅢᅣᅤᅥᅦᅧᅨᅩᅪᅫᅬᅭᅮᅯᅰᅱᅲᅳᅴᅵᄔᄕᇇᇈᇌᇎᇓᇗᇙᄜᇝᇟᄝᄞᄠᄢᄣᄧᄩᄫᄬᄭᄮᄯᄲᄶᅀᅇᅌᇱᇲᅗᅘᅙᆄᆅᆈᆑᆒᆔᆞᆡ上中下甲丙丁天地問幼箏우秘男適優印注項写左右医宗夜テヌモヨヰヱヲꙁꙃꙅꙇꙉꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝺꝼᵹꝿꞁꞃꞅꞇꞌꞑꞓꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩɬʞʇꭓꞵꞷꬷꭒᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩᎪᎫᎬᎭᎮᎯᎰᎱᎲᎳᎴᎵᎶᎷᎸᎹᎺᎻᎼᎽᎾᎿᏀᏁᏂᏃᏄᏅᏆᏇᏈᏉᏊᏋᏌᏍᏎᏏᏐᏑᏒᏓᏔᏕᏖᏗᏘᏙᏚᏛᏜᏝᏞᏟᏠᏡᏢᏣᏤᏥᏦᏧᏨᏩᏪᏫᏬᏭᏮᏯ豈更賈滑串句契喇奈懶癩羅蘿螺裸邏樂洛烙珞落酪駱亂卵欄爛蘭鸞嵐濫藍襤拉臘蠟廊朗浪狼郎來冷勞擄櫓爐盧蘆虜路露魯鷺碌祿綠菉錄論壟弄籠聾牢磊賂雷壘屢樓淚漏累縷陋勒肋凜凌稜綾菱陵讀拏諾丹寧怒率異北磻便復不泌數索參塞省葉說殺沈拾若掠略亮兩凉梁糧良諒量勵呂廬旅濾礪閭驪麗黎曆歷轢年憐戀撚漣煉璉秊練聯輦蓮連鍊列劣咽烈裂廉念捻殮簾獵令囹嶺怜玲瑩羚聆鈴零靈領例禮醴隸惡了僚寮尿料燎療蓼遼暈阮劉杻柳流溜琉留硫紐類戮陸倫崙淪輪律慄栗隆利吏履易李梨泥理痢罹裏裡離匿溺吝燐璘藺隣鱗麟林淋臨笠粒狀炙識什茶刺切度拓糖宅洞暴輻降廓兀嗀塚晴凞猪益礼神祥福靖精蘒諸逸都飯飼館鶴郞隷侮僧免勉勤卑喝嘆器塀墨層悔慨憎懲敏既暑梅海渚漢煮爫琢碑祉祈祐祖禍禎穀突節縉繁署者臭艹著褐視謁謹賓贈辶難響頻恵𤋮舘並况全侀充冀勇勺啕喙嗢墳奄奔婢嬨廒廙彩徭惘慎愈慠戴揄搜摒敖望杖滛滋瀞瞧爵犯瑱甆画瘝瘟盛直睊着磌窱类絛缾荒華蝹襁覆調請諭變輸遲醙鉶陼韛頋鬒𢡊𢡄𣏕㮝䀘䀹𥉉𥳐𧻓齃龎עםٱٻپڀٺٿٹڤڦڄڃچڇڍڌڎڈژڑکگڳڱںڻۀہھۓڭۋۅۉ、〖〗—–_{}【】《》「」『』[]#&*-<>\\$%@ءؤة\"'^|~⦅⦆・ゥャ¢£¬¦¥₩│←↑→↓■○𐐨𐐩𐐪𐐫𐐬𐐭𐐮𐐯𐐰𐐱𐐲𐐳𐐴𐐵𐐶𐐷𐐸𐐹𐐺𐐻𐐼𐐽𐐾𐐿𐑀𐑁𐑂𐑃𐑄𐑅𐑆𐑇𐑈𐑉𐑊𐑋𐑌𐑍𐑎𐑏𐓘𐓙𐓚𐓛𐓜𐓝𐓞𐓟𐓠𐓡𐓢𐓣𐓤𐓥𐓦𐓧𐓨𐓩𐓪𐓫𐓬𐓭𐓮𐓯𐓰𐓱𐓲𐓳𐓴𐓵𐓶𐓷𐓸𐓹𐓺𐓻𐳀𐳁𐳂𐳃𐳄𐳅𐳆𐳇𐳈𐳉𐳊𐳋𐳌𐳍𐳎𐳏𐳐𐳑𐳒𐳓𐳔𐳕𐳖𐳗𐳘𐳙𐳚𐳛𐳜𐳝𐳞𐳟𐳠𐳡𐳢𐳣𐳤𐳥𐳦𐳧𐳨𐳩𐳪𐳫𐳬𐳭𐳮𐳯𐳰𐳱𐳲𑣀𑣁𑣂𑣃𑣄𑣅𑣆𑣇𑣈𑣉𑣊𑣋𑣌𑣍𑣎𑣏𑣐𑣑𑣒𑣓𑣔𑣕𑣖𑣗𑣘𑣙𑣚𑣛𑣜𑣝𑣞𑣟ıȷ∇∂𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃ٮڡٯ字双多解交映無前後再新初終販声吹演投捕遊指禁空合満申割営配得可丽丸乁𠄢你侻倂偺備像㒞𠘺兔兤具𠔜㒹內𠕋冗冤仌冬𩇟刃㓟刻剆剷㔕包匆卉博即卽卿𠨬灰及叟𠭣叫叱吆咞吸呈周咢哶唐啓啣善喫喳嗂圖圗噑噴壮城埴堍型堲報墬𡓤売壷夆夢奢𡚨𡛪姬娛娧姘婦㛮嬈嬾𡧈寃寘寳𡬘寿将㞁屠峀岍𡷤嵃𡷦嵮嵫嵼巡巢㠯巽帨帽幩㡢𢆃㡼庰庳庶𪎒𢌱舁弢㣇𣊸𦇚形彫㣣徚忍志忹悁㤺㤜𢛔惇慈慌慺憲憤憯懞戛扝抱拔捐𢬌挽拼捨掃揤𢯱搢揅掩㨮摩摾撝摷㩬敬𣀊旣書晉㬙㬈㫤冒冕最暜肭䏙朡杞杓𣏃㭉柺枅桒𣑭梎栟椔楂榣槪檨𣚣櫛㰘次𣢧歔㱎歲殟殻𣪍𡴋𣫺汎𣲼沿泍汧洖派浩浸涅𣴞洴港湮㴳滇𣻑淹潮𣽞𣾎濆瀹瀛㶖灊災灷炭𠔥煅𤉣熜爨牐𤘈犀犕𤜵𤠔獺王㺬玥㺸瑇瑜璅瓊㼛甤𤰶甾𤲒𢆟瘐𤾡𤾸𥁄㿼䀈𥃳𥃲𥄙𥄳眞真瞋䁆䂖𥐝硎䃣𥘦𥚚𥛅秫䄯穊穏𥥼𥪧䈂𥮫篆築䈧𥲀糒䊠糨糣紀𥾆絣䌁緇縂繅䌴𦈨𦉇䍙𦋙罺𦌾羕翺𦓚𦔣聠𦖨聰𣍟䏕育脃䐋脾媵𦞧𦞵𣎓𣎜舄辞䑫芑芋芝劳花芳芽苦𦬼茝荣莭茣莽菧荓菊菌菜𦰶𦵫𦳕䔫蓱蓳蔖𧏊蕤𦼬䕝䕡𦾱𧃒䕫虐虧虩蚩蚈蜎蛢蜨蝫螆蟡蠁䗹衠𧙧裗裞䘵裺㒻𧢮𧥦䚾䛇誠𧲨貫賁贛起𧼯𠠄跋趼跰𠣞軔𨗒𨗭邔郱鄑𨜮鄛鈸鋗鋘鉼鏹鐕𨯺開䦕閷𨵷䧦雃嶲霣𩅅𩈚䩮䩶韠𩐊䪲𩒖頩𩖶飢䬳餩馧駂駾䯎𩬰鱀鳽䳎䳭鵧𪃎䳸𪄅𪈎𪊑䵖黾鼅鼏鼖𪘀",mapChar:function(r){return r>=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}};var e,t}.apply(t,[]))||(e.exports=n)},94489:(e,t,r)=>{"use strict";var n=r(28847)(r(93106));function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function p(e){throw new RangeError(f[e])}function y(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]);var i=function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(l,".")).split("."),t).join(".");return n+i}function m(e){for(var t=[],r=0,n=e.length;r=55296&&i<=56319&&r>1,e+=d(e/t);e>455;n+=s)e=d(e/35);return d(n+36*e/(e+38))},v=function(e){var t,r=[],n=e.length,i=0,o=128,u=72,c=e.lastIndexOf("-");c<0&&(c=0);for(var l=0;l=128&&p("not-basic"),r.push(e.charCodeAt(l));for(var f=c>0?c+1:0;f=n&&p("invalid-input");var g=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:s;(g>=s||g>d((a-i)/y))&&p("overflow"),i+=g*y;var v=m<=u?1:m>=u+26?26:m-u;if(gd(a/w)&&p("overflow"),y*=w}var A=r.length+1;u=b(i-h,A,0==h),d(i/A)>a-o&&p("overflow"),o+=d(i/A),i%=A,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},w=function(e){var t,r=[],n=(e=m(e)).length,o=128,u=0,c=72,l=i(e);try{for(l.s();!(t=l.n()).done;){var f=t.value;f<128&&r.push(h(f))}}catch(e){l.e(e)}finally{l.f()}var y=r.length,v=y;for(y&&r.push("-");v=o&&Ed((a-u)/S)&&p("overflow"),u+=(A-o)*S,o=A;var x,_=i(e);try{for(_.s();!(x=_.n()).done;){var P=x.value;if(Pa&&p("overflow"),P==o){for(var T=u,I=s;;I+=s){var O=I<=c?1:I>=c+26?26:I-c;if(T{"use strict";var n,i;r(28847)(r(3355)),n=[r(94489),r(32996)],void 0===(i=function(e,t){return function(e,t){function r(r,n,i){for(var o=[],a=e.ucs2.decode(r),s=0;s>23,d=l>>21&3,h=l>>5&65535,p=31&l,y=t.mapStr.substr(h,p);if(0===d||n&&1&f)throw new Error("Illegal char "+c);1===d?o.push(y):2===d?o.push(i?y:c):3===d&&o.push(c)}return o.join("").normalize("NFC")}function n(t,n,o){void 0===o&&(o=!1);var a=r(t,o,n).split(".");return(a=a.map((function(t){return t.startsWith("xn--")?i(t=e.decode(t.substring(4)),o,!1):i(t,o,n),t}))).join(".")}function i(e,n,i){if("-"===e[2]&&"-"===e[3])throw new Error("Failed to validate "+e);if(e.startsWith("-")||e.endsWith("-"))throw new Error("Failed to validate "+e);if(e.includes("."))throw new Error("Failed to validate "+e);if(r(e,n,i)!==e)throw new Error("Failed to validate "+e);var o=e.codePointAt(0);if(t.mapChar(o)&2<<23)throw new Error("Label contains illegal character: "+o)}return{toUnicode:function(e,t){return void 0===t&&(t={}),n(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)},toAscii:function(t,r){void 0===r&&(r={});var i,o=!("transitional"in r)||r.transitional,a="useStd3ASCII"in r&&r.useStd3ASCII,s="verifyDnsLength"in r&&r.verifyDnsLength,u=n(t,o,a).split(".").map(e.toASCII),c=u.join(".");if(s){if(c.length<1||c.length>253)throw new Error("DNS name has wrong length: "+c);for(i=0;i63)throw new Error("DNS label has wrong length: "+l)}}return c}}}(e,t)}.apply(t,n))||(e.exports=i)},83226:(e,t)=>{"use strict";t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,l=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*y}},41736:e=>{"use strict";"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},69446:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(11191)(),o=r(80593)("Object.prototype.toString"),a=function(e){return!(i&&e&&"object"===(0,n.default)(e)&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},s=function(e){return!!a(e)||null!==e&&"object"===(0,n.default)(e)&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},u=function(){return a(arguments)}();a.isLegacyArguments=s,e.exports=u?a:s},41493:(e,t,r)=>{"use strict";var n,i,o=r(28847)(r(3355)),a=Function.prototype.toString,s="object"===("undefined"==typeof Reflect?"undefined":(0,o.default)(Reflect))&&null!==Reflect&&Reflect.apply;if("function"==typeof s&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw i}}),i={},s((function(){throw 42}),null,n)}catch(e){e!==i&&(s=null)}else s=null;var u=/^\s*class\b/,c=function(e){try{var t=a.call(e);return u.test(t)}catch(e){return!1}},l=function(e){try{return!c(e)&&(a.call(e),!0)}catch(e){return!1}},f=Object.prototype.toString,d="function"==typeof Symbol&&!!Symbol.toStringTag,h=!(0 in[,]),p=function(){return!1};if("object"===("undefined"==typeof document?"undefined":(0,o.default)(document))){var y=document.all;f.call(y)===f.call(document.all)&&(p=function(e){if((h||!e)&&(void 0===e||"object"===(0,o.default)(e)))try{var t=f.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=s?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!==(0,o.default)(e))return!1;try{s(e,null,n)}catch(e){if(e!==i)return!1}return!c(e)&&l(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!==(0,o.default)(e))return!1;if(d)return l(e);if(c(e))return!1;var t=f.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&l(e)}},27277:e=>{"use strict";e.exports=function(e){if(!e)return!1;var r=t.call(e);return"[object Function]"===r||"function"==typeof e&&"[object RegExp]"!==r||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},14477:(e,t,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(11191)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},8619:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+(0,n.default)(e)+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},28915:(e,t,r)=>{"use strict";var n=r(72337);e.exports=function(e){return!!n(e)}},39484:e=>{"use strict";var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},24858:(e,t,r)=>{"use strict";e=r.nmd(e);var n=r(19142),i=r(28847)(r(3355));!function(){var t="object"===("undefined"==typeof window?"undefined":(0,i.default)(window))?window:{};!t.JS_SHA3_NO_NODE_JS&&"object"===(void 0===n?"undefined":(0,i.default)(n))&&n.versions&&n.versions.node&&(t=r.g);for(var o=!t.JS_SHA3_NO_COMMON_JS&&"object"===(0,i.default)(e)&&e.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],u=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],c=[224,256,384,512],l=["hex","buffer","arrayBuffer","array"],f=function(e,t,r){return function(n){return new k(e,t,e).update(n)[r]()}},d=function(e,t,r){return function(n,i){return new k(e,t,i).update(n)[r]()}},h=function(e,t){var r=f(e,t,"hex");r.create=function(){return new k(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}k.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,o=this.blocks,a=this.byteCount,u=this.blockCount,c=0,l=this.s;c>2]|=e[c]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(o[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=a){for(this.start=r-a,this.block=o[u],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(E(r),o=0)}return i&&(e=r[o],i>0&&(u+=a[e>>4&15]+a[15&e]),i>1&&(u+=a[e>>12&15]+a[e>>8&15]),i>2&&(u+=a[e>>20&15]+a[e>>16&15])),u},k.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&E(n)}return o&&(e=s<<2,t=n[a],o>0&&(u[e]=255&t),o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u};var E=function(e){var t,r,n,i,o,a,s,c,l,f,d,h,p,y,m,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|l>>>31),r=o^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(f<<1|d>>>31),r=s^(d<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(h<<1|p>>>31),r=l^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,y=e[0],m=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=y^~g&v,e[1]=m^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&y,e[7]=k^~S&m,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~y&g,e[9]=S^~m&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=u[n],e[1]^=u[n+1]};if(o)e.exports=y;else for(g=0;g{"use strict";e.exports=r(22109)(r(80801))},22109:(e,t,r)=>{"use strict";var n=r(46543),i=r(40274);e.exports=function(e){var t=n(e),r=i(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+e)}}}},46543:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(69721)),a=i(r(58985)),s=i(r(15163)),u=i(r(34650)),c=i(r(21949)),l=r(86505).Transform;e.exports=function(e){return function(t){(0,s.default)(f,t);var r,i,l=(r=f,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,c.default)(r);if(i){var n=(0,c.default)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,u.default)(this,e)});function f(t,r,n,i,a){var s;return(0,o.default)(this,f),(s=l.call(this,a))._rate=t,s._capacity=r,s._delimitedSuffix=n,s._hashBitLength=i,s._options=a,s._state=new e,s._state.initialize(t,r),s._finalized=!1,s}return(0,a.default)(f,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)}},{key:"_flush",value:function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}},{key:"update",value:function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}},{key:"digest",value:function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new f(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),f}(l)}},40274:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(69721)),a=i(r(58985)),s=i(r(15163)),u=i(r(34650)),c=i(r(21949)),l=r(86505).Transform;e.exports=function(e){return function(t){(0,s.default)(f,t);var r,i,l=(r=f,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,c.default)(r);if(i){var n=(0,c.default)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,u.default)(this,e)});function f(t,r,n,i){var a;return(0,o.default)(this,f),(a=l.call(this,i))._rate=t,a._capacity=r,a._delimitedSuffix=n,a._options=i,a._state=new e,a._state.initialize(t,r),a._finalized=!1,a}return(0,a.default)(f,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)}},{key:"_flush",value:function(){}},{key:"_read",value:function(e){this.push(this.squeeze(e))}},{key:"update",value:function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}},{key:"squeeze",value:function(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new f(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),f}(l)}},25612:(e,t)=>{"use strict";var r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(var t=0;t<24;++t){var n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],f=e[8]^e[18]^e[28]^e[38]^e[48],d=e[9]^e[19]^e[29]^e[39]^e[49],h=f^(o<<1|a>>>31),p=d^(a<<1|o>>>31),y=e[0]^h,m=e[1]^p,g=e[10]^h,b=e[11]^p,v=e[20]^h,w=e[21]^p,A=e[30]^h,k=e[31]^p,E=e[40]^h,S=e[41]^p;h=n^(s<<1|u>>>31),p=i^(u<<1|s>>>31);var x=e[2]^h,_=e[3]^p,P=e[12]^h,T=e[13]^p,I=e[22]^h,O=e[23]^p,B=e[32]^h,C=e[33]^p,N=e[42]^h,R=e[43]^p;h=o^(c<<1|l>>>31),p=a^(l<<1|c>>>31);var M=e[4]^h,U=e[5]^p,L=e[14]^h,j=e[15]^p,F=e[24]^h,D=e[25]^p,H=e[34]^h,z=e[35]^p,q=e[44]^h,G=e[45]^p;h=s^(f<<1|d>>>31),p=u^(d<<1|f>>>31);var K=e[6]^h,V=e[7]^p,J=e[16]^h,W=e[17]^p,Q=e[26]^h,Z=e[27]^p,Y=e[36]^h,X=e[37]^p,$=e[46]^h,ee=e[47]^p;h=c^(n<<1|i>>>31),p=l^(i<<1|n>>>31);var te=e[8]^h,re=e[9]^p,ne=e[18]^h,ie=e[19]^p,oe=e[28]^h,ae=e[29]^p,se=e[38]^h,ue=e[39]^p,ce=e[48]^h,le=e[49]^p,fe=y,de=m,he=b<<4|g>>>28,pe=g<<4|b>>>28,ye=v<<3|w>>>29,me=w<<3|v>>>29,ge=k<<9|A>>>23,be=A<<9|k>>>23,ve=E<<18|S>>>14,we=S<<18|E>>>14,Ae=x<<1|_>>>31,ke=_<<1|x>>>31,Ee=T<<12|P>>>20,Se=P<<12|T>>>20,xe=I<<10|O>>>22,_e=O<<10|I>>>22,Pe=C<<13|B>>>19,Te=B<<13|C>>>19,Ie=N<<2|R>>>30,Oe=R<<2|N>>>30,Be=U<<30|M>>>2,Ce=M<<30|U>>>2,Ne=L<<6|j>>>26,Re=j<<6|L>>>26,Me=D<<11|F>>>21,Ue=F<<11|D>>>21,Le=H<<15|z>>>17,je=z<<15|H>>>17,Fe=G<<29|q>>>3,De=q<<29|G>>>3,He=K<<28|V>>>4,ze=V<<28|K>>>4,qe=W<<23|J>>>9,Ge=J<<23|W>>>9,Ke=Q<<25|Z>>>7,Ve=Z<<25|Q>>>7,Je=Y<<21|X>>>11,We=X<<21|Y>>>11,Qe=ee<<24|$>>>8,Ze=$<<24|ee>>>8,Ye=te<<27|re>>>5,Xe=re<<27|te>>>5,$e=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|ue>>>24,it=ue<<8|se>>>24,ot=ce<<14|le>>>18,at=le<<14|ce>>>18;e[0]=fe^~Ee&Me,e[1]=de^~Se&Ue,e[10]=He^~$e&ye,e[11]=ze^~et&me,e[20]=Ae^~Ne&Ke,e[21]=ke^~Re&Ve,e[30]=Ye^~he&xe,e[31]=Xe^~pe&_e,e[40]=Be^~qe&tt,e[41]=Ce^~Ge&rt,e[2]=Ee^~Me&Je,e[3]=Se^~Ue&We,e[12]=$e^~ye&Pe,e[13]=et^~me&Te,e[22]=Ne^~Ke&nt,e[23]=Re^~Ve&it,e[32]=he^~xe&Le,e[33]=pe^~_e&je,e[42]=qe^~tt&ge,e[43]=Ge^~rt&be,e[4]=Me^~Je&ot,e[5]=Ue^~We&at,e[14]=ye^~Pe&Fe,e[15]=me^~Te&De,e[24]=Ke^~nt&ve,e[25]=Ve^~it&we,e[34]=xe^~Le&Qe,e[35]=_e^~je&Ze,e[44]=tt^~ge&Ie,e[45]=rt^~be&Oe,e[6]=Je^~ot&fe,e[7]=We^~at&de,e[16]=Pe^~Fe&He,e[17]=Te^~De&ze,e[26]=nt^~ve&Ae,e[27]=it^~we&ke,e[36]=Le^~Qe&Ye,e[37]=je^~Ze&Xe,e[46]=ge^~Ie&Be,e[47]=be^~Oe&Ce,e[8]=ot^~fe&Ee,e[9]=at^~de&Se,e[18]=Fe^~He&$e,e[19]=De^~ze&et,e[28]=ve^~Ae&Ne,e[29]=we^~ke&Re,e[38]=Qe^~Ye&he,e[39]=Ze^~Xe&pe,e[48]=Ie^~Be&qe,e[49]=Oe^~Ce&Ge,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},80801:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(25612);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return t},o.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=o},50807:(e,t,r)=>{"use strict";var n=r(41736),i=r(22353),o=r(48850).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<>>32-t}function c(e,t,r,n,i,o,a){return u(e+(t&r|~t&n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return u(e+(t&n|r&~n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return u(e+(t^r^n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return u(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=l(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=l(o,r,n,i,e[6],3225465664,9),i=l(i,o,r,n,e[11],643717713,14),n=l(n,i,o,r,e[0],3921069994,20),r=l(r,n,i,o,e[5],3593408605,5),o=l(o,r,n,i,e[10],38016083,9),i=l(i,o,r,n,e[15],3634488961,14),n=l(n,i,o,r,e[4],3889429448,20),r=l(r,n,i,o,e[9],568446438,5),o=l(o,r,n,i,e[14],3275163606,9),i=l(i,o,r,n,e[3],4107603335,14),n=l(n,i,o,r,e[8],1163531501,20),r=l(r,n,i,o,e[13],2850285829,5),o=l(o,r,n,i,e[2],4243563512,9),i=l(i,o,r,n,e[7],1735328473,14),r=f(r,n=l(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=d(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,r,n,i,e[7],1126891415,10),i=d(i,o,r,n,e[14],2878612391,15),n=d(n,i,o,r,e[5],4237533241,21),r=d(r,n,i,o,e[12],1700485571,6),o=d(o,r,n,i,e[3],2399980690,10),i=d(i,o,r,n,e[10],4293915773,15),n=d(n,i,o,r,e[1],2240044497,21),r=d(r,n,i,o,e[8],1873313359,6),o=d(o,r,n,i,e[15],4264355552,10),i=d(i,o,r,n,e[6],2734768916,15),n=d(n,i,o,r,e[13],1309151649,21),r=d(r,n,i,o,e[4],4149444226,6),o=d(o,r,n,i,e[11],3174756917,10),i=d(i,o,r,n,e[2],718787259,15),n=d(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},37441:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(19142),o=r(28847),a=o(r(82247)),s=o(r(3355)),u=o(r(94571)),c=o(r(90775)),l=o(r(58985)),f=o(r(69721)),d=o(r(15163)),h=o(r(34650)),p=o(r(21949)),y=o(r(22940));function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t{"use strict";var n=r(31734),i=r(82202);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),l=s.toRed(o);t>0;t--){var f=this._randrange(new n(2),s);r&&r(f);var d=f.toRed(o).redPow(c);if(0!==d.cmp(a)&&0!==d.cmp(l)){for(var h=1;h0;t--){var l=this._randrange(new n(2),a),f=e.gcd(l);if(0!==f.cmpn(1))return f;var d=l.toRed(i).redPow(u);if(0!==d.cmp(o)&&0!==d.cmp(c)){for(var h=1;h{"use strict";function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},96580:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},36565:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.code=r,this.alphabet=o,n&&o&&(this.engine=n(o))}return(0,o.default)(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}();e.exports=a},52642:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base16 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"hex")}}}},96494:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(r){var n,i=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(r,e)}}}},76627:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?i.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var o=n.indexOf("=");return o>0&&!t&&(n=n.substring(0,o)),n},decode:function(t){var r,o=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"base64")}}}},7905:(e,t,r)=>{"use strict";var n=r(36565),i=r(27548),o=r(52642),a=r(96494),s=r(76627),u=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],c=u.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),l=u.reduce((function(e,t){return e[t[1]]=c[t[0]],e}),{});e.exports={names:c,codes:l}},6086:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(7905);(t=e.exports=a).encode=function(e,t){var r=s(e);return a(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=s(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return s(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));var o=new Error("Unsupported encoding");function a(e,t){if(!t)throw new Error("requires an encoded buffer");var r=s(e),i=n.from(r.code);return function(e,t){s(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function s(e){var t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw o;t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}},54093:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(24070),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(29033).Buffer,i=r(26657),o=r(7054),a=r(86002),s=r(55576);(t=e.exports).addPrefix=function(e,t){var r;if(n.isBuffer(e))r=s.varintBufferEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");r=a[e]}return n.concat([r,t])},t.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},t.getCodec=function(e){var t=i.decode(e),r=o.get(t);if(void 0===r)throw new Error("Code ".concat(t," not found"));return r},t.getName=function(e){return o.get(e)},t.getNumber=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return s.varintBufferDecode(t)[0]},t.getCode=function(e){return i.decode(e)},t.getCodeVarint=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=function(e){return i.encode(e)};var u=r(54093);Object.assign(t,u),t.print=r(11032)},7054:(e,t,r)=>{"use strict";var n=r(24070),i=new Map;for(var o in n){var a=n[o];i.set(a,o)}e.exports=Object.freeze(i)},11032:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(24070),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(29033).Buffer,i=r(26657);function o(e){return parseInt(e.toString("hex"),16)}function a(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),n.from(t,"hex")}e.exports={numberToBuffer:a,bufferToNumber:o,varintBufferEncode:function(e){return n.from(i.encode(o(e)))},varintBufferDecode:function(e){return a(i.decode(e))},varintEncode:function(e){return n.from(i.encode(e))}}},86002:(e,t,r)=>{"use strict";var n=r(24070),i=r(55576).varintEncode,o={};for(var a in n){var s=n[a];o[a]=i(s)}e.exports=Object.freeze(o)},71786:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.code=r,this.alphabet=o,n&&o&&(this.engine=n(o))}return(0,o.default)(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}();e.exports=a},37739:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base16 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"hex")}}}},70976:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(r){var n,i=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(r,e)}}}},88504:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?i.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var o=n.indexOf("=");return o>0&&!t&&(n=n.substring(0,o)),n},decode:function(t){var r,o=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"base64")}}}},12263:(e,t,r)=>{"use strict";var n=r(71786),i=r(27548),o=r(37739),a=r(70976),s=r(88504),u=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],c=u.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),l=u.reduce((function(e,t){return e[t[1]]=c[t[0]],e}),{});e.exports={names:c,codes:l}},2592:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(12263);function o(e,t){if(!t)throw new Error("requires an encoded buffer");var r=a(e),i=n.from(r.code);return function(e,t){a(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function a(e){var t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw new Error("Unsupported encoding");t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}(t=e.exports=o).encode=function(e,t){var r=a(e);return o(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=a(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return a(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes))},81269:(e,t)=>{"use strict";t.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),t.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),t.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},77748:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(2592),o=r(26657),a=r(81269);function s(e){t.decode(e)}t.names=a.names,t.codes=a.codes,t.defaultLengths=a.defaultLengths,t.toHexString=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},t.fromHexString=function(e){return n.from(e,"hex")},t.toB58String=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return i.encode("base58btc",e).toString().slice(1)},t.fromB58String=function(e){var t=e;return n.isBuffer(e)&&(t=e.toString()),i.decode("z"+t)},t.decode=function(e){if(!n.isBuffer(e))throw new Error("multihash must be a Buffer");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");var r=o.decode(e);if(!t.isValidCode(r))throw new Error("multihash unknown function code: 0x".concat(r.toString(16)));e=e.slice(o.decode.bytes);var i=o.decode(e);if(i<0)throw new Error("multihash invalid length: ".concat(i));if((e=e.slice(o.decode.bytes)).length!==i)throw new Error("multihash length inconsistent: 0x".concat(e.toString("hex")));return{code:r,name:a.codes[r],length:i,digest:e}},t.encode=function(e,r,i){if(!e||void 0===r)throw new Error("multihash encode requires at least two args: digest, code");var a=t.coerceCode(r);if(!n.isBuffer(e))throw new Error("digest should be a Buffer");if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.");return n.concat([n.from(o.encode(a)),n.from(o.encode(i)),e])},t.coerceCode=function(e){var r=e;if("string"==typeof e){if(void 0===a.names[e])throw new Error("Unrecognized hash function named: ".concat(e));r=a.names[e]}if("number"!=typeof r)throw new Error("Hash function code should be a number. Got: ".concat(r));if(void 0===a.codes[r]&&!t.isAppCode(r))throw new Error("Unrecognized function code: ".concat(r));return r},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!a.codes[e]},t.validate=s,t.prefix=function(e){return s(e),e.slice(0,2)}},77277:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(36931);e.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new i(1),r=String(e).toLowerCase().trim(),a="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),s=o(r);if("-"===s.substr(0,1)&&(s=o(s.slice(1)),t=new i(-1,10)),!(s=""===s?"0":s).match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||!0===a&&s.match(/^[0-9A-Fa-f]+$/))return new i(s,16).mul(t);if((s.match(/^-?[0-9]+$/)||""===s)&&!1===a)return new i(s,10).mul(t)}else if("object"===(0,n.default)(e)&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new i(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},33103:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u{"use strict";var n,i,o;e=r.nmd(e);var a,s=r(28847)(r(3355));"undefined"!=typeof self&&self,a=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}([function(e,t,r){r.d(t,"j",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"h",(function(){return s})),r.d(t,"b",(function(){return u})),r.d(t,"k",(function(){return c})),r.d(t,"e",(function(){return l})),r.d(t,"g",(function(){return f})),r.d(t,"i",(function(){return d})),r.d(t,"a",(function(){return h})),r.d(t,"f",(function(){return p}));var n=r(1),i=c((function(e,t){var r=t.length;return c((function(n){for(var i=0;i0&&(i=r),r=e[c++]);)switch(z++,"\n"===r?(G++,q=0):q++,L){case h:if("{"===r)L=y;else if("["===r)L=g;else if(!V(r))return K("Non-whitespace before {[.");continue;case w:case y:if(V(r))continue;if(L===w)j.push(A);else{if("}"===r){s({}),u(),L=j.pop()||p;continue}j.push(m)}if('"'!==r)return K('Malformed object key should start with " ');L=v;continue;case A:case m:if(V(r))continue;if(":"===r)L===m?(j.push(m),void 0!==o&&(s({}),a(o),o=void 0),H++):void 0!==o&&(a(o),o=void 0),L=p;else if("}"===r)void 0!==o&&(s(o),u(),o=void 0),u(),H--,L=j.pop()||p;else{if(","!==r)return K("Bad object");L===m&&j.push(m),void 0!==o&&(s(o),u(),o=void 0),L=w}continue;case g:case p:if(V(r))continue;if(L===g){if(s([]),H++,L=p,"]"===r){u(),H--,L=j.pop()||p;continue}j.push(b)}if('"'===r)L=v;else if("{"===r)L=y;else if("["===r)L=g;else if("t"===r)L=k;else if("f"===r)L=x;else if("n"===r)L=I;else if("-"===r)R+=r;else if("0"===r)R+=r,L=20;else{if(-1==="123456789".indexOf(r))return K("Bad value");R+=r,L=20}continue;case b:if(","===r)j.push(b),void 0!==o&&(s(o),u(),o=void 0),L=p;else{if("]"!==r){if(V(r))continue;return K("Bad array")}void 0!==o&&(s(o),u(),o=void 0),u(),H--,L=j.pop()||p}continue;case v:void 0===o&&(o="");var d=c-1;e:for(;;){for(;D>0;)if(F+=r,r=e.charAt(c++),4===D?(o+=String.fromCharCode(parseInt(F,16)),D=0,d=c-1):D++,!r)break e;if('"'===r&&!M){L=j.pop()||p,o+=e.substring(d,c-1);break}if(!("\\"!==r||M||(M=!0,o+=e.substring(d,c-1),r=e.charAt(c++))))break;if(M){if(M=!1,"n"===r?o+="\n":"r"===r?o+="\r":"t"===r?o+="\t":"f"===r?o+="\f":"b"===r?o+="\b":"u"===r?(D=1,F=""):o+=r,r=e.charAt(c++),d=c-1,r)continue;break}f.lastIndex=c;var J=f.exec(e);if(!J){c=e.length+1,o+=e.substring(d,c-1);break}if(c=J.index+1,!(r=e.charAt(J.index))){o+=e.substring(d,c-1);break}}continue;case k:if(!r)continue;if("r"!==r)return K("Invalid true started with t"+r);L=E;continue;case E:if(!r)continue;if("u"!==r)return K("Invalid true started with tr"+r);L=S;continue;case S:if(!r)continue;if("e"!==r)return K("Invalid true started with tru"+r);s(!0),u(),L=j.pop()||p;continue;case x:if(!r)continue;if("a"!==r)return K("Invalid false started with f"+r);L=_;continue;case _:if(!r)continue;if("l"!==r)return K("Invalid false started with fa"+r);L=P;continue;case P:if(!r)continue;if("s"!==r)return K("Invalid false started with fal"+r);L=T;continue;case T:if(!r)continue;if("e"!==r)return K("Invalid false started with fals"+r);s(!1),u(),L=j.pop()||p;continue;case I:if(!r)continue;if("u"!==r)return K("Invalid null started with n"+r);L=O;continue;case O:if(!r)continue;if("l"!==r)return K("Invalid null started with nu"+r);L=B;continue;case B:if(!r)continue;if("l"!==r)return K("Invalid null started with nul"+r);s(null),u(),L=j.pop()||p;continue;case C:if("."!==r)return K("Leading zero not followed by .");R+=r,L=20;continue;case 20:if(-1!=="0123456789".indexOf(r))R+=r;else if("."===r){if(-1!==R.indexOf("."))return K("Invalid number has two dots");R+=r}else if("e"===r||"E"===r){if(-1!==R.indexOf("e")||-1!==R.indexOf("E"))return K("Invalid number has two exponential");R+=r}else if("+"===r||"-"===r){if("e"!==i&&"E"!==i)return K("Invalid symbol in number");R+=r}else R&&(s(parseFloat(R)),u(),R=""),c--,L=j.pop()||p;continue;default:return K("Unknown state: "+L)}z>=N&&(n=0,void 0!==o&&o.length>l&&(K("Max buffer length exceeded: textNode"),n=Math.max(n,o.length)),R.length>l&&(K("Max buffer length exceeded: numberNode"),n=Math.max(n,R.length)),N=l-n+z)}})),e(n.n).on((function(){if(L===h)return s({}),u(),void(U=!0);L===p&&0===H||K("Unexpected end"),void 0!==o&&(s(o),u(),o=void 0),U=!0}))}},function(e,t,r){r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return c}));var n=r(19),i=r(3),o=r(2),a=r(20),s=r(0);function u(){return new XMLHttpRequest}function c(e,t,r,u,c,l,f){var d=e(i.m).emit,h=e(i.b).emit,p=0,y=!0;function m(){if("2"===String(t.status)[0]){var e=t.responseText,r=(" "+e.substr(p)).substr(1);r&&d(r),p=Object(o.e)(e)}}function g(t){try{y&&e(i.c).emit(t.status,Object(a.a)(t.getAllResponseHeaders())),y=!1}catch(e){}}e(i.a).on((function(){t.onreadystatechange=null,t.abort()})),"onprogress"in t&&(t.onprogress=m),t.onreadystatechange=function(){switch(t.readyState){case 2:case 3:return g(t);case 4:g(t),"2"===String(t.status)[0]?(m(),e(i.n).emit()):h(Object(i.o)(t.status,t.responseText))}};try{for(var b in t.open(r,u,!0),l)t.setRequestHeader(b,l[b]);Object(n.a)(window.location,Object(n.b)(u))||t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.withCredentials=f,t.send(c)}catch(e){window.setTimeout(Object(s.j)(h,Object(i.o)(void 0,void 0,e)),0)}}},function(e,t,r){function n(e,t){function r(t){return String(t.port||{"http:":80,"https:":443}[t.protocol||e.protocol])}return!!(t.protocol&&t.protocol!==e.protocol||t.host&&t.host!==e.host||t.host&&r(t)!==r(e))}function i(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[];return{protocol:t[1]||"",host:t[2]||"",port:t[3]||""}}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}))},function(e,t,r){function n(e){var t={};return e&&e.split("\r\n").forEach((function(e){var r=e.indexOf(": ");t[e.substring(0,r)]=e.substring(r+2)})),t}r.d(t,"a",(function(){return n}))}]).default},"object"===(0,s.default)(t)&&"object"===(0,s.default)(e)?e.exports=a():(i=[],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o))},21307:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!==(0,n.default)(r))throw new TypeError(r+"must be non-object");for(var i in r)o(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16}},29806:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},28548:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,a=i+n;e^=-1;for(var s=i;s>>8^o[255&(e^r[s])];return~e}},54151:(e,t,r)=>{"use strict";var n,i=r(21307),o=r(25280),a=r(57506),s=r(28548),u=r(78021),c=-2,l=258,f=262,d=103,h=113,p=666;function y(e,t){return e.msg=u[t],t}function m(e){return(e<<1)-(e>4?9:0)}function g(e){for(var t=e.length;--t>=0;)e[t]=0}function b(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function v(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,b(e.strm)}function w(e,t){e.pending_buf[e.pending++]=t}function A(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function k(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-f?e.strstart-(e.w_size-f):0,c=e.window,d=e.w_mask,h=e.prev,p=e.strstart+l,y=c[o+a-1],m=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+a]===m&&c[r+a-1]===y&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(e.match_start=t,a=n,n>=s)break;y=c[o+a-1],m=c[o+a]}}}while((t=h[t&d])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function E(e){var t,r,n,o,u,c,l,d,h,p,y=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=y+(y-f)){i.arraySet(e.window,e.window,y,y,0),e.match_start-=y,e.strstart-=y,e.block_start-=y,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=y?n-y:0}while(--r);t=r=y;do{n=e.prev[--t],e.prev[t]=n>=y?n-y:0}while(--r);o+=y}if(0===e.strm.avail_in)break;if(c=e.strm,l=e.window,d=e.strstart+e.lookahead,h=o,p=void 0,(p=c.avail_in)>h&&(p=h),r=0===p?0:(c.avail_in-=p,i.arraySet(l,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=a(c.adler,l,p,d):2===c.state.wrap&&(c.adler=s(c.adler,l,p,d)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=3)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(s=2,n-=16),o<1||o>9||8!==r||n<8||n>15||t<0||t>9||a<0||a>4)return y(e,c);8===n&&(n=9);var u=new P;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(E(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,v(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-f&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(v(e,!1),e.strm.avail_out),1)})),new _(4,4,8,4,S),new _(4,5,16,8,S),new _(4,6,32,32,S),new _(4,4,16,16,x),new _(8,16,32,32,x),new _(8,16,128,128,x),new _(8,32,128,256,x),new _(32,128,258,1024,x),new _(32,258,258,4096,x)],t.deflateInit=function(e,t){return O(e,t,8,15,8,0)},t.deflateInit2=O,t.deflateReset=I,t.deflateResetKeep=T,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},t.deflate=function(e,t){var r,i,a,u;if(!e||!e.state||t>5||t<0)return e?y(e,c):c;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===p&&4!==t)return y(e,0===e.avail_out?-5:c);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,w(i,31),w(i,139),w(i,8),i.gzhead?(w(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),w(i,255&i.gzhead.time),w(i,i.gzhead.time>>8&255),w(i,i.gzhead.time>>16&255),w(i,i.gzhead.time>>24&255),w(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),w(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(w(i,255&i.gzhead.extra.length),w(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(w(i,0),w(i,0),w(i,0),w(i,0),w(i,0),w(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),w(i,3),i.status=h);else{var f=8+(i.w_bits-8<<4)<<8;f|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=h,A(i,f),0!==i.strstart&&(A(i,e.adler>>>16),A(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending!==i.pending_buf_size));)w(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=d)}else i.status=d;if(i.status===d&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&b(e),i.pending+2<=i.pending_buf_size&&(w(i,255&e.adler),w(i,e.adler>>8&255),e.adler=0,i.status=h)):i.status=h),0!==i.pending){if(b(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&m(t)<=m(r)&&4!==t)return y(e,-5);if(i.status===p&&0!==e.avail_in)return y(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==p){var k=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(E(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead<=l){if(E(e),e.lookahead<=l&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=e.strstart+l;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==k&&4!==k||(i.status=p),1===k||3===k)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===k&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(g(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),b(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(w(i,255&e.adler),w(i,e.adler>>8&255),w(i,e.adler>>16&255),w(i,e.adler>>24&255),w(i,255&e.total_in),w(i,e.total_in>>8&255),w(i,e.total_in>>16&255),w(i,e.total_in>>24&255)):(A(i,e.adler>>>16),A(i,65535&e.adler)),b(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==d&&t!==h&&t!==p?y(e,c):(e.state=null,t===h?y(e,-3):0):c},t.deflateSetDictionary=function(e,t){var r,n,o,s,u,l,f,d,h=t.length;if(!e||!e.state)return c;if(2===(s=(r=e.state).wrap)||1===s&&42!==r.status||r.lookahead)return c;for(1===s&&(e.adler=a(e.adler,t,h,0)),r.wrap=0,h>=r.w_size&&(0===s&&(g(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,t,h-r.w_size,r.w_size,0),t=d,h=r.w_size),u=e.avail_in,l=e.next_in,f=e.input,e.avail_in=h,e.next_in=0,e.input=t,E(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<{"use strict";e.exports=function(e,t){var r,n,i,o,a,s,u,c,l,f,d,h,p,y,m,g,b,v,w,A,k,E,S,x,_;r=e.state,n=e.next_in,x=e.input,i=n+(e.avail_in-5),o=e.next_out,_=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,f=r.wnext,d=r.window,h=r.hold,p=r.bits,y=r.lencode,m=r.distcode,g=(1<>>=w=v>>>24,p-=w,0==(w=v>>>16&255))_[o++]=65535&v;else{if(!(16&w)){if(!(64&w)){v=y[(65535&v)+(h&(1<>>=w,p-=w),p<15&&(h+=x[n++]<>>=w=v>>>24,p-=w,!(16&(w=v>>>16&255))){if(!(64&w)){v=m[(65535&v)+(h&(1<u){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=w,p-=w,k>(w=o-a)){if((w=k-w)>l&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(E=0,S=d,0===f){if(E+=c-w,w2;)_[o++]=S[E++],_[o++]=S[E++],_[o++]=S[E++],A-=3;A&&(_[o++]=S[E++],A>1&&(_[o++]=S[E++]))}else{E=o-k;do{_[o++]=_[E++],_[o++]=_[E++],_[o++]=_[E++],A-=3}while(A>2);A&&(_[o++]=_[E++],A>1&&(_[o++]=_[E++]))}break}}break}}while(n>3,h&=(1<<(p-=A<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n{"use strict";var n=r(21307),i=r(57506),o=r(28548),a=r(52399),s=r(51721),u=-2,c=12,l=30;function f(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):u}function p(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,h(e)):u}function y(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,p(e))):u}function m(e,t){var r,n;return e?(n=new d,e.state=n,n.window=null,0!==(r=y(e,t))&&(e.state=null),r):u}var g,b,v=!0;function w(e){if(v){var t;for(g=new n.Buf32(512),b=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,b,0,e.work,{bits:5}),v=!1}e.lencode=g,e.lenbits=9,e.distcode=b,e.distbits=5}function A(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,j,2,0),b=0,v=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg="incorrect header check",r.mode=l;break}if(8!=(15&b)){e.msg="unknown compression method",r.mode=l;break}if(v-=4,N=8+(15&(b>>>=4)),0===r.wbits)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=l;break}r.dmax=1<>8&1),512&r.flags&&(j[0]=255&b,j[1]=b>>>8&255,r.check=o(r.check,j,2,0)),b=0,v=0,r.mode=3;case 3:for(;v<32;){if(0===m)break e;m--,b+=d[p++]<>>8&255,j[2]=b>>>16&255,j[3]=b>>>24&255,r.check=o(r.check,j,4,0)),b=0,v=0,r.mode=4;case 4:for(;v<16;){if(0===m)break e;m--,b+=d[p++]<>8),512&r.flags&&(j[0]=255&b,j[1]=b>>>8&255,r.check=o(r.check,j,2,0)),b=0,v=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===m)break e;m--,b+=d[p++]<>>8&255,r.check=o(r.check,j,2,0)),b=0,v=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((S=r.length)>m&&(S=m),S&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,p,S,N)),512&r.flags&&(r.check=o(r.check,d,S,p)),m-=S,p+=S,r.length-=S),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===m)break e;S=0;do{N=d[p+S++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N))}while(N&&S>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=c;break;case 10:for(;v<32;){if(0===m)break e;m--,b+=d[p++]<>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===m)break e;m--,b+=d[p++]<>>=1)){case 0:r.mode=14;break;case 1:if(w(r),r.mode=20,6===t){b>>>=2,v-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=l}b>>>=2,v-=2;break;case 14:for(b>>>=7&v,v-=7&v;v<32;){if(0===m)break e;m--,b+=d[p++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=l;break}if(r.length=65535&b,b=0,v=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(S=r.length){if(S>m&&(S=m),S>g&&(S=g),0===S)break e;n.arraySet(h,d,p,S,y),m-=S,p+=S,g-=S,y+=S,r.length-=S;break}r.mode=c;break;case 17:for(;v<14;){if(0===m)break e;m--,b+=d[p++]<>>=5,v-=5,r.ndist=1+(31&b),b>>>=5,v-=5,r.ncode=4+(15&b),b>>>=4,v-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=l;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,v-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},R=s(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid code lengths set",r.mode=l;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,I=65535&L,!((P=L>>>24)<=v);){if(0===m)break e;m--,b+=d[p++]<>>=P,v-=P,r.lens[r.have++]=I;else{if(16===I){for(U=P+2;v>>=P,v-=P,0===r.have){e.msg="invalid bit length repeat",r.mode=l;break}N=r.lens[r.have-1],S=3+(3&b),b>>>=2,v-=2}else if(17===I){for(U=P+3;v>>=P)),b>>>=3,v-=3}else{for(U=P+7;v>>=P)),b>>>=7,v-=7}if(r.have+S>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=l;break}for(;S--;)r.lens[r.have++]=N}}if(r.mode===l)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=l;break}if(r.lenbits=9,M={bits:r.lenbits},R=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid literal/lengths set",r.mode=l;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},R=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,R){e.msg="invalid distances set",r.mode=l;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(m>=6&&g>=258){e.next_out=y,e.avail_out=g,e.next_in=p,e.avail_in=m,r.hold=b,r.bits=v,a(e,E),y=e.next_out,h=e.output,g=e.avail_out,p=e.next_in,d=e.input,m=e.avail_in,b=r.hold,v=r.bits,r.mode===c&&(r.back=-1);break}for(r.back=0;T=(L=r.lencode[b&(1<>>16&255,I=65535&L,!((P=L>>>24)<=v);){if(0===m)break e;m--,b+=d[p++]<>O)])>>>16&255,I=65535&L,!(O+(P=L>>>24)<=v);){if(0===m)break e;m--,b+=d[p++]<>>=O,v-=O,r.back+=O}if(b>>>=P,v-=P,r.back+=P,r.length=I,0===T){r.mode=26;break}if(32&T){r.back=-1,r.mode=c;break}if(64&T){e.msg="invalid literal/length code",r.mode=l;break}r.extra=15&T,r.mode=22;case 22:if(r.extra){for(U=r.extra;v>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;T=(L=r.distcode[b&(1<>>16&255,I=65535&L,!((P=L>>>24)<=v);){if(0===m)break e;m--,b+=d[p++]<>O)])>>>16&255,I=65535&L,!(O+(P=L>>>24)<=v);){if(0===m)break e;m--,b+=d[p++]<>>=O,v-=O,r.back+=O}if(b>>>=P,v-=P,r.back+=P,64&T){e.msg="invalid distance code",r.mode=l;break}r.offset=I,r.extra=15&T,r.mode=24;case 24:if(r.extra){for(U=r.extra;v>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=l;break}r.mode=25;case 25:if(0===g)break e;if(S=E-g,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=l;break}S>r.wnext?(S-=r.wnext,x=r.wsize-S):x=r.wnext-S,S>r.length&&(S=r.length),_=r.window}else _=h,x=y-r.offset,S=r.length;S>g&&(S=g),g-=S,r.length-=S;do{h[y++]=_[x++]}while(--S);0===r.length&&(r.mode=21);break;case 26:if(0===g)break e;h[y++]=r.length,g--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===m)break e;m--,b|=d[p++]<{"use strict";var n=r(21307),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,u,c,l,f,d){var h,p,y,m,g,b,v,w,A,k=d.bits,E=0,S=0,x=0,_=0,P=0,T=0,I=0,O=0,B=0,C=0,N=null,R=0,M=new n.Buf16(16),U=new n.Buf16(16),L=null,j=0;for(E=0;E<=15;E++)M[E]=0;for(S=0;S=1&&0===M[_];_--);if(P>_&&(P=_),0===_)return c[l++]=20971520,c[l++]=20971520,d.bits=1,0;for(x=1;x<_&&0===M[x];x++);for(P0&&(0===e||1!==_))return-1;for(U[1]=0,E=1;E<15;E++)U[E+1]=U[E]+M[E];for(S=0;S852||2===e&&B>592)return 1;for(;;){v=E-I,f[S]b?(w=L[j+f[S]],A=N[R+f[S]]):(w=96,A=0),h=1<>I)+(p-=h)]=v<<24|w<<16|A}while(0!==p);for(h=1<>=1;if(0!==h?(C&=h-1,C+=h):C=0,S++,0==--M[E]){if(E===_)break;E=t[r+f[S]]}if(E>P&&(C&m)!==y){for(0===I&&(I=P),g+=x,O=1<<(T=E-I);T+I<_&&!((O-=M[T+I])<=0);)T++,O<<=1;if(B+=1<852||2===e&&B>592)return 1;c[y=C&m]=P<<24|T<<16|g-l}}return 0!==C&&(c[g+C]=E-I<<24|64<<16),d.bits=P,0}},78021:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},25280:(e,t,r)=>{"use strict";var n=r(21307);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,a=286,s=30,u=15,c=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],l=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],h=new Array(576);i(h);var p=new Array(60);i(p);var y=new Array(512);i(y);var m=new Array(256);i(m);var g=new Array(29);i(g);var b,v,w,A=new Array(s);function k(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function S(e){return e<256?y[e]:y[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function _(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function I(e,t,r){var n,i,o=new Array(16),a=0;for(n=1;n<=u;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=T(o[s]++,s))}}function O(e){var t;for(t=0;t8?x(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function C(e,t,r,n){var i=2*t,o=2*r;return e[i]>1;r>=1;r--)N(e,o,r);i=c;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,N(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,a,s,c=t.dyn_tree,l=t.max_code,f=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,y=t.stat_desc.max_length,m=0;for(o=0;o<=u;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=c[2*c[2*(n=e.heap[r])+1]+1]+1)>y&&(o=y,m++),c[2*n+1]=o,n>l||(e.bl_count[o]++,a=0,n>=p&&(a=h[n-p]),s=c[2*n],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(f[2*n+1]+a)));if(0!==m){do{for(o=y-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[y]--,m-=2}while(m>0);for(o=y;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>l||(c[2*i+1]!==o&&(e.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),n--)}}(e,t),I(o,l,e.bl_count)}function U(e,t,r){var n,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++s>=7;n0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t=3&&0===e.bl_tree[2*d[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?F(e,t,r,n):4===e.strategy||a===i?(_(e,2+(n?1:0),3),R(e,h,p)):(_(e,4+(n?1:0),3),function(e,t,r,n){var i;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(m[r]+o+1)]++,e.dyn_dtree[2*S(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){_(e,2,3),P(e,256,h),function(e){16===e.bi_valid?(x(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},47563:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},81823:(e,t,r)=>{"use strict";var n=r(68357);t.certificate=r(41320);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var l=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=l,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var f=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=f;var d=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},41320:(e,t,r)=>{"use strict";var n=r(68357),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),l=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),f=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),d=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(l),this.key("validity").use(f),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},64988:(e,t,r)=>{"use strict";var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=r(27085),s=r(98073),u=r(48850).Buffer;e.exports=function(e,t){var r,c=e.toString(),l=c.match(n);if(l){var f="aes"+l[1],d=u.from(l[2],"hex"),h=u.from(l[3].replace(/[\r\n]/g,""),"base64"),p=a(t,d.slice(0,8),parseInt(l[1],10)).key,y=[],m=s.createDecipheriv(f,p,d);y.push(m.update(h)),y.push(m.final()),r=u.concat(y)}else{var g=c.match(o);r=u.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},27552:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(81823),o=r(22562),a=r(64988),s=r(98073),u=r(54192),c=r(48850).Buffer;function l(e){var t;"object"!==(0,n.default)(e)||c.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=c.from(e));var r,l,f=a(e,t),d=f.tag,h=f.data;switch(d){case"CERTIFICATE":l=i.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(l||(l=i.PublicKey.decode(h,"der")),r=l.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(l.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return l.subjectPrivateKey=l.subjectPublicKey,{type:"ec",data:l};case"1.2.840.10040.4.1":return l.algorithm.params.pub_key=i.DSAparam.decode(l.subjectPublicKey.data,"der"),{type:"dsa",data:l.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=o[e.algorithm.decrypt.cipher.algo.join(".")],a=e.algorithm.decrypt.cipher.iv,l=e.subjectPrivateKey,f=parseInt(i.split("-")[1],10)/8,d=u.pbkdf2Sync(t,r,n,f,"sha1"),h=s.createDecipheriv(i,d,a),p=[];return p.push(h.update(l)),p.push(h.final()),c.concat(p)}(h=i.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(r=(l=i.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(l.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:l.algorithm.curve,privateKey:i.ECPrivateKey.decode(l.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return l.algorithm.params.priv_key=i.DSAparam.decode(l.subjectPrivateKey,"der"),{type:"dsa",params:l.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=i.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+d)}}e.exports=l,l.signature=i.signature},48209:e=>{"use strict";var t=function(e){return e.replace(/^\s+|\s+$/g,"")};e.exports=function(e){if(!e)return{};for(var r,n={},i=t(e).split("\n"),o=0;o{"use strict";t.pbkdf2=r(1882),t.pbkdf2Sync=r(1658)},1882:(e,t,r)=>{"use strict";var n,i,o=r(48850).Buffer,a=r(63127),s=r(77401),u=r(1658),c=r(98398),l=r.g.crypto&&r.g.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function h(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(e,t,r,n,i){return l.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return l.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,t,i,y,m,g){"function"==typeof m&&(g=m,m=void 0);var b=f[(m=m||"sha1").toLowerCase()];if(b&&"function"==typeof r.g.Promise){if(a(i,y),e=c(e,s,"Password"),t=c(t,s,"Salt"),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){h()((function(){t(null,e)}))}),(function(e){h()((function(){t(e)}))}))}(function(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var t=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=t,t}(b).then((function(r){return r?p(e,t,i,y,b):u(e,t,i,y,m)})),g)}else h()((function(){var r;try{r=u(e,t,i,y,m)}catch(e){return g(e)}g(null,r)}))}},77401:(e,t,r)=>{"use strict";var n,i=r(19142);n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},63127:e=>{"use strict";var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},1658:(e,t,r)=>{"use strict";var n=r(55349),i=r(26707),o=r(51708),a=r(48850).Buffer,s=r(63127),u=r(77401),c=r(98398),l=a.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,r){var s=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=s(t):t.length{"use strict";var n=r(48850).Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},19142:e=>{"use strict";var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&d())}function d(){if(!c){var e=a(f);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l1)for(var r=1;r{"use strict";t.publicEncrypt=r(82466),t.privateDecrypt=r(53144),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},26873:(e,t,r)=>{"use strict";var n=r(35866),i=r(48850).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,a=i.alloc(0),s=0;a.length{"use strict";var n=r(27552),i=r(26873),o=r(27223),a=r(31734),s=r(99782),u=r(35866),c=r(2561),l=r(48850).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var d,h=n(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");d=r?c(new a(t),h):s(t,h);var y=l.alloc(p-d.length);if(d=l.concat([y,d],p),4===f)return function(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(l.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),c=t.slice(a+1),f=o(s,i(c,a)),d=o(c,i(f,r-a-1));if(function(e,t){e=l.from(e),t=l.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i=t.length){o++;break}var a=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,d,r);if(3===f)return d;throw new Error("unknown padding")}},82466:(e,t,r)=>{"use strict";var n=r(27552),i=r(75010),o=r(35866),a=r(26873),s=r(27223),u=r(31734),c=r(2561),l=r(99782),f=r(48850).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var h,p=n(e);if(4===d)h=function(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(f.alloc(0)).digest(),l=c.length,d=2*l;if(n>r-d-2)throw new Error("message too long");var h=f.alloc(r-n-d-2),p=r-l-1,y=i(l),m=s(f.concat([c,h,f.alloc(1,1),t],p),a(y,p)),g=s(y,a(m,l));return new u(f.concat([f.alloc(1),g,m],r))}(p,t);else if(1===d)h=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");return n=r?f.alloc(a-o-3,255):function(e){for(var t,r=f.allocUnsafe(e),n=0,o=i(2*e),a=0;n=0)throw new Error("data too long for modulus")}return r?l(h,p):c(h,p)}},2561:(e,t,r)=>{"use strict";var n=r(31734),i=r(48850).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},27223:e=>{"use strict";e.exports=function(e,t){for(var r=e.length,n=-1;++n{"use strict";var n=r(28847)(r(3355)),i=r(22028),o=r(33103),a=r(80034);function s(e,t){return t.encode?t.strict?i(e):encodeURIComponent(e):e}function u(e){return Array.isArray(e)?e.sort():"object"===(0,n.default)(e)?u(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function c(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function l(e,t){var r=function(e){var t;switch(e.arrayFormat){case"index":return function(e,r,n){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return function(e,r,n){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};default:return function(e,t,r){void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t=o({arrayFormat:"none"},t)),i=Object.create(null);return"string"!=typeof e?i:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),n=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:a(o),r(a(n),o,i)})),Object.keys(i).sort().reduce((function(e,t){var r=i[t];return Boolean(r)&&"object"===(0,n.default)(r)&&!Array.isArray(r)?e[t]=u(r):e[t]=r,e}),Object.create(null))):i}t.extract=c,t.parse=l,t.stringify=function(e,t){!1===(t=o({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var r=function(e){switch(e.arrayFormat){case"index":return function(t,r,n){return null===r?[s(t,e),"[",n,"]"].join(""):[s(t,e),"[",s(n,e),"]=",s(r,e)].join("")};case"bracket":return function(t,r){return null===r?s(t,e):[s(t,e),"[]=",s(r,e)].join("")};default:return function(t,r){return null===r?s(t,e):[s(t,e),"=",s(r,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map((function(n){var i=e[n];if(void 0===i)return"";if(null===i)return s(n,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(r(n,e,o.length))})),o.join("&")}return s(n,t)+"="+s(i,t)})).filter((function(e){return e.length>0})).join("&"):""},t.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:l(c(e),t)}}},75010:(e,t,r)=>{"use strict";var n=r(19142),i=65536,o=r(48850).Buffer,a=r.g.crypto||r.g.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>i)for(var s=0;s{"use strict";var n=r(19142);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(48850),a=r(75010),s=o.Buffer,u=o.kMaxLength,c=r.g.crypto||r.g.msCrypto,l=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>l||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>l||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function h(e,t,r,i){if(n.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return c.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return a(r).copy(e,t),e;a(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}c&&c.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,i){if(!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(t,e.length),d(n,t,e.length),h(e,t,n,i)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return f(t,e.length),void 0===n&&(n=e.length-t),d(n,t,e.length),h(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},79024:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i={};function o(e,t,r){r||(r=Error);var n=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function a(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,u,c;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var l=("number"!=typeof c&&(c=0),c+1>(u=e).length||-1===u.indexOf(".",c)?"argument":"property");s='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(a(t,"type"))}return s+". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=i},76884:(e,t,r)=>{"use strict";var n=r(19142),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(6297),a=r(71471);r(41736)(l,o);for(var s=i(a.prototype),u=0;u{"use strict";e.exports=i;var n=r(99154);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(41736)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},6297:(e,t,r)=>{"use strict";var n,i=r(19142);e.exports=x,x.ReadableState=S,r(38291).EventEmitter;var o,a=function(e,t){return e.listeners(t).length},s=r(37144),u=r(29033).Buffer,c=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(94616);o=l&&l.debuglog?l.debuglog("stream"):function(){};var f,d,h,p=r(25392),y=r(57572),m=r(6756).getHighWaterMark,g=r(79024).q,b=g.ERR_INVALID_ARG_TYPE,v=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,A=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(41736)(x,s);var k=y.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(76884),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(23462).s),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function x(e){if(n=n||r(76884),!(this instanceof x))return new x(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function _(e,t,r,n,i){o("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,B(e)))}}(e,s);else if(i||(a=function(e,t){var r,n;return n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),a)k(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?k(e,new A):P(e,s,t,!0);else if(s.ended)k(e,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?P(e,s,t,!1):C(e,s)):P(e,s,t,!1)}else n||(s.reading=!1,C(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(B,e))}function B(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){o("readable nexttick read 0"),e.read(0)}function U(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(D,t,e))}function D(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function H(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):O(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},x.prototype._read=function(e){k(this,new w("_read()"))},x.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===i.stdout||e===i.stderr?y:u;function u(){o("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",(function t(i,a){o("onunpipe"),i===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",f),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",c);var l=!1;function f(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==H(n.pipes,e))&&!l&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){o("onerror",t),y(),e.removeListener("error",d),0===a(e,"error")&&k(e,t)}function h(){e.removeListener("finish",p),y()}function p(){o("onfinish"),e.removeListener("close",h),y()}function y(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",h),e.once("finish",p),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?O(this):n.reading||i.nextTick(M,this))),r},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r},x.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t},x.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(U,e,t))}(this,e)),e.paused=!1,this},x.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a{"use strict";e.exports=l;var n=r(79024).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(76884);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";var n,i=r(19142);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=x,x.WritableState=S;var a,s={deprecate:r(96219)},u=r(37144),c=r(29033).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(57572),d=r(6756).getHighWaterMark,h=r(79024).q,p=h.ERR_INVALID_ARG_TYPE,y=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_MULTIPLE_CALLBACK,g=h.ERR_STREAM_CANNOT_PIPE,b=h.ERR_STREAM_DESTROYED,v=h.ERR_STREAM_NULL_VALUES,w=h.ERR_STREAM_WRITE_AFTER_END,A=h.ERR_UNKNOWN_ENCODING,k=f.errorOrDestroy;function E(){}function S(e,t,a){n=n||r(76884),e=e||{},"boolean"!=typeof a&&(a=t instanceof n),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(B,e,t),e._writableState.errorEmitted=!0,k(e,n)):(o(n),e._writableState.errorEmitted=!0,k(e,n),B(e,t))}(e,r,n,t,o);else{var a=I(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),n?i.nextTick(P,e,r,a,o):P(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function x(e){var t=this instanceof(n=n||r(76884));if(!t&&!a.call(x,this))return new x(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function _(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function P(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),B(e,t)}function T(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,_(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(_(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(r){t.pendingcb--,r&&k(e,r),t.prefinished=!0,e.emit("prefinish"),B(e,t)}))}function B(e,t){var r=I(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(41736)(x,u),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===x&&e&&e._writableState instanceof S}})):a=function(e){return e instanceof this},x.prototype.pipe=function(){k(this,new g)},x.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,c.isBuffer(n)||n instanceof l);return s&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(e,t){var r=new w;k(e,r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o;return null===r?o=new v:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(k(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length-1))throw new A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,r){r(new y("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,B(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=f.destroy,x.prototype._undestroy=f.undestroy,x.prototype._destroy=function(e,t){t(e)}},32317:(e,t,r)=>{"use strict";var n,i=r(19142),o=r(28847)(r(3355));function a(e,t,r){return(t=function(e){var t=function(e){if("object"!==(0,o.default)(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==(0,o.default)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,o.default)(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(5831),u=Symbol("lastResolve"),c=Symbol("lastReject"),l=Symbol("error"),f=Symbol("ended"),d=Symbol("lastPromise"),h=Symbol("handlePromise"),p=Symbol("stream");function y(e,t){return{value:e,done:t}}function m(e){var t=e[u];if(null!==t){var r=e[p].read();null!==r&&(e[d]=null,e[u]=null,e[c]=null,t(y(r,!1)))}}function g(e){i.nextTick(m,e)}var b=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((a(n={get stream(){return this[p]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(y(void 0,!0));if(this[p].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[l]?r(e[l]):t(y(void 0,!0))}))}));var r,n=this[d];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[f]?r(y(void 0,!0)):t[h](r,n)}),n)}}(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(y(o,!1));r=new Promise(this[h])}return this[d]=r,r}},Symbol.asyncIterator,(function(){return this})),a(n,"return",(function(){var e=this;return new Promise((function(t,r){e[p].destroy(null,(function(e){e?r(e):t(y(void 0,!0))}))}))})),n),b);e.exports=function(e){var t,r=Object.create(v,(a(t={},p,{value:e,writable:!0}),a(t,u,{value:null,writable:!0}),a(t,c,{value:null,writable:!0}),a(t,l,{value:null,writable:!0}),a(t,f,{value:e._readableState.endEmitted,writable:!0}),a(t,h,{value:function(e,t){var n=r[p].read();n?(r[d]=null,r[u]=null,r[c]=null,e(y(n,!1))):(r[u]=e,r[c]=t)},writable:!0}),t));return r[d]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];return null!==t&&(r[d]=null,r[u]=null,r[c]=null,t(e)),void(r[l]=e)}var n=r[u];null!==n&&(r[d]=null,r[u]=null,r[c]=null,n(y(void 0,!0))),r[f]=!0})),e.on("readable",g.bind(null,r)),r}},25392:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,u.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return c(this,o(o({},t),{},{depth:0,customInspect:!1}))}}])&&function(e,t){for(var r=0;r{"use strict";var n=r(19142);function i(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},5831:(e,t,r)=>{"use strict";var n=r(79024).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";e.exports=function(){throw new Error("Readable.from is not available in the browser")}},60384:(e,t,r)=>{"use strict";var n,i=r(79024).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i0,(function(e){l||(l=e),e&&d.forEach(u),o||(d.forEach(u),f(l))}))}));return t.reduce(c)}},6756:(e,t,r)=>{"use strict";var n=r(79024).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},37144:(e,t,r)=>{"use strict";e.exports=r(38291).EventEmitter},86505:(e,t,r)=>{"use strict";(t=e.exports=r(6297)).Stream=t,t.Readable=t,t.Writable=r(71471),t.Duplex=r(76884),t.Transform=r(99154),t.PassThrough=r(53582),t.finished=r(5831),t.pipeline=r(60384)},26707:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(41736),o=r(22353),a=new Array(16),s=[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],u=[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],c=[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],l=[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],f=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function y(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,A=0|this._b,k=0|this._c,E=0|this._d,S=0|this._e,x=0;x<80;x+=1){var _,P;x<16?(_=y(r,n,i,o,h,e[s[x]],f[0],c[x]),P=v(w,A,k,E,S,e[u[x]],d[0],l[x])):x<32?(_=m(r,n,i,o,h,e[s[x]],f[1],c[x]),P=b(w,A,k,E,S,e[u[x]],d[1],l[x])):x<48?(_=g(r,n,i,o,h,e[s[x]],f[2],c[x]),P=g(w,A,k,E,S,e[u[x]],d[2],l[x])):x<64?(_=b(r,n,i,o,h,e[s[x]],f[3],c[x]),P=m(w,A,k,E,S,e[u[x]],d[3],l[x])):(_=v(r,n,i,o,h,e[s[x]],f[4],c[x]),P=y(w,A,k,E,S,e[u[x]],d[4],l[x])),r=h,h=o,o=p(i,10),i=n,n=_,w=S,S=E,E=p(k,10),k=A,A=P}var T=this._b+i+E|0;this._b=this._c+o+S|0,this._c=this._d+h+w|0,this._d=this._e+r+A|0,this._e=this._a+n+k|0,this._a=T},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},6905:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var i,o=(i=r(31734))&&i.__esModule?i:{default:i};function a(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function s(e,t){if(e<56)return n.from([e+t]);var r=l(e),i=l(t+55+r.length/2);return n.from(i+r,"hex")}function u(e){var t,r,i,o,s,c=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?n.from([]):e.slice(1,t),2===t&&i[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:i,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1e.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(o=e.slice(r,f)).length)throw new Error("invalid rlp, List has a invalid length");for(;o.length;)s=u(o),c.push(s.data),o=s.remainder;return{data:c,remainder:e.slice(f)}}function c(e){return"0x"===e.slice(0,2)}function l(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function f(e){if(!n.isBuffer(e)){if("string"==typeof e)return c(e)?n.from((r="string"!=typeof(i=e)?i:c(i)?i.slice(2):i).length%2?"0"+r:r,"hex"):n.from(e);if("number"==typeof e||"bigint"==typeof e)return e?(t=l(e),n.from(t,"hex")):n.from([]);if(null==e)return n.from([]);if(e instanceof Uint8Array)return n.from(e);if(o.default.isBN(e))return n.from(e.toArray());throw new Error("invalid type")}var t,r,i;return e}t.encode=function e(t){if(Array.isArray(t)){for(var r=[],i=0;i{"use strict";var n=r(29033),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},11755:(e,t,r)=>{"use strict";var n,i=r(19142),o=r(28847)(r(3355)),a=r(29033),s=a.Buffer,u={};for(n in a)a.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(u[n]=a[n]);var c=u.Buffer={};for(n in s)s.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(c[n]=s[n]);if(u.Buffer.prototype=s.prototype,c.from&&c.from!==Uint8Array.from||(c.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+(0,o.default)(e));if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,o.default)(e));return s(e,t,r)}),c.alloc||(c.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+(0,o.default)(e));if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=s(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!u.kStringMaxLength)try{u.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}u.constants||(u.constants={MAX_LENGTH:u.kMaxLength},u.kStringMaxLength&&(u.constants.MAX_STRING_LENGTH=u.kStringMaxLength)),e.exports=u},67799:e=>{"use strict";!function(){var t=2147483647;function r(e){var t=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]),r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225,l=new Uint32Array(64);function f(e){for(var f=0,d=e.length;d>=64;){var h=r,p=n,y=i,m=o,g=a,b=s,v=u,w=c,A=void 0,k=void 0,E=void 0,S=void 0,x=void 0;for(k=0;k<16;k++)E=f+4*k,l[k]=(255&e[E])<<24|(255&e[E+1])<<16|(255&e[E+2])<<8|255&e[E+3];for(k=16;k<64;k++)S=((A=l[k-2])>>>17|A<<15)^(A>>>19|A<<13)^A>>>10,x=((A=l[k-15])>>>7|A<<25)^(A>>>18|A<<14)^A>>>3,l[k]=(S+l[k-7]|0)+(x+l[k-16]|0)|0;for(k=0;k<64;k++)S=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&b^~g&v)|0)+(w+(t[k]+l[k]|0)|0)|0,x=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&p^h&y^p&y)|0,w=v,v=b,b=g,g=m+S|0,m=y,y=p,p=h,h=S+x|0;r=r+h|0,n=n+p|0,i=i+y|0,o=o+m|0,a=a+g|0,s=s+b|0,u=u+v|0,c=c+w|0,f+=64,d-=64}}f(e);var d,h=e.length%64,p=e.length/536870912|0,y=e.length<<3,m=h<56?56:120,g=e.slice(e.length-h,e.length);for(g.push(128),d=h+1;d>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(y>>>24&255),g.push(y>>>16&255),g.push(y>>>8&255),g.push(y>>>0&255),f(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function n(e,t,n){e=e.length<=64?e:r(e);var i,o=64+t.length+4,a=new Array(o),s=new Array(64),u=[];for(i=0;i<64;i++)a[i]=54;for(i=0;i=o-4;e--){if(a[e]++,a[e]<=255)return;a[e]=0}}for(;n>=32;)c(),u=u.concat(r(s.concat(r(a)))),n-=32;return n>0&&(c(),u=u.concat(r(s.concat(r(a))).slice(0,n))),u}function i(e,t,r,n,i){var o;for(u(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)s(e,16*o,i,16),a(i,n),u(i,0,e,t+16*o,16);for(o=0;o>>32-t}function a(e,t){u(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=o(t[0]+t[12],7),t[8]^=o(t[4]+t[0],9),t[12]^=o(t[8]+t[4],13),t[0]^=o(t[12]+t[8],18),t[9]^=o(t[5]+t[1],7),t[13]^=o(t[9]+t[5],9),t[1]^=o(t[13]+t[9],13),t[5]^=o(t[1]+t[13],18),t[14]^=o(t[10]+t[6],7),t[2]^=o(t[14]+t[10],9),t[6]^=o(t[2]+t[14],13),t[10]^=o(t[6]+t[2],18),t[3]^=o(t[15]+t[11],7),t[7]^=o(t[3]+t[15],9),t[11]^=o(t[7]+t[3],13),t[15]^=o(t[11]+t[7],18),t[1]^=o(t[0]+t[3],7),t[2]^=o(t[1]+t[0],9),t[3]^=o(t[2]+t[1],13),t[0]^=o(t[3]+t[2],18),t[6]^=o(t[5]+t[4],7),t[7]^=o(t[6]+t[5],9),t[4]^=o(t[7]+t[6],13),t[5]^=o(t[4]+t[7],18),t[11]^=o(t[10]+t[9],7),t[8]^=o(t[11]+t[10],9),t[9]^=o(t[8]+t[11],13),t[10]^=o(t[9]+t[8],18),t[12]^=o(t[15]+t[14],7),t[13]^=o(t[12]+t[15],9),t[14]^=o(t[13]+t[12],13),t[15]^=o(t[14]+t[13],18);for(var n=0;n<16;++n)e[n]+=t[n]}function s(e,t,r,n){for(var i=0;i=256)return!1}return!0}function l(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function f(e,r,o,a,f,d,h){if(o=l(o,"N"),a=l(a,"r"),f=l(f,"p"),d=l(d,"dkLen"),0===o||o&o-1)throw new Error("N must be power of 2");if(o>t/128/a)throw new Error("N too large");if(a>t/128/f)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var p=n(e,r,128*f*a),y=new Uint32Array(32*f*a),m=0;mB&&(r=B);for(var c=0;cB&&(r=B);for(var m=0;m>8&255),p.push(y[R]>>16&255),p.push(y[R]>>24&255);var M=n(e,p,d);return h&&h(null,1,M),M}h&&C(t)};if(!h)for(;;){var R=N();if(null!=R)return R}N()}var d={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(s,u){var c=0;a&&a(0),f(e,t,r,n,i,o,(function(e,t,r){if(e)u(e);else if(r)a&&1!==c&&a(1),s(new Uint8Array(r));else if(a&&t!==c)return c=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(f(e,t,r,n,i,o))}};e.exports=d}()},57902:(e,t,r)=>{"use strict";e.exports=r(36922)(r(38123))},38123:(e,t,r)=>{"use strict";var n=new(0,r(36597).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var a=new o(t),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var u=a.redSqr().redIMul(a);return s.redSqr().redISub(u.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===a(e)?1:0},publicKeyCreate:function(e,t){var r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=a(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n=0)return 2;var u=n.getPublic().add(i.g.mul(r));return u.isInfinity()?2:(s(e,u),0)},publicKeyTweakMul:function(e,t,r){var n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;var a=e.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var u=33,c=0;u>1&&0===s[c]&&!(128&s[c+1]);--u,++c);if(128&(s=s.subarray(c))[0])return 1;if(u>1&&0===s[0]&&!(128&s[1]))return 1;var l=a.subarray(39,72);l[0]=0,l.set(n,1);for(var f=33,d=0;f>1&&0===l[d]&&!(128&l[d+1]);--f,++d);return 128&(l=l.subarray(d))[0]||f>1&&0===l[0]&&!(128&l[1])?1:(e.outputlen=6+u+f,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+u]=2,a[5+u]=l.length,a.set(l,6+u),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var u=new o(a);u.cmp(i.n)>=0&&(u=new o(0));var c=new o(t.subarray(6+r));return c.cmp(i.n)>=0&&(c=new o(0)),e.set(u.toArrayLike(Uint8Array,"be",32),0),e.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,a,s){if(s){var u=s;s=function(e){var n=u(t,r,null,a,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var c,l=new o(r);if(l.cmp(i.n)>=0||l.isZero())return 1;try{c=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(e){return 1}return e.signature.set(c.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(c.s.toArrayLike(Uint8Array,"be",32),32),e.recid=c.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},u=new o(s.r),c=new o(s.s);if(u.cmp(i.n)>=0||c.cmp(i.n)>=0)return 1;if(1===c.cmp(n.nh)||u.isZero()||c.isZero())return 3;var l=a(r);if(null===l)return 2;var f=l.getPublic();return n.verify(t,s,f)?0:3},ecdsaRecover:function(e,t,r,a){var u,c={r:t.slice(0,32),s:t.slice(32,64)},l=new o(c.r),f=new o(c.s);if(l.cmp(i.n)>=0||f.cmp(i.n)>=0)return 1;if(l.isZero()||f.isZero())return 2;try{u=n.recoverPubKey(a,c,r)}catch(e){return 2}return s(e,u),0},ecdh:function(e,t,r,s,u,c,l){var f=a(t);if(null===f)return 1;var d=new o(r);if(d.cmp(i.n)>=0||d.isZero())return 2;var h=f.getPublic().mul(d);if(void 0===u)for(var p=h.encode(null,!0),y=n.hash().update(p).digest(),m=0;m<32;++m)e[m]=y[m];else{c||(c=new Uint8Array(32));for(var g=h.getX().toArray("be",32),b=0;b<32;++b)c[b]=g[b];l||(l=new Uint8Array(32));for(var v=h.getY().toArray("be",32),w=0;w<32;++w)l[w]=v[w];var A=u(c,l,s);if(!(A instanceof Uint8Array&&A.length===e.length))return 2;e.set(A)}return 0}}},36922:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),c("output",e,t),e}function d(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){if(u(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&c("seed",t,32),1===e.contextRandomize(t))throw new Error("Unknow error on context randomization")},privateKeyVerify:function(t){return c("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(c("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(r)}},privateKeyTweakAdd:function(t,r){switch(c("private key",t,32),c("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(n)}},privateKeyTweakMul:function(t,r){switch(c("private key",t,32),c("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(i)}},publicKeyVerify:function(t){return c("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(c("private key",t,32),l(r),n=f(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(a)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(c("public key",t,[33,65]),l(r),n=f(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(o);case 2:throw new Error(a)}},publicKeyNegate:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;switch(c("public key",t,[33,65]),l(n),i=f(i,n?33:65),e.publicKeyNegate(i,t)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error(r);case 3:throw new Error(a)}},publicKeyCombine:function(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;u(Array.isArray(r),"Expected public keys to be an Array"),u(r.length>0,"Expected public keys array will have more than zero items");var s,d=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(r);try{for(d.s();!(s=d.n()).done;)c("public key",s.value,[33,65])}catch(e){d.e(e)}finally{d.f()}switch(l(n),i=f(i,n?33:65),e.publicKeyCombine(i,r)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(a)}},publicKeyTweakAdd:function(t,r){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(c("public key",t,[33,65]),c("tweak",r,32),l(i),a=f(a,i?33:65),e.publicKeyTweakAdd(a,t,r)){case 0:return a;case 1:throw new Error(o);case 2:throw new Error(n)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(c("public key",t,[33,65]),c("tweak",r,32),l(n),a=f(a,n?33:65),e.publicKeyTweakMul(a,t,r)){case 0:return a;case 1:throw new Error(o);case 2:throw new Error(i)}},signatureNormalize:function(t){switch(c("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(s)}},signatureExport:function(t,n){c("signature",t,64);var i={output:n=f(n,72),outputlen:72};switch(e.signatureExport(i,t)){case 0:return n.slice(0,i.outputlen);case 1:throw new Error(s);case 2:throw new Error(r)}},signatureImport:function(t,n){switch(c("signature",t),n=f(n,64),e.signatureImport(n,t)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(r)}},ecdsaSign:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;c("message",t,32),c("private key",n,32),u("Object"===d(i),"Expected options to be an Object"),void 0!==i.data&&c("options.data",i.data),void 0!==i.noncefn&&u("Function"===d(i.noncefn),"Expected options.noncefn to be a Function");var a={signature:o=f(o,64),recid:null};switch(e.ecdsaSign(a,t,n,i.data,i.noncefn)){case 0:return a;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(r)}},ecdsaVerify:function(t,r,n){switch(c("signature",t,64),c("message",r,32),c("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(s);case 2:throw new Error(o)}},ecdsaRecover:function(t,n,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(c("signature",t,64),u("Number"===d(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),c("message",i,32),l(o),a=f(a,o?33:65),e.ecdsaRecover(a,t,n,i)){case 0:return a;case 1:throw new Error(s);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(r)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(c("public key",t,[33,65]),c("private key",r,32),u("Object"===d(n),"Expected options to be an Object"),void 0!==n.data&&c("options.data",n.data),void 0!==n.hashfn?(u("Function"===d(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&c("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&c("options.ybuf",n.ybuf,32),c("output",i)):i=f(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}}}},77990:(e,t,r)=>{"use strict";var n=r(57701),i=r(94919),o=r(1020)(),a=r(53820),s=n("%TypeError%"),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},76003:(e,t,r)=>{"use strict";var n=r(48850).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},51708:(e,t,r)=>{"use strict";var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(8210),n.sha1=r(10544),n.sha224=r(66288),n.sha256=r(34571),n.sha384=r(46959),n.sha512=r(14515)},8210:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=n)<<5|t>>>27)+l(h,i,o,s)+u+r[d]+a[h];u=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},10544:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),y=c(n)+f(p,i,o,s)+u+r[h]+a[p]|0;u=s,s=o,o=l(i),i=n,n=y}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},66288:(e,t,r)=>{"use strict";var n=r(41736),i=r(34571),o=r(76003),a=r(48850).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},34571:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,y=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+h(r[g-15])+r[g-16];for(var b=0;b<64;++b){var v=m+d(u)+c(u,p,y)+a[b]+r[b]|0,w=f(n)+l(n,i,o)|0;m=y,y=p,p=u,u=s+v|0,s=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=y+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},46959:(e,t,r)=>{"use strict";var n=r(41736),i=r(14515),o=r(76003),a=r(48850).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},14515:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,A=0|this._bl,k=0|this._cl,E=0|this._dl,S=0|this._el,x=0|this._fl,_=0|this._gl,P=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var I=t[T-30],O=t[T-30+1],B=h(I,O),C=p(O,I),N=y(I=t[T-4],O=t[T-4+1]),R=m(O,I),M=t[T-14],U=t[T-14+1],L=t[T-32],j=t[T-32+1],F=C+U|0,D=B+M+g(F,C)|0;D=(D=D+N+g(F=F+R|0,R)|0)+L+g(F=F+j|0,j)|0,t[T]=D,t[T+1]=F}for(var H=0;H<160;H+=2){D=t[H],F=t[H+1];var z=l(r,n,i),q=l(w,A,k),G=f(r,w),K=f(w,r),V=d(s,S),J=d(S,s),W=a[H],Q=a[H+1],Z=c(s,u,b),Y=c(S,x,_),X=P+J|0,$=v+V+g(X,P)|0;$=($=($=$+Z+g(X=X+Y|0,Y)|0)+W+g(X=X+Q|0,Q)|0)+D+g(X=X+F|0,F)|0;var ee=K+q|0,te=G+z+g(ee,K)|0;v=b,P=_,b=u,_=x,u=s,x=S,s=o+$+g(S=E+X|0,E)|0,o=i,E=k,i=n,k=A,n=r,A=w,r=$+te+g(w=X+ee|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+A|0,this._cl=this._cl+k|0,this._dl=this._dl+E|0,this._el=this._el+S|0,this._fl=this._fl+x|0,this._gl=this._gl+_|0,this._hl=this._hl+P|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,A)|0,this._ch=this._ch+i+g(this._cl,k)|0,this._dh=this._dh+o+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,S)|0,this._fh=this._fh+u+g(this._fl,x)|0,this._gh=this._gh+b+g(this._gl,_)|0,this._hh=this._hh+v+g(this._hl,P)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},57245:(e,t,r)=>{"use strict";e.exports=i;var n=r(38291).EventEmitter;function i(){n.call(this)}r(41736)(i,n),i.Readable=r(6297),i.Writable=r(71471),i.Duplex=r(76884),i.Transform=r(99154),i.PassThrough=r(53582),i.finished=r(5831),i.pipeline=r(60384),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",c),e.on("error",c),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},29519:(e,t,r)=>{"use strict";var n=r(38844),i=r(53319),o=r(87705),a=r(83675),s=r(51143),u=t;u.request=function(e,t){e="string"==typeof e?s.parse(e):o(e);var i=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return t&&f.on("response",t),f},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},23928:(e,t,r)=>{"use strict";var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),t.writableStream=a(r.g.WritableStream),t.abortController=a(r.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&a(i().overrideMimeType),n=null},38844:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(19142),o=r(23928),a=r(41736),s=r(53319),u=r(86505),c=s.IncomingMessage,l=s.readyStates,f=e.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+n.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};a(f,u.Writable),f.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===e._mode){var u=null;if(o.abortController){var c=new AbortController;u=c.signal,e._fetchAbortController=c,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var f=e._xhr=new r.g.XMLHttpRequest;try{f.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in f&&(f.responseType=e._mode),"withCredentials"in f&&(f.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(f.timeout=t.requestTimeout,f.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){f.setRequestHeader(e[0],e[1])})),e._response=null,f.onreadystatechange=function(){switch(f.readyState){case l.LOADING:case l.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(f.onprogress=function(){e._onXHRProgress()}),f.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{f.send(a)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},f.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},f.prototype._write=function(e,t,r){this._body.push(e),r()},f.prototype._resetTimers=function(e){var t=this;r.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(r.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=r.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},f.prototype.abort=f.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},f.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},f.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},53319:(e,t,r)=>{"use strict";var n=r(19142),i=r(29033).Buffer,o=r(23928),a=r(41736),s=r(86505),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(e,t,r,a){var u=this;if(s.Readable.call(u),u._mode=r,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){n.nextTick((function(){u.emit("close")}))})),"fetch"===r){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),o.writableStream){var c=new WritableStream({write:function(e){return a(!1),new Promise((function(t,r){u._destroyed?r():u.push(i.from(e))?t():u._resumeFetch=t}))},close:function(){a(!0),u._destroyed||u.push(null)},abort:function(e){a(!0),u._destroyed||u.emit("error",e)}});try{return void t.body.pipeTo(c).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var l=t.body.getReader();!function e(){l.read().then((function(t){u._destroyed||(a(t.done),t.done?u.push(null):(u.push(i.from(t.value)),e()))})).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var f=u.rawHeaders["mime-type"];if(f){var d=f.match(/;\s*charset=([^;])(;|$)/);d&&(u._charset=d[1].toLowerCase())}u._charset||(u._charset="utf-8")}};a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,o=null;switch(t._mode){case"text":if((o=n.responseText).length>t._pos){var a=o.substr(t._pos);if("x-user-defined"===t._charset){for(var s=i.alloc(a.length),c=0;ct._pos&&(t.push(i.from(new Uint8Array(l.result.slice(t._pos)))),t._pos=l.result.byteLength)},l.onload=function(){e(!0),t.push(null)},l.readAsArrayBuffer(o)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},22028:e=>{"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}},23462:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},36931:(e,t,r)=>{"use strict";var n=r(8619);e.exports=function(e){return"string"!=typeof e?e:n(e)?e.slice(2):e}},26427:(e,t,r)=>{"use strict";var n=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:n},o={download:n,safeDownloadArchived:n,directoryTree:n},a={platform:n,arch:n},s={join:n,slice:n},u={spawn:n},c={lookup:n},l=r(31357),f=r(40631),d=r(42733),h=r(52510),p=r(13094);e.exports=p({fs:i,files:o,os:a,path:s,child_process:u,defaultArchives:{},mimetype:c,request:l,downloadUrl:null,bytes:f,hash:d,pick:h})},52510:e=>{"use strict";var t=function(e){return function(){return new Promise((function(t,r){var n,i=function(r){var n={},i=r.target.files.length,o=0;[].map.call(r.target.files,(function(r){var a=new FileReader;a.onload=function(a){var s=new Uint8Array(a.target.result);if("directory"===e){var u=r.webkitRelativePath;n[u.slice(u.indexOf("/")+1)]={type:"text/plain",data:s},++o===i&&t(n)}else if("file"===e){var c=r.webkitRelativePath;t({type:mimetype.lookup(c),data:s})}else t(s)},a.readAsArrayBuffer(r)}))};"directory"===e?((n=document.createElement("input")).addEventListener("change",i),n.type="file",n.webkitdirectory=!0,n.mozdirectory=!0,n.msdirectory=!0,n.odirectory=!0,n.directory=!0):((n=document.createElement("input")).addEventListener("change",i),n.type="file");var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),n.dispatchEvent(o)}))}};e.exports={data:t("data"),file:t("file"),directory:t("directory")}},42733:(e,t,r)=>{"use strict";var n=r(49574).keccak256,i=r(40631),o=function(e,t){var r=i.reverse(i.pad(6,i.fromNumber(e))),o=i.flatten([r,"0x0000",t]);return n(o).slice(2)};e.exports=function e(t){"string"==typeof t&&"0x"!==t.slice(0,2)?t=i.fromString(t):"string"!=typeof t&&void 0!==t.length&&(t=i.fromUint8Array(t));var r=i.length(t);if(r<=4096)return o(r,t);for(var n=4096;128*n{"use strict";e.exports=function(e){var t=e.fs,r=e.files,n=e.os,i=e.path,o=e.child_process,a=e.mimetype,s=e.defaultArchives,u=e.request,c=e.downloadUrl,l=e.bytes,f=e.hash,d=e.pick,h=function(e){return function(t){for(var r={},n=0,i=e.length;n=400?n(new Error("Error ".concat(i.statusCode,"."))):r(new Uint8Array(t))}))}))}},m=function(e){return function(t){return function t(r){return function(n){return function(i){var o=function(e){return void 0===e.path?Promise.resolve():"application/bzz-manifest+json"===e.contentType?t(e.hash)(n+e.path)(i):Promise.resolve((r=n+e.path,function(e){return function(t){return t[r]=e,t}})(function(e){return{type:e.contentType,hash:e.hash}}(e))(i));var r};return y(e)(r).then((function(e){return JSON.parse(U(e)).entries})).then((function(e){return Promise.all(e.map(o))})).then((function(){return i}))}}}(t)("")({})}},g=function(e){return function(t){return m(e)(t).then((function(e){return h(Object.keys(e))(Object.keys(e).map((function(t){return e[t].hash})))}))}},b=function(e){return function(t){return m(e)(t).then((function(t){var r=Object.keys(t),n=r.map((function(e){return t[e].hash})),i=r.map((function(e){return t[e].type})),o=n.map(y(e));return Promise.all(o).then((function(e){return h(r)(function(e){return e.map((function(e,t){return{type:i[t],data:e}}))}(e))}))}))}},v=function(e){return function(t){return function(n){return r.download(p(e)(t))(n)}}},w=function(e){return function(t){return function(r){return g(e)(t).then((function(t){var n=[];for(var o in t)if(o.length>0){var a=i.join(r,o);n.push(v(e)(t[o])(a))}return Promise.all(n).then((function(){return r}))}))}}},A=function(e){return function(t){return new Promise((function(r,n){var i={body:"string"==typeof t?L(t):t,method:"POST"};u("".concat(e,"/bzz-raw:/"),i,(function(e,t){return e?n(e):r(t)}))}))}},k=function(e){return function(t){return function(r){return function(n){return function i(o){var a="/"===r[0]?r:"/"+r,s="".concat(e,"/bzz:/").concat(t).concat(a),c={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return new Promise((function(e,t){u(s,c,(function(r,n){return r?t(r):-1!==n.indexOf("error")?t(n):e(n)}))})).catch((function(e){return o>0&&i(o-1)}))}(3)}}}},E=function(e){return function(t){return x(e)({"":t})}},S=function(e){return function(r){return t.readFile(r).then((function(t){return E(e)({type:a.lookup(r),data:t})}))}},x=function(e){return function(t){return A(e)("{}").then((function(r){return Object.keys(t).reduce((function(r,n){return r.then(function(r){return function(n){return k(e)(n)(r)(t[r])}}(n))}),Promise.resolve(r))}))}},_=function(e){return function(r){return t.readFile(r).then(A(e))}},P=function(e){return function(n){return function(i){return r.directoryTree(i).then((function(e){return Promise.all(e.map((function(e){return t.readFile(e)}))).then((function(t){var r=e.map((function(e){return e.slice(i.length)})),n=e.map((function(e){return a.lookup(e)||"text/plain"}));return h(r)(t.map((function(e,t){return{type:n[t],data:e}})))}))})).then((function(e){return(t=n?{"":e[n]}:{},function(e){var r={};for(var n in t)r[n]=t[n];for(var i in e)r[i]=e[i];return r})(e);var t})).then(x(e))}}},T=function(e){return function(t){if("data"===t.pick)return d.data().then(A(e));if("file"===t.pick)return d.file().then(E(e));if("directory"===t.pick)return d.directory().then(x(e));if(t.path)switch(t.kind){case"data":return _(e)(t.path);case"file":return S(e)(t.path);case"directory":return P(e)(t.defaultFile)(t.path)}else{if(t.length||"string"==typeof t)return A(e)(t);if(t instanceof Object)return x(e)(t)}return Promise.reject(new Error("Bad arguments"))}},I=function(e){return function(t){return function(r){return R(e)(t).then((function(n){return n?r?w(e)(t)(r):b(e)(t):r?v(e)(t)(r):y(e)(t)}))}}},O=function(e,t){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(t||s)[i],a=c+o.archive+".tar.gz",u=o.archiveMD5,l=o.binaryMD5;return r.safeDownloadArchived(a)(u)(l)(e)},B=function(e){return new Promise((function(t,r){var n=o.spawn,i=function(e){return function(t){return-1!==(""+t).indexOf(e)}},a=e.account,s=e.password,u=e.dataDir,c=e.ensApi,l=e.privateKey,f=0,d=n(e.binPath,["--bzzaccount",a||l,"--datadir",u,"--ens-api",c]),h=function(e){0===f&&i("Passphrase")(e)?setTimeout((function(){f=1,d.stdin.write(s+"\n")}),500):i("Swarm http proxy started")(e)&&(f=2,clearTimeout(p),t(d))};d.stdout.on("data",h),d.stderr.on("data",h);var p=setTimeout((function(){return r(new Error("Couldn't start swarm process."))}),2e4)}))},C=function(e){return new Promise((function(t,r){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var n=setTimeout((function(){return e.kill("SIGKILL")}),8e3);e.once("close",(function(){clearTimeout(n),t()}))}))},N=function(e){return A(e)("test").then((function(e){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===e})).catch((function(){return!1}))},R=function(e){return function(t){return y(e)(t).then((function(e){try{return!!JSON.parse(U(e)).entries}catch(e){return!1}}))}},M=function(e){return function(t,r,n,i,o){var a;return void 0!==t&&(a=e(t)),void 0!==r&&(a=e(r)),void 0!==n&&(a=e(n)),void 0!==i&&(a=e(i)),void 0!==o&&(a=e(o)),a}},U=function(e){return l.toString(l.fromUint8Array(e))},L=function(e){return l.toUint8Array(l.fromString(e))},j=function(e){return{download:function(t,r){return I(e)(t)(r)},downloadData:M(y(e)),downloadDataToDisk:M(v(e)),downloadDirectory:M(b(e)),downloadDirectoryToDisk:M(w(e)),downloadEntries:M(m(e)),downloadRoutes:M(g(e)),isAvailable:function(){return N(e)},upload:function(t){return T(e)(t)},uploadData:M(A(e)),uploadFile:M(E(e)),uploadFileFromDisk:M(E(e)),uploadDataFromDisk:M(_(e)),uploadDirectory:M(x(e)),uploadDirectoryFromDisk:M(P(e)),uploadToManifest:M(k(e)),pick:d,hash:f,fromString:L,toString:U}};return{at:j,local:function(e){return function(t){return N("http://localhost:8500").then((function(r){return r?t(j("http://localhost:8500")).then((function(){})):O(e.binPath,e.archives).onData((function(t){return(e.onProgress||function(){})(t.length)})).then((function(){return B(e)})).then((function(e){return t(j("http://localhost:8500")).then((function(){return e}))})).then(C)}))}},download:I,downloadBinary:O,downloadData:y,downloadDataToDisk:v,downloadDirectory:b,downloadDirectoryToDisk:w,downloadEntries:m,downloadRoutes:g,isAvailable:N,startProcess:B,stopProcess:C,upload:T,uploadData:A,uploadDataFromDisk:_,uploadFile:E,uploadFileFromDisk:S,uploadDirectory:x,uploadDirectoryFromDisk:P,uploadToManifest:k,pick:d,hash:f,fromString:L,toString:U}}},16873:e=>{"use strict";var t=function(e,t){for(var r=[],n=0;n{"use strict";r(16873);var n=function(e,t){return parseInt(e.slice(2*t+2,2*t+4),16)},i=function(e){return(e.length-2)/2},o=function(e){for(var t=[],r=2,n=e.length;r>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},49574:e=>{"use strict";var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],i=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],o=function(e){var t,r,n,o,a,s,u,c,l,f,d,h,p,y,m,g,b,v,w,A,k,E,S,x,_,P,T,I,O,B,C,N,R,M,U,L,j,F,D,H,z,q,G,K,V,J,W,Q,Z,Y,X,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,le;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(c<<1|l>>>31),r=a^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(f<<1|d>>>31),r=u^(d<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(h<<1|p>>>31),r=l^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(o<<1|a>>>31),r=d^(a<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,y=e[0],m=e[1],J=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=y^~g&v,e[1]=m^~b&w,e[10]=x^~P&I,e[11]=_^~T&O,e[20]=M^~L&F,e[21]=U^~j&D,e[30]=K^~J&Q,e[31]=V^~W&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&A,e[3]=b^~w&k,e[12]=P^~I&B,e[13]=T^~O&C,e[22]=L^~F&H,e[23]=j^~D&z,e[32]=J^~Q&Y,e[33]=W^~Z&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~A&E,e[5]=w^~k&S,e[14]=I^~B&N,e[15]=O^~C&R,e[24]=F^~H&q,e[25]=D^~z&G,e[34]=Q^~Y&$,e[35]=Z^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=A^~E&y,e[7]=k^~S&m,e[16]=B^~N&x,e[17]=C^~R&_,e[26]=H^~q&M,e[27]=z^~G&U,e[36]=Y^~$&K,e[37]=X^~ee&V,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~y&g,e[9]=S^~m&b,e[18]=N^~x&P,e[19]=R^~_&T,e[28]=q^~M&L,e[29]=G^~U&j,e[38]=$^~K&J,e[39]=ee^~V&W,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=i[n],e[1]^=i[n+1]},a=function(e){return function(i){var a;if("0x"===i.slice(0,2)){a=[];for(var s=2,u=i.length;s>2]|=i[h]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(u[m>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=c){for(e.start=m-c,e.block=u[l],m=0;m>2]|=r[3&m],e.lastByteIndex===c)for(u[0]=u[l],m=1;m>4&15]+t[15&p]+t[p>>12&15]+t[p>>8&15]+t[p>>20&15]+t[p>>16&15]+t[p>>28&15]+t[p>>24&15];g%l==0&&(o(d),m=0)}return"0x"+y}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),a)}};e.exports={keccak256:a(256),keccak512:a(512),keccak256s:a(256),keccak512s:a(512)}},68419:e=>{"use strict";e.exports=function(e,t){if(t){t=(t=t.trim().replace(/^(\?|#|&)/,""))?"?"+t:t;var r=e.split(/[\?\#]/)[0];t&&/\:\/\/[^\/]*$/.test(r)&&(r+="/");var n=e.match(/(\#.*)$/);e=r+t,n&&(e+=n[0])}return e}},78677:(e,t,r)=>{"use strict";var n;e=r.nmd(e);var i=r(28847)(r(3355));!function(o){var a="object"==(0,i.default)(t)&&t&&!t.nodeType&&t,s="object"==(0,i.default)(e)&&e&&!e.nodeType&&e,u="object"==(void 0===r.g?"undefined":(0,i.default)(r.g))&&r.g;u.global!==u&&u.window!==u&&u.self!==u||(o=u);var c,l,f=2147483647,d=36,h=/^xn--/,p=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,b=String.fromCharCode;function v(e){throw RangeError(m[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function A(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(y,".")).split("."),t).join(".")}function k(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+b(e)})).join("")}function S(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,r){var n=0;for(e=r?g(e/700):e>>1,e+=g(e/t);e>455;n+=d)e=g(e/35);return g(n+36*e/(e+38))}function _(e){var t,r,n,i,o,a,s,u,c,l,h,p=[],y=e.length,m=0,b=128,w=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&v("not-basic"),p.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=y&&v("invalid-input"),((u=(h=e.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:d)>=d||u>g((f-m)/a))&&v("overflow"),m+=u*a,!(u<(c=s<=w?1:s>=w+26?26:s-w));s+=d)a>g(f/(l=d-c))&&v("overflow"),a*=l;w=x(m-o,t=p.length+1,0==o),g(m/t)>f-b&&v("overflow"),b+=g(m/t),m%=t,p.splice(m++,0,b)}return E(p)}function P(e){var t,r,n,i,o,a,s,u,c,l,h,p,y,m,w,A=[];for(p=(e=k(e)).length,t=128,r=0,o=72,a=0;a=t&&hg((f-r)/(y=n+1))&&v("overflow"),r+=(s-t)*y,t=s,a=0;af&&v("overflow"),h==t){for(u=r,c=d;!(u<(l=c<=o?1:c>=o+26?26:c-o));c+=d)w=u-l,m=d-l,A.push(b(S(l+w%m,0))),u=g(w/m);A.push(b(S(u,0))),o=x(r,y,n==i),r=0,++n}++r,++t}return A.join("")}if(c={version:"1.3.2",ucs2:{decode:k,encode:E},decode:_,encode:P,toASCII:function(e){return A(e,(function(e){return p.test(e)?"xn--"+P(e):e}))},toUnicode:function(e){return A(e,(function(e){return h.test(e)?_(e.slice(4).toLowerCase()):e}))}},"object"==(0,i.default)(r.amdO)&&r.amdO)void 0===(n=function(){return c}.call(t,r,t,e))||(e.exports=n);else if(a&&s)if(e.exports==a)s.exports=c;else for(l in c)c.hasOwnProperty(l)&&(a[l]=c[l]);else o.punycode=c}(void 0)},98983:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var c=0;c=0?(l=p.substr(0,y),f=p.substr(y+1)):(l=p,f=""),d=decodeURIComponent(l),h=decodeURIComponent(f),t(o,d)?Array.isArray(o[d])?o[d].push(h):o[d]=[o[d],h]:o[d]=h}return o}},84031:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=function(e){switch((0,n.default)(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,o){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===(0,n.default)(e)?Object.keys(e).map((function(n){var o=encodeURIComponent(i(n))+r;return Array.isArray(e[n])?e[n].map((function(e){return o+encodeURIComponent(i(e))})).join(t):o+encodeURIComponent(i(e[n]))})).join(t):o?encodeURIComponent(i(o))+r+encodeURIComponent(i(e)):""}},845:(e,t,r)=>{"use strict";t.decode=t.parse=r(98983),t.encode=t.stringify=r(84031)},51143:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(78677),o=r(95751);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=w,t.resolve=function(e,t){return w(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?w(e,!1,!0).resolveObject(t):t},t.format=function(e){return o.isString(e)&&(e=w(e)),e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var s=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(l),d=["%","/","?",";","#"].concat(f),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(845);function w(e,t,r){if(e&&o.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}a.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(0,n.default)(e));var a=e.indexOf("?"),u=-1!==a&&a127?R+="x":R+=N[M];if(!R.match(p)){var L=B.slice(0,T),j=B.slice(T+1),F=N.match(y);F&&(L.push(F[1]),j.unshift(F[2])),j.length&&(w="/"+j.join(".")+w),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=i.toASCII(this.hostname));var D=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+D,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!m[E])for(T=0,C=f.length;T0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=E.slice(-1)[0],_=(r.host||e.host||E.length>1)&&("."===x||".."===x)||""===x,P=0,T=E.length;T>=0;T--)"."===(x=E[T])?E.splice(T,1):".."===x?(E.splice(T,1),P++):P&&(E.splice(T,1),P--);if(!A&&!k)for(;P--;P)E.unshift("..");!A||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),_&&"/"!==E.join("/").substr(-1)&&E.push("");var I,O=""===E[0]||E[0]&&"/"===E[0].charAt(0);return S&&(r.hostname=r.host=O?"":E.length?E.shift():"",(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),(A=A||r.host&&E.length)&&!O&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=u.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},95751:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===(0,n.default)(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},88632:(e,t)=>{"use strict";!function(e){var t,r,n,i=String.fromCharCode;function o(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return i(e>>t&63|128)}function u(e){if(!(4294967168&e))return i(e);var t="";return 4294965248&e?4294901760&e?!(4292870144&e)&&(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)):(a(e),t=i(e>>12&15|224),t+=s(e,6)):t=i(e>>6&31|192),t+i(63&e|128)}function c(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,!(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|c())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|c()<<6|c())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|c()<<12|c()<<6|c())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i="";++n65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(s)}}(t)},96219:(e,t,r)=>{"use strict";function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},16248:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},17092:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(69446),o=r(14477),a=r(72337),s=r(28915);function u(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,f=u(Object.prototype.toString),d=u(Number.prototype.valueOf),h=u(String.prototype.valueOf),p=u(Boolean.prototype.valueOf);if(c)var y=u(BigInt.prototype.valueOf);if(l)var m=u(Symbol.prototype.valueOf);function g(e,t){if("object"!==(0,n.default)(e))return!1;try{return t(e),!0}catch(e){return!1}}function b(e){return"[object Map]"===f(e)}function v(e){return"[object Set]"===f(e)}function w(e){return"[object WeakMap]"===f(e)}function A(e){return"[object WeakSet]"===f(e)}function k(e){return"[object ArrayBuffer]"===f(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(k.working?k(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===f(e)}function x(e){return"undefined"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}t.isArgumentsObject=i,t.isGeneratorFunction=o,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"===(0,n.default)(e)&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||x(e)},t.isUint8Array=function(e){return"Uint8Array"===a(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===a(e)},t.isUint16Array=function(e){return"Uint16Array"===a(e)},t.isUint32Array=function(e){return"Uint32Array"===a(e)},t.isInt8Array=function(e){return"Int8Array"===a(e)},t.isInt16Array=function(e){return"Int16Array"===a(e)},t.isInt32Array=function(e){return"Int32Array"===a(e)},t.isFloat32Array=function(e){return"Float32Array"===a(e)},t.isFloat64Array=function(e){return"Float64Array"===a(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===a(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===a(e)},b.working="undefined"!=typeof Map&&b(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(b.working?b(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(w.working?w(e):e instanceof WeakMap)},A.working="undefined"!=typeof WeakSet&&A(new WeakSet),t.isWeakSet=function(e){return A(e)},k.working="undefined"!=typeof ArrayBuffer&&k(new ArrayBuffer),t.isArrayBuffer=E,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=x;var _="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function P(e){return"[object SharedArrayBuffer]"===f(e)}function T(e){return void 0!==_&&(void 0===P.working&&(P.working=P(new _)),P.working?P(e):e instanceof _)}function I(e){return g(e,d)}function O(e){return g(e,h)}function B(e){return g(e,p)}function C(e){return c&&g(e,y)}function N(e){return l&&g(e,m)}t.isSharedArrayBuffer=T,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===f(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===f(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===f(e)},t.isGeneratorObject=function(e){return"[object Generator]"===f(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===f(e)},t.isNumberObject=I,t.isStringObject=O,t.isBooleanObject=B,t.isBigIntObject=C,t.isSymbolObject=N,t.isBoxedPrimitive=function(e){return I(e)||O(e)||B(e)||C(e)||N(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||T(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},45058:(e,t,r)=>{"use strict";var n=r(19142),i=r(28847)(r(3355)),o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),A(n.showHidden)&&(n.showHidden=!1),A(n.depth)&&(n.depth=2),A(n.colors)&&(n.colors=!1),A(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),h(n,e,n.depth)}function f(e,t){var r=l.styles[t];return r?"["+l.colors[r][0]+"m"+e+"["+l.colors[r][1]+"m":e}function d(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&_(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return w(i)||(i=h(e,i,n)),i}var o=function(e,t){if(A(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return v(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):b(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),x(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(r);if(0===a.length){if(_(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(k(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return p(r)}var c,l="",f=!1,d=["{","}"];return m(r)&&(f=!0,d=["[","]"]),_(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),k(r)&&(l=" "+RegExp.prototype.toString.call(r)),S(r)&&(l=" "+Date.prototype.toUTCString.call(r)),x(r)&&(l=" "+p(r)),0!==a.length||f&&0!=r.length?n<0?k(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,d)):d[0]+l+d[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function y(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),O(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=b(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),A(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function b(e){return null===e}function v(e){return"number"==typeof e}function w(e){return"string"==typeof e}function A(e){return void 0===e}function k(e){return E(e)&&"[object RegExp]"===P(e)}function E(e){return"object"===(0,i.default)(e)&&null!==e}function S(e){return E(e)&&"[object Date]"===P(e)}function x(e){return E(e)&&("[object Error]"===P(e)||e instanceof Error)}function _(e){return"function"==typeof e}function P(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(u.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(17092),t.isArray=m,t.isBoolean=g,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=w,t.isSymbol=function(e){return"symbol"===(0,i.default)(e)},t.isUndefined=A,t.isRegExp=k,t.types.isRegExp=k,t.isObject=E,t.isDate=S,t.types.isDate=S,t.isError=x,t.types.isNativeError=x,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,i.default)(e)||void 0===e},t.isBuffer=r(16248);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[T((e=new Date).getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(41736),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var B="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(B&&e[B]){var t;if("function"!=typeof(t=e[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return u.default}});var n=d(r(55999)),i=d(r(28231)),o=d(r(78647)),a=d(r(65025)),s=d(r(55996)),u=d(r(8928)),c=d(r(76163)),l=d(r(22982)),f=d(r(91729));function d(e){return e&&e.__esModule?e:{default:e}}},86792:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,i,o,a){return n((s=n(n(t,e),n(i,a)))<<(u=o)|s>>>32-u,r);var s,u}function o(e,t,r,n,o,a,s){return i(t&r|~t&n,e,t,o,a,s)}function a(e,t,r,n,o,a,s){return i(t&n|r&~n,e,t,o,a,s)}function s(e,t,r,n,o,a,s){return i(t^r^n,e,t,o,a,s)}function u(e,t,r,n,o,a,s){return i(r^(t|~n),e,t,o,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var i=0;i>5]>>>i%32&255,a=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[i/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},55996:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default="00000000-0000-0000-0000-000000000000"},91729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(76163))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},77300:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},14402:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};var n=new Uint8Array(16)},42702:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=[];for(var a=0;a>>0;A=w,w=v,v=n(b,30)>>>0,b=g,g=S}i[0]=i[0]+g>>>0,i[1]=i[1]+b>>>0,i[2]=i[2]+v>>>0,i[3]=i[3]+w>>>0,i[4]=i[4]+A>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},22982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=s;for(var n,i=(n=r(76163))&&n.__esModule?n:{default:n},o=[],a=0;a<256;++a)o.push((a+256).toString(16).slice(1));function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]}t.default=function(e){var t=s(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0);if(!(0,i.default)(t))throw TypeError("Stringified UUID is invalid");return t}},55999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,o,a=(n=r(14402))&&n.__esModule?n:{default:n},s=r(22982),u=0,c=0;t.default=function(e,t,r){var n=t&&r||0,l=t||new Array(16),f=(e=e||{}).node||i,d=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==d){var h=e.random||(e.rng||a.default)();null==f&&(f=i=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=o=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:Date.now(),y=void 0!==e.nsecs?e.nsecs:c+1,m=p-u+(y-c)/1e4;if(m<0&&void 0===e.clockseq&&(d=d+1&16383),(m<0||p>u)&&void 0===e.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=p,c=y,o=d;var g=(1e4*(268435455&(p+=122192928e5))+y)%4294967296;l[n++]=g>>>24&255,l[n++]=g>>>16&255,l[n++]=g>>>8&255,l[n++]=255&g;var b=p/4294967296*1e4&268435455;l[n++]=b>>>8&255,l[n++]=255&b,l[n++]=b>>>24&15|16,l[n++]=b>>>16&255,l[n++]=d>>>8|128,l[n++]=255&d;for(var v=0;v<6;++v)l[n+v]=f[v];return t||(0,s.unsafeStringify)(l)}},28231:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(36125)),i=o(r(86792));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v3",48,i.default);t.default=a},36125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,a,s){var u;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(11788)),i=a(r(14402)),o=r(22982);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();var a=(e=e||{}).random||(e.rng||i.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=a[s];return t}return(0,o.unsafeStringify)(a)}},65025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(36125)),i=o(r(42702));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v5",80,i.default);t.default=a},76163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(77300))&&n.__esModule?n:{default:n};t.default=function(e){return"string"==typeof e&&i.default.test(e)}},8928:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(76163))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},38325:e=>{"use strict";e.exports=function e(n,i){var o,a=0,s=0,u=i=i||0,c=n.length;do{if(u>=c)throw e.bytes=0,new RangeError("Could not decode varint");o=n[u++],a+=s<28?(o&r)<=t);return e.bytes=u-i,a};var t=128,r=127},92699:e=>{"use strict";e.exports=function e(i,o,a){o=o||[];for(var s=a=a||0;i>=n;)o[a++]=255&i|t,i/=128;for(;i&r;)o[a++]=255&i|t,i>>>=7;return o[a]=0|i,e.bytes=a-s+1,o};var t=128,r=-128,n=Math.pow(2,31)},26657:(e,t,r)=>{"use strict";e.exports={encode:r(92699),decode:r(38325),encodingLength:r(57490)}},57490:e=>{"use strict";var t=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),a=Math.pow(2,42),s=Math.pow(2,49),u=Math.pow(2,56),c=Math.pow(2,63);e.exports=function(e){return e{"use strict";var n,i=r(28847)(r(3355));if("object"===("undefined"==typeof globalThis?"undefined":(0,i.default)(globalThis)))n=globalThis;else try{n=r(26464)}catch(e){}finally{if(n||"undefined"==typeof window||(n=window),!n)throw new Error("Could not determine global this")}var o=n.WebSocket||n.MozWebSocket,a=r(75735);function s(e,t){return t?new o(e,t):new o(e)}o&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return o[e]}})})),e.exports={w3cwebsocket:o?s:null,version:a}},75735:(e,t,r)=>{"use strict";e.exports=r(19794).version},72337:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(48184),o=r(43604),a=r(24373),s=r(80593),u=r(53820),c=s("Object.prototype.toString"),l=r(11191)(),f="undefined"==typeof globalThis?r.g:globalThis,d=o(),h=s("String.prototype.slice"),p=Object.getPrototypeOf,y=s("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?t:"Object"===t&&function(e){var t=!1;return i(m,(function(r,n){if(!t)try{r(e),t=h(n,1)}catch(e){}})),t}(e)}return u?function(e){var t=!1;return i(m,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=h(n,1))}catch(e){}})),t}(e):null}},31357:(e,t,r)=>{"use strict";var n=r(31296),i=r(68419),o=r(33103),a=r(39122),s=r(17321),u="application/json",c=function(){};e.exports=function(e,t,r){if(!e||"string"!=typeof e)throw new TypeError("must specify a URL");if("function"==typeof t&&(r=t,t={}),r&&"function"!=typeof r)throw new TypeError("expected cb to be undefined or a function");r=r||c;var l=(t=t||{}).json?"json":"text",f=(t=o({responseType:l},t)).headers||{},d=(t.method||"GET").toUpperCase(),h=t.query;return h&&("string"!=typeof h&&(h=n.stringify(h)),e=i(e,h)),"json"===t.responseType&&a(f,"Accept",u),t.json&&"GET"!==d&&"HEAD"!==d&&(a(f,"Content-Type",u),t.body=JSON.stringify(t.body)),t.method=d,t.url=e,t.headers=f,delete t.query,delete t.json,s(t,r)}},39122:e=>{"use strict";e.exports=function(e,t,r){var n=t.toLowerCase();e[t]||e[n]||(e[t]=r)}},49800:e=>{"use strict";e.exports=function(e,t){return t?{statusCode:t.statusCode,headers:t.headers,method:e.method,url:e.url,rawRequest:t.rawRequest?t.rawRequest:t}:null}},17321:(e,t,r)=>{"use strict";var n=r(30346),i=r(49800),o=function(){};e.exports=function(e,t){delete e.uri;var r=!1;"json"===e.responseType&&(e.responseType="text",r=!0);var a=n(e,(function(n,a,s){if(r&&!n)try{var u=a.rawRequest.responseText;s=JSON.parse(u)}catch(e){n=e}a=i(e,a),t(n,n?null:s,a),t=o})),s=a.onabort;return a.onabort=function(){var e=s.apply(a,Array.prototype.slice.call(arguments));return t(new Error("XHR Aborted")),t=o,e},a}},30346:(e,t,r)=>{"use strict";var n=r(92948),i=r(27277),o=r(48209),a=r(87705);function s(e,t,r){var n=e;return i(t)?(r=t,"string"==typeof e&&(n={uri:e})):n=a(t,{uri:e}),n.callback=r,n}function u(e,t,r){return c(t=s(e,t,r))}function c(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,r=function(r,n,i){t||(t=!0,e.callback(r,n,i))};function n(){var e=void 0;if(e=l.response?l.response:l.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(l),g)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(f),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,b)}function a(){if(!c){var t;clearTimeout(f),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=b,a=null;return 0!==t?(i={body:n(),statusCode:t,method:h,headers:{},url:d,rawRequest:l},l.getAllResponseHeaders&&(i.headers=o(l.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),r(a,i,i.body)}}var s,c,l=e.xhr||null;l||(l=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var f,d=l.url=e.uri||e.url,h=l.method=e.method||"GET",p=e.body||e.data,y=l.headers=e.headers||{},m=!!e.sync,g=!1,b={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:l};if("json"in e&&!1!==e.json&&(g=!0,y.accept||y.Accept||(y.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(y["content-type"]||y["Content-Type"]||(y["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(a,0)},l.onload=a,l.onerror=i,l.onprogress=function(){},l.onabort=function(){c=!0},l.ontimeout=i,l.open(h,d,!m,e.username,e.password),m||(l.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(f=setTimeout((function(){if(!c){c=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),l.setRequestHeader)for(s in y)y.hasOwnProperty(s)&&l.setRequestHeader(s,y[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(p||null),l}e.exports=u,e.exports.default=u,u.XMLHttpRequest=n.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var r=0;r{"use strict";e.exports=function(){for(var e={},r=0;r{"use strict";var n=r(28847)(r(3355)),i=r(26427),o=function e(t){this.givenProvider=e.givenProvider,t&&t._requestManager&&(t=t.currentProvider),"undefined"!=typeof document&&(this.pick=i.pick),this.setProvider(t)};o.givenProvider=null,"undefined"!=typeof ethereum&ðereum.bzz&&(o.givenProvider=ethereum.bzz),o.prototype.setProvider=function(e){if(e&&"object"===(0,n.default)(e)&&"string"==typeof e.bzz&&(e=e.bzz),"string"!=typeof e){this.currentProvider=null;var t=new Error("No provider set, please set one using bzz.setProvider().");return this.download=this.upload=this.isAvailable=function(){throw t},!1}return this.currentProvider=e,this.download=i.at(e).download,this.upload=i.at(e).upload,this.isAvailable=i.at(e).isAvailable,!0},e.exports=o},94246:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports={ErrorResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:JSON.stringify(e),r=e.error&&e.error.data?e.error.data:null,n=new Error("Returned error: "+t);return n.data=r,n},InvalidNumberOfParams:function(e,t,r){return new Error('Invalid number of parameters for "'+r+'". Got '+e+" expected "+t+"!")},InvalidConnection:function(e,t){return this.ConnectionError("CONNECTION ERROR: Couldn't connect to node "+e+".",t)},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:"Invalid JSON RPC response: "+JSON.stringify(e);return new Error(t)},ConnectionTimeout:function(e){return new Error("CONNECTION TIMEOUT: timeout of "+e+" ms achived")},ConnectionNotOpenError:function(e){return this.ConnectionError("connection not open on send()",e)},ConnectionCloseError:function(e){return"object"===(0,n.default)(e)&&e.code&&e.reason?this.ConnectionError("CONNECTION ERROR: The connection got closed with the close code `"+e.code+"` and the following reason string `"+e.reason+"`",e):new Error("CONNECTION ERROR: The connection closed unexpectedly")},MaxAttemptsReachedOnReconnectingError:function(){return new Error("Maximum number of reconnect attempts reached!")},PendingRequestsOnReconnectingError:function(){return new Error("CONNECTION ERROR: Provider started to reconnect before the response got received!")},ConnectionError:function(e,t){var r=new Error(e);return t&&(r.code=t.code,r.reason=t.reason,t.description&&(r.description=t.description)),r},RevertInstructionError:function(e,t){var r=new Error("Your request got reverted with the following reason string: "+e);return r.reason=e,r.signature=t,r},TransactionRevertInstructionError:function(e,t,r){var n=new Error("Transaction has been reverted by the EVM:\n"+JSON.stringify(r,null,2));return n.reason=e,n.signature=t,n.receipt=r,n},TransactionError:function(e,t){var r=new Error(e);return r.receipt=t,r},NoContractAddressFoundError:function(e){return this.TransactionError("The transaction receipt didn't contain a contract address.",e)},ContractCodeNotStoredError:function(e){return this.TransactionError("The contract code couldn't be stored, please check your gas limit.",e)},TransactionRevertedWithoutReasonError:function(e){return this.TransactionError("Transaction has been reverted by the EVM:\n"+JSON.stringify(e,null,2),e)},TransactionOutOfGasError:function(e){return this.TransactionError("Transaction ran out of gas. Please provide more gas:\n"+JSON.stringify(e,null,2),e)},ResolverMethodMissingError:function(e,t){return new Error("The resolver at "+e+'does not implement requested method: "'+t+'".')},ContractMissingABIError:function(){return new Error("You must provide the json interface of the contract when instantiating a contract object.")},ContractOnceRequiresCallbackError:function(){return new Error("Once requires a callback as the second parameter.")},ContractEventDoesNotExistError:function(e){return new Error('Event "'+e+"\" doesn't exist in this contract.")},ContractReservedEventError:function(e){return new Error('The event "'+e+"\" is a reserved event name, you can't use it.")},ContractMissingDeployDataError:function(){return new Error('No "data" specified in neither the given options, nor the default options.')},ContractNoAddressDefinedError:function(){return new Error("This contract object doesn't have address set yet, please set an address first.")},ContractNoFromAddressDefinedError:function(){return new Error('No "from" address specified in neither the given options, nor the default options.')}}},32084:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(90775)),o=n(r(3355));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t{"use strict";var n=r(94246),i=r(32084);e.exports={errors:n,formatters:i}},53349:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(74519)),a=n(r(90775)),s=n(r(94571)),u=n(r(3355));function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},g.prototype.getCall=function(e){return"function"==typeof this.call?this.call(e):this.call},g.prototype.extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},g.prototype.validateArgs=function(e){if(e.length!==this.params)throw f.InvalidNumberOfParams(e.length,this.params,this.name)},g.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map((function(r,n){return r?r.call(t,e[n]):e[n]})):e},g.prototype.formatOutput=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.outputFormatter&&e?t.outputFormatter(e,null==this?void 0:this.hexFormat):e})):this.outputFormatter&&e?this.outputFormatter(e,null==this?void 0:this.hexFormat):e},g.prototype.toPayload=function(e){var t=this.getCall(e),r=this.extractCallback(e),n=this.formatInput(e);this.validateArgs(n);var i={method:t,params:n,callback:r};return this.transformPayload&&(i=this.transformPayload(i)),i},g.prototype._confirmTransaction=function(e,t,r){var n=this,o=!1,a=!0,c=0,l=0,b=null,v=null,w=null,A=r.params[0]&&"object"===(0,u.default)(r.params[0])&&r.params[0].gas?r.params[0].gas:null,k=!!r.params[0]&&"object"===(0,u.default)(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,E=k&&r.params[0].data.length>2,S=[new g({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[d.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:d.outputBlockFormatter}),new g({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:d.outputTransactionReceiptFormatter}),new g({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[d.inputAddressFormatter,d.inputDefaultBlockNumberFormatter]}),new g({name:"getTransactionByHash",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:d.outputTransactionFormatter}),new y({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:d.outputBlockFormatter}}})],x={};S.forEach((function(e){e.attachToObject(x),e.requestManager=n.requestManager}));var _=function(u,y,g,S,_){if(!g)return _||(_={unsubscribe:function(){clearInterval(b),clearTimeout(v)}}),(u?p.resolve(u):x.getTransactionReceipt(t)).catch((function(t){_.unsubscribe(),o=!0,h._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)})).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var o,s,c;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r&&r.blockHash){t.next=2;break}throw new Error("Receipt missing or blockHash null");case 2:if(n.extraFormatters&&n.extraFormatters.receiptFormatter&&(r=n.extraFormatters.receiptFormatter(r)),!(e.eventEmitter.listeners("confirmation").length>0)){t.next=28;break}if(void 0!==u&&0===l){t.next=25;break}return t.next=7,x.getBlockByNumber("latest");case 7:if(s=t.sent,c=s?s.hash:null,!y){t.next=24;break}if(!w){t.next=17;break}return t.next=13,x.getBlockByNumber(w.number+1);case 13:(o=t.sent)&&(w=o,e.eventEmitter.emit("confirmation",l,r,c)),t.next=22;break;case 17:return t.next=19,x.getBlockByNumber(r.blockNumber);case 19:o=t.sent,w=o,e.eventEmitter.emit("confirmation",l,r,c);case 22:t.next=25;break;case 24:e.eventEmitter.emit("confirmation",l,r,c);case 25:(y&&o||!y)&&l++,a=!1,l===n.transactionConfirmationBlocks+1&&(_.unsubscribe(),e.eventEmitter.removeAllListeners());case 28:return t.abrupt("return",r);case 29:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!k||o){t.next=19;break}if(r.contractAddress){t.next=5;break}return a&&(_.unsubscribe(),o=!0),h._fireError(f.NoContractAddressFoundError(r),e.eventEmitter,e.reject,null,r),t.abrupt("return");case 5:return t.prev=5,t.next=8,x.getCode(r.contractAddress);case 8:s=t.sent,t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:if(s){t.next=15;break}return t.abrupt("return");case 15:!0===r.status&&E||s.length>2?(e.eventEmitter.emit("receipt",r),n.extraFormatters&&n.extraFormatters.contractDeployFormatter?e.resolve(n.extraFormatters.contractDeployFormatter(r)):e.resolve(r),a&&e.eventEmitter.removeAllListeners()):h._fireError(f.ContractCodeNotStoredError(r),e.eventEmitter,e.reject,null,r),a&&_.unsubscribe(),o=!0;case 19:return t.abrupt("return",r);case 20:case"end":return t.stop()}}),t,null,[[5,11]])})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(s){var u,c,l,p;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k||o){t.next=35;break}if(s.outOfGas||A&&A===s.gasUsed||!0!==s.status&&"0x1"!==s.status&&void 0!==s.status){t.next=7;break}e.eventEmitter.emit("receipt",s),e.resolve(s),a&&e.eventEmitter.removeAllListeners(),t.next=33;break;case 7:if(JSON.stringify(s,null,2),!1!==s.status&&"0x0"!==s.status){t.next=32;break}if(t.prev=9,u=null,!n.handleRevert||"eth_sendTransaction"!==n.call&&"eth_sendRawTransaction"!==n.call){t.next=24;break}return c=r.params[0],"eth_sendRawTransaction"===n.call&&(l=r.params[0],p=m.parse(l),c=d.inputTransactionFormatter({data:p.data,to:p.to,from:p.from,gas:p.gasLimit.toHexString(),gasPrice:p.gasPrice?p.gasPrice.toHexString():void 0,value:p.value.toHexString()})),t.next=16,n.getRevertReason(c,s.blockNumber);case 16:if(!(u=t.sent)){t.next=21;break}h._fireError(f.TransactionRevertInstructionError(u.reason,u.signature,s),e.eventEmitter,e.reject,null,s),t.next=22;break;case 21:throw!1;case 22:t.next=25;break;case 24:throw!1;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(9),h._fireError(f.TransactionRevertedWithoutReasonError(s),e.eventEmitter,e.reject,null,s);case 30:t.next=33;break;case 32:h._fireError(f.TransactionOutOfGasError(s),e.eventEmitter,e.reject,null,s);case 33:a&&_.unsubscribe(),o=!0;case 35:case"end":return t.stop()}}),t,null,[[9,27]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(){c++,y?c-1>=n.transactionPollingTimeout&&(_.unsubscribe(),o=!0,h._fireError(f.TransactionError("Transaction was not mined within "+n.transactionPollingTimeout+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject)):c-1>=n.transactionBlockTimeout&&(_.unsubscribe(),o=!0,h._fireError(f.TransactionError("Transaction was not mined within "+n.transactionBlockTimeout+" blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject))}));_.unsubscribe(),o=!0,h._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:g},e.eventEmitter,e.reject)},P=function(e){var t=!1,r=function(){b=setInterval(_.bind(null,e,!0),n.transactionPollingInterval)};if(!this.requestManager.provider.on)return r();x.subscribe("newBlockHeaders",(function(n,i,o){if(t=!0,n||!i)return r();_(e,!1,n,0,o)})),v=setTimeout((function(){t||r()}),1e3*this.blockHeaderTimeout)}.bind(this);x.getTransactionReceipt(t).then((function(t){t&&t.blockHash?(e.eventEmitter.listeners("confirmation").length>0&&P(t),_(t,!1)):o||P()})).catch((function(){o||P()}))};var b=function(e,t){return"number"==typeof e?t.wallet[e]:e&&"object"===(0,u.default)(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};g.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,r="eth_call"===e.call,n=function(){var n=Array.prototype.slice.call(arguments),i=p(!t),a=e.toPayload(n);e.hexFormat=!1,"eth_getTransactionReceipt"!==e.call&&"eth_getTransactionByHash"!==e.call&&"getBlock"!==e.name||(e.hexFormat=a.params.length{"use strict";var n=r(98008),i=function(e){var t,r,i=new Promise((function(){t=arguments[0],r=arguments[1]}));if(e)return{resolve:t,reject:r,eventEmitter:i};var o=new n;return i._events=o._events,i.emit=o.emit,i.on=o.on,i.once=o.once,i.off=o.off,i.listeners=o.listeners,i.addListener=o.addListener,i.removeListener=o.removeListener,i.removeAllListeners=o.removeAllListeners,{resolve:t,reject:r,eventEmitter:i}};i.resolve=function(e){var t=i(!0);return t.resolve(e),t.eventEmitter},e.exports=i},35229:(e,t,r)=>{"use strict";var n=r(48155),i=r(11314).errors,o=function(e){this.requestManager=e,this.requests=[]};o.prototype.add=function(e){this.requests.push(e)},o.prototype.execute=function(){var e=this.requests,t=this._sortResponses.bind(this);this.requestManager.sendBatch(e,(function(r,o){o=t(o),e.map((function(e,t){return o[t]||{}})).forEach((function(t,r){if(e[r].callback){if(t&&t.error)return e[r].callback(i.ErrorResponse(t));if(!n.isValidResponse(t))return e[r].callback(i.InvalidResponse(t));try{e[r].callback(null,e[r].format?e[r].format(t.result):t.result)}catch(t){e[r].callback(t)}}}))}))},o.prototype._sortResponses=function(e){return(e||[]).sort((function(e,t){return e.id-t.id}))},e.exports=o},99764:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=null,o="object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))?globalThis:void 0;if(!o)try{o=Function("return this")()}catch(e){o=self}void 0!==o.ethereum?i=o.ethereum:void 0!==o.web3&&o.web3.currentProvider&&(o.web3.currentProvider.sendAsync&&(o.web3.currentProvider.send=o.web3.currentProvider.sendAsync,delete o.web3.currentProvider.sendAsync),!o.web3.currentProvider.on&&o.web3.currentProvider.connection&&"ipcProviderWrapper"===o.web3.currentProvider.connection.constructor.name&&(o.web3.currentProvider.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");"data"===e?this.connection.on("data",(function(e){var r="";e=e.toString();try{r=JSON.parse(e)}catch(r){return t(new Error("Couldn't parse response data"+e))}r.id||-1===r.method.indexOf("_subscription")||t(null,r)})):this.connection.on(e,t)}),i=o.web3.currentProvider),e.exports=i},92033:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(45058).callbackify,o=r(11314).errors,a=r(48155),s=r(35229),u=r(99764),c=function e(t,r){this.provider=null,this.providers=e.providers,this.setProvider(t,r),this.subscriptions=new Map};c.givenProvider=u,c.providers={WebsocketProvider:r(77651),HttpProvider:r(14565),IpcProvider:r(52683)},c.prototype.setProvider=function(e,t){var r=this;if(e&&"string"==typeof e&&this.providers)if(/^http(s)?:\/\//i.test(e))e=new this.providers.HttpProvider(e);else if(/^ws(s)?:\/\//i.test(e))e=new this.providers.WebsocketProvider(e);else if(e&&"object"===(0,n.default)(t)&&"function"==typeof t.connect)e=new this.providers.IpcProvider(e,t);else if(e)throw new Error("Can't autodetect provider for \""+e+'"');this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=e||null,this.provider&&this.provider.on&&("function"==typeof e.request?this.provider.on("message",(function(e){if(e&&"eth_subscription"===e.type&&e.data){var t=e.data;t.subscription&&r.subscriptions.has(t.subscription)&&r.subscriptions.get(t.subscription).callback(null,t.result)}})):this.provider.on("data",(function(e,t){(e=e||t).method&&e.params&&e.params.subscription&&r.subscriptions.has(e.params.subscription)&&r.subscriptions.get(e.params.subscription).callback(null,e.params.result)})),this.provider.on("connect",(function(){r.subscriptions.forEach((function(e){e.subscription.resubscribe()}))})),this.provider.on("error",(function(e){r.subscriptions.forEach((function(t){t.callback(e)}))})),this.provider.on("disconnect",(function(e){r._isCleanCloseEvent(e)&&!r._isIpcCloseError(e)||(r.subscriptions.forEach((function(t){t.callback(o.ConnectionCloseError(e)),r.subscriptions.delete(t.subscription.id)})),r.provider&&r.provider.emit&&r.provider.emit("error",o.ConnectionCloseError(e))),r.provider&&r.provider.emit&&r.provider.emit("end",e)})))},c.prototype.send=function(e,t){if(t=t||function(){},!this.provider)return t(o.InvalidProvider());var r=e.method,n=e.params,s=a.toPayload(r,n),u=this._jsonrpcResultCallback(t,s);if(this.provider.request)i(this.provider.request.bind(this.provider))({method:r,params:n},t);else if(this.provider.sendAsync)this.provider.sendAsync(s,u);else{if(!this.provider.send)throw new Error("Provider does not have a request or send method to use.");this.provider.send(s,u)}},c.prototype.sendBatch=function(e,t){if(!this.provider)return t(o.InvalidProvider());var r=a.toBatchPayload(e);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,(function(e,r){return e?t(e):Array.isArray(r)?void t(null,r):t(o.InvalidResponse(r))}))},c.prototype.addSubscription=function(e,t){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions.set(e.id,{callback:t,subscription:e})},c.prototype.removeSubscription=function(e,t){if(this.subscriptions.has(e)){var r=this.subscriptions.get(e).subscription.options.type;return this.subscriptions.delete(e),void this.send({method:r+"_unsubscribe",params:[e]},t)}"function"==typeof t&&t(null)},c.prototype.clearSubscriptions=function(e){try{var t=this;return this.subscriptions.size>0&&this.subscriptions.forEach((function(r,n){e&&"syncing"===r.name||t.removeSubscription(n)})),this.provider.reset&&this.provider.reset(),!0}catch(e){throw new Error("Error while clearing subscriptions: ".concat(e))}},c.prototype._isCleanCloseEvent=function(e){return"object"===(0,n.default)(e)&&([1e3].includes(e.code)||!0===e.wasClean)},c.prototype._isIpcCloseError=function(e){return"boolean"==typeof e&&e},c.prototype._jsonrpcResultCallback=function(e,t){return function(r,n){return n&&n.id&&t.id!==n.id?e(new Error("Wrong response id ".concat(n.id," (expected: ").concat(t.id,") in ").concat(JSON.stringify(t)))):r?e(r):n&&n.error?e(o.ErrorResponse(n)):a.isValidResponse(n)?void e(null,n.result):e(o.InvalidResponse(n))}},e.exports={Manager:c,BatchManager:s}},48155:e=>{"use strict";var t={messageId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),toPayload:function(e,r){if(!e)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(r)+'"!');return t.messageId===Number.MAX_SAFE_INTEGER?t.messageId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER):t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:e,params:r||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!(!e||e.error||"2.0"!==e.jsonrpc||"number"!=typeof e.id&&"string"!=typeof e.id||void 0===e.result)}},toBatchPayload:function(e){return e.map((function(e){return t.toPayload(e.method,e.params)}))}};e.exports=t},34178:(e,t,r)=>{"use strict";var n=r(42929),i=function(e){this.name=e.name,this.type=e.type,this.subscriptions=e.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.attachToObject=function(e){var t=this.buildCall(),r=this.name.split(".");r.length>1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},i.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new n({subscription:e.subscriptions[arguments[0]]||{},requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},e.exports={subscriptions:i,subscription:n}},42929:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(11314).errors,o=r(98008),a=r(11314).formatters;function s(e){return e}function u(e){o.call(this),this.id=null,this.callback=s,this.arguments=null,this.lastBlock=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}u.prototype=Object.create(o.prototype),u.prototype.constructor=u,u.prototype._extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},u.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw i.InvalidNumberOfParams(e.length,t.params,t.subscriptionName)},u.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map((function(t,r){return t?t(e[r]):e[r]})):e},u.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},u.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e)||s,this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},u.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.lastBlock=null,this.removeAllListeners()},u.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),r=this._toPayload(t);if(!r)return this;if(!this.options.requestManager.provider)return setTimeout((function(){var t=new Error("No provider set.");e.callback(t,null,e),e.emit("error",t)}),0),this;if(!this.options.requestManager.provider.on)return setTimeout((function(){var t=new Error("The current provider doesn't support subscriptions: "+e.options.requestManager.provider.constructor.name);e.callback(t,null,e),e.emit("error",t)}),0),this;if(this.lastBlock&&this.options.params&&"object"===(0,n.default)(this.options.params)&&(r.params[1]=this.options.params,r.params[1].fromBlock=a.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&r.params[1]&&"object"===(0,n.default)(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)){var i=Object.assign({},r.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[i]},(function(t,r){t?setTimeout((function(){e.callback(t,null,e),e.emit("error",t)}),0):r.forEach((function(t){var r=e._formatOutput(t);e.callback(null,r,e),e.emit("data",r)}))}))}return"object"===(0,n.default)(r.params[1])&&delete r.params[1].fromBlock,this.options.requestManager.send(r,(function(t,i){!t&&i?(e.id=i,e.method=r.params[0],e.options.requestManager.addSubscription(e,(function(t,r){t?(e.callback(t,!1,e),e.emit("error",t)):(Array.isArray(r)||(r=[r]),r.forEach((function(t){var r=e._formatOutput(t);if(e.lastBlock=r&&"object"===(0,n.default)(r)?r.blockNumber:null,"function"==typeof e.options.subscription.subscriptionHandler)return e.options.subscription.subscriptionHandler.call(e,r);e.emit("data",r),e.callback(null,r,e)})))})),e.emit("connected",i)):setTimeout((function(){e.callback(t,!1,e),e.emit("error",t)}),0)})),this},u.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},e.exports=u},1949:(e,t,r)=>{"use strict";var n=r(11314).formatters,i=r(53349),o=r(48161);e.exports=function(e){var t=function(t){var r;return t.property?(e[t.property]||(e[t.property]={}),r=e[t.property]):r=e,t.methods&&t.methods.forEach((function(t){t instanceof i||(t=new i(t)),t.attachToObject(r),t.setRequestManager(e._requestManager)})),e};return t.formatters=n,t.utils=o,t.Method=i,t}},80606:(e,t,r)=>{"use strict";var n=r(92033),i=r(1949);e.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=t[0]._requestManager:e._requestManager=new n.Manager(t[0],t[1]),e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,r){return e._requestManager.setProvider(t,r),e._provider=e._requestManager.provider,!0}),e.setRequestManager=function(t){e._requestManager=t,e._provider=t.provider},e.BatchRequest=n.BatchManager.bind(null,e._requestManager),e.extend=i(e)},addProviders:function(e){e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers}}},79901:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(29033).Buffer,o=r(48161),a=r(62914).RQ,s=r(62914)._R,u=new a((function(e,t){return!e.match(/^u?int/)||Array.isArray(t)||t&&"object"===(0,n.default)(t)&&"BN"===t.constructor.name?t:t.toString()}));function c(){}var l=function(){};l.prototype.encodeFunctionSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e).slice(0,10)},l.prototype.encodeEventSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e)},l.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},l.prototype.encodeParameters=function(e,t){var r=this;return e=r.mapTypes(e),t=t.map((function(t,i){var o=e[i];return"object"===(0,n.default)(o)&&o.type&&(o=o.type),t=r.formatParam(o,t),"string"==typeof o&&o.includes("tuple")&&function e(t,n){if("array"===t.name){if(!t.type.match(/\[(\d+)\]/))return n.map((function(r){return e(u._getCoder(s.from(t.type.replace("[]",""))),r)}));var i=parseInt(t.type.match(/\[(\d+)\]/)[1]);if(n.length!==i)throw new Error("Array length does not matches with the given input");return n.map((function(r){return e(u._getCoder(s.from(t.type.replace(/\[\d+\]/,""))),r)}))}t.coders.forEach((function(t,i){"tuple"===t.name?e(t,n[i]):n[i]=r.formatParam(t.name,n[i])}))}(u._getCoder(s.from(o)),t),t})),u.encode(e,t)},l.prototype.mapTypes=function(e){var t=this,r=[];return e.forEach((function(e){if("object"===(0,n.default)(e)&&"function"===e.type&&(e=Object.assign({},e,{type:"bytes24"})),t.isSimplifiedStructFormat(e)){var i=Object.keys(e)[0];r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))}else r.push(e)})),r},l.prototype.isSimplifiedStructFormat=function(e){return"object"===(0,n.default)(e)&&void 0===e.components&&void 0===e.name},l.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},l.prototype.mapStructToCoderFormat=function(e){var t=this,r=[];return Object.keys(e).forEach((function(i){"object"!==(0,n.default)(e[i])?r.push({name:i,type:e[i]}):r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))})),r},l.prototype.formatParam=function(e,t){var r=this,n=new RegExp(/^bytes([0-9]*)$/),a=new RegExp(/^bytes([0-9]*)\[\]$/),s=new RegExp(/^(u?int)([0-9]*)$/),u=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(o.isBN(t)||o.isBigNumber(t))return t.toString(10);if(e.match(a)||e.match(u))return t.map((function(t){return r.formatParam(e.replace("[]",""),t)}));var c=e.match(s);if(c){var l=parseInt(c[2]||"256");l/80&&(!t||"0x"===t||"0X"===t))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var i=u.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,""),r),o=new c;return o.__length__=0,e.forEach((function(e,t){var r=i[o.__length__],a="object"===(0,n.default)(e)&&e.type&&"string"===e.type;r="0x"!==r||a||"string"==typeof e&&"string"===e?r:null,o[t]=r,("function"==typeof e||e&&"object"===(0,n.default)(e))&&e.name&&(o[e.name]=r),o.__length__++})),o},l.prototype.decodeLog=function(e,t,r){var n=this;r=Array.isArray(r)?r:[r],t=t||"";var i=[],o=[],a=0;e.forEach((function(e,t){e.indexed?(o[t]=["bool","int","uint","address","fixed","ufixed"].find((function(t){return-1!==e.type.indexOf(t)}))?n.decodeParameter(e.type,r[a]):r[a],a++):i[t]=e}));var s=t,u=s?this.decodeParametersWith(i,s,!0):[],l=new c;return l.__length__=0,e.forEach((function(e,t){l[t]="string"===e.type?"":null,void 0!==u[t]&&(l[t]=u[t]),void 0!==o[t]&&(l[t]=o[t]),e.name&&(l[e.name]=l[t]),l.__length__++})),l};var f=new l;e.exports=f},99819:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(93106)),a=i(r(3355)),s=i(r(90775)),u=i(r(74519));function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var l,d="Signer Error: ",h=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(c);try{for(h.s();!(l=h.n()).done;){var p=l.value;d+="".concat(d," ").concat(p,".")}}catch(e){h.e(e)}finally{h.f()}throw new Error(d)}var y="0x"+u.serialize().toString("hex"),m=b.keccak256(y),g={messageHash:"0x"+n.from(u.getMessageToSign(!0)).toString("hex"),v:"0x"+u.v.toString("hex"),r:"0x"+u.r.toString("hex"),s:"0x"+u.s.toString("hex"),rawTransaction:y,transactionHash:m};return r(null,g),g}catch(e){return r(e),Promise.reject(e)}}return e.type=function(e){var t,r=void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas;if(void 0!==e.type?t=b.toHex(e.type):void 0===e.type&&r&&(t="0x2"),void 0!==e.gasPrice&&("0x2"===t||r))throw Error("eip-1559 transactions don't support gasPrice");if(("0x1"===t||"0x0"===t)&&r)throw Error("pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas");return r||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===k.London||e.hardfork&&e.hardfork.toLowerCase()===k.London?t="0x2":(e.accessList||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===k.Berlin||e.hardfork&&e.hardfork.toLowerCase()===k.Berlin)&&(t="0x1"),t}(e),void 0!==e.nonce&&void 0!==e.chainId&&(void 0!==e.gasPrice||void 0!==e.maxFeePerGas&&void 0!==e.maxPriorityFeePerGas)&&s?Promise.resolve(c(e)):Promise.all([S(e.common)||S(e.common.customChain.chainId)?S(e.chainId)?i._ethereumCall.getChainId():e.chainId:void 0,S(e.nonce)?i._ethereumCall.getTransactionCount(i.privateKeyToAccount(t).address):e.nonce,S(s)?i._ethereumCall.getNetworkId():1,P(i,e)]).then((function(t){var r=(0,u.default)(t,4),n=r[0],i=r[1],o=r[2],a=r[3];if(S(n)&&S(e.common)&&S(e.common.customChain.chainId)||S(i)||S(o)||S(a))throw new Error('One of the values "chainId", "networkId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(t));return c(l(l(l({},e),S(e.common)||S(e.common.customChain.chainId)?{chainId:n}:{}),{},{nonce:i,networkId:o},a))}))},_.prototype.recoverTransaction=function(e){var t=n.from(e.slice(2),"hex"),r=w.fromSerializedData(t);return b.toChecksumAddress(r.getSenderAddress().toString("hex"))},_.prototype.hashMessage=function(e){var t=b.isHexStrict(e)?e:b.utf8ToHex(e),r=b.hexToBytes(t),i=n.from(r),o="Ethereum Signed Message:\n"+r.length,a=n.from(o),s=n.concat([a,i]);return E.bufferToHex(b.keccak256(s))},_.prototype.sign=function(e,t){if(t.startsWith("0x")||(t="0x"+t),66!==t.length)throw new Error("Private key must be 32 bytes long");var r=this.hashMessage(e),n=p.sign(r,t),i=p.decodeSignature(n);return{message:e,messageHash:r,v:i[0],r:i[1],s:i[2],signature:n}},_.prototype.recover=function(e,t,r){var n=[].slice.apply(arguments);return e&&"object"===(0,a.default)(e)?this.recover(e.messageHash,p.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),n.length>=4?(r="boolean"==typeof(r=n.slice(-1)[0])&&!!r,this.recover(e,p.encodeSignature(n.slice(1,4)),r)):p.recover(e,t))},_.prototype.decrypt=function(e,t,r){if("string"!=typeof t)throw new Error("No password given.");var i,s,u=e&&"object"===(0,a.default)(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==u.version)throw new Error("Not a valid V3 wallet");if("scrypt"===u.crypto.kdf)s=u.crypto.kdfparams,i=m.syncScrypt(n.from(t),n.from(s.salt,"hex"),s.n,s.r,s.p,s.dklen);else{if("pbkdf2"!==u.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(s=u.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");i=y.pbkdf2Sync(n.from(t),n.from(s.salt,"hex"),s.c,s.dklen,"sha256")}var c=n.from(u.crypto.ciphertext,"hex");if(b.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(c)))).replace("0x","")!==u.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var l=y.createDecipheriv(u.crypto.cipher,i.slice(0,16),n.from(u.crypto.cipherparams.iv,"hex")),f="0x"+n.from([].concat((0,o.default)(l.update(c)),(0,o.default)(l.final()))).toString("hex");return this.privateKeyToAccount(f,!0)},_.prototype.encrypt=function(e,t,r){var i,a=this.privateKeyToAccount(e,!0),s=(r=r||{}).salt||y.randomBytes(32),u=r.iv||y.randomBytes(16),c=r.kdf||"scrypt",l={dklen:r.dklen||32,salt:s.toString("hex")};if("pbkdf2"===c)l.c=r.c||262144,l.prf="hmac-sha256",i=y.pbkdf2Sync(n.from(t),n.from(l.salt,"hex"),l.c,l.dklen,"sha256");else{if("scrypt"!==c)throw new Error("Unsupported kdf");l.n=r.n||8192,l.r=r.r||8,l.p=r.p||1,i=m.syncScrypt(n.from(t),n.from(l.salt,"hex"),l.n,l.r,l.p,l.dklen)}var f=y.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),u);if(!f)throw new Error("Unsupported cipher");var d=n.from([].concat((0,o.default)(f.update(n.from(a.privateKey.replace("0x",""),"hex"))),(0,o.default)(f.final()))),h=b.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(d)))).replace("0x","");return{version:3,id:g.v4({random:r.uuid||y.randomBytes(16)}),address:a.address.toLowerCase().replace("0x",""),crypto:{ciphertext:d.toString("hex"),cipherparams:{iv:u.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:c,kdfparams:l,mac:h.toString("hex")}}},T.prototype._findSafeIndex=function(e){return e=e||0,this.hasOwnProperty(e)?this._findSafeIndex(e+1):e},T.prototype._currentIndexes=function(){return Object.keys(this).map((function(e){return parseInt(e)})).filter((function(e){return e<9e20}))},T.prototype.create=function(e,t){for(var r=0;r{"use strict";var n=r(28847),i=n(r(93106)),o=n(r(90775)),a=n(r(3355));function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e.inputs);try{var c=function(){var e=a.value;if(!e.indexed)return"continue";var t=r[e.name];if(!t)return o.push(null),"continue";Array.isArray(t)?o.push(t.map((function(t){return g.encodeParameter(e.type,t)}))):o.push(g.encodeParameter(e.type,t))};for(u.s();!(a=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}return o.length&&(n.topics=o),this.options.address&&(n.address=this.options.address.toLowerCase()),n},b.prototype._decodeEventABI=function(e){var t=this;e.data=e.data||"",e.topics=e.topics||[];var r=p.outputLogFormatter(e);if("ALLEVENTS"===t.name&&(t=t.jsonInterface.find((function(t){return t.signature===e.topics[0]}))||{anonymous:!0}),t.inputs=t.inputs||[],!t.anonymous){var n=0;t.inputs.forEach((function(e){return e.indexed?n++:null})),n>0&&e.topics.length!==n+1&&(t={anonymous:!0,inputs:[]})}var i=t.anonymous?e.topics:e.topics.slice(1);return r.returnValues=g.decodeLog(t.inputs,e.data,i),delete r.returnValues.__length__,r.event=t.name,r.signature=t.anonymous||!e.topics[0]?null:e.topics[0],r.raw={data:r.data,topics:r.topics},delete r.data,delete r.topics,r},b.prototype._encodeMethodABI=function(){var e=this._method.signature,t=this.arguments||[],r=!1,n=this._parent.options.jsonInterface.filter((function(t){return"constructor"===e&&t.type===e||(t.signature===e||t.signature===e.replace("0x","")||t.name===e)&&"function"===t.type})).map((function(e){var n=Array.isArray(e.inputs)?e.inputs.length:0;if(n!==t.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+n+" arguments.");return"function"===e.type&&(r=e.signature),Array.isArray(e.inputs)?e.inputs:[]})).map((function(e){return g.encodeParameters(e,t).replace("0x","")}))[0]||"";if("constructor"===e){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData.startsWith("0x")||(this._deployData="0x"+this._deployData),this._deployData+n}var i=r?r+n:n;if(!i)throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".');return i},b.prototype._decodeMethodReturn=function(e,t){if(!t)return null;t=t.length>=2?t.slice(2):t;var r=g.decodeParameters(e,t);return 1===r.__length__?r[0]:(delete r.__length__,r)},b.prototype.deploy=function(e,t){if((e=e||{}).arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data){if("function"==typeof t)return t(y.ContractMissingDeployDataError());throw y.ContractMissingDeployDataError()}var r=this.options.jsonInterface.find((function(e){return"constructor"===e.type}))||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:e.data,_ethAccounts:this.constructor._ethAccounts},e.arguments)},b.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),r="object"===(!!e[e.length-1]&&(0,a.default)(e[e.length-1]))?e.pop():{},n="string"==typeof e[0]?e[0]:"allevents",i="allevents"===n.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find((function(e){return"event"===e.type&&(e.name===n||e.signature==="0x"+n.replace("0x",""))}));if(!i)throw y.ContractEventDoesNotExistError(n);if(!d.isAddress(this.options.address))throw y.ContractNoAddressDefinedError();return{params:this._encodeEventABI(i,r),event:i,filter:r.filter||{},callback:t}},b.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},b.prototype.once=function(e,t,r){var n=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(n)))throw y.ContractOnceRequiresCallbackError();t&&delete t.fromBlock,this._on(e,t,(function(e,t,n){n.unsubscribe(),"function"==typeof r&&r(e,t,n)}))},b.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);e.params&&e.params.toBlock&&(delete e.params.toBlock,console.warn("Invalid option: toBlock. Use getPastEvents for specific range.")),this._checkListener("newListener",e.event.name),this._checkListener("removeListener",e.event.name);var t=new h({subscription:{params:1,inputFormatter:[p.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t};var v=function(e,t){if(e.event&&"ALLEVENTS"===e.event.name&&Array.isArray(t)){var r=e.filter||{},n=Object.keys(r);return n.length>0?t.filter((function(e){return"string"==typeof e||n.every((function(t){return Array.isArray(r[t])?r[t].some((function(r){return String(e.returnValues[t]).toUpperCase()===String(r).toUpperCase()})):String(e.returnValues[t]).toUpperCase()===String(r[t]).toUpperCase()}))})):t}return t};b.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new f({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[p.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var r=t.buildCall();return t=null,r(e.params,(function(t,r){"function"==typeof e.callback&&e.callback(t,v(e,r))})).then(v.bind(this,e))},b.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),t.createAccessList=this.parent._executeMethod.bind(t,"createAccessList"),e&&this.method.inputs&&e.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,e);throw y.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name)}return t.arguments=e||[],t._method=this.method,t._parent=this.parent,t._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(t._deployData=this.deployData),t},b.prototype._processExecuteArguments=function(e,t){var r={};if(r.type=e.shift(),r.callback=this._parent._getCallback(e),"call"!==r.type||!0===e[e.length-1]||"string"!=typeof e[e.length-1]&&!isFinite(e[e.length-1])||(r.defaultBlock=e.pop()),r.options="object"===(!!e[e.length-1]&&(0,a.default)(e[e.length-1]))?e.pop():{},r.generateRequest=!0===e[e.length-1]&&e.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!d.isAddress(this._parent.options.address))throw y.ContractNoAddressDefinedError();return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:d._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,r.callback)},b.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=m("send"!==t.type),n=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){var i={params:[p.inputCallFormatter.call(this._parent,t.options)],callback:t.callback};return"call"===t.type?(i.params.push(p.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),i.method="eth_call",i.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):i.method="eth_sendTransaction",i}switch(t.type){case"createAccessList":return d.isAddress(t.options.from)?new f({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[p.inputTransactionFormatter,p.inputDefaultBlockNumberFormatter],requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback):d._fireError(y.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);case"estimate":return new f({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[p.inputCallFormatter],outputFormatter:d.hexToNumber,requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback);case"call":return new f({name:"call",call:"eth_call",params:2,inputFormatter:[p.inputCallFormatter,p.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,handleRevert:e._parent.handleRevert,abiCoder:g}).createFunction()(t.options,t.defaultBlock,t.callback);case"send":if(!d.isAddress(t.options.from))return d._fireError(y.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);if("boolean"==typeof this._method.payable&&!this._method.payable&&t.options.value&&t.options.value>0)return d._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,t.callback);var o={receiptFormatter:function(t){if(Array.isArray(t.logs)){var r=t.logs.map((function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)}));t.events={};var n=0;r.forEach((function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[n]=e,n++)})),delete t.logs}return t},contractDeployFormatter:function(t){var r=e._parent.clone();return r.options.address=t.contractAddress,r}};return new f({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[p.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:e.constructor._ethAccounts||e._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,transactionBlockTimeout:e._parent.transactionBlockTimeout,transactionConfirmationBlocks:e._parent.transactionConfirmationBlocks,transactionPollingTimeout:e._parent.transactionPollingTimeout,transactionPollingInterval:e._parent.transactionPollingInterval,defaultCommon:e._parent.defaultCommon,defaultChain:e._parent.defaultChain,defaultHardfork:e._parent.defaultHardfork,handleRevert:e._parent.handleRevert,extraFormatters:o,abiCoder:g}).createFunction()(t.options,t.callback);default:throw new Error('Method "'+t.type+'" not implemented.')}},e.exports=b},46764:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571)),a=r(55160),s=r(11314).formatters,u=r(48161),c=r(11841),l=r(62867),f=r(22689);function d(e){this.eth=e;var t=null;this._detectedAddress=null,this._lastSyncCheck=null,Object.defineProperty(this,"registry",{get:function(){return new c(this)},enumerable:!0}),Object.defineProperty(this,"resolverMethodHandler",{get:function(){return new l(this.registry)},enumerable:!0}),Object.defineProperty(this,"registryAddress",{get:function(){return t},set:function(e){t=null!==e?s.inputAddressFormatter(e):e},enumerable:!0})}d.prototype.supportsInterface=function(e,t,r){return this.getResolver(e).then((function(e){return u.isHexStrict(t)||(t=u.sha3(t).slice(0,10)),e.methods.supportsInterface(t).call(r)})).catch((function(e){if("function"!=typeof r)throw e;r(e,null)}))},d.prototype.resolver=function(e,t){return this.registry.resolver(e,t)},d.prototype.getResolver=function(e,t){return this.registry.getResolver(e,t)},d.prototype.setResolver=function(e,t,r,n){return this.registry.setResolver(e,t,r,n)},d.prototype.setRecord=function(e,t,r,n,i,o){return this.registry.setRecord(e,t,r,n,i,o)},d.prototype.setSubnodeRecord=function(e,t,r,n,i,o,a){return this.registry.setSubnodeRecord(e,t,r,n,i,o,a)},d.prototype.setApprovalForAll=function(e,t,r,n){return this.registry.setApprovalForAll(e,t,r,n)},d.prototype.isApprovedForAll=function(e,t,r){return this.registry.isApprovedForAll(e,t,r)},d.prototype.recordExists=function(e,t){return this.registry.recordExists(e,t)},d.prototype.setSubnodeOwner=function(e,t,r,n,i){return this.registry.setSubnodeOwner(e,t,r,n,i)},d.prototype.getTTL=function(e,t){return this.registry.getTTL(e,t)},d.prototype.setTTL=function(e,t,r,n){return this.registry.setTTL(e,t,r,n)},d.prototype.getOwner=function(e,t){return this.registry.getOwner(e,t)},d.prototype.setOwner=function(e,t,r,n){return this.registry.setOwner(e,t,r,n)},d.prototype.getAddress=function(e,t){return this.resolverMethodHandler.method(e,"addr",[]).call(t)},d.prototype.setAddress=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setAddr",[t]).send(r,n)},d.prototype.getPubkey=function(e,t){return this.resolverMethodHandler.method(e,"pubkey",[],null,t).call(t)},d.prototype.setPubkey=function(e,t,r,n,i){return this.resolverMethodHandler.method(e,"setPubkey",[t,r]).send(n,i)},d.prototype.getContent=function(e,t){return this.resolverMethodHandler.method(e,"content",[]).call(t)},d.prototype.setContent=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setContent",[t]).send(r,n)},d.prototype.getContenthash=function(e,t){return this.resolverMethodHandler.method(e,"contenthash",[],f.decode).call(t)},d.prototype.setContenthash=function(e,t,r,n){var i;try{i=f.encode(t)}catch(e){var o=new Error("Could not encode "+t+". See docs for supported hash protocols.");if("function"==typeof n)return void n(o,null);throw o}return this.resolverMethodHandler.method(e,"setContenthash",[i]).send(r,n)},d.prototype.getMultihash=function(e,t){return this.resolverMethodHandler.method(e,"multihash",[]).call(t)},d.prototype.setMultihash=function(e,t,r,n){return this.resolverMethodHandler.method(e,"multihash",[t]).send(r,n)},d.prototype.checkNetwork=(0,o.default)(i.default.mark((function e(){var t,r,n,o,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=new Date/1e3,this._lastSyncCheck&&!(t-this._lastSyncCheck>3600)){e.next=9;break}return e.next=4,this.eth.getBlock("latest");case 4:if(r=e.sent,!((n=t-r.timestamp)>3600)){e.next=8;break}throw new Error("Network not synced; last block was "+n+" seconds ago");case 8:this._lastSyncCheck=t;case 9:if(!this.registryAddress){e.next=11;break}return e.abrupt("return",this.registryAddress);case 11:if(this._detectedAddress){e.next=20;break}return e.next=14,this.eth.net.getNetworkType();case 14:if(o=e.sent,void 0!==(s=a.addresses[o])){e.next=18;break}throw new Error("ENS is not supported on network "+o);case 18:return this._detectedAddress=s,e.abrupt("return",this._detectedAddress);case 20:return e.abrupt("return",this._detectedAddress);case 21:case"end":return e.stop()}}),e,this)}))),e.exports=d},55160:e=>{"use strict";e.exports={addresses:{main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",ropsten:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",rinkeby:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},interfaceIds:{addr:"0x3b3b57de",setAddr:"0x3b3b57de",pubkey:"0xc8690233",setPubkey:"0xc8690233",contenthash:"0xbc1c58d1",setContenthash:"0xbc1c58d1",content:"0xd8389dc5",setContent:"0xd8389dc5"}}},11841:(e,t,r)=>{"use strict";var n=r(58164),i=r(21006),o=r(90282),a=r(11314).formatters,s=r(48161),u=r(43205),c=r(48384);function l(e){var t=this;this.ens=e,this.contract=e.checkNetwork().then((function(e){var r=new n(u,e);return r.setProvider(t.ens.eth.currentProvider),r}))}l.prototype.owner=function(e,t){return console.warn('Deprecated: Please use the "getOwner" method instead of "owner".'),this.getOwner(e,t)},l.prototype.getOwner=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.owner(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},l.prototype.setOwner=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setOwner(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},l.prototype.getTTL=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.ttl(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},l.prototype.setTTL=function(e,t,r,n){var a=new o(!0);return this.contract.then((function(n){return n.methods.setTTL(i.hash(e),t).send(r)})).then((function(e){"function"!=typeof n?a.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?a.reject(e):n(e,null)})),a.eventEmitter},l.prototype.setSubnodeOwner=function(e,t,r,n,u){var c=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeOwner(i.hash(e),t,a.inputAddressFormatter(r)).send(n)})).then((function(e){"function"!=typeof u?c.resolve(e):u(e,e)})).catch((function(e){"function"!=typeof u?c.reject(e):u(e,null)})),c.eventEmitter},l.prototype.setRecord=function(e,t,r,n,s,u){var c=new o(!0);return this.contract.then((function(o){return o.methods.setRecord(i.hash(e),a.inputAddressFormatter(t),a.inputAddressFormatter(r),n).send(s)})).then((function(e){"function"!=typeof u?c.resolve(e):u(e,e)})).catch((function(e){"function"!=typeof u?c.reject(e):u(e,null)})),c.eventEmitter},l.prototype.setSubnodeRecord=function(e,t,r,n,u,c,l){var f=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeRecord(i.hash(e),t,a.inputAddressFormatter(r),a.inputAddressFormatter(n),u).send(c)})).then((function(e){"function"!=typeof l?f.resolve(e):l(e,e)})).catch((function(e){"function"!=typeof l?f.reject(e):l(e,null)})),f.eventEmitter},l.prototype.setApprovalForAll=function(e,t,r,n){var i=new o(!0);return this.contract.then((function(n){return n.methods.setApprovalForAll(a.inputAddressFormatter(e),t).send(r)})).then((function(e){"function"!=typeof n?i.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?i.reject(e):n(e,null)})),i.eventEmitter},l.prototype.isApprovedForAll=function(e,t,r){var n=new o(!0);return this.contract.then((function(r){return r.methods.isApprovedForAll(a.inputAddressFormatter(e),a.inputAddressFormatter(t)).call()})).then((function(e){"function"!=typeof r?n.resolve(e):r(e,e)})).catch((function(e){"function"!=typeof r?n.reject(e):r(e,null)})),n.eventEmitter},l.prototype.recordExists=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.recordExists(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},l.prototype.resolver=function(e,t){return console.warn('Deprecated: Please use the "getResolver" method instead of "resolver".'),this.getResolver(e,t)},l.prototype.getResolver=function(e,t){var r=this;return this.contract.then((function(t){return t.methods.resolver(i.hash(e)).call()})).then((function(e){var i=new n(c,e);if(i.setProvider(r.ens.eth.currentProvider),"function"!=typeof t)return i;t(i,i)})).catch((function(e){if("function"!=typeof t)throw e;t(e,null)}))},l.prototype.setResolver=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setResolver(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},e.exports=l},30715:(e,t,r)=>{"use strict";var n=r(46764);e.exports=n},62867:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571)),a=r(90282),s=r(21006),u=r(11314).errors,c=r(55160).interfaceIds;function l(e){this.registry=e}l.prototype.method=function(e,t,r,n,i){return{call:this.call.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this,outputFormatter:n}),send:this.send.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this})}},l.prototype.call=function(e){var t=this,r=new a,n=this.parent.prepareArguments(this.ensName,this.methodArguments),s=this.outputFormatter||null;return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,t.parent.checkInterfaceSupport(a,t.methodName);case 2:t.parent.handleCall(r,a.methods[t.methodName],n,s,e);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(t){"function"!=typeof e?r.reject(t):e(t,null)})),r.eventEmitter},l.prototype.send=function(e,t){var r=this,n=new a,s=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.parent.checkInterfaceSupport(a,r.methodName);case 2:r.parent.handleSend(n,a.methods[r.methodName],s,e,t);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(e){"function"!=typeof t?n.reject(e):t(e,null)})),n.eventEmitter},l.prototype.handleCall=function(e,t,r,n,i){return t.apply(this,r).call().then((function(t){n&&(t=n(t)),"function"!=typeof i?e.resolve(t):i(t,t)})).catch((function(t){"function"!=typeof i?e.reject(t):i(t,null)})),e},l.prototype.handleSend=function(e,t,r,n,i){return t.apply(this,r).send(n).on("sending",(function(){e.eventEmitter.emit("sending")})).on("sent",(function(){e.eventEmitter.emit("sent")})).on("transactionHash",(function(t){e.eventEmitter.emit("transactionHash",t)})).on("confirmation",(function(t,r){e.eventEmitter.emit("confirmation",t,r)})).on("receipt",(function(t){e.eventEmitter.emit("receipt",t),e.resolve(t),"function"==typeof i&&i(t,t)})).on("error",(function(t){e.eventEmitter.emit("error",t),"function"!=typeof i?e.reject(t):i(t,null)})),e},l.prototype.prepareArguments=function(e,t){var r=s.hash(e);return t.length>0?(t.unshift(r),t):[r]},l.prototype.checkInterfaceSupport=function(){var e=(0,o.default)(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c[r]){e.next=2;break}return e.abrupt("return");case 2:return n=!1,e.prev=3,e.next=6,t.methods.supportsInterface(c[r]).call();case 6:n=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.warn('Could not verify interface of resolver contract at "'+t.options.address+'". ');case 12:if(n){e.next=14;break}throw u.ResolverMethodMissingError(t.options.address,r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,r){return e.apply(this,arguments)}}(),e.exports=l},22689:(e,t,r)=>{"use strict";var n=r(94308);e.exports={decode:function(e){var t=null,r=null,i=null;if(e&&e.error)return{protocolType:null,decoded:e.error};if(e)try{t=n.decode(e);var o=n.getCodec(e);"ipfs-ns"===o?r="ipfs":"swarm-ns"===o?r="bzz":"onion"===o?r="onion":"onion3"===o?r="onion3":t=e}catch(e){i=e.message}return{protocolType:r,decoded:t,error:i}},encode:function(e){var t,r,i=!1;if(e){var o=e.match(/^(ipfs|bzz|onion|onion3):\/\/(.*)/)||e.match(/\/(ipfs)\/(.*)/);o&&(r=o[1],t=o[2]);try{if("ipfs"===r)t.length>=4&&(i="0x"+n.fromIpfs(t));else if("bzz"===r)t.length>=4&&(i="0x"+n.fromSwarm(t));else if("onion"===r)16===t.length&&(i="0x"+n.encode("onion",t));else{if("onion3"!==r)throw new Error("Could not encode content hash: unsupported content type");56===t.length&&(i="0x"+n.encode("onion3",t))}}catch(e){throw e}}return i}}},43205:e=>{"use strict";e.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},48384:e=>{"use strict";e.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"contenthash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},30006:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=r(48161),s=r(31734),u=function(e){var t="A".charCodeAt(0),r="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).slice(4)+e.slice(0,4)).split("").map((function(e){var n=e.charCodeAt(0);return n>=t&&n<=r?n-t+10:e})).join("")},c=function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97},l=function(){function e(t){(0,i.default)(this,e),this._iban=t}return(0,o.default)(e,[{key:"isValid",value:function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===c(u(this._iban))}},{key:"isDirect",value:function(){return 34===this._iban.length||35===this._iban.length}},{key:"isIndirect",value:function(){return 20===this._iban.length}},{key:"checksum",value:function(){return this._iban.slice(2,4)}},{key:"institution",value:function(){return this.isIndirect()?this._iban.slice(7,11):""}},{key:"client",value:function(){return this.isIndirect()?this._iban.slice(11):""}},{key:"toAddress",value:function(){if(this.isDirect()){var e=this._iban.slice(4),t=new s(e,36);return a.toChecksumAddress(t.toString(16,20))}return""}},{key:"toString",value:function(){return this._iban}}],[{key:"toAddress",value:function(t){if(!(t=new e(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()}},{key:"toIban",value:function(t){return e.fromAddress(t).toString()}},{key:"fromAddress",value:function(t){if(!a.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var r=function(e){for(var t=e;t.length<30;)t="0"+t;return t}(new s(t,16).toString(36));return e.fromBban(r.toUpperCase())}},{key:"fromBban",value:function(t){return new e("XE"+("0"+(98-c(u("XE00"+t)))).slice(-2)+t)}},{key:"createIndirect",value:function(t){return e.fromBban("ETH"+t.institution+t.identifier)}},{key:"isValid",value:function(t){return new e(t).isValid()}}]),e}();e.exports=l},96306:(e,t,r)=>{"use strict";var n=r(80606),i=r(53349),o=r(48161),a=r(473),s=r(11314).formatters,u=function(){var e=this;n.packageInit(this,arguments),this.net=new a(this);var t=null,r="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return t},set:function(e){return e&&(t=o.toChecksumAddress(s.inputAddressFormatter(e))),u.forEach((function(e){e.defaultAccount=t})),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return r},set:function(e){return r=e,u.forEach((function(e){e.defaultBlock=r})),e},enumerable:!0});var u=[new i({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:o.toChecksumAddress}),new i({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:o.toChecksumAddress}),new i({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[s.inputAddressFormatter,null,null]}),new i({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[s.inputAddressFormatter]}),new i({name:"importRawKey",call:"personal_importRawKey",params:2}),new i({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"sign",call:"personal_sign",params:3,inputFormatter:[s.inputSignFormatter,s.inputAddressFormatter,null]}),new i({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[s.inputSignFormatter,null]})];u.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount}))};n.addProviders(u),e.exports=u},28130:e=>{"use strict";e.exports=function(e){var t,r=this;return this.net.getId().then((function(e){return t=e,r.getBlock(0)})).then((function(r){var n="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===t&&(n="main"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===t&&(n="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===t&&(n="rinkeby"),"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a"===r.hash&&5===t&&(n="goerli"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===t&&(n="kovan"),"function"==typeof e&&e(null,n),n})).catch((function(t){if("function"!=typeof e)throw t;e(t)}))}},66748:(e,t,r)=>{"use strict";var n=r(80606),i=r(11314),o=r(34178).subscriptions,a=r(53349),s=r(48161),u=r(473),c=r(30715),l=r(96306),f=r(58164),d=r(30006),h=r(99819),p=r(79901),y=r(28130),m=i.formatters,g=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},b=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},v=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},w=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},A=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},k=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),e.personal.setRequestManager(r),e.accounts.setRequestManager(r),e.Contract._requestManager=e._requestManager,e.Contract.currentProvider=e._provider,!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager),e.ens._detectedAddress=null,e.ens._lastSyncCheck=null};var i,k,E,S=!1,x=null,_="latest",P=50,T=24,I=750,O=1e3,B=10,C=100;Object.defineProperty(this,"handleRevert",{get:function(){return S},set:function(t){S=t,e.Contract.handleRevert=S,M.forEach((function(e){e.handleRevert=S}))},enumerable:!0}),Object.defineProperty(this,"defaultCommon",{get:function(){return E},set:function(t){E=t,e.Contract.defaultCommon=E,M.forEach((function(e){e.defaultCommon=E}))},enumerable:!0}),Object.defineProperty(this,"defaultHardfork",{get:function(){return k},set:function(t){k=t,e.Contract.defaultHardfork=k,M.forEach((function(e){e.defaultHardfork=k}))},enumerable:!0}),Object.defineProperty(this,"defaultChain",{get:function(){return i},set:function(t){i=t,e.Contract.defaultChain=i,M.forEach((function(e){e.defaultChain=i}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingTimeout",{get:function(){return I},set:function(t){I=t,e.Contract.transactionPollingTimeout=I,M.forEach((function(e){e.transactionPollingTimeout=I}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingInterval",{get:function(){return O},set:function(t){O=t,e.Contract.transactionPollingInterval=O,M.forEach((function(e){e.transactionPollingInterval=O}))},enumerable:!0}),Object.defineProperty(this,"transactionConfirmationBlocks",{get:function(){return T},set:function(t){T=t,e.Contract.transactionConfirmationBlocks=T,M.forEach((function(e){e.transactionConfirmationBlocks=T}))},enumerable:!0}),Object.defineProperty(this,"transactionBlockTimeout",{get:function(){return P},set:function(t){P=t,e.Contract.transactionBlockTimeout=P,M.forEach((function(e){e.transactionBlockTimeout=P}))},enumerable:!0}),Object.defineProperty(this,"blockHeaderTimeout",{get:function(){return B},set:function(t){B=t,e.Contract.blockHeaderTimeout=B,M.forEach((function(e){e.blockHeaderTimeout=B}))},enumerable:!0}),Object.defineProperty(this,"defaultAccount",{get:function(){return x},set:function(t){return t&&(x=s.toChecksumAddress(m.inputAddressFormatter(t))),e.Contract.defaultAccount=x,e.personal.defaultAccount=x,M.forEach((function(e){e.defaultAccount=x})),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return _},set:function(t){return _=t,e.Contract.defaultBlock=_,e.personal.defaultBlock=_,M.forEach((function(e){e.defaultBlock=_})),t},enumerable:!0}),Object.defineProperty(this,"maxListenersWarningThreshold",{get:function(){return C},set:function(t){e.currentProvider&&e.currentProvider.setMaxListeners&&(C=t,e.currentProvider.setMaxListeners(t))},enumerable:!0}),this.clearSubscriptions=e._requestManager.clearSubscriptions.bind(e._requestManager),this.removeSubscriptionById=e._requestManager.removeSubscription.bind(e._requestManager),this.net=new u(this),this.net.getNetworkType=y.bind(this),this.accounts=new h(this),this.personal=new l(this),this.personal.defaultAccount=this.defaultAccount,this.maxListenersWarningThreshold=C;var N=this,R=function(){f.apply(this,arguments);var e=this,t=N.setProvider;N.setProvider=function(){t.apply(N,arguments),n.packageInit(e,[N])}};R.setProvider=function(){f.setProvider.apply(this,arguments)},(R.prototype=Object.create(f.prototype)).constructor=R,this.Contract=R,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.transactionBlockTimeout=this.transactionBlockTimeout,this.Contract.transactionConfirmationBlocks=this.transactionConfirmationBlocks,this.Contract.transactionPollingTimeout=this.transactionPollingTimeout,this.Contract.transactionPollingInterval=this.transactionPollingInterval,this.Contract.blockHeaderTimeout=this.blockHeaderTimeout,this.Contract.handleRevert=this.handleRevert,this.Contract._requestManager=this._requestManager,this.Contract._ethAccounts=this.accounts,this.Contract.currentProvider=this._requestManager.provider,this.Iban=d,this.abi=p,this.ens=new c(this);var M=[new a({name:"getNodeInfo",call:"web3_clientVersion"}),new a({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new a({name:"getCoinbase",call:"eth_coinbase",params:0}),new a({name:"isMining",call:"eth_mining",params:0}),new a({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:s.hexToNumber}),new a({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:m.outputSyncingFormatter}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:m.outputBigNumberFormatter}),new a({name:"getFeeHistory",call:"eth_feeHistory",params:3,inputFormatter:[s.numberToHex,m.inputBlockNumberFormatter,null]}),new a({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:s.hexToNumber}),new a({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputBigNumberFormatter}),new a({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[m.inputAddressFormatter,s.numberToHex,m.inputDefaultBlockNumberFormatter]}),new a({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter]}),new a({name:"getBlock",call:g,params:2,inputFormatter:[m.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:m.outputBlockFormatter}),new a({name:"getUncle",call:v,params:2,inputFormatter:[m.inputBlockNumberFormatter,s.numberToHex],outputFormatter:m.outputBlockFormatter}),new a({name:"getBlockTransactionCount",call:w,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getBlockUncleCount",call:A,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionFormatter}),new a({name:"getTransactionFromBlock",call:b,params:2,inputFormatter:[m.inputBlockNumberFormatter,s.numberToHex],outputFormatter:m.outputTransactionFormatter}),new a({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionReceiptFormatter}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null],abiCoder:p}),new a({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new a({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[m.inputTransactionFormatter],abiCoder:p}),new a({name:"sign",call:"eth_sign",params:2,inputFormatter:[m.inputSignFormatter,m.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}}),new a({name:"call",call:"eth_call",params:2,inputFormatter:[m.inputCallFormatter,m.inputDefaultBlockNumberFormatter],abiCoder:p}),new a({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[m.inputCallFormatter],outputFormatter:s.hexToNumber}),new a({name:"submitWork",call:"eth_submitWork",params:3}),new a({name:"getWork",call:"eth_getWork",params:0}),new a({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter}),new a({name:"getChainId",call:"eth_chainId",params:0,outputFormatter:s.hexToNumber}),new a({name:"requestAccounts",call:"eth_requestAccounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getProof",call:"eth_getProof",params:3,inputFormatter:[m.inputAddressFormatter,m.inputStorageKeysFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputProofFormatter}),new a({name:"getPendingTransactions",call:"eth_pendingTransactions",params:0,outputFormatter:m.outputTransactionFormatter}),new a({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[m.inputTransactionFormatter,m.inputDefaultBlockNumberFormatter]}),new o({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:m.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter,subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},syncing:{params:0,outputFormatter:m.outputSyncingFormatter,subscriptionHandler:function(e){var t=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",t._isSyncing),"function"==typeof this.callback&&this.callback(null,t._isSyncing,this),setTimeout((function(){t.emit("data",e),"function"==typeof t.callback&&t.callback(null,e,t)}),0)):(this.emit("data",e),"function"==typeof t.callback&&this.callback(null,e,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout((function(){e.currentBlock>e.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),"function"==typeof t.callback&&t.callback(null,t._isSyncing,t))}),500))}}}})];M.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount,t.transactionBlockTimeout=e.transactionBlockTimeout,t.transactionConfirmationBlocks=e.transactionConfirmationBlocks,t.transactionPollingTimeout=e.transactionPollingTimeout,t.transactionPollingInterval=e.transactionPollingInterval,t.handleRevert=e.handleRevert}))};n.addProviders(k),e.exports=k},473:(e,t,r)=>{"use strict";var n=r(80606),i=r(53349),o=r(48161),a=function(){var e=this;n.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:parseInt}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};n.addProviders(a),e.exports=a},14565:(e,t,r)=>{"use strict";var n=r(11314).errors,i=r(33768),o=r(29519),a=r(90912);r(54258).polyfill(),void 0===r.g||r.g.AbortController||r(53368);var s=function(e,t){t=t||{},this.withCredentials=t.withCredentials,this.timeout=t.timeout||0,this.headers=t.headers,this.agent=t.agent,this.forceGlobalFetch=t.forceGlobalFetch||!1,this.connected=!1;var r=!1!==t.keepAlive;this.host=e||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new a.Agent({keepAlive:r}):this.httpAgent=new o.Agent({keepAlive:r}))};s.prototype.send=function(e,t){var r,o={method:"POST",body:JSON.stringify(e)},a={},s=this.forceGlobalFetch?globalThis.fetch:i;if("undefined"!=typeof AbortController?r=new AbortController:"undefined"!=typeof window&&void 0!==window.AbortController&&(r=new window.AbortController),void 0!==r&&(o.signal=r.signal),"undefined"==typeof XMLHttpRequest){var u={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent};this.agent&&(u.httpsAgent=this.agent.https,u.httpAgent=this.agent.http),"https"===this.host.substring(0,5)?o.agent=u.httpsAgent:o.agent=u.httpAgent}this.headers&&this.headers.forEach((function(e){a[e.name]=e.value})),a["Content-Type"]||(a["Content-Type"]="application/json"),this.withCredentials?o.credentials="include":o.credentials="omit",o.headers=a,this.timeout>0&&void 0!==r&&(this.timeoutId=setTimeout((function(){r.abort()}),this.timeout)),s(this.host,o).then(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),e.json().then((function(e){t(null,e)}),(function(){e.text().then((function(e){t(n.InvalidResponse(e))}),(function(){t(n.InvalidResponse(""))}))}))}.bind(this),function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),"AbortError"!==e.name?t(n.InvalidConnection(this.host,e)):t(n.ConnectionTimeout(this.timeout))}.bind(this))},s.prototype.disconnect=function(){},s.prototype.supportsSubscriptions=function(){return!1},e.exports=s},52683:(e,t,r)=>{"use strict";var n=r(11314).errors,i=r(83150),o=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=e,this.connected=!1,this.connection=t.connect({path:this.path}),this.addDefaultEvents();var n=function(e){var t=null;Array.isArray(e)?e.forEach((function(e){r.responseCallbacks[e.id]&&(t=e.id)})):t=e.id,t||-1===e.method.indexOf("_subscription")?r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t]):r.notificationCallbacks.forEach((function(t){"function"==typeof t&&t(e)}))};"Socket"===t.constructor.name?i(this.connection).done(n):this.connection.on("data",(function(e){r._parseResponse(e.toString()).forEach(n)}))};o.prototype.addDefaultEvents=function(){var e=this;this.connection.on("connect",(function(){e.connected=!0})),this.connection.on("close",(function(){e.connected=!1})),this.connection.on("error",(function(){e._timeout()})),this.connection.on("end",(function(){e._timeout()})),this.connection.on("timeout",(function(){e._timeout()}))},o.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var i=null;try{i=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){throw t._timeout(),n.InvalidResponse(e)}),15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,i&&r.push(i)})),r},o.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,n=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=n},o.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](n.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},o.prototype.reconnect=function(){this.connection.connect({path:this.path})},o.prototype.send=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},o.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");"data"===e?this.notificationCallbacks.push(t):this.connection.on(e,t)},o.prototype.once=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");this.connection.once(e,t)},o.prototype.removeListener=function(e,t){var r=this;"data"===e?this.notificationCallbacks.forEach((function(e,n){e===t&&r.notificationCallbacks.splice(n,1)})):this.connection.removeListener(e,t)},o.prototype.removeAllListeners=function(e){"data"===e?this.notificationCallbacks=[]:this.connection.removeAllListeners(e)},o.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},o.prototype.supportsSubscriptions=function(){return!0},e.exports=o},40360:(e,t,r)=>{"use strict";var n=r(19142),i=r(29033).Buffer,o=r(28847)(r(3355)),a="[object process]"===Object.prototype.toString.call(void 0!==n?n:0),s="undefined"!=typeof navigator&&"ReactNative"===navigator.product,u=null,c=null;if(a||s){u=function(e){return i.from(e).toString("base64")};var l=r(51143);if(l.URL){var f=l.URL;c=function(e){return new f(e)}}else c=r(51143).parse}else u=btoa.bind("object"===("undefined"==typeof globalThis?"undefined":(0,o.default)(globalThis))?globalThis:self),c=function(e){return new URL(e)};e.exports={parseURL:c,btoa:u}},77651:(e,t,r)=>{"use strict";var n=r(98008),i=r(40360),o=r(11314).errors,a=r(1158).w3cwebsocket,s=function(e,t){n.call(this),t=t||{},this.url=e,this._customTimeout=t.timeout||15e3,this.headers=t.headers||{},this.protocol=t.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},t.reconnect),this.clientConfig=t.clientConfig||void 0,this.requestOptions=t.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1,this.connectFailedDescription=null;var r=i.parseURL(e);r.username&&r.password&&(this.headers.authorization="Basic "+i.btoa(r.username+":"+r.password)),r.auth&&(this.headers.authorization="Basic "+i.btoa(r.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.connect=function(){this.connection=new a(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},s.prototype._onMessage=function(e){var t=this;this._parseResponse("string"==typeof e.data?e.data:"").forEach((function(e){if(e.method&&-1!==e.method.indexOf("_subscription"))t.emit(t.DATA,e);else{var r=e.id;Array.isArray(e)&&(r=e[0].id),t.responseQueue.has(r)&&(void 0!==t.responseQueue.get(r).callback&&t.responseQueue.get(r).callback(!1,e),t.responseQueue.delete(r))}}))},s.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var e=this;this.requestQueue.forEach((function(t,r){e.send(t.payload,t.callback),e.requestQueue.delete(r)}))}},s.prototype._onConnectFailed=function(e){this.connectFailedDescription=e.toString().split("\n")[0];var t=this;this.connectFailedDescription&&(e.description=this.connectFailedDescription,this.connectFailedDescription=null),e.code=1006,e.reason="connection failed",!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.ERROR,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this.connection._connection&&this.connection._connection.removeAllListeners(),this.connection._client.removeAllListeners(),this.connection._readyState=3,this.emit(this.CLOSE,e)):this.reconnect()},s.prototype._onClose=function(e){var t=this;!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.CLOSE,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},s.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this)),this.connection._client&&(this.connection._client.removeAllListeners("connectFailed"),this.connection._client.on("connectFailed",this._onConnectFailed.bind(this)))},s.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose),this.connection._connection&&this.connection._client.removeListener("connectFailed",this._onConnectFailed)},s.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){t.reconnectOptions.auto&&t.reconnectOptions.onTimeout?t.reconnect():(t.emit(t.ERROR,o.ConnectionTimeout(t._customTimeout)),t.requestQueue.size>0&&t.requestQueue.forEach((function(e,r){e.callback(o.ConnectionTimeout(t._customTimeout)),t.requestQueue.delete(r)})))}),t._customTimeout))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)})),r},s.prototype.send=function(e,t){var r=e.id,n={payload:e,callback:t};if(Array.isArray(e)&&(r=e[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(r,n);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(r),this.emit(this.ERROR,o.ConnectionNotOpenError()),void n.callback(o.ConnectionNotOpenError());this.responseQueue.set(r,n),this.requestQueue.delete(r);try{this.connection.send(JSON.stringify(n.payload))}catch(e){n.callback(e),this.responseQueue.delete(r)}}},s.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},s.prototype.disconnect=function(e,t){this._removeSocketListeners(),this.connection.close(e||1e3,t)},s.prototype.supportsSubscriptions=function(){return!0},s.prototype.reconnect=function(){var e=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach((function(t,r){try{e.responseQueue.delete(r),t.callback(o.PendingRequestsOnReconnectingError())}catch(e){console.error("Error encountered in reconnect: ",e)}})),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach((function(t,r){t.callback(o.MaxAttemptsReachedOnReconnectingError()),e.requestQueue.delete(r)})))},e.exports=s},92565:(e,t,r)=>{"use strict";var n=r(80606),i=r(34178).subscriptions,o=r(53349),a=r(473),s=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager)},this.net=new a(this),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new o({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};s.prototype.clearSubscriptions=function(){this._requestManager.clearSubscriptions()},n.addProviders(s),e.exports=s},48161:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(17130),o=r(90323),a=r(747),s=r(75010),u=r(31734),c=function e(t,r){var i=[];return r.forEach((function(r){if("object"===(0,n.default)(r.components)){if("tuple"!==r.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var o="",a=r.type.indexOf("[");a>=0&&(o=r.type.substring(a));var s=e(t,r.components);Array.isArray(s)&&t?i.push("tuple("+s.join(",")+")"+o):t?i.push("("+s+")"):i.push("("+s.join(",")+")"+o)}else i.push(r.type)})),i},l=function(e){if(!o.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,stripHexPrefix:o.stripHexPrefix,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:l,toAscii:l,asciiToHex:f,fromAscii:f,unitMap:i.unitMap,toWei:function(e,t){if(t=d(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.toWei(e,t):i.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=d(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.fromWei(e,t):i.fromWei(e,t).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement,isBloom:o.isBloom,isUserEthereumAddressInBloom:o.isUserEthereumAddressInBloom,isContractAddressInBloom:o.isContractAddressInBloom,isTopic:o.isTopic,isTopicInBloom:o.isTopicInBloom,isInBloom:o.isInBloom,compareBlockNumbers:function(e,t){if(e===t)return 0;if("genesis"!==e&&"earliest"!==e&&0!==e||"genesis"!==t&&"earliest"!==t&&0!==t){if("genesis"===e||"earliest"===e||0===e)return-1;if("genesis"===t||"earliest"===t||0===t)return 1;if("latest"===e||"finalized"===e)return"pending"===t?-1:1;if("latest"===t||"finalized"===t)return"pending"===e?1:-1;if("pending"===e)return 1;if("pending"===t)return-1;if("safe"===e||"safe"===t)return;var r=new u(e),n=new u(t);return r.lt(n)?-1:r.eq(n)?0:1}return 0},toNumber:o.toNumber}},747:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(90323),a=function(e){var t=(0,n.default)(e);if("string"===t)return o.isHexStrict(e)?new i(e.replace(/0x/i,""),16):new i(e,10);if("number"===t)return new i(e);if(o.isBigNumber(e))return new i(e.toString(10));if(o.isBN(e))return e;throw new Error(e+" is not a number")},s=function(e,t,r){var n,s;if("bytes"===(e=function(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}(e))){if(t.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+t.length);return t}if("string"===e)return o.utf8ToHex(t);if("bool"===e)return t?"01":"00";if(e.startsWith("address")){if(n=r?64:40,!o.isAddress(t))throw new Error(t+" is not a valid address, or the checksum is invalid.");return o.leftPad(t.toLowerCase(),n)}if(n=function(e){var t=/^\D+(\d+).*$/.exec(e);return t?parseInt(t[1],10):null}(e),e.startsWith("bytes")){if(!n)throw new Error("bytes[] not yet supported in solidity");if(r&&(n=32),n<1||n>32||n256)throw new Error("Invalid uint"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?o.leftPad(s.toString("hex"),n/8*2):s}if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(n).toString("hex"):n?o.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+e)},u=function(e){if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,a="";if(e&&"object"===(0,n.default)(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,a=e.hasOwnProperty("v")?e.v:e.value):(t=o.toHex(e,!0),a=o.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new i(a)),Array.isArray(a)){if(r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null}(t),r&&a.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(a));r=a.length}return Array.isArray(a)?a.map((function(e){return s(t,e,r).toString("hex").replace("0x","")})).join(""):s(t,a,r).toString("hex").replace("0x","")};e.exports={soliditySha3:function(){var e=Array.prototype.slice.call(arguments).map(u);return o.sha3("0x"+e.join(""))},soliditySha3Raw:function(){return o.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(u).join(""))},encodePacked:function(){return"0x"+Array.prototype.slice.call(arguments).map(u).join("").toLowerCase()}}},90323:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(74519)),a=i(r(3355)),s=r(31734),u=r(77277),c=r(88632),l=r(65907),f=r(19313),d=r(1243).keccak256,h=function(e){return s.isBN(e)},p=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},y=function(e){try{return u.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},m=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(e)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(e))||g(e))},g=function(e){e=e.replace(/^0x/i,"");for(var t=x(e.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(t[r],16)>7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},b=function(e){var t="";e=(e=(e=(e=(e=c.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];if(!e)return e;if("string"==typeof e&&!k(e))throw new Error('Given value "'+e+'" is not a valid hex string.');var r=y(e);return t&&(r>Number.MAX_SAFE_INTEGER||r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:E,isHexStrict:k,stripHexPrefix:function(e){return 0!==e&&E(e)?e.replace(/^(-)?0x/i,"$1"):e},leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(i).join(r||"0")},toTwosComplement:function(e){return"0x"+y(e).toTwos(256).toString(16,64)},sha3:x,sha3Raw:function(e){return null===(e=x(e))?S:e},toNumber:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"number"==typeof e?e:v(A(e),t)}}},17001:(e,t,r)=>{"use strict";var n=r(78920).i8,i=r(80606),o=r(66748),a=r(473),s=r(96306),u=r(92565),c=r(42463),l=r(48161),f=function(){var e=this;i.packageInit(this,arguments),this.version=n,this.utils=l,this.eth=new o(this),this.shh=new u(this),this.bzz=new c(this);var t=this.setProvider;this.setProvider=function(r,n){return t.apply(e,arguments),e.eth.setRequestManager(e._requestManager),e.shh.setRequestManager(e._requestManager),e.bzz.setProvider(r),!0}};f.version=n,f.utils=l,f.modules={Eth:o,Net:a,Personal:s,Shh:u,Bzz:c},i.addProviders(f),e.exports=f},89214:()=>{},52361:()=>{},94616:()=>{},38768:e=>{"use strict";e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},77907:(e,t,r)=>{"use strict";var n=r(38768);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},58975:e=>{"use strict";e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},94571:e=>{"use strict";function t(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=e.apply(r,n);function s(e){t(a,i,o,s,u,"next",e)}function u(e){t(a,i,o,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},69721:e=>{"use strict";e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},14727:(e,t,r)=>{"use strict";var n=r(38746),i=r(36923);function o(t,r,a){return i()?(e.exports=o=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=o=function(e,t,r){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return r&&n(o,r.prototype),o},e.exports.__esModule=!0,e.exports.default=e.exports),o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},58985:(e,t,r)=>{"use strict";var n=r(32310);function i(e,t){for(var r=0;r{"use strict";var n=r(32310);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},119:(e,t,r)=>{"use strict";var n=r(47460);function i(){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=i=Reflect.get.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,r){var i=n(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},21949:e=>{"use strict";function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},15163:(e,t,r)=>{"use strict";var n=r(38746);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},28847:e=>{"use strict";e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},78958:e=>{"use strict";e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},36923:e=>{"use strict";e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},41642:e=>{"use strict";e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},91436:e=>{"use strict";e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},82966:e=>{"use strict";e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},22344:e=>{"use strict";e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},34650:(e,t,r)=>{"use strict";var n=r(3355).default,i=r(58975);e.exports=function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},82028:(e,t,r)=>{"use strict";var n=r(3355).default;function i(){e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),s=new T(n||[]);return a(o,"_invoke",{value:S(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p={};function y(){}function m(){}function g(){}var b={};f(b,u,(function(){return this}));var v=Object.getPrototypeOf,w=v&&v(v(I([])));w&&w!==r&&o.call(w,u)&&(b=w);var A=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}})}function S(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var i=h(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},38746:e=>{"use strict";function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},74519:(e,t,r)=>{"use strict";var n=r(12338),i=r(91436),o=r(46906),a=r(82966);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},47460:(e,t,r)=>{"use strict";var n=r(21949);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},93106:(e,t,r)=>{"use strict";var n=r(77907),i=r(41642),o=r(46906),a=r(22344);e.exports=function(e){return n(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},79662:(e,t,r)=>{"use strict";var n=r(3355).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},32310:(e,t,r)=>{"use strict";var n=r(3355).default,i=r(79662);e.exports=function(e){var t=i(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},3355:e=>{"use strict";function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},46906:(e,t,r)=>{"use strict";var n=r(38768);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},22940:(e,t,r)=>{"use strict";var n=r(21949),i=r(38746),o=r(78958),a=r(14727);function s(t){var r="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return a(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},82247:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(82028)();e.exports=i;try{regeneratorRuntime=i}catch(e){"object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},43604:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t{"use strict";e.exports=JSON.parse('{"name":"goerli","chainId":5,"networkId":5,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"Cross-client PoA test network","url":"https://github.com/goerli/testnet","genesis":{"hash":"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a","timestamp":"0x5c51a607","gasLimit":10485760,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xa3f5ab08"},{"name":"homestead","block":0,"forkHash":"0xa3f5ab08"},{"name":"tangerineWhistle","block":0,"forkHash":"0xa3f5ab08"},{"name":"spuriousDragon","block":0,"forkHash":"0xa3f5ab08"},{"name":"byzantium","block":0,"forkHash":"0xa3f5ab08"},{"name":"constantinople","block":0,"forkHash":"0xa3f5ab08"},{"name":"petersburg","block":0,"forkHash":"0xa3f5ab08"},{"name":"istanbul","block":1561651,"forkHash":"0xc25efa5c"},{"name":"berlin","block":4460644,"forkHash":"0x757a1c47"},{"name":"london","block":5062605,"forkHash":"0xb8c6299d"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"51.141.78.53","port":30303,"id":"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a","location":"","comment":"Upstream bootnode 1"},{"ip":"13.93.54.137","port":30303,"id":"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b","location":"","comment":"Upstream bootnode 2"},{"ip":"94.237.54.114","port":30313,"id":"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291","location":"","comment":"Upstream bootnode 3"},{"ip":"18.218.250.66","port":30313,"id":"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949","location":"","comment":"Upstream bootnode 4"},{"ip":"3.11.147.67","port":30303,"id":"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91","location":"","comment":"Ethereum Foundation bootnode"},{"ip":"51.15.116.226","port":30303,"id":"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":30303,"id":"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":40303,"id":"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd","location":"","comment":"Goerli Initiative bootnode"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]}')},37098:e=>{"use strict";e.exports=JSON.parse('{"name":"kovan","chainId":42,"networkId":42,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"aura","aura":{}},"comment":"Parity PoA test network","url":"https://kovan-testnet.github.io/website/","genesis":{"hash":"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9","timestamp":null,"gasLimit":6000000,"difficulty":131072,"nonce":"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","extraData":"0x","stateRoot":"0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x010ffe56"},{"name":"homestead","block":0,"forkHash":"0x010ffe56"},{"name":"tangerineWhistle","block":0,"forkHash":"0x010ffe56"},{"name":"spuriousDragon","block":0,"forkHash":"0x010ffe56"},{"name":"byzantium","block":5067000,"forkHash":"0x7f83c620"},{"name":"constantinople","block":9200000,"forkHash":"0xa94e3dc4"},{"name":"petersburg","block":10255201,"forkHash":"0x186874aa"},{"name":"istanbul","block":14111141,"forkHash":"0x7f6599a6"},{"name":"berlin","block":24770900,"forkHash":"0x1a0f10d9"},{"name":"london","block":26741100,"forkHash":"0x1ed20b71"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"116.203.116.241","port":30303,"id":"16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45","location":"","comment":"1"},{"ip":"3.217.96.11","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"2"},{"ip":"108.61.170.124","port":30303,"id":"740e1c8ea64e71762c71a463a04e2046070a0c9394fcab5891d41301dc473c0cff00ebab5a9bc87fbcb610ab98ac18225ff897bc8b7b38def5975d5ceb0a7d7c","location":"","comment":"3"},{"ip":"157.230.31.163","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"4"}]}')},87295:e=>{"use strict";e.exports=JSON.parse('{"name":"mainnet","chainId":1,"networkId":1,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"The Ethereum main chain","url":"https://ethstats.net/","genesis":{"hash":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","timestamp":null,"gasLimit":5000,"difficulty":17179869184,"nonce":"0x0000000000000042","extraData":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","stateRoot":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfc64ec04"},{"name":"homestead","block":1150000,"forkHash":"0x97c2c34c"},{"name":"dao","block":1920000,"forkHash":"0x91d1f948"},{"name":"tangerineWhistle","block":2463000,"forkHash":"0x7a64da13"},{"name":"spuriousDragon","block":2675000,"forkHash":"0x3edd5b10"},{"name":"byzantium","block":4370000,"forkHash":"0xa00bc324"},{"name":"constantinople","block":7280000,"forkHash":"0x668db0af"},{"name":"petersburg","block":7280000,"forkHash":"0x668db0af"},{"name":"istanbul","block":9069000,"forkHash":"0x879d6e30"},{"name":"muirGlacier","block":9200000,"forkHash":"0xe029e991"},{"name":"berlin","block":12244000,"forkHash":"0x0eb440f6"},{"name":"london","block":12965000,"forkHash":"0xb715077d"},{"name":"arrowGlacier","block":13773000,"forkHash":"0x20c327fc"},{"name":"grayGlacier","block":15050000,"forkHash":"0xf0afd0e3"},{"name":"mergeForkIdTransition","block":null,"forkHash":null},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"18.138.108.67","port":30303,"id":"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666","location":"ap-southeast-1-001","comment":"bootnode-aws-ap-southeast-1-001"},{"ip":"3.209.45.79","port":30303,"id":"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de","location":"us-east-1-001","comment":"bootnode-aws-us-east-1-001"},{"ip":"34.255.23.113","port":30303,"id":"ca6de62fce278f96aea6ec5a2daadb877e51651247cb96ee310a318def462913b653963c155a0ef6c7d50048bba6e6cea881130857413d9f50a621546b590758","location":"eu-west-1-001","comment":"bootnode-aws-eu-west-1-001"},{"ip":"35.158.244.151","port":30303,"id":"279944d8dcd428dffaa7436f25ca0ca43ae19e7bcf94a8fb7d1641651f92d121e972ac2e8f381414b80cc8e5555811c2ec6e1a99bb009b3f53c4c69923e11bd8","location":"eu-central-1-001","comment":"bootnode-aws-eu-central-1-001"},{"ip":"52.187.207.27","port":30303,"id":"8499da03c47d637b20eee24eec3c356c9a2e6148d6fe25ca195c7949ab8ec2c03e3556126b0d7ed644675e78c4318b08691b7b57de10e5f0d40d05b09238fa0a","location":"australiaeast-001","comment":"bootnode-azure-australiaeast-001"},{"ip":"191.234.162.198","port":30303,"id":"103858bdb88756c71f15e9b5e09b56dc1be52f0a5021d46301dbbfb7e130029cc9d0d6f73f693bc29b665770fff7da4d34f3c6379fe12721b5d7a0bcb5ca1fc1","location":"brazilsouth-001","comment":"bootnode-azure-brazilsouth-001"},{"ip":"52.231.165.108","port":30303,"id":"715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8","location":"koreasouth-001","comment":"bootnode-azure-koreasouth-001"},{"ip":"104.42.217.25","port":30303,"id":"5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f","location":"westus-001","comment":"bootnode-azure-westus-001"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]}')},40439:e=>{"use strict";e.exports=JSON.parse('{"name":"rinkeby","chainId":4,"networkId":4,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"PoA test network","url":"https://www.rinkeby.io","genesis":{"hash":"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177","timestamp":"0x58ee40ba","gasLimit":4700000,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x3b8e0691"},{"name":"homestead","block":1,"forkHash":"0x60949295"},{"name":"tangerineWhistle","block":2,"forkHash":"0x8bde40dd"},{"name":"spuriousDragon","block":3,"forkHash":"0xcb3a64bb"},{"name":"byzantium","block":1035301,"forkHash":"0x8d748b57"},{"name":"constantinople","block":3660663,"forkHash":"0xe49cab14"},{"name":"petersburg","block":4321234,"forkHash":"0xafec6b27"},{"name":"istanbul","block":5435345,"forkHash":"0xcbdb8838"},{"name":"berlin","block":8290928,"forkHash":"0x6910c8bd"},{"name":"london","block":8897988,"forkHash":"0x8e29f2f3"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"52.169.42.101","port":30303,"id":"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf","location":"","comment":"IE"},{"ip":"52.3.158.184","port":30303,"id":"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8","location":"","comment":"INFURA"},{"ip":"159.89.28.211","port":30303,"id":"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6","location":"","comment":"AKASHA"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"]}')},31227:e=>{"use strict";e.exports=JSON.parse('{"name":"ropsten","chainId":3,"networkId":3,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network","url":"https://github.com/ethereum/ropsten","genesis":{"hash":"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d","timestamp":null,"gasLimit":16777216,"difficulty":1048576,"nonce":"0x0000000000000042","extraData":"0x3535353535353535353535353535353535353535353535353535353535353535","stateRoot":"0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x30c7ddbc"},{"name":"homestead","block":0,"forkHash":"0x30c7ddbc"},{"name":"tangerineWhistle","block":0,"forkHash":"0x30c7ddbc"},{"name":"spuriousDragon","block":10,"forkHash":"0x63760190"},{"name":"byzantium","block":1700000,"forkHash":"0x3ea159c7"},{"name":"constantinople","block":4230000,"forkHash":"0x97b544f3"},{"name":"petersburg","block":4939394,"forkHash":"0xd6e2149b"},{"name":"istanbul","block":6485846,"forkHash":"0x4bc66396"},{"name":"muirGlacier","block":7117117,"forkHash":"0x6727ef90"},{"name":"berlin","block":9812189,"forkHash":"0xa157d377"},{"name":"london","block":10499401,"forkHash":"0x7119b6b3"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"52.176.7.10","port":30303,"id":"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606","location":"","comment":"US-Azure geth"},{"ip":"52.176.100.77","port":30303,"id":"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c","location":"","comment":"US-Azure parity"},{"ip":"52.232.243.152","port":30303,"id":"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f","location":"","comment":"Parity"},{"ip":"192.81.208.223","port":30303,"id":"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09","location":"","comment":"@gpip"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net"]}')},49422:e=>{"use strict";e.exports=JSON.parse('{"name":"sepolia","chainId":11155111,"networkId":11155111,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network to replace Ropsten","url":"https://github.com/ethereum/go-ethereum/pull/23730","genesis":{"hash":"0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9","timestamp":"0x6159af19","gasLimit":30000000,"difficulty":131072,"nonce":"0x0000000000000000","extraData":"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521","stateRoot":"0x5eb6e371a698b8d68f665192350ffcecbbbf322916f4b51bd79bb6887da3f494"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfe3366e7"},{"name":"homestead","block":0,"forkHash":"0xfe3366e7"},{"name":"tangerineWhistle","block":0,"forkHash":"0xfe3366e7"},{"name":"spuriousDragon","block":0,"forkHash":"0xfe3366e7"},{"name":"byzantium","block":0,"forkHash":"0xfe3366e7"},{"name":"constantinople","block":0,"forkHash":"0xfe3366e7"},{"name":"petersburg","block":0,"forkHash":"0xfe3366e7"},{"name":"istanbul","block":0,"forkHash":"0xfe3366e7"},{"name":"muirGlacier","block":0,"forkHash":"0xfe3366e7"},{"name":"berlin","block":0,"forkHash":"0xfe3366e7"},{"name":"london","block":0,"forkHash":"0xfe3366e7"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"18.168.182.86","port":30303,"id":"9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066","location":"","comment":"geth"},{"ip":"52.14.151.177","port":30303,"id":"ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7","location":"","comment":"besu"}],"dnsNetworks":[]}')},96561:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-1153","number":1153,"comment":"Transient Storage","url":"https://eips.ethereum.org/EIPS/eip-1153","status":"Review","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{"tstore":{"v":100,"d":"Base fee of the TSTORE opcode"},"tload":{"v":100,"d":"Base fee of the TLOAD opcode"}},"vm":{},"pow":{}}')},77523:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-1559","number":1559,"comment":"Fee market change for ETH 1.0 chain","url":"https://eips.ethereum.org/EIPS/eip-1559","status":"Final","minimumHardfork":"berlin","requiredEIPs":[2930],"gasConfig":{"baseFeeMaxChangeDenominator":{"v":8,"d":"Maximum base fee change denominator"},"elasticityMultiplier":{"v":2,"d":"Maximum block gas target elasticity"},"initialBaseFee":{"v":1000000000,"d":"Initial base fee on first EIP1559 block"}},"gasPrices":{},"vm":{},"pow":{}}')},83339:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2315","number":2315,"comment":"Simple subroutines for the EVM","url":"https://eips.ethereum.org/EIPS/eip-2315","status":"Draft","minimumHardfork":"istanbul","gasConfig":{},"gasPrices":{"beginsub":{"v":2,"d":"Base fee of the BEGINSUB opcode"},"returnsub":{"v":5,"d":"Base fee of the RETURNSUB opcode"},"jumpsub":{"v":10,"d":"Base fee of the JUMPSUB opcode"}},"vm":{},"pow":{}}')},26769:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2537","number":2537,"comment":"BLS12-381 precompiles","url":"https://eips.ethereum.org/EIPS/eip-2537","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"Bls12381G1AddGas":{"v":600,"d":"Gas cost of a single BLS12-381 G1 addition precompile-call"},"Bls12381G1MulGas":{"v":12000,"d":"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},"Bls12381G2AddGas":{"v":4500,"d":"Gas cost of a single BLS12-381 G2 addition precompile-call"},"Bls12381G2MulGas":{"v":55000,"d":"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},"Bls12381PairingBaseGas":{"v":115000,"d":"Base gas cost of BLS12-381 pairing check"},"Bls12381PairingPerPairGas":{"v":23000,"d":"Per-pair gas cost of BLS12-381 pairing check"},"Bls12381MapG1Gas":{"v":5500,"d":"Gas cost of BLS12-381 map field element to G1"},"Bls12381MapG2Gas":{"v":110000,"d":"Gas cost of BLS12-381 map field element to G2"},"Bls12381MultiExpGasDiscount":{"v":[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],"d":"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},"vm":{},"pow":{}}')},17897:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2565","number":2565,"comment":"ModExp gas cost","url":"https://eips.ethereum.org/EIPS/eip-2565","status":"Final","minimumHardfork":"byzantium","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":3,"d":"Gquaddivisor from modexp precompile for gas calculation"}},"vm":{},"pow":{}}')},62170:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2718","comment":"Typed Transaction Envelope","url":"https://eips.ethereum.org/EIPS/eip-2718","status":"Final","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},88436:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2929","comment":"Gas cost increases for state access opcodes","url":"https://eips.ethereum.org/EIPS/eip-2929","status":"Final","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"coldsload":{"v":2100,"d":"Gas cost of the first read of storage from a given location (per transaction)"},"coldaccountaccess":{"v":2600,"d":"Gas cost of the first read of a given address (per transaction)"},"warmstorageread":{"v":100,"d":"Gas cost of reading storage locations which have already loaded \'cold\'"},"sstoreCleanGasEIP2200":{"v":2900,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreNoopGasEIP2200":{"v":100,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":100,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitRefundEIP2200":{"v":19900,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanRefundEIP2200":{"v":4900,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"call":{"v":0,"d":"Base fee of the CALL opcode"},"callcode":{"v":0,"d":"Base fee of the CALLCODE opcode"},"delegatecall":{"v":0,"d":"Base fee of the DELEGATECALL opcode"},"staticcall":{"v":0,"d":"Base fee of the STATICCALL opcode"},"balance":{"v":0,"d":"Base fee of the BALANCE opcode"},"extcodesize":{"v":0,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":0,"d":"Base fee of the EXTCODECOPY opcode"},"extcodehash":{"v":0,"d":"Base fee of the EXTCODEHASH opcode"},"sload":{"v":0,"d":"Base fee of the SLOAD opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"}},"vm":{},"pow":{}}')},96213:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2930","comment":"Optional access lists","url":"https://eips.ethereum.org/EIPS/eip-2930","status":"Final","minimumHardfork":"istanbul","requiredEIPs":[2718,2929],"gasConfig":{},"gasPrices":{"accessListStorageKeyCost":{"v":1900,"d":"Gas cost per storage key in an Access List transaction"},"accessListAddressCost":{"v":2400,"d":"Gas cost per storage key in an Access List transaction"}},"vm":{},"pow":{}}')},25491:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3198","number":3198,"comment":"BASEFEE opcode","url":"https://eips.ethereum.org/EIPS/eip-3198","status":"Final","minimumHardfork":"london","gasConfig":{},"gasPrices":{"basefee":{"v":2,"d":"Gas cost of the BASEFEE opcode"}},"vm":{},"pow":{}}')},20070:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3529","comment":"Reduction in refunds","url":"https://eips.ethereum.org/EIPS/eip-3529","status":"Final","minimumHardfork":"berlin","requiredEIPs":[2929],"gasConfig":{"maxRefundQuotient":{"v":5,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"selfdestructRefund":{"v":0,"d":"Refunded following a selfdestruct operation"},"sstoreClearRefundEIP2200":{"v":4800,"d":"Once per SSTORE operation for clearing an originally existing storage slot"}},"vm":{},"pow":{}}')},52256:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3540","number":3540,"comment":"EVM Object Format (EOF) v1","url":"https://eips.ethereum.org/EIPS/eip-3540","status":"Review","minimumHardfork":"london","requiredEIPs":[3541],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},21871:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3541","comment":"Reject new contracts starting with the 0xEF byte","url":"https://eips.ethereum.org/EIPS/eip-3541","status":"Final","minimumHardfork":"berlin","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},47225:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3554","comment":"Reduction in refunds","url":"Difficulty Bomb Delay to December 1st 2021","status":"Final","minimumHardfork":"muirGlacier","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9500000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},3968:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3607","number":3607,"comment":"Reject transactions from senders with deployed code","url":"https://eips.ethereum.org/EIPS/eip-3607","status":"Final","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},29496:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3651","number":3198,"comment":"Warm COINBASE","url":"https://eips.ethereum.org/EIPS/eip-3651","status":"Review","minimumHardfork":"london","requiredEIPs":[2929],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},74290:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3670","number":3670,"comment":"EOF - Code Validation","url":"https://eips.ethereum.org/EIPS/eip-3670","status":"Review","minimumHardfork":"london","requiredEIPs":[3540],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},98571:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3675","number":3675,"comment":"Upgrade consensus to Proof-of-Stake","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Review","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},64551:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3855","number":3855,"comment":"PUSH0 instruction","url":"https://eips.ethereum.org/EIPS/eip-3855","status":"Review","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{"push0":{"v":2,"d":"Base fee of the PUSH0 opcode"}},"vm":{},"pow":{}}')},94300:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3860","number":3860,"comment":"Limit and meter initcode","url":"https://eips.ethereum.org/EIPS/eip-3860","status":"Review","minimumHardfork":"spuriousDragon","requiredEIPs":[],"gasConfig":{},"gasPrices":{"initCodeWordCost":{"v":2,"d":"Gas to pay for each word (32 bytes) of initcode when creating a contract"}},"vm":{"maxInitCodeSize":{"v":49152,"d":"Maximum length of initialization code when creating a contract"}},"pow":{}}')},74818:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-4345","number":4345,"comment":"Difficulty Bomb Delay to June 2022","url":"https://eips.ethereum.org/EIPS/eip-4345","status":"Final","minimumHardfork":"london","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":10700000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},68372:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-4399","number":4399,"comment":"Supplant DIFFICULTY opcode with PREVRANDAO","url":"https://eips.ethereum.org/EIPS/eip-4399","status":"Review","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},4759:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-5133","number":5133,"comment":"Delaying Difficulty Bomb to mid-September 2022","url":"https://eips.ethereum.org/EIPS/eip-5133","status":"Draft","minimumHardfork":"grayGlacier","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":11400000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},51971:e=>{"use strict";e.exports=JSON.parse('{"name":"arrowGlacier","comment":"HF to delay the difficulty bomb","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md","status":"Final","eips":[4345],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},20015:e=>{"use strict";e.exports=JSON.parse('{"name":"berlin","comment":"HF targeted for July 2020 following the Muir Glacier HF","url":"https://eips.ethereum.org/EIPS/eip-2070","status":"Final","eips":[2565,2929,2718,2930]}')},26985:e=>{"use strict";e.exports=JSON.parse('{"name":"byzantium","comment":"Hardfork with new precompiles, instructions and other protocol changes","url":"https://eips.ethereum.org/EIPS/eip-609","status":"Final","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":20,"d":"Gquaddivisor from modexp precompile for gas calculation"},"ecAdd":{"v":500,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":40000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":100000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":80000,"d":"Gas costs regarding curve pairing precompile input length"},"revert":{"v":0,"d":"Base fee of the REVERT opcode"},"staticcall":{"v":700,"d":"Base fee of the STATICCALL opcode"},"returndatasize":{"v":2,"d":"Base fee of the RETURNDATASIZE opcode"},"returndatacopy":{"v":3,"d":"Base fee of the RETURNDATACOPY opcode"}},"vm":{},"pow":{"minerReward":{"v":"3000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":3000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},60114:e=>{"use strict";e.exports=JSON.parse('{"name":"chainstart","comment":"Start of the Ethereum main chain","url":"","status":"","gasConfig":{"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be"},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations"},"maxRefundQuotient":{"v":2,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"base":{"v":2,"d":"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},"tierStep":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them"},"exp":{"v":10,"d":"Base fee of the EXP opcode"},"expByte":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction"},"sha3":{"v":30,"d":"Base fee of the SHA3 opcode"},"sha3Word":{"v":6,"d":"Once per word of the SHA3 operation\'s data"},"sload":{"v":50,"d":"Base fee of the SLOAD opcode"},"sstoreSet":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero"},"sstoreReset":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero"},"sstoreRefund":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero"},"jumpdest":{"v":1,"d":"Base fee of the JUMPDEST opcode"},"log":{"v":375,"d":"Base fee of the LOG opcode"},"logData":{"v":8,"d":"Per byte in a LOG* operation\'s data"},"logTopic":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},"create":{"v":32000,"d":"Base fee of the CREATE opcode"},"call":{"v":40,"d":"Base fee of the CALL opcode"},"callStipend":{"v":2300,"d":"Free gas given at beginning of call"},"callValueTransfer":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero"},"callNewAccount":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior"},"selfdestructRefund":{"v":24000,"d":"Refunded following a selfdestruct operation"},"memory":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation"},"createData":{"v":200,"d":""},"tx":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions"},"txCreation":{"v":32000,"d":"The cost of creating a contract via tx"},"txDataZero":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},"txDataNonZero":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"copy":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},"ecRecover":{"v":3000,"d":""},"sha256":{"v":60,"d":""},"sha256Word":{"v":12,"d":""},"ripemd160":{"v":600,"d":""},"ripemd160Word":{"v":120,"d":""},"identity":{"v":15,"d":""},"identityWord":{"v":3,"d":""},"stop":{"v":0,"d":"Base fee of the STOP opcode"},"add":{"v":3,"d":"Base fee of the ADD opcode"},"mul":{"v":5,"d":"Base fee of the MUL opcode"},"sub":{"v":3,"d":"Base fee of the SUB opcode"},"div":{"v":5,"d":"Base fee of the DIV opcode"},"sdiv":{"v":5,"d":"Base fee of the SDIV opcode"},"mod":{"v":5,"d":"Base fee of the MOD opcode"},"smod":{"v":5,"d":"Base fee of the SMOD opcode"},"addmod":{"v":8,"d":"Base fee of the ADDMOD opcode"},"mulmod":{"v":8,"d":"Base fee of the MULMOD opcode"},"signextend":{"v":5,"d":"Base fee of the SIGNEXTEND opcode"},"lt":{"v":3,"d":"Base fee of the LT opcode"},"gt":{"v":3,"d":"Base fee of the GT opcode"},"slt":{"v":3,"d":"Base fee of the SLT opcode"},"sgt":{"v":3,"d":"Base fee of the SGT opcode"},"eq":{"v":3,"d":"Base fee of the EQ opcode"},"iszero":{"v":3,"d":"Base fee of the ISZERO opcode"},"and":{"v":3,"d":"Base fee of the AND opcode"},"or":{"v":3,"d":"Base fee of the OR opcode"},"xor":{"v":3,"d":"Base fee of the XOR opcode"},"not":{"v":3,"d":"Base fee of the NOT opcode"},"byte":{"v":3,"d":"Base fee of the BYTE opcode"},"address":{"v":2,"d":"Base fee of the ADDRESS opcode"},"balance":{"v":20,"d":"Base fee of the BALANCE opcode"},"origin":{"v":2,"d":"Base fee of the ORIGIN opcode"},"caller":{"v":2,"d":"Base fee of the CALLER opcode"},"callvalue":{"v":2,"d":"Base fee of the CALLVALUE opcode"},"calldataload":{"v":3,"d":"Base fee of the CALLDATALOAD opcode"},"calldatasize":{"v":2,"d":"Base fee of the CALLDATASIZE opcode"},"calldatacopy":{"v":3,"d":"Base fee of the CALLDATACOPY opcode"},"codesize":{"v":2,"d":"Base fee of the CODESIZE opcode"},"codecopy":{"v":3,"d":"Base fee of the CODECOPY opcode"},"gasprice":{"v":2,"d":"Base fee of the GASPRICE opcode"},"extcodesize":{"v":20,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":20,"d":"Base fee of the EXTCODECOPY opcode"},"blockhash":{"v":20,"d":"Base fee of the BLOCKHASH opcode"},"coinbase":{"v":2,"d":"Base fee of the COINBASE opcode"},"timestamp":{"v":2,"d":"Base fee of the TIMESTAMP opcode"},"number":{"v":2,"d":"Base fee of the NUMBER opcode"},"difficulty":{"v":2,"d":"Base fee of the DIFFICULTY opcode"},"gaslimit":{"v":2,"d":"Base fee of the GASLIMIT opcode"},"pop":{"v":2,"d":"Base fee of the POP opcode"},"mload":{"v":3,"d":"Base fee of the MLOAD opcode"},"mstore":{"v":3,"d":"Base fee of the MSTORE opcode"},"mstore8":{"v":3,"d":"Base fee of the MSTORE8 opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"},"jump":{"v":8,"d":"Base fee of the JUMP opcode"},"jumpi":{"v":10,"d":"Base fee of the JUMPI opcode"},"pc":{"v":2,"d":"Base fee of the PC opcode"},"msize":{"v":2,"d":"Base fee of the MSIZE opcode"},"gas":{"v":2,"d":"Base fee of the GAS opcode"},"push":{"v":3,"d":"Base fee of the PUSH opcode"},"dup":{"v":3,"d":"Base fee of the DUP opcode"},"swap":{"v":3,"d":"Base fee of the SWAP opcode"},"callcode":{"v":40,"d":"Base fee of the CALLCODE opcode"},"return":{"v":0,"d":"Base fee of the RETURN opcode"},"invalid":{"v":0,"d":"Base fee of the INVALID opcode"},"selfdestruct":{"v":0,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed"},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack"},"maxExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis"}},"pow":{"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be"},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations"},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":0,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},35993:e=>{"use strict";e.exports=JSON.parse('{"name":"constantinople","comment":"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)","url":"https://eips.ethereum.org/EIPS/eip-1013","status":"Final","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":200,"d":"Once per SSTORE operation if the value doesn\'t change"},"netSstoreInitGas":{"v":20000,"d":"Once per SSTORE operation from clean zero"},"netSstoreCleanGas":{"v":5000,"d":"Once per SSTORE operation from clean non-zero"},"netSstoreDirtyGas":{"v":200,"d":"Once per SSTORE operation from dirty"},"netSstoreClearRefund":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"netSstoreResetRefund":{"v":4800,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"netSstoreResetClearRefund":{"v":19800,"d":"Once per SSTORE operation for resetting to the original zero value"},"shl":{"v":3,"d":"Base fee of the SHL opcode"},"shr":{"v":3,"d":"Base fee of the SHR opcode"},"sar":{"v":3,"d":"Base fee of the SAR opcode"},"extcodehash":{"v":400,"d":"Base fee of the EXTCODEHASH opcode"},"create2":{"v":32000,"d":"Base fee of the CREATE2 opcode"}},"vm":{},"pow":{"minerReward":{"v":"2000000000000000000","d":"The amount a miner gets rewarded for mining a block"},"difficultyBombDelay":{"v":5000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},7197:e=>{"use strict";e.exports=JSON.parse('{"name":"dao","comment":"DAO rescue hardfork","url":"https://eips.ethereum.org/EIPS/eip-779","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},31088:e=>{"use strict";e.exports=JSON.parse('{"name":"grayGlacier","comment":"Delaying the difficulty bomb to Mid September 2022","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md","status":"Draft","eips":[5133],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},62800:e=>{"use strict";e.exports=JSON.parse('{"name":"homestead","comment":"Homestead hardfork with protocol and network changes","url":"https://eips.ethereum.org/EIPS/eip-606","status":"Final","gasConfig":{},"gasPrices":{"delegatecall":{"v":40,"d":"Base fee of the DELEGATECALL opcode"}},"vm":{},"pow":{}}')},83166:e=>{"use strict";e.exports=JSON.parse('{"name":"istanbul","comment":"HF targeted for December 2019 following the Constantinople/Petersburg HF","url":"https://eips.ethereum.org/EIPS/eip-1679","status":"Final","gasConfig":{},"gasPrices":{"blake2Round":{"v":1,"d":"Gas cost per round for the Blake2 F precompile"},"ecAdd":{"v":150,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":6000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":45000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":34000,"d":"Gas costs regarding curve pairing precompile input length"},"txDataNonZero":{"v":16,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"sstoreSentryGasEIP2200":{"v":2300,"d":"Minimum gas required to be present for an SSTORE call, not consumed"},"sstoreNoopGasEIP2200":{"v":800,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":800,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitGasEIP2200":{"v":20000,"d":"Once per SSTORE operation from clean zero to non-zero"},"sstoreInitRefundEIP2200":{"v":19200,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanGasEIP2200":{"v":5000,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreCleanRefundEIP2200":{"v":4200,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"sstoreClearRefundEIP2200":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"balance":{"v":700,"d":"Base fee of the BALANCE opcode"},"extcodehash":{"v":700,"d":"Base fee of the EXTCODEHASH opcode"},"chainid":{"v":2,"d":"Base fee of the CHAINID opcode"},"selfbalance":{"v":5,"d":"Base fee of the SELFBALANCE opcode"},"sload":{"v":800,"d":"Base fee of the SLOAD opcode"}},"vm":{},"pow":{}}')},61250:e=>{"use strict";e.exports=JSON.parse('{"name":"london","comment":"HF targeted for July 2021 following the Berlin fork","url":"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md","status":"Final","eips":[1559,3198,3529,3541]}')},88648:e=>{"use strict";e.exports=JSON.parse('{"name":"merge","comment":"Hardfork to upgrade the consensus mechanism to Proof-of-Stake","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md","status":"Draft","consensus":{"type":"pos","algorithm":"casper","casper":{}},"eips":[3675,4399]}')},49347:e=>{"use strict";e.exports=JSON.parse('{"name":"mergeForkIdTransition","comment":"Pre-merge hardfork to fork off non-upgraded clients","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Draft","eips":[]}')},42946:e=>{"use strict";e.exports=JSON.parse('{"name":"muirGlacier","comment":"HF to delay the difficulty bomb","url":"https://eips.ethereum.org/EIPS/eip-2384","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},4064:e=>{"use strict";e.exports=JSON.parse('{"name":"petersburg","comment":"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople","url":"https://eips.ethereum.org/EIPS/eip-1716","status":"Final","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreInitGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreCleanGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreDirtyGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreClearRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetClearRefund":{"v":null,"d":"Removed along EIP-1283"}},"vm":{},"pow":{}}')},5553:e=>{"use strict";e.exports=JSON.parse('{"name":"shanghai","comment":"Next feature hardfork after the merge hardfork","url":"https://github.com/ethereum/pm/issues/356","status":"Pre-Draft","eips":[]}')},90716:e=>{"use strict";e.exports=JSON.parse('{"name":"spuriousDragon","comment":"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit","url":"https://eips.ethereum.org/EIPS/eip-607","status":"Final","gasConfig":{},"gasPrices":{"expByte":{"v":50,"d":"Times ceil(log256(exponent)) for the EXP instruction"}},"vm":{"maxCodeSize":{"v":24576,"d":"Maximum length of contract code"}},"pow":{}}')},22302:e=>{"use strict";e.exports=JSON.parse('{"name":"tangerineWhistle","comment":"Hardfork with gas cost changes for IO-heavy operations","url":"https://eips.ethereum.org/EIPS/eip-608","status":"Final","gasConfig":{},"gasPrices":{"sload":{"v":200,"d":"Once per SLOAD operation"},"call":{"v":700,"d":"Once per CALL operation & message call transaction"},"extcodesize":{"v":700,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":700,"d":"Base fee of the EXTCODECOPY opcode"},"balance":{"v":400,"d":"Base fee of the BALANCE opcode"},"delegatecall":{"v":700,"d":"Base fee of the DELEGATECALL opcode"},"callcode":{"v":700,"d":"Base fee of the CALLCODE opcode"},"selfdestruct":{"v":5000,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{},"pow":{}}')},44946:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},75207:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},83630:e=>{"use strict";e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"blake3":30,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"libp2p-peer-record":769,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,"x11":4352,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},29799:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},18597:e=>{"use strict";e.exports={i8:"6.5.4"}},24070:e=>{"use strict";e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"x11":4352,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},22562:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},19794:e=>{"use strict";e.exports={version:"1.0.34"}},78920:e=>{"use strict";e.exports={i8:"1.10.4"}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n](o,o.exports,r),o.loaded=!0,o.exports}return r.amdO={},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r(17001)})(),e.exports=t()},2640:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8799:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(tthis.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n{const n=r(8341),i=r(135),o=r(4941),a=r(6458),s=r(5099),{BLOCKCHAINS_RENAME_PAIRS:u}=r(9660);e.exports=class{constructor(e){const t=e.blockchain?.name,r=e;t&&Object.keys(u).includes(t)&&(r.blockchain.name=u[t]),this.initializeServices(r)}initializeServices(e){this.blockchainService=this.initializeBlockchainService(e),this.nodeApiService=this.initializeNodeApiService(e),this.inputService=new s(e),this.validationService=new o}getServices(){return{blockchainService:this.blockchainService,nodeApiService:this.nodeApiService,validationService:this.validationService,inputService:this.inputService}}initializeNodeApiService(e){return e.communicationType&&n[e.communicationType]?new n[e.communicationType](e):new n.Default(e)}initializeBlockchainService(e){return a.nodeSupported()?new i.Node(e):a.nodeSupported()||window.ethereum||!e.blockchain?.privateKey?new i.Browser(e):new i.Node(e)}}},135:(e,t,r)=>{const n=r(7480),i=r(6268);e.exports={Browser:n,Node:i}},2913:(e,t,r)=>{const n=r(6450),i=r(2505),o=r(9784),a=r(7184),s=r(9033),u=r(6347),c=r(7247),l=r(3738),f=r(3582),d=r(2914),h=r(2566),p=r(684),y=r(568),m=r(5165),g=r(8469),b=r(4),{OPERATIONS_STEP_STATUS:v,DEFAULT_GAS_PRICE:w}=r(9660),A=r(2974),{sleepForMilliseconds:k}=r(6458);e.exports=class{constructor(e={}){this.config=e,this.events={},this.abis={},this.abis.AssertionStorage=o,this.abis.Hub=a,this.abis.ServiceAgreementV1=s,this.abis.ServiceAgreementStorageProxy=u,this.abis.ContentAssetStorage=c,this.abis.UnfinalizedStateStorage=l,this.abis.ContentAsset=f,this.abis.Token=d,this.abis.Paranet=h,this.abis.ParanetsRegistry=p,this.abis.ParanetIncentivesPoolFactory=y,this.abis.ParanetNeuroIncentivesPool=m,this.abis.ParanetKnowledgeMinersRegistry=g,this.abis.IdentityStorage=b,this.abis.ContentAsset.filter((e=>"event"===e.type)).forEach((e=>{const t=e.inputs.map((e=>e.internalType));this.events[e.name]={hash:n.utils.keccak256(`${e.name}(${t})`),inputs:e.inputs}}))}initializeWeb3(){return{}}async decodeEventLogs(){}async getPublicKey(){}async ensureBlockchainInfo(e){if(!this[e.name]){this[e.name]={contracts:{[e.hubContract]:{}},contractAddresses:{[e.hubContract]:{Hub:e.hubContract}}};const t=await this.getWeb3Instance(e);this[e.name].contracts[e.hubContract].Hub=new t.eth.Contract(this.abis.Hub,e.hubContract,{from:e.publicKey})}}async getWeb3Instance(e){if(!this[e.name].web3){const t={transactionPollingTimeout:e.transactionPollingTimeout};await this.initializeWeb3(e.name,e.rpc,t)}return this[e.name].web3}async getNetworkGasPrice(e){await this.ensureBlockchainInfo(e);const t=await this.getWeb3Instance(e);try{let r;if(e.name.startsWith("otp"))r=await t.eth.getGasPrice();else if(e.name.startsWith("base"))r=await t.eth.getGasPrice();else if(e.name.startsWith("gnosis")){const t=await i.get(e.gasPriceOracleLink);"100"===e.name.split(":")[1]?r=Number(t.data.result,10):"10200"===e.name.split(":")[1]&&(r=Math.round(1e9*t.data.average))}else r=n.utils.toWei(e.name.startsWith("otp")?w.OTP:w.GNOSIS,"Gwei");return r}catch(t){return console.warn(`Failed to fetch the gas price from the network: ${t}. Using default value: 2 Gwei.`),n.utils.toWei(e.name.startsWith("otp")?w.OTP:w.GNOSIS,"Gwei")}}async callContractFunction(e,t,r,n){await this.ensureBlockchainInfo(n);let i=await this.getContractInstance(e,n);try{return await i.methods[t](...r).call()}catch(o){if(/revert|VM Exception/i.test(o.message)){let o;try{o=await i.methods.status().call()}catch(e){o=!1}if(!o&&"ParanetNeuroIncentivesPool"!==e)return await this.updateContractInstance(e,n,!0),i=await this.getContractInstance(e,n),i.methods[t](...r).call()}throw o}}async prepareTransaction(e,t,r,n){await this.ensureBlockchainInfo(n);const i=await this.getWeb3Instance(n),o=await this.getPublicKey(n),a=await e.methods[t](...r).encodeABI();let s,u=Number(await e.methods[t](...r).estimateGas({from:o}));if(u=Math.round(u*n.gasLimitMultiplier),n.previousTxGasPrice&&n.retryTx)s=Math.round(1.2*n.previousTxGasPrice);else if(n.forceReplaceTxs){const e=await i.eth.getTransactionCount(o,"pending"),t=await i.eth.getTransactionCount(o,"latest");if(e>t){const e=await i.eth.getBlock("pending",!0),r=Object.values(e.transactions).find((e=>e.from.toLowerCase()===o.toLowerCase()&&e.nonce===t));s=r?Math.round(1.2*Number(r.gasPrice)):Math.round(1.2*(n.gasPrice||await this.getNetworkGasPrice(n)))}}else s=n.gasPrice||await this.getNetworkGasPrice(n);return s=(BigInt(s)*BigInt(Math.round(100*n.gasPriceMultiplier))/100n).toString(),n.simulateTxs&&await i.eth.call({to:e.options.address,data:a,from:o,gasPrice:s,gas:u}),{from:o,to:e.options.address,data:a,gasPrice:s,gas:u}}async waitForTransactionFinalization(e,t){await this.ensureBlockchainInfo(t);const r=await this.getWeb3Instance(t),n=Date.now();let i=0,o=e,a=!1;try{for(;!a&&Date.now()-n+i=o.blockNumber){a=!0;break}{let e=await r.eth.getTransactionReceipt(o.transactionHash);if(e&&e.blockNumber===o.blockNumber);else if(e&&e.blockNumber!==o.blockNumber)o=e;else{const n=Date.now();for(;!e&&Date.now()-n0?(await this.executeContractFunction("Token","increaseAllowance",[t,o],n),{allowanceIncreased:!0,allowanceGap:o}):{allowanceIncreased:!1,allowanceGap:o}}async createAsset(e,t,r,n,i=A){const o=await this.getPublicKey(n);let a,s=!1,u=0;try{let c;a=await this.getContractAddress("ServiceAgreementV1",n),({allowanceIncreased:s,allowanceGap:u}=await this.increaseServiceAgreementV1Allowance(o,a,e.tokenAmount,n)),i.afterHook({status:v.INCREASE_ALLOWANCE_COMPLETED}),c=null==t&&null==r?await this.executeContractFunction("ContentAsset","createAsset",[Object.values(e)],n):await this.executeContractFunction("Paranet","mintKnowledgeAsset",[t,r,Object.values(e)],n);let{tokenId:l}=await this.decodeEventLogs(c,"AssetMinted",n);return l=parseInt(l,10),i.afterHook({status:v.CREATE_ASSET_COMPLETED,data:{tokenId:l}}),{tokenId:l,receipt:c}}catch(e){throw s&&await this.executeContractFunction("Token","decreaseAllowance",[a,u],n),e}}async hasPendingUpdate(e,t){return this.callContractFunction("UnfinalizedStateStorage","hasPendingUpdate",[e],t)}async cancelAssetUpdate(e,t){return this.executeContractFunction("ContentAsset","cancelAssetStateUpdate",[e],t)}async getLatestAssertionId(e,t){return this.callContractFunction("ContentAssetStorage","getLatestAssertionId",[e],t)}async getUnfinalizedState(e,t){return this.callContractFunction("UnfinalizedStateStorage","getUnfinalizedState",[e],t)}async getAssetOwner(e,t){return this.callContractFunction("ContentAssetStorage","ownerOf",[e],t)}async burnAsset(e,t){return this.executeContractFunction("ContentAsset","burnAsset",[e],t)}async extendAssetStoringPeriod(e,t,r,n){const i=await this.getPublicKey(n);let o,a=!1,s=0;try{return o=await this.getContractAddress("ServiceAgreementV1",n),({allowanceIncreased:a,allowanceGap:s}=await this.increaseServiceAgreementV1Allowance(i,o,r,n)),this.executeContractFunction("ContentAsset","extendAssetStoringPeriod",[e,t,r],n)}catch(e){throw a&&await this.executeContractFunction("Token","decreaseAllowance",[o,s],n),e}}async addTokens(e,t,r){const n=await this.getPublicKey(r);let i,o=!1,a=0;try{return i=await this.getContractAddress("ServiceAgreementV1",r),({allowanceIncreased:o,allowanceGap:a}=await this.increaseServiceAgreementV1Allowance(n,i,t,r)),this.executeContractFunction("ContentAsset","increaseAssetTokenAmount",[e,t],r)}catch(e){throw o&&await this.executeContractFunction("Token","decreaseAllowance",[i,a],r),e}}async addUpdateTokens(e,t,r){const n=await this.getPublicKey(r);let i,o=!1,a=0;try{return i=await this.getContractAddress("ServiceAgreementV1",r),({allowanceIncreased:o,allowanceGap:a}=await this.increaseServiceAgreementV1Allowance(n,i,t,r)),this.executeContractFunction("ContentAsset","increaseAssetUpdateTokenAmount",[e,t],r)}catch(e){throw o&&await this.executeContractFunction("Token","decreaseAllowance",[i,a],r),e}}async getAssertionIdByIndex(e,t,r){return this.callContractFunction("ContentAssetStorage","getAssertionIdByIndex",[e,t],r)}async getAssertionIds(e,t){return this.callContractFunction("ContentAssetStorage","getAssertionIds",[e],t)}async getAssertionIssuer(e,t,r,n){return this.callContractFunction("ContentAssetStorage","getAssertionIssuer",[e,t,r],n)}async getAgreementData(e,t){const r=await this.callContractFunction("ServiceAgreementStorageProxy","getAgreementData",[e],t);return{startTime:Number(r[0]),epochsNumber:Number(r[1]),epochLength:Number(r[2]),tokenAmount:r[3][0],addedTokenAmount:r[3][1],scoreFunctionId:r[4][0],proofWindowOffsetPerc:r[4][1]}}async getAssertionSize(e,t){return this.callContractFunction("AssertionStorage","getAssertionSize",[e],t)}async registerParanet(e,t){return this.executeContractFunction("Paranet","registerParanet",Object.values(e),t)}async addParanetCuratedNodes(e,t){return this.executeContractFunction("Paranet","addParanetCuratedNodes",Object.values(e),t)}async removeParanetCuratedNodes(e,t){return this.executeContractFunction("Paranet","removeParanetCuratedNodes",Object.values(e),t)}async requestParanetCuratedNodeAccess(e,t){return this.executeContractFunction("Paranet","requestParanetCuratedNodeAccess",Object.values(e),t)}async approveCuratedNode(e,t){return this.executeContractFunction("Paranet","approveCuratedNode",Object.values(e),t)}async rejectCuratedNode(e,t){return this.executeContractFunction("Paranet","rejectCuratedNode",Object.values(e),t)}async getCuratedNodes(e,t){return this.callContractFunction("ParanetsRegistry","getCuratedNodes",Object.values(e),t)}async getKnowledgeMiners(e,t){return this.callContractFunction("ParanetsRegistry","getKnowledgeMiners",Object.values(e),t)}async addParanetCuratedMiners(e,t){return this.executeContractFunction("Paranet","addParanetCuratedMiners",Object.values(e),t)}async removeParanetCuratedMiners(e,t){return this.executeContractFunction("Paranet","removeParanetCuratedMiners",Object.values(e),t)}async requestParanetCuratedMinerAccess(e,t){return this.executeContractFunction("Paranet","requestParanetCuratedMinerAccess",Object.values(e),t)}async approveCuratedMiner(e,t){return this.executeContractFunction("Paranet","approveCuratedMiner",Object.values(e),t)}async rejectCuratedMiner(e,t){return this.executeContractFunction("Paranet","rejectCuratedMiner",Object.values(e),t)}async deployNeuroIncentivesPool(e,t){return this.executeContractFunction("ParanetIncentivesPoolFactory","deployNeuroIncentivesPool",Object.values(e),t)}async registerParanetService(e,t){return this.executeContractFunction("Paranet","registerParanetService",Object.values(e),t)}async addParanetServices(e,t){return this.executeContractFunction("Paranet","addParanetServices",Object.values(e),t)}async submitToParanet(e,t){return this.executeContractFunction("Paranet","submitKnowledgeAsset",Object.values(e),t)}async getUpdatingKnowledgeAssetStates(e,t){return this.callContractFunction("ParanetKnowledgeMinersRegistry","getUpdatingKnowledgeAssetStates",Object.values(e),t)}async updateClaimableRewards(e,t){return this.executeContractFunction("Paranet","processUpdatedKnowledgeAssetStatesMetadata",Object.values(e),t)}async getIncentivesPoolAddress(e,t){return this.callContractFunction("ParanetsRegistry","getIncentivesPoolAddress",Object.values(e),t)}async getNeuroIncentivesPoolAddress(e,t){return this.getIncentivesPoolAddress({paranetId:e,incentivesPoolType:"Neuroweb"},t)}async setIncentivesPool(e,t){if(await this.ensureBlockchainInfo(t),this[t.name].contractAddresses[t.hubContract].ParanetNeuroIncentivesPool!==e){this[t.name].contractAddresses[t.hubContract].ParanetNeuroIncentivesPool=e;const r=await this.getWeb3Instance(t);this[t.name].contracts[t.hubContract].ParanetNeuroIncentivesPool=await new r.eth.Contract(this.abis.ParanetNeuroIncentivesPool,this[t.name].contractAddresses[t.hubContract].ParanetNeuroIncentivesPool,{from:t.publicKey})}}async claimKnowledgeMinerReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.executeContractFunction("ParanetNeuroIncentivesPool","claimKnowledgeMinerReward",[],t)}async claimVoterReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.executeContractFunction("ParanetNeuroIncentivesPool","claimIncentivizationProposalVoterReward",[],t)}async claimOperatorReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.executeContractFunction("ParanetNeuroIncentivesPool","claimParanetOperatorReward",[],t)}async getClaimableKnowledgeMinerReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.callContractFunction("ParanetNeuroIncentivesPool","getClaimableKnowledgeMinerRewardAmount",[],t)}async getClaimableAllKnowledgeMinersReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.callContractFunction("ParanetNeuroIncentivesPool","getClaimableAllKnowledgeMinersRewardAmount",[],t)}async getClaimableVoterReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.callContractFunction("ParanetNeuroIncentivesPool","getClaimableProposalVoterRewardAmount",[],t)}async getClaimableAllVotersReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.callContractFunction("ParanetNeuroIncentivesPool","getClaimableAllProposalVotersRewardAmount",[],t)}async getClaimableOperatorReward(e,t){const r=await this.getNeuroIncentivesPoolAddress(e,t);return await this.setIncentivesPool(r,t),this.callContractFunction("ParanetNeuroIncentivesPool","getClaimableParanetOperatorRewardAmount",[],t)}async isParanetKnowledgeMiner(e,t,r){const n=await this.getNeuroIncentivesPoolAddress(t,r);return await this.setIncentivesPool(n,r),this.callContractFunction("ParanetNeuroIncentivesPool","isKnowledgeMiner",[e],r)}async isParanetOperator(e,t,r){const n=await this.getNeuroIncentivesPoolAddress(t,r);return await this.setIncentivesPool(n,r),this.callContractFunction("ParanetNeuroIncentivesPool","isParanetOperator",[e],r)}async isParanetProposalVoter(e,t,r){const n=await this.getNeuroIncentivesPoolAddress(t,r);return await this.setIncentivesPool(n,r),this.callContractFunction("ParanetNeuroIncentivesPool","isProposalVoter",[e],r)}async getIdentityId(e,t){return this.callContractFunction("IdentityStorage","getIdentityId",[e],t)}async getChainId(e){await this.ensureBlockchainInfo(e);return(await this.getWeb3Instance(e)).eth.getChainId()}async getBlockchainTimestamp(e){if(!e.name.startsWith("hardhat"))return Math.floor(Date.now()/1e3);return(await this.getLatestBlock(e)).timestamp}async getGasPrice(e){await this.ensureBlockchainInfo(e);const t=await this.getWeb3Instance(e);try{let r;if(e.name.startsWith("otp")||e.name.startsWith("base"))r=await t.eth.getGasPrice();else if(e.name.startsWith("gnosis")){const t=await i.get(e.gasPriceOracleLink);"100"===e.name.split(":")[1]?r=Number(t.result,10):"10200"===e.name.split(":")[1]&&(r=Math.round(1e9*t.data.average))}else r=n.utils.toWei(e.name.startsWith("otp")?w.OTP:w.GNOSIS,"Gwei");return r}catch(t){return console.warn(`Failed to fetch the gas price from the network: ${t}. Using default value: 2 Gwei.`),n.utils.toWei(e.name.startsWith("otp")?w.OTP:w.GNOSIS,"Gwei")}}async getWalletBalances(e){await this.ensureBlockchainInfo(e);const t=await this.getWeb3Instance(e),r=await this.getPublicKey(e);return{blockchainToken:await t.eth.getBalance(r),trac:await this.callContractFunction("Token","balanceOf",[await this.getPublicKey(e)],e)}}async getLatestBlock(e){await this.ensureBlockchainInfo(e);const t=await this.getWeb3Instance(e),r=await t.eth.getBlockNumber();return t.eth.getBlock(r)}convertToWei(e){return n.utils.toWei(e.toString(),"ether")}}},7480:(e,t,r)=>{const n=r(6450),i=r(2913),{WEBSOCKET_PROVIDER_OPTIONS:o}=r(9660);e.exports=class extends i{constructor(e={}){super(e),this.config=e}async initializeWeb3(e,t){if(void 0!==window.web3&&window.web3||console.error("No web3 implementation injected, please inject your own Web3 implementation."),window.ethereum){this[e].web3=new n(window.ethereum);try{await window.ethereum.enable()}catch(e){console.error(e)}}else if(t.startsWith("ws")){const r=(new n).providers.WebsocketProvider(t,o);this[e].web3=new n(r)}else this[e].web3=new n(t)}async decodeEventLogs(e,t,r){await this.ensureBlockchainInfo(r);const n=await this.getWeb3Instance(r);let i;const{hash:o,inputs:a}=this.events[t],s=Object.values(e.events);for(const e of s)if(e.raw.topics&&e.raw.topics.length>0&&e.raw.topics[0]===o){i=n.eth.abi.decodeLog(a,e.raw.data,e.raw.topics.slice(1));break}return i}async executeContractFunction(e,t,r,n){await this.ensureBlockchainInfo(n);let i,o=await this.getContractInstance(e,n);try{i=await this.prepareTransaction(o,t,r,n);let e=await o.methods[t](...r).send(i);return n.name.startsWith("otp")&&n.waitNeurowebTxFinalization&&(e=await this.waitForTransactionFinalization(e,n)),e}catch(a){if(/revert|VM Exception/i.test(a.message)){let a;try{a=await o.methods.status().call()}catch(e){a=!1}if(!a){await this.updateContractInstance(e,n,!0),o=await this.getContractInstance(e,n);const a=await this.getWeb3Instance(n);return await a.eth.call({to:o.options.address,data:i.data,from:i.from}),o.methods[t](...r).send(i)}}throw a}}async getPublicKey(){return this.getAccount()}async getAccount(){if(!this.account){if(!window.ethereum)throw Error("This operation can be performed only by using Metamask accounts.");const e=await window.ethereum.request({method:"eth_requestAccounts"}).catch((()=>console.error("There was an error fetching your accounts")));[this.account]=e}return this.account}async transferAsset(e,t,r){return this.executeContractFunction("ContentAssetStorage","transferFrom",[await this.getAccount(),t,e],r)}}},6268:(e,t,r)=>{const n=r(6450),{TRANSACTION_RETRY_ERRORS:i,WEBSOCKET_PROVIDER_OPTIONS:o}=r(9660),a=r(2913);e.exports=class extends a{constructor(e={}){super(e),this.config=e,this.events={},this.abis.ContentAsset.filter((e=>"event"===e.type)).forEach((e=>{const t=e.inputs.map((e=>e.internalType));this.events[e.name]={hash:n.utils.keccak256(`${e.name}(${t})`),inputs:e.inputs}}))}initializeWeb3(e,t,r){if(t.startsWith("ws")){const r=new n.providers.WebsocketProvider(t,o);this[e].web3=new n(r)}else this[e].web3=new n(t);r.transactionPollingTimeout&&(this[e].web3.eth.transactionPollingTimeout=r.transactionPollingTimeout)}async decodeEventLogs(e,t,r){await this.ensureBlockchainInfo(r);const n=await this.getWeb3Instance(r);let i;const{hash:o,inputs:a}=this.events[t];for(const t of e.logs)if(t.topics&&t.topics.length>0&&t.topics[0]===o){i=n.eth.abi.decodeLog(a,t.data,t.topics.slice(1));break}return i}async getPublicKey(e){return e?.publicKey}async executeContractFunction(e,t,r,n){await this.ensureBlockchainInfo(n);const o=await this.getWeb3Instance(n);let a,s,u=await this.getContractInstance(e,n),c=!1,l=!1;for(;void 0===a;)try{const e=await this.prepareTransaction(u,t,r,n);s=e.gasPrice,c=!0;const i=await o.eth.accounts.signTransaction(e,n.privateKey);a=await o.eth.sendSignedTransaction(i.rawTransaction),n.name.startsWith("otp")&&n.waitNeurowebTxFinalization&&(a=await this.waitForTransactionFinalization(a,n))}catch(t){if(c&&!l&&n.handleNotMinedError&&i.some((e=>t.message.toLowerCase().includes(e))))l=!0,n.retryTx=!0,n.previousTxGasPrice=s;else{if(l||!/revert|VM Exception/i.test(t.message))throw t;{let r;try{r=await u.methods.status().call()}catch(e){r=!1}if(r||"ParanetNeuroIncentivesPool"===e)throw t;await this.updateContractInstance(e,n,!0),u=await this.getContractInstance(e,n),l=!0,n.retryTx=!0}}}return a}async transferAsset(e,t,r){return this.executeContractFunction("ContentAssetStorage","transferFrom",[r.publicKey,t,e],r)}}},5099:(e,t,r)=>{const{DEFAULT_NEUROWEB_FINALITY_PARAMETERS:n,DEFAULT_PARAMETERS:i,DEFAULT_PROXIMITY_SCORE_FUNCTIONS_PAIR_IDS:o,BLOCKCHAINS:a,LOW_BID_SUGGESTION:s,PARANET_NODES_ACCESS_POLICY:u,PARANET_MINERS_ACCESS_POLICY:c}=r(9660);e.exports=class{constructor(e={}){this.config=e}getBidSuggestionArguments(e){return{blockchain:this.getBlockchain(e),endpoint:this.getEndpoint(e),port:this.getPort(e),epochsNum:this.getEpochsNum(e),hashFunctionId:this.getHashFunctionId(e),authToken:this.getAuthToken(e),bidSuggestionRange:this.getBidSuggestionRange(e)}}getAssetCreateArguments(e){return{blockchain:this.getBlockchain(e),endpoint:this.getEndpoint(e),port:this.getPort(e),maxNumberOfRetries:this.getMaxNumberOfRetries(e),frequency:this.getFrequency(e),epochsNum:this.getEpochsNum(e),hashFunctionId:this.getHashFunctionId(e),scoreFunctionId:this.getScoreFunctionId(e),immutable:this.getImmutable(e),tokenAmount:this.getTokenAmount(e),authToken:this.getAuthToken(e),paranetUAL:this.getParanetUAL(e)}}getAssetGetArguments(e){return{blockchain:this.getBlockchain(e),endpoint:this.getEndpoint(e),port:this.getPort(e),maxNumberOfRetries:this.getMaxNumberOfRetries(e),frequency:this.getFrequency(e),state:this.getState(e),contentType:this.getContentType(e),validate:this.getValidate(e),outputFormat:this.getOutputFormat(e),authToken:this.getAuthToken(e),hashFunctionId:this.getHashFunctionId(e),paranetUAL:this.getParanetUAL(e)}}getQueryArguments(e){return{graphLocation:this.getGraphLocation(e),graphState:this.getGraphState(e),endpoint:this.getEndpoint(e),port:this.getPort(e),maxNumberOfRetries:this.getMaxNumberOfRetries(e),frequency:this.getFrequency(e),authToken:this.getAuthToken(e),paranetUAL:this.getParanetUAL(e)}}getParanetCreateArguments(e){return{blockchain:this.getBlockchain(e),paranetName:this.getParanetName(e),paranetDescription:this.getParanetDescription(e),paranetNodesAccessPolicy:this.getParanetNodesAccessPolicy(e),paranetMinersAccessPolicy:this.getParanetMinersAccessPolicy(e)}}getParanetDeployIncentivesContractArguments(e){return{blockchain:this.getBlockchain(e),incentiveType:this.getIncentiveType(e),tracToNeuroEmissionMultiplier:this.getTracToNeuroEmissionMultiplier(e),operatorRewardPercentage:this.getOperatorRewardPercentage(e),incentivizationProposalVotersRewardPercentage:this.getIncentivizationProposalVotersRewardPercentage(e)}}getParanetCreateServiceArguments(e){return{blockchain:this.getBlockchain(e),paranetServiceName:this.getParanetServiceName(e),paranetServiceDescription:this.getParanetServiceDescription(e),paranetServiceAddresses:this.getParanetServiceAddresses(e)}}getParanetRoleCheckArguments(e){return{blockchain:this.getBlockchain(e),roleAddress:this.getRoleAddress(e)}}getBlockchain(e){const t=e.environment??this.config.environment??i.ENVIRONMENT,r=e.blockchain?.name??this.config.blockchain?.name??null,o=e.blockchain?.rpc??this.config.blockchain?.rpc??a[t][r]?.rpc,s=e.blockchain?.hubContract??this.config.blockchain?.hubContract??a[t][r]?.hubContract,u=e.blockchain?.publicKey??this.config.blockchain?.publicKey??null,c=e.blockchain?.privateKey??this.config.blockchain?.privateKey??null,l=e.blockchain?.handleNotMinedError??this.config.blockchain?.handleNotMinedError??i.HANDLE_NOT_MINED_ERROR,f=e.blockchain?.gasLimitMultiplier??this.config.blockchain?.gasLimitMultiplier??i.GAS_LIMIT_MULTIPLIER,d=e.blockchain?.gasPriceMultiplier??this.config.blockchain?.gasPriceMultiplier??i.GAS_PRICE_MULTIPLIER,h={name:r,rpc:o,hubContract:s,publicKey:u,privateKey:c,gasLimitMultiplier:f,gasPrice:e.blockchain?.gasPrice??this.config.blockchain?.gasPrice??void 0,transactionPollingTimeout:e.blockchain?.transactionPollingTimeout??this.config.blockchain?.transactionPollingTimeout??null,handleNotMinedError:l,simulateTxs:e.blockchain?.simulateTxs??this.config.blockchain?.simulateTxs??i.SIMULATE_TXS,forceReplaceTxs:e.blockchain?.forceReplaceTxs??this.config.blockchain?.forceReplaceTxs??i.FORCE_REPLACE_TXS,gasPriceOracleLink:e.blockchain?.gasPriceOracleLink??this.config.blockchain?.gasPriceOracleLink??a[t][r]?.gasPriceOracleLink??void 0,gasPriceMultiplier:d};return r&&r.startsWith("otp")&&(h.waitNeurowebTxFinalization=e.blockchain?.waitNeurowebTxFinalization??this.config.blockchain?.waitNeurowebTxFinalization??n.WAIT_NEUROWEB_TX_FINALIZATION,h.transactionFinalityPollingInterval=e.blockchain?.transactionFinalityPollingInterval??this.config.blockchain?.transactionFinalityPollingInterval??n.TX_FINALITY_POLLING_INTERVAL,h.transactionFinalityMaxWaitTime=e.blockchain?.transactionFinalityMaxWaitTime??this.config.blockchain?.transactionFinalityMaxWaitTime??n.TX_FINALITY_MAX_WAIT_TIME,h.transactionReminingPollingInterval=e.blockchain?.transactionReminingPollingInterval??this.config.blockchain?.transactionReminingPollingInterval??n.TX_REMINING_POLLING_INTERVAL,h.transactionReminingMaxWaitTime=e.blockchain?.transactionReminingMaxWaitTime??this.config.blockchain?.transactionReminingMaxWaitTime??n.TX_REMINING_MAX_WAIT_TIME),h}getGraphLocation(e){return e.graphLocation??e.paranetUAL??this.config.graphLocation??i.GRAPH_LOCATION}getGraphState(e){return e.graphState??this.config.graphState??i.GRAPH_STATE}getEndpoint(e){return e.endpoint??this.config.endpoint??null}getPort(e){return e.port??this.config.port??i.PORT}getFrequency(e){return e.frequency??this.config.frequency??i.FREQUENCY}getHashFunctionId(e){return e.hashFunctionId??this.config.hashFunctionId??i.HASH_FUNCTION_ID}getScoreFunctionId(e){const t=e.environment??this.config.environment??i.ENVIRONMENT,r=this.getBlockchain(e).name;return o[t][r]}getEpochsNum(e){return e.epochsNum??this.config.epochsNum??null}getImmutable(e){return e.immutable??this.config.immutable??i.IMMUTABLE}getTokenAmount(e){return e.tokenAmount??this.config.tokenAmount??null}getState(e){return e.state??this.config.state??i.STATE}getContentType(e){return e.contentType??this.config.contentType??i.CONTENT_TYPE}getValidate(e){return e.validate??this.config.validate??i.VALIDATE}getOutputFormat(e){return e.outputFormat??this.config.outputFormat??i.OUTPUT_FORMAT}getMaxNumberOfRetries(e){return e.maxNumberOfRetries??this.config.maxNumberOfRetries??i.MAX_NUMBER_OF_RETRIES}getAuthToken(e){return e.auth?.token??this.config?.auth?.token??null}getBidSuggestionRange(e){return e.bidSuggestionRange??s}getParanetUAL(e){return e.paranetUAL??this.config.paranetUAL??null}getParanetName(e){return e.paranetName??null}getParanetDescription(e){return e.paranetDescription??null}getParanetNodesPolicy(e){return e.nodesAccessPolicy??u.OPEN}getParanetMinersPolicy(e){return e.minersAccessPolicy??c.OPEN}getParanetNodesAccessPolicy(e){return e.paranetNodesAccessPolicy??u.OPEN}getParanetMinersAccessPolicy(e){return e.paranetMinersAccessPolicy??c.OPEN}getTracToNeuroEmissionMultiplier(e){return e.tracToNeuroEmissionMultiplier??null}getIncentivizationProposalVotersRewardPercentage(e){return 100*e.incentivizationProposalVotersRewardPercentage??null}getOperatorRewardPercentage(e){return 100*e.operatorRewardPercentage??null}getIncentiveType(e){return e.incentiveType??null}getParanetServiceName(e){return e.paranetServiceName??null}getParanetServiceDescription(e){return e.paranetServiceDescription??null}getParanetServiceAddresses(e){return e.paranetServiceAddresses??[]}getRoleAddress(e){return e.roleAddress??null}}},560:(e,t,r)=>{const n=r(2505),{OPERATION_STATUSES:i}=r(9660),{sleepForMilliseconds:o}=r(6458);e.exports=class{constructor(e={}){this.config=e}async info(e,t,r){try{return await n({method:"get",url:`${e}:${t}/info`,headers:this.prepareRequestConfig(r)})}catch(e){throw Error(`Unable to get node info: ${e.message}`)}}async getBidSuggestion(e,t,r,i,o,a,s,u,c,l){try{const f={blockchain:i,epochsNumber:o,assertionSize:a,contentAssetStorageAddress:s,firstAssertionId:u,hashFunctionId:c};null!=l&&(f.bidSuggestionRange=l);return(await n({method:"get",url:`${e}:${t}/bid-suggestion`,params:f,headers:this.prepareRequestConfig(r)})).data.bidSuggestion}catch(e){throw Error(`Unable to get bid suggestion: ${e.message}`)}}async localStore(e,t,r,i){try{return(await n({method:"post",url:`${e}:${t}/local-store`,data:i,headers:this.prepareRequestConfig(r)})).data.operationId}catch(e){throw Error(`Unable to store locally: ${e.message}`)}}async publish(e,t,r,i,o,a,s,u,c){try{return(await n({method:"post",url:`${e}:${t}/publish`,data:{assertionId:i,assertion:o,blockchain:a,contract:s,tokenId:u,hashFunctionId:c},headers:this.prepareRequestConfig(r)})).data.operationId}catch(e){throw Error(`Unable to publish: ${e.message}`)}}async publishParanet(e,t,r,i,o,a,s,u,c,l,f){try{return(await n({method:"post",url:`${e}:${t}/publish-paranet`,data:{assertions:i,blockchain:o,contract:a,tokenId:s,hashFunctionId:u,paranetUAL:c,sender:l,txHash:f},headers:this.prepareRequestConfig(r)})).data.operationId}catch(e){throw Error(`Unable to publish: ${e.message}`)}}async get(e,t,r,i,o,a,s){try{return(await n({method:"post",url:`${e}:${t}/get`,data:{id:i,state:o,hashFunctionId:a,paranetUAL:s},headers:this.prepareRequestConfig(r)})).data.operationId}catch(e){throw Error(`Unable to get assertion: ${e.message}`)}}async query(e,t,r,i,o,a){try{return(await n({method:"post",url:`${e}:${t}/query`,data:{query:i,type:o,repository:a},headers:this.prepareRequestConfig(r)})).data.operationId}catch(e){throw Error(`Unable to query: ${e.message}`)}}async getOperationResult(e,t,r,a,s,u,c){await o(500);let l={status:i.PENDING},f=0;const d={method:"get",url:`${e}:${t}/${a}/${c}`,headers:this.prepareRequestConfig(r)};do{if(f>s){l.data={...l.data,data:{errorType:"DKG_CLIENT_ERROR",errorMessage:"Unable to get results. Max number of retries reached."}};break}f+=1,await o(1e3*u),l=await n(d)}while(l.data.status!==i.COMPLETED&&l.data.status!==i.FAILED);return l.data}prepareRequestConfig(e){return e?{Authorization:`Bearer ${e}`}:{}}}},2569:e=>{e.exports=class{publish(){}getOperationResult(){}}},8341:(e,t,r)=>{const n=r(2569),i=r(560);e.exports={Sockets:n,Https:i,Http:i,Default:i}},6458:(e,t,r)=>{const n=r(4841),{GRAPH_LOCATIONS:i,GRAPH_STATES:o,OT_NODE_TRIPLE_STORE_REPOSITORIES:a}=r(9660);e.exports={nodeSupported:()=>"undefined"==typeof window,isEmptyObject:function(e){return 0===Object.keys(e).length&&e.constructor===Object},toNumber:e=>parseInt(e.slice(2),16),deriveUAL:(e,t,r)=>`did:dkg:${e.toLowerCase()}/${t.toLowerCase()}/${r}`,resolveUAL(e){const t=e.split(":"),r=(3===t.length?t[2]:`${t[2]}:${t[3]}`).split("/");if(3!==r.length)throw new Error(`UAL doesn't have correct format: ${e}`);return{blockchain:r[0],contract:r[1],tokenId:parseInt(r[2],10)}},deriveRepository(e,t){switch(e+t){case i.PUBLIC_KG+o.CURRENT:return a.PUBLIC_CURRENT;case i.PUBLIC_KG+o.HISTORICAL:return a.PUBLIC_HISTORY;case i.LOCAL_KG+o.CURRENT:return a.PRIVATE_CURRENT;case i.LOCAL_KG+o.HISTORICAL:return a.PRIVATE_HISTORY;default:return e}},async sleepForMilliseconds(e){await new Promise((t=>setTimeout(t,e)))},capitalizeFirstLetter:e=>e[0].toUpperCase()+e.slice(1),getOperationStatusObject:(e,t)=>({operationId:t,...e.data?.errorType?{status:e.status,...e.data}:{status:e.status}}),async toNQuads(e,t){const r={algorithm:"URDNA2015",format:"application/n-quads"};t&&(r.inputFormat=t);return(await n.canonize(e,r)).split("\n").filter((e=>""!==e))},toJSONLD:async e=>n.fromRDF(e,{algorithm:"URDNA2015",format:"application/n-quads"})}},4941:(e,t,r)=>{const{isAddress:n}=r(4193),{ASSET_STATES:i,CONTENT_TYPES:o,GRAPH_LOCATIONS:a,GRAPH_STATES:s,MAX_FILE_SIZE:u,OPERATIONS:c,GET_OUTPUT_FORMATS:l,QUERY_TYPES:f,BID_SUGGESTION_RANGE_ENUM:d,PARANET_NODES_ACCESS_POLICY:h,PARANET_MINERS_ACCESS_POLICY:p}=r(9660),{nodeSupported:y}=r(6458);e.exports=class{validateNodeInfo(e,t,r){this.validateEndpoint(e),this.validatePort(t),this.validateAuthToken(r)}validateGraphQuery(e,t,r,n,i,o,a,s,u){this.validateQueryString(e),this.validateQueryType(t),this.validateGraphLocation(r),this.validateGraphState(n),this.validateEndpoint(i),this.validatePort(o),this.validateMaxNumberOfRetries(a),this.validateFrequency(s),this.validateAuthToken(u)}validateIsValidUAL(e){this.validateBlockchain(e)}validateSetAllowance(e){this.validateBlockchain(e)}validateIncreaseAllowance(e){this.validateBlockchain(e)}validateDecreaseAllowance(e){this.validateBlockchain(e)}validateAssetCreate(e,t,r,n,i,o,a,s,u,l,f,d,h){this.validateContent(e),this.validateBlockchain(t,c.PUBLISH),this.validateEndpoint(r),this.validatePort(n),this.validateMaxNumberOfRetries(i),this.validateFrequency(o),this.validateEpochsNum(a),this.validateHashFunctionId(s),this.validateScoreFunctionId(u),this.validateImmutable(l),this.validateTokenAmount(f),this.validateAuthToken(d),this.validateParanetUAL(h)}validateAssetGet(e,t,r,n,i,o,a,s,u,l,f,d){this.validateUAL(e),this.validateBlockchain(t,c.GET),this.validateEndpoint(r),this.validatePort(n),this.validateMaxNumberOfRetries(i),this.validateFrequency(o),this.validateState(a),this.validateContentType(s),this.validateHashFunctionId(u),this.validateValidate(l),this.validateOutputFormat(f),this.validateAuthToken(d)}validateAssetTransfer(e,t,r){this.validateUAL(e),this.validateNewOwner(t),this.validateBlockchain(r)}validateAssetGetOwner(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateAssetGetStateIssuer(e,t,r){this.validateUAL(e),this.validateStateIndex(t),this.validateBlockchain(r)}validateAssetGetStates(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateAssetGetLatestStateIssuer(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateAssetBurn(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateExtendAssetStoringPeriod(e,t,r,n){this.validateUAL(e),this.validateEpochsNum(t),this.validateTokenAmount(r),this.validateBlockchain(n)}validateAddTokens(e,t,r){this.validateUAL(e),this.validateTokenAmount(t),this.validateBlockchain(r)}validateGetIdentityId(e,t){this.validateAddress(e),this.validateBlockchain(t)}validateParanetCreate(e,t,r,n,i,o){this.validateUAL(e),this.validateBlockchain(t),this.validateParanetName(r),this.validateParanetDescription(n),this.validateParanetNodesAccessPolicy(i),this.validateParanetMinersAccessPolicy(o)}validateParanetAddCuratedNodes(e,t,r){this.validateUAL(e),this.validateBlockchain(t);for(const e of r)this.validateIdentityId(e)}validateParanetRemoveCuratedNodes(e,t,r){this.validateUAL(e),this.validateBlockchain(t);for(const e of r)this.validateIdentityId(e)}validateRequestParanetCuratedNodeAccess(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateApproveCuratedNode(e,t,r){this.validateUAL(e),this.validateBlockchain(t),this.validateIdentityId(r)}validateRejectCuratedNode(e,t,r){this.validateUAL(e),this.validateBlockchain(t),this.validateIdentityId(r)}validateGetCuratedNodes(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateGetParanetKnowledgeMiners(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateParanetAddCuratedMiners(e,t,r){this.validateUAL(e),this.validateBlockchain(t);for(const e of r)this.validateAddress(e)}validateParanetRemoveCuratedMiners(e,t,r){this.validateUAL(e),this.validateBlockchain(t);for(const e of r)this.validateAddress(e)}validateRequestParanetCuratedMinerAccess(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateApproveCuratedMiner(e,t,r){this.validateUAL(e),this.validateBlockchain(t),this.validateAddress(r)}validateRejectCuratedMiner(e,t,r){this.validateUAL(e),this.validateBlockchain(t),this.validateAddress(r)}validateDeployIncentivesContract(e,t,r,n,i){this.validateUAL(e),this.validateBlockchain(t),this.validateTracToNeuroEmissionMultiplier(r),this.validateOperatorRewardPercentage(n),this.validateIncentivizationProposalVotersRewardPercentage(i)}validateParanetRewardArguments(e,t){this.validateUAL(e),this.validateBlockchain(t)}validateParanetRoleCheckArguments(e,t,r){this.validateAddress(e),this.validateUAL(t),this.validateBlockchain(r)}validateParanetCreateServiceArguments(e,t,r,n,i){this.validateUAL(e),this.validateBlockchain(i),this.validateParanetServiceName(t),this.validateParanetServiceDescription(r),this.validateParanetServiceAddresses(n)}validateParanetAddServicesArguments(e,t,r){this.validateUAL(e),this.validateBlockchain(r);for(const e of t)this.validateUAL(e)}validateSubmitToParanet(e,t,r){this.validateUAL(e),this.validateUAL(t),this.validateBlockchain(r)}validateRequiredParam(e,t){if(null==t)throw Error(`${e} is missing.`)}validateParamType(e,t,r){const n=Array.isArray(r);let i=t;if(n&&r.includes("number")){const e=parseInt(t,10);i=Number.isNaN(e)?t:e}else"number"===r&&(i=parseInt(t,10));const o=n?r:[r];if(!o.some((e=>typeof i===e)))throw new Error(`${e} must be of type ${o.join(" or ")}.`)}validateQueryString(e){this.validateRequiredParam("queryString",e),this.validateParamType("queryString",e,"string")}validateQueryType(e){this.validateRequiredParam("queryType",e);const t=Object.values(f);if(!t.includes(e))throw Error(`Invalid query Type: available query types: ${t}`)}validateGraphLocation(e){this.validateRequiredParam("graphLocation",e);const t=Object.keys(a);if(!t.includes(e)&&!this.validateUAL(e))throw Error(`Invalid graph location: available locations are valid Paranet UAL or: ${t}`)}validateGraphState(e){this.validateRequiredParam("graphState",e);const t=Object.keys(s);if(!t.includes(e))throw Error(`Invalid graph state: available states: ${t}`)}validateUAL(e){this.validateRequiredParam("UAL",e),this.validateParamType("UAL",e,"string");const t=e.split(":"),r=(3===t.length?t[2]:`${t[2]}:${t[3]}`).split("/");if(3!==r?.length)throw Error("Invalid UAL.");return!0}validateStateIndex(e){if(this.validateRequiredParam("stateIndex",e),this.validateParamType("stateIndex",e,"number"),e<0)throw Error("Invalid state index.")}validateObjectType(e){if(!e||"object"!=typeof e)throw Error("Content must be an object")}validateContent(e){this.validateRequiredParam("content",e);const t=Object.keys(e);if(!(1===t.length&&(t.includes("public")||t.includes("private"))||2===t.length&&(t.includes("public")||t.includes("private"))))throw Error('content keys can only be "public", "private" or both.');if(!e.public&&!e.private)throw Error("Public or private content must be defined")}validateAssertionSizeInBytes(e){if(e>u)throw Error(`File size limit is ${u/1048576}MB.`)}validateEndpoint(e){if(this.validateRequiredParam("endpoint",e),this.validateParamType("endpoint",e,"string"),!e.startsWith("http")&&!e.startsWith("ws"))throw Error('Endpoint should start with either "http" or "ws"')}validatePort(e){this.validateRequiredParam("port",e),this.validateParamType("port",e,"number")}validateMaxNumberOfRetries(e){this.validateRequiredParam("maxNumberOfRetries",e),this.validateParamType("maxNumberOfRetries",e,"number")}validateFrequency(e){this.validateRequiredParam("frequency",e),this.validateParamType("frequency",e,"number")}validateState(e){this.validateRequiredParam("state",e),this.validateParamType("state",e,["number","string"]);const t=Object.values(i);if("string"==typeof e&&!t.includes(e.toUpperCase())&&"number"!=typeof e&&!/^0x[a-fA-F0-9]{64}$/.test(e))throw Error(`Invalid state, available states: ${t},numerical or hash.`)}validateContentType(e){this.validateRequiredParam("contentType",e);const t=Object.values(o);if(!t.includes(e))throw Error(`Invalid content visibility! Available parameters: ${t}`)}validateEpochsNum(e){this.validateRequiredParam("epochsNum",e),this.validateParamType("epochsNum",e,"number")}validateHashFunctionId(e){this.validateRequiredParam("hashFunctionId",e),this.validateParamType("hashFunctionId",e,"number")}validateScoreFunctionId(e){this.validateRequiredParam("scoreFunctionId",e),this.validateParamType("scoreFunctionId",e,"number")}validateImmutable(e){this.validateRequiredParam("immutable",e),this.validateParamType("immutable",e,"boolean")}validateTokenAmount(e){null!=e&&this.validateParamType("tokenAmount",e,"number")}validateGasPrice(e){null!=e&&this.validateParamType("gasPrice",e,"number")}validateTransactionPollingTimeout(e){null!=e&&this.validateParamType("tokenAmount",e,"number")}validateAuthToken(e){null!=e&&this.validateParamType("authToken",e,"string")}validateParanetUAL(e){null!=e&&this.validateUAL(e)}validateValidate(e){this.validateRequiredParam("validate",e),this.validateParamType("validate",e,"boolean")}validateOutputFormat(e){this.validateRequiredParam("outputFormat",e);const t=Object.values(l);if(!t.includes(e))throw Error(`Invalid query Type: available query types: ${t}`)}validateBlockchain(e,t){this.validateRequiredParam("blockchain",e),this.validateRequiredParam("blockchain name",e.name),this.validateRequiredParam("blockchain hub contract",e.hubContract),this.validateGasPrice(e.gasPrice),this.validateTransactionPollingTimeout(e.transactionPollingTimeout),y()&&(this.validateRequiredParam("blockchain rpc",e.rpc),t!==c.GET&&(this.validateRequiredParam("blockchain public key",e.publicKey),this.validateRequiredParam("blockchain private key",e.privateKey)))}validateNewOwner(e){this.validateRequiredParam("newOwner",e),this.validateParamType("newOwner",e,"string")}validateGetBidSuggestion(e){this.validateBidSuggestionRange(e)}validateBidSuggestionRange(e){if(!d.includes(e))throw Error(`Invalid bidSuggestionRange parametar: supported parametars ${d}`)}validateParanetName(e){this.validateRequiredParam("paranetName",e),this.validateParamType("paranetName",e,"string")}validateParanetDescription(e){this.validateRequiredParam("paranetDescription",e),this.validateParamType("paranetDescription",e,"string")}validateParanetNodesAccessPolicy(e){if(this.validateRequiredParam("paranetNodesAccessPolicy",e),this.validateParamType("paranetNodesAccessPolicy",e,"number"),!Object.values(h).includes(e))throw Error(`Invalid nodes access policy: ${e}. Should be 0 for OPEN or 1 for CURATED`)}validateParanetMinersAccessPolicy(e){if(this.validateRequiredParam("paranetMinersAccessPolicy",e),this.validateParamType("paranetMinersAccessPolicy",e,"number"),!Object.values(p).includes(e))throw Error(`Invalid miners access policy: ${e}. Should be 0 for OPEN or 1 for CURATED`)}validateTracToNeuroEmissionMultiplier(e){this.validateRequiredParam("tracToNeuroEmissionMultiplier",e),this.validateParamType("tracToNeuroEmissionMultiplier",e,"number")}validateIncentivizationProposalVotersRewardPercentage(e){if(this.validateRequiredParam("incentivizationProposalVotersRewardPercentage",e),this.validateParamType("incentivizationProposalVotersRewardPercentage",e,"number"),e>1e4||e<0)throw Error("Invalid percentage value for incentivization proposal voters reward.")}validateOperatorRewardPercentage(e){if(this.validateRequiredParam("operatorRewardPercentage",e),this.validateParamType("operatorRewardPercentage",e,"number"),e>1e4||e<0)throw Error("Invalid percentage value for operator reward.")}validateParanetServiceName(e){this.validateRequiredParam("paranetServiceName",e),this.validateParamType("paranetServiceName",e,"string")}validateParanetServiceDescription(e){this.validateRequiredParam("paranetServiceDescription",e),this.validateParamType("paranetServiceDescription",e,"string")}validateParanetServiceAddresses(e){if(0!==e.length)for(const t of e)this.validateAddress(t)}validateAddress(e){if(this.validateRequiredParam("address",e),this.validateParamType("address",e,"string"),!n(e))throw Error(`Wrong address format. Given address: ${e}`)}validateIdentityId(e){this.validateRequiredParam("identityId",e),this.validateParamType("identityId",e,"number")}}},2974:e=>{e.exports={afterHook:()=>{}}},7790:()=>{},477:()=>{},7789:()=>{},3514:(e,t)=>{"use strict";const r=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function n(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e>--u&1}const f=2**31,d=f>>>1,h=d>>1,p=f-1;let y=0;for(let e=0;e<31;e++)y=y<<1|l();let m=[],g=0,b=f;for(;;){let e=Math.floor(((y-g+1)*i-1)/b),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|l(),a=a<<1^d,s=(s^d)<<1|d|1;g=a,b=1+s-a}let v=n-4;return m.map((t=>{switch(t-v){case 3:return v+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return v+256+(e[s++]<<8|e[s++]);case 1:return v+e[s++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,r)=>t[e.charCodeAt(0)]=r));let r=e.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,a=0,s=0;i=8&&(n[o++]=s>>(a-=8));return n}(e)))}function i(e){return 1&e?~e>>1:e>>1}function o(e,t){let r=Array(e);for(let n=0,o=0;n{let t=a(e);if(t.length)return t}))}function u(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(f(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(d(r,e))}return t.flat()}function c(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function l(e,t,r){let n=Array(e).fill().map((()=>[]));for(let i=0;in[t].push(e)));return n}function f(e,t){let r=1+t(),n=t(),i=c(t);return l(i.length,1+e,t).flatMap(((e,t)=>{let[o,...a]=e;return Array(i[t]).fill().map(((e,t)=>{let i=t*n;return[o+t*r,a.map((e=>e+i))]}))}))}function d(e,t){return l(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}function h(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function p(e){let t=[];for(let r=0,n=e.length;r>24&255}function S(e){return 16777215&e}let x,_,P,T;function I(e){return e>=g&&e<55204}function O(e,t){if(e>=b&&e<4371&&t>=v&&t<4470)return g+(e-b)*k+(t-v)*A;if(I(e)&&t>w&&t<4547&&(e-g)%A==0)return e+(t-w);{let r=T.get(e);return r&&(r=r.get(t),r)?r:-1}}function B(e){x||function(){let e=n("AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g");x=new Map(s(e).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),_=new Set(a(e)),P=new Map,T=new Map;for(let[t,r]of u(e)){if(!_.has(t)&&2==r.length){let[e,n]=r,i=T.get(e);i||(i=new Map,T.set(e,i)),i.set(n,t)}P.set(t,r.reverse())}}();let t=[],r=[],i=!1;function o(e){let r=x.get(e);r&&(i=!0,e|=r),t.push(e)}for(let n of e)for(;;){if(n<128)t.push(n);else if(I(n)){let e=n-g,t=e%k/A|0,r=e%A;o(b+(e/k|0)),o(v+t),r>0&&o(w+r)}else{let e=P.get(n);e?r.push(...e):o(n)}if(!r.length)break;n=r.pop()}if(i&&t.length>1){let e=E(t[0]);for(let r=1;r0&&i>=e)0==e?(t.push(n,...r),r.length=0,n=a):r.push(a),i=e;else{let o=O(n,a);o>=0?n=o:0==i&&0==e?(t.push(n),n=a):(r.push(a),i=e)}}return n>=0&&t.push(n,...r),t}(B(e))}const R=".",M=e=>Array.from(e);function U(e,t){return e.P.has(t)||e.Q.has(t)}class L extends Array{get is_emoji(){return!0}}let j,F,D,H,z,q,G,K,V,J,W,Q;function Z(){if(j)return;let e=n("AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI");const t=()=>a(e),r=()=>new Set(t()),i=(e,t)=>t.forEach((t=>e.add(t)));j=new Map(u(e)),F=r(),D=t(),H=new Set(t().map((e=>D[e]))),D=new Set(D),z=r(),q=r();let o=s(e),l=e();const f=()=>{let e=new Set;return t().forEach((t=>i(e,o[t]))),i(e,t()),e};G=c((t=>{let r=c(e).map((e=>e+96));if(r.length){let n=t>=l;return r[0]-=32,r=y(r),n&&(r=`Restricted[${r}]`),{N:r,P:f(),Q:f(),M:!e(),R:n}}})),K=r(),V=new Map;let d=t().concat(M(K)).sort(((e,t)=>e-t));d.forEach(((t,r)=>{let n=e(),i=d[r]=n?d[r-n]:{V:[],M:new Map};i.V.push(t),K.has(t)||V.set(t,i)}));for(let{V:e,M:t}of new Set(V.values())){let r=[];for(let t of e){let e=G.filter((e=>U(e,t))),n=r.find((({G:t})=>e.some((e=>t.has(e)))));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(t),i(n.G,e)}let n=r.flatMap((e=>M(e.G)));for(let{G:e,V:i}of r){let r=new Set(n.filter((t=>!e.has(t))));for(let e of i)t.set(e,r)}}J=new Set;let h=new Set;const p=e=>J.has(e)?h.add(e):J.add(e);for(let e of G){for(let t of e.P)p(t);for(let t of e.Q)p(t)}for(let e of J)V.has(e)||h.has(e)||V.set(e,1);i(J,C(J)),W=function(e){let t=[],r=a(e);return function e({S:r,B:n},i,o){if(!(4&r&&o===i[i.length-1])){2&r&&(o=i[i.length-1]),1&r&&t.push(i);for(let t of n)for(let r of t.Q)e(t,[...i,r],o)}}(function t(n){return{S:e(),B:c((()=>{let n=a(e).map((e=>r[e]));if(n.length)return t(n)})),Q:n}}([]),[]),t}(e).map((e=>L.from(e))).sort(m),Q=new Map;for(let e of W){let t=[Q];for(let r of e){let e=t.map((e=>{let t=e.get(r);return t||(t=new Map,e.set(r,t)),t}));65039===r?t.push(...e):t=e}for(let r of t)r.V=e}}function Y(e){return(te(e)?"":`${X($([e]))} `)+h(e)}function X(e){return`"${e}"‎`}function $(e,t=1/0,r=h){let n=[];ee(e[0])&&n.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let i=0,o=e.length;for(let t=0;t{let o=p(e),a={input:o,offset:i};i+=o.length+1;try{let e,i=a.tokens=ue(o,t,n),s=i.length;if(!s)throw new Error("empty label");let u=a.output=i.flat();if(function(e){for(let t=e.lastIndexOf(95);t>0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}(u),!(a.emoji=s>1||i[0].is_emoji)&&u.every((e=>e<128)))!function(e){if(e.length>=4&&45==e[2]&&45==e[3])throw new Error(`invalid label extension: "${y(e.slice(0,4))}"`)}(u),e="ASCII";else{let t=i.flatMap((e=>e.is_emoji?[]:e));if(t.length){if(D.has(u[0]))throw se("leading combining mark");for(let e=1;eU(e,r)));if(!e.length)throw G.some((e=>U(e,r)))?ae(t[0],r):oe(r);if(t=e,1==e.length)break}return t}(n);!function(e,t){for(let r of t)if(!U(e,r))throw ae(e,r);if(e.M){let e=C(t);for(let t=1,r=e.length;t4)throw new Error(`excessive non-spacing marks: ${X($(e.slice(t-1,n)))} (${n-t}/4)`);t=n}}}(o,t),function(e,t){let r,n=[];for(let e of t){let t=V.get(e);if(1===t)return;if(t){let n=t.M.get(e);if(r=r?r.filter((e=>n.has(e))):M(n),!r.length)return}else n.push(e)}if(r)for(let t of r)if(n.every((e=>U(t,e))))throw new Error(`whole-script confusable: ${e.N}/${t.N}`)}(o,n),e=o.N}else e="Emoji"}a.type=e}catch(e){a.error=e}return a}))}function ie(e){return e.map((({input:t,error:r,output:n})=>{if(r){let n=r.message;throw new Error(1==e.length?n:`Invalid label ${X($(t,63))}: ${n}`)}return y(n)})).join(R)}function oe(e){return new Error(`disallowed character: ${Y(e)}`)}function ae(e,t){let r=Y(t),n=G.find((e=>e.P.has(t)));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${e.N} + ${r}`)}function se(e){return new Error(`illegal placement: ${e}`)}function ue(e,t,r){let n=[],i=[];for(e=e.slice().reverse();e.length;){let o=le(e);if(o)i.length&&(n.push(t(i)),i=[]),n.push(r(o));else{let t=e.pop();if(J.has(t))i.push(t);else{let e=j.get(t);if(e)i.push(...e);else if(!F.has(t))throw oe(t)}}}return i.length&&n.push(t(i)),n}function ce(e){return e.filter((e=>65039!=e))}function le(e,t){let r,n=Q,i=e.length;for(;i&&(n=n.get(e[--i]),n);){let{V:o}=n;o&&(r=o,t&&t.push(...e.slice(i).reverse()),e.length=i)}return r}const fe="valid",de="mapped",he="ignored";function pe(e){return e==fe||e==de}function ye(e){return e.some((e=>q.has(e)))}function me(e){for(let t=0;te.cps))})}return e}t.ens_beautify=function(e){let t=ne(e,N,(e=>e));for(let{type:e,output:r,error:n}of t){if(n)break;"Greek"!==e&&re(r,958,926)}return ie(t)},t.ens_emoji=function(){return Z(),W.map((e=>e.slice()))},t.ens_normalize=function(e){return ie(ne(e,N,ce))},t.ens_normalize_fragment=function(e,t){Z();let r=t?C:N;return e.split(R).map((e=>y(ue(p(e),r,ce).flat()))).join(R)},t.ens_split=function(e,t){return ne(e,N,t?e=>e.slice():ce)},t.ens_tokenize=function e(t,{nf:r=!0}={}){Z();let n=p(t).reverse(),i=[],o=[];for(;n.length;){let e=le(n,i);if(e)o.push({type:"emoji",emoji:e.slice(),input:i,cps:ce(e)}),i=[];else{let e=n.pop();if(46==e)o.push({type:"stop",cp:e});else if(J.has(e))o.push({type:fe,cps:[e]});else if(F.has(e))o.push({type:he,cp:e});else{let t=j.get(e);t?o.push({type:de,cp:e,cps:t.slice()}):o.push({type:"disallowed",cp:e})}}}if(r)for(let t=0,r=-1;tpe(e.type)?e.cps:[])),s=N(a);m(s,a)?(o.splice(r,n-r,{type:"nfc",input:a,cps:s,tokens0:me(i),tokens:e(y(s),{nf:!1})}),t=r):t=n-1,r=-1}else r=t;else n.type!==he&&(r=-1)}return me(o)},t.is_combining_mark=ee,t.nfc=N,t.nfd=C,t.safe_str_from_cps=$,t.should_escape=te},6013:function(e,t){"use strict";var r,n,i,o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},a=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.AES=void 0;const s={16:10,24:12,32:14},u=[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],c=[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],l=[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],f=[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],d=[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],h=[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],p=[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],y=[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],m=[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],g=[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],b=[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],v=[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],w=[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],A=[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],k=[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 E(e){const t=[];for(let r=0;r>2,o(this,i,"f")[h][e%4]=d[e],o(this,n,"f")[t-h][e%4]=d[e];let p,y=0,m=f;for(;m>16&255]<<24^c[p>>8&255]<<16^c[255&p]<<8^c[p>>24&255]^u[y]<<24,y+=1,8!=f)for(let e=1;e>8&255]<<8^c[p>>16&255]<<16^c[p>>24&255]<<24;for(let e=f/2+1;e>2,r=m%4,o(this,i,"f")[e][r]=d[a],o(this,n,"f")[t-e][r]=d[a++],m++}for(let e=1;e>24&255]^w[p>>16&255]^A[p>>8&255]^k[255&p]}encrypt(e){if(16!=e.length)throw new TypeError("invalid plaintext size (must be 16 bytes)");const t=o(this,i,"f").length-1,r=[0,0,0,0];let n=E(e);for(let e=0;e<4;e++)n[e]^=o(this,i,"f")[0][e];for(let e=1;e>24&255]^d[n[(t+1)%4]>>16&255]^h[n[(t+2)%4]>>8&255]^p[255&n[(t+3)%4]]^o(this,i,"f")[e][t];n=r.slice()}const a=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=o(this,i,"f")[t][e],a[4*e]=255&(c[n[e]>>24&255]^s>>24),a[4*e+1]=255&(c[n[(e+1)%4]>>16&255]^s>>16),a[4*e+2]=255&(c[n[(e+2)%4]>>8&255]^s>>8),a[4*e+3]=255&(c[255&n[(e+3)%4]]^s);return a}decrypt(e){if(16!=e.length)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const t=o(this,n,"f").length-1,r=[0,0,0,0];let i=E(e);for(let e=0;e<4;e++)i[e]^=o(this,n,"f")[0][e];for(let e=1;e>24&255]^m[i[(t+3)%4]>>16&255]^g[i[(t+2)%4]>>8&255]^b[255&i[(t+1)%4]]^o(this,n,"f")[e][t];i=r.slice()}const a=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=o(this,n,"f")[t][e],a[4*e]=255&(l[i[e]>>24&255]^s>>24),a[4*e+1]=255&(l[i[(e+3)%4]>>16&255]^s>>16),a[4*e+2]=255&(l[i[(e+2)%4]>>8&255]^s>>8),a[4*e+3]=255&(l[255&i[(e+1)%4]]^s);return a}}t.AES=S,r=new WeakMap,n=new WeakMap,i=new WeakMap},8165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=t.OFB=t.ECB=t.CTR=t.CFB=t.CBC=t.ModeOfOperation=t.AES=void 0;var n=r(6013);Object.defineProperty(t,"AES",{enumerable:!0,get:function(){return n.AES}});var i=r(6342);Object.defineProperty(t,"ModeOfOperation",{enumerable:!0,get:function(){return i.ModeOfOperation}});var o=r(2977);Object.defineProperty(t,"CBC",{enumerable:!0,get:function(){return o.CBC}});var a=r(9990);Object.defineProperty(t,"CFB",{enumerable:!0,get:function(){return a.CFB}});var s=r(4164);Object.defineProperty(t,"CTR",{enumerable:!0,get:function(){return s.CTR}});var u=r(1485);Object.defineProperty(t,"ECB",{enumerable:!0,get:function(){return u.ECB}});var c=r(226);Object.defineProperty(t,"OFB",{enumerable:!0,get:function(){return c.OFB}});var l=r(8420);Object.defineProperty(t,"pkcs7Pad",{enumerable:!0,get:function(){return l.pkcs7Pad}}),Object.defineProperty(t,"pkcs7Strip",{enumerable:!0,get:function(){return l.pkcs7Strip}})},2977:function(e,t,r){"use strict";var n,i,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CBC=void 0;const s=r(6342);class u extends s.ModeOfOperation{constructor(e,t){if(super("ECC",e,u),n.set(this,void 0),i.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");o(this,n,new Uint8Array(t),"f")}else o(this,n,new Uint8Array(16),"f");o(this,i,this.iv,"f")}get iv(){return new Uint8Array(a(this,n,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;rNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let t=15;t>=0;--t)s(this,o,"f")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError("invalid counter initial Uint8Array value length");s(this,o,"f").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==s(this,o,"f")[e]){s(this,o,"f")[e]++;break}s(this,o,"f")[e]=0}}encrypt(e){var t,r;const u=new Uint8Array(e);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ECB=void 0;const n=r(6342);class i extends n.ModeOfOperation{constructor(e){super("ECB",e,i)}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModeOfOperation=void 0;const n=r(6013);t.ModeOfOperation=class{constructor(e,t,r){if(r&&!(this instanceof r))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new n.AES(t)},name:{enumerable:!0,value:e}})}}},8420:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=void 0,t.pkcs7Pad=function(e){const t=16-e.length%16,r=new Uint8Array(e.length+t);r.set(e);for(let n=e.length;n16)throw new TypeError("PKCS#7 padding byte out of range");const r=e.length-t;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="6.13.2"},954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbiCoder=void 0;const n=r(5347),i=r(8869),o=r(1355),a=r(3178),s=r(8719),u=r(2348),c=r(9095),l=r(8026),f=r(7398),d=r(8766),h=r(1693),p=r(189),y=r(646),m=r(5347),g=new Map;g.set(0,"GENERIC_PANIC"),g.set(1,"ASSERT_FALSE"),g.set(17,"OVERFLOW"),g.set(18,"DIVIDE_BY_ZERO"),g.set(33,"ENUM_RANGE_ERROR"),g.set(34,"BAD_STORAGE_DATA"),g.set(49,"STACK_UNDERFLOW"),g.set(50,"ARRAY_RANGE_ERROR"),g.set(65,"OUT_OF_MEMORY"),g.set(81,"UNINITIALIZED_FUNCTION_CALL");const b=new RegExp(/^bytes([0-9]*)$/),v=new RegExp(/^(u?int)([0-9]*)$/);let w=null,A=1024;class k{#e(e){if(e.isArray())return new a.ArrayCoder(this.#e(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new h.TupleCoder(e.components.map((e=>this.#e(e))),e.name);switch(e.baseType){case"address":return new o.AddressCoder(e.name);case"bool":return new s.BooleanCoder(e.name);case"string":return new d.StringCoder(e.name);case"bytes":return new u.BytesCoder(e.name);case"":return new l.NullCoder(e.name)}let t=e.type.match(v);if(t){let r=parseInt(t[2]||"256");return(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid "+t[1]+" bit length","param",e),new f.NumberCoder(r/8,"int"===t[1],e.name)}if(t=e.type.match(b),t){let r=parseInt(t[1]);return(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","param",e),new c.FixedBytesCoder(r,e.name)}(0,n.assertArgument)(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#e(p.ParamType.from(e))));return new h.TupleCoder(t,"_").defaultValue()}encode(e,t){(0,n.assertArgumentCount)(t.length,e.length,"types/values length mismatch");const r=e.map((e=>this.#e(p.ParamType.from(e)))),o=new h.TupleCoder(r,"_"),a=new i.Writer;return o.encode(a,t),a.data}decode(e,t,r){const n=e.map((e=>this.#e(p.ParamType.from(e))));return new h.TupleCoder(n,"_").decode(new i.Reader(t,r,A))}static _setDefaultMaxInflation(e){(0,n.assertArgument)("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),A=e}static defaultAbiCoder(){return null==w&&(w=new k),w}static getBuiltinCallException(e,t,r){return function(e,t,r,n){let i="missing revert data",o=null,a=null;if(r){i="execution reverted";const e=(0,m.getBytes)(r);if(r=(0,m.hexlify)(r),0===e.length)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(e.length%32!=4)i+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,m.hexlify)(e.slice(0,4)))try{o=n.decode(["string"],e.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch(e){i+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,m.hexlify)(e.slice(0,4)))try{const t=Number(n.decode(["uint256"],e.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[t]},o=`Panic due to ${g.get(t)||"UNKNOWN"}(${t})`,i+=`: ${o}`}catch(e){i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const s={to:t.to?(0,y.getAddress)(t.to):null,data:t.data||"0x"};return t.from&&(s.from=(0,y.getAddress)(t.from)),(0,m.makeError)(i,"CALL_EXCEPTION",{action:e,data:r,reason:o,transaction:s,invocation:null,revert:a})}(e,t,r,k.defaultAbiCoder())}}t.AbiCoder=k},9414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBytes32String=t.encodeBytes32String=void 0;const n=r(5347);t.encodeBytes32String=function(e){const t=(0,n.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,n.zeroPadBytes)(t,32)},t.decodeBytes32String=function(e){const t=(0,n.getBytes)(e,"bytes");if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,n.toUtf8String)(t.slice(0,r))}},8869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reader=t.Writer=t.Coder=t.checkResultErrors=t.Result=t.WordSize=void 0;const n=r(5347);t.WordSize=32;const i=new Uint8Array(t.WordSize),o=["then"],a={},s=new WeakMap;function u(e){return s.get(e)}function c(e,t){s.set(e,t)}function l(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}function f(e,t,r){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof d?f(u(e),e,r):e)):e.reduce(((e,n,i)=>{let o=t.getValue(n);return n in e||(r&&o instanceof d&&(o=f(u(o),o,r)),e[n]=o),e}),{})}class d extends Array{#t;constructor(...e){const t=e[0];let r=e[1],i=(e[2]||[]).slice(),s=!0;t!==a&&(r=e,i=[],s=!1),super(r.length),r.forEach(((e,t)=>{this[t]=e}));const f=i.reduce(((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(c(this,Object.freeze(r.map(((e,t)=>{const r=i[t];return null!=r&&1===f.get(r)?r:null})))),this.#t=[],null==this.#t&&this.#t,!s)return;Object.freeze(this);const d=new Proxy(this,{get:(e,t,r)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){const r=(0,n.getNumber)(t,"%index");if(r<0||r>=this.length)throw new RangeError("out of result range");const i=e[r];return i instanceof Error&&l(`index ${r}`,i),i}if(o.indexOf(t)>=0)return Reflect.get(e,t,r);const i=e[t];if(i instanceof Function)return function(...t){return i.apply(this===r?e:this,t)};if(!(t in e))return e.getValue.apply(this===r?e:this,[t])}return Reflect.get(e,t,r)}});return c(d,u(this)),d}toArray(e){const t=[];return this.forEach(((r,n)=>{r instanceof Error&&l(`index ${n}`,r),e&&r instanceof d&&(r=r.toArray(e)),t.push(r)})),t}toObject(e){const t=u(this);return t.reduce(((r,i,o)=>((0,n.assert)(null!=i,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),f(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const r=u(this),n=[],i=[];for(let o=e;o{this.#r[e]=h(t)}}};class p{allowLoose;#r;#o;#a;#s;#u;constructor(e,t,r){(0,n.defineProperties)(this,{allowLoose:!!t}),this.#r=(0,n.getBytesCopy)(e),this.#a=0,this.#s=null,this.#u=null!=r?r:1024,this.#o=0}get data(){return(0,n.hexlify)(this.#r)}get dataLength(){return this.#r.length}get consumed(){return this.#o}get bytes(){return new Uint8Array(this.#r)}#c(e){if(this.#s)return this.#s.#c(e);this.#a+=e,(0,n.assert)(this.#u<1||this.#a<=this.#u*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#u} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#r),offset:this.#o,length:e,info:{bytesRead:this.#a,dataLength:this.dataLength}})}#l(e,r,i){let o=Math.ceil(r/t.WordSize)*t.WordSize;return this.#o+o>this.#r.length&&(this.allowLoose&&i&&this.#o+r<=this.#r.length?o=r:(0,n.assert)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#r),length:this.#r.length,offset:this.#o+o})),this.#r.slice(this.#o,this.#o+o)}subReader(e){const t=new p(this.#r.slice(this.#o+e),this.allowLoose,this.#u);return t.#s=this,t}readBytes(e,t){let r=this.#l(0,e,!!t);return this.#c(e),this.#o+=r.length,r.slice(0,e)}readValue(){return(0,n.toBigInt)(this.readBytes(t.WordSize))}readIndex(){return(0,n.toNumber)(this.readBytes(t.WordSize))}}t.Reader=p},1355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;const n=r(646),i=r(6508),o=r(9976),a=r(8869);class s extends a.Coder{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let r=o.Typed.dereference(t,"string");try{r=(0,n.getAddress)(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return(0,n.getAddress)((0,i.toBeHex)(e.readValue(),20))}}t.AddressCoder=s},5754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;const n=r(8869);class i extends n.Coder{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}t.AnonymousCoder=i},3178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=t.unpack=t.pack=void 0;const n=r(5347),i=r(9976),o=r(8869),a=r(5754);function s(e,t,r){let i=[];if(Array.isArray(r))i=r;else if(r&&"object"==typeof r){let e={};i=t.map((t=>{const i=t.localName;return(0,n.assert)(i,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),(0,n.assert)(!e[i],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),e[i]=!0,r[i]}))}else(0,n.assertArgument)(!1,"invalid tuple value","tuple",r);(0,n.assertArgument)(t.length===i.length,"types/value length mismatch","tuple",r);let a=new o.Writer,s=new o.Writer,u=[];t.forEach(((e,t)=>{let r=i[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=a.writeUpdatableValue();u.push((e=>{n(e+t)}))}else e.encode(a,r)})),u.forEach((e=>{e(a.length)}));let c=e.appendWriter(a);return c+=e.appendWriter(s),c}function u(e,t){let r=[],i=[],a=e.subReader(0);return t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readIndex(),i=a.subReader(r);try{o=t.decode(i)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}if(null==o)throw new Error("investigate");r.push(o),i.push(t.localName||null)})),o.Result.fromItems(r,i)}t.pack=s,t.unpack=u;class c extends o.Coder{coder;length;constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),(0,n.defineProperties)(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;const n=r(9976),i=r(8869);class o extends i.Coder{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){const r=n.Typed.dereference(t,"bool");return e.writeValue(r?1:0)}decode(e){return!!e.readValue()}}t.BooleanCoder=o},2348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesCoder=t.DynamicBytesCoder=void 0;const n=r(5347),i=r(8869);class o extends i.Coder{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=(0,n.getBytesCopy)(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readIndex(),!0)}}t.DynamicBytesCoder=o;t.BytesCoder=class extends o{constructor(e){super("bytes",e)}decode(e){return(0,n.hexlify)(super.decode(e))}}},9095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;const n=r(5347),i=r(9976),o=r(8869);class a extends o.Coder{size;constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),(0,n.defineProperties)(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,n.getBytesCopy)(i.Typed.dereference(t,this.type));return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return(0,n.hexlify)(e.readBytes(this.size))}}t.FixedBytesCoder=a},8026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;const n=r(8869),i=new Uint8Array([]);class o extends n.Coder{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes(i)}decode(e){return e.readBytes(0),null}}t.NullCoder=o},7398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;const n=r(5347),i=r(9976),o=r(8869),a=BigInt(0),s=BigInt(1),u=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class c extends o.Coder{size;signed;constructor(e,t,r){const i=(t?"int":"uint")+8*e;super(i,i,r,!1),(0,n.defineProperties)(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let r=(0,n.getBigInt)(i.Typed.dereference(t,this.type)),c=(0,n.mask)(u,8*o.WordSize);if(this.signed){let e=(0,n.mask)(c,8*this.size-1);(r>e||r<-(e+s))&&this._throwError("value out-of-bounds",t),r=(0,n.toTwos)(r,8*o.WordSize)}else(r(0,n.mask)(c,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(r)}decode(e){let t=(0,n.mask)(e.readValue(),8*this.size);return this.signed&&(t=(0,n.fromTwos)(t,8*this.size)),t}}t.NumberCoder=c},8766:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;const n=r(3948),i=r(9976),o=r(2348);class a extends o.DynamicBytesCoder{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,n.toUtf8Bytes)(i.Typed.dereference(t,"string")))}decode(e){return(0,n.toUtf8String)(super.decode(e))}}t.StringCoder=a},1693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TupleCoder=void 0;const n=r(8166),i=r(9976),o=r(8869),a=r(3178);class s extends o.Coder{coders;constructor(e,t){let r=!1;const i=[];e.forEach((e=>{e.dynamic&&(r=!0),i.push(e.type)}));super("tuple","tuple("+i.join(",")+")",t,r),(0,n.defineProperties)(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){const r=i.Typed.dereference(t,"tuple");return(0,a.pack)(e,this.coders,r)}decode(e){return(0,a.unpack)(e,this.coders)}}t.TupleCoder=s},189:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructFragment=t.FunctionFragment=t.FallbackFragment=t.ConstructorFragment=t.EventFragment=t.ErrorFragment=t.NamedFragment=t.Fragment=t.ParamType=void 0;const n=r(5347),i=r(3562);function o(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const a=o("external public payable override".split(" ")),s="constant external internal payable private public pure view override",u=o(s.split(" ")),c="constructor error event fallback function receive struct",l=o(c.split(" ")),f="calldata memory storage payable indexed",d=o(f.split(" ")),h=o([c,f,"tuple returns",s].join(" ").split(" ")),p={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},y=new RegExp("^(\\s*)"),m=new RegExp("^([0-9]+)"),g=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),b=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),v=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class w{#o;#f;get offset(){return this.#o}get length(){return this.#f.length-this.#o}constructor(e){this.#o=0,this.#f=e.slice()}clone(){return new w(this.#f)}reset(){this.#o=0}#d(e=0,t=0){return new w(this.#f.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#d(this.#o+1,e.match+1);return this.#o=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#o=this.#f.length)throw new Error("out-of-bounds");return this.#f[this.#o]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#o++,e}toString(){const e=[];for(let t=this.#o;t`}}function A(e){const t=[],r=t=>{const r=a0&&"NUMBER"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=(0,n.getNumber)(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(u=s.match(g),u){if(c.text=u[1],a+=c.text.length,h.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(v)){c.type="TYPE";continue}c.type="ID"}else{if(u=s.match(m),!u)throw new Error(`unexpected token ${JSON.stringify(s[0])} at position ${a}`);c.text=u[1],c.type="NUMBER",a+=c.text.length}}return new w(t.map((e=>Object.freeze(e))))}function k(e,t){let r=[];for(const n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function E(e,t){if(t.peekKeyword(l)){const r=t.pop().text;if(r!==e)throw new Error(`expected ${e}, got ${r}`)}return t.popType("ID")}function S(e,t){const r=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function x(e){let t=S(e,u);return k(t,o("constant payable nonpayable".split(" "))),k(t,o("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function _(e,t){return e.popParams().map((e=>D.from(e,t)))}function P(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return(0,n.getBigInt)(e.pop().text);throw new Error("invalid gas")}return null}function T(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const I=new RegExp(/^(.*)\[([0-9]*)\]$/);function O(e){const t=e.match(v);if((0,n.assertArgument)(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const r=parseInt(t[2]);(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){const r=parseInt(t[3]);(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}const B={},C=Symbol.for("_ethers_internal"),N="_ParamTypeInternal",R="_ErrorInternal",M="_EventInternal",U="_ConstructorInternal",L="_FallbackInternal",j="_FunctionInternal",F="_StructInternal";class D{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,i,o,a,s,u){if((0,n.assertPrivate)(e,B,"ParamType"),Object.defineProperty(this,C,{value:N}),a&&(a=Object.freeze(a.slice())),"array"===i){if(null==s||null==u)throw new Error("")}else if(null!=s||null!=u)throw new Error("");if("tuple"===i){if(null==a)throw new Error("")}else if(null!=a)throw new Error("");(0,n.defineProperties)(this,{name:t,type:r,baseType:i,indexed:o,components:a,arrayLength:s,arrayChildren:u})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const r={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(r)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map((e=>r.arrayChildren.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map(((e,n)=>r.components[n].walk(e,t)))}return t(this.type,e)}#h(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const i=this.arrayChildren,o=t.slice();return o.forEach(((t,n)=>{i.#h(e,t,r,(e=>{o[n]=e}))})),void n(o)}if(this.isTuple()){const i=this.components;let o;if(Array.isArray(t))o=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");o=i.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(o.length!==this.components.length)throw new Error("array is wrong length");return o.forEach(((t,n)=>{i[n].#h(e,t,r,(e=>{o[n]=e}))})),void n(o)}const i=r(this.type,t);i.then?e.push(async function(){n(await i)}()):n(i)}async walkAsync(e,t){const r=[],n=[e];return this.#h(r,e,t,(e=>{n[0]=e})),r.length&&await Promise.all(r),n[0]}static from(e,t){if(D.isParamType(e))return e;if("string"==typeof e)try{return D.from(A(e),t)}catch(t){(0,n.assertArgument)(!1,"invalid param type","obj",e)}else if(e instanceof w){let r="",n="",i=null;S(e,o(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",i=e.popParams().map((e=>D.from(e))),r=`tuple(${i.map((e=>e.format())).join(",")})`):(r=O(e.popType("TYPE")),n=r);let a=null,s=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();a=new D(B,"",r,n,null,i,s,a),s=t.value,r+=t.text,n="array",i=null}let u=null;if(S(e,d).has("indexed")){if(!t)throw new Error("");u=!0}const c=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new D(B,c,r,n,u,i,s,a)}const r=e.name;(0,n.assertArgument)(!r||"string"==typeof r&&r.match(b),"invalid name","obj.name",r);let i=e.indexed;null!=i&&((0,n.assertArgument)(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let a=e.type,s=a.match(I);if(s){const t=parseInt(s[2]||"-1"),n=D.from({type:s[1],components:e.components});return new D(B,r||"",a,"array",i,null,t,n)}if("tuple"===a||a.startsWith("tuple(")||a.startsWith("(")){const t=null!=e.components?e.components.map((e=>D.from(e))):null;return new D(B,r||"",a,"tuple",i,t,null,null)}return a=O(e.type),new D(B,r||"",a,a,i,null,null,null)}static isParamType(e){return e&&e[C]===N}}t.ParamType=D;class H{type;inputs;constructor(e,t,r){(0,n.assertPrivate)(e,B,"Fragment"),r=Object.freeze(r.slice()),(0,n.defineProperties)(this,{type:t,inputs:r})}static from(e){if("string"==typeof e){try{H.from(JSON.parse(e))}catch(e){}return H.from(A(e))}if(e instanceof w){switch(e.peekKeyword(l)){case"constructor":return V.from(e);case"error":return G.from(e);case"event":return K.from(e);case"fallback":case"receive":return J.from(e);case"function":return W.from(e);case"struct":return Q.from(e)}}else if("object"==typeof e){switch(e.type){case"constructor":return V.from(e);case"error":return G.from(e);case"event":return K.from(e);case"fallback":case"receive":return J.from(e);case"function":return W.from(e);case"struct":return Q.from(e)}(0,n.assert)(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,n.assertArgument)(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return V.isFragment(e)}static isError(e){return G.isFragment(e)}static isEvent(e){return K.isFragment(e)}static isFunction(e){return W.isFragment(e)}static isStruct(e){return Q.isFragment(e)}}t.Fragment=H;class z extends H{name;constructor(e,t,r,i){super(e,t,i),(0,n.assertArgument)("string"==typeof r&&r.match(b),"invalid identifier","name",r),i=Object.freeze(i.slice()),(0,n.defineProperties)(this,{name:r})}}function q(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}t.NamedFragment=z;class G extends z{constructor(e,t,r){super(e,"error",t,r),Object.defineProperty(this,C,{value:R})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+q(e,this.inputs)),t.join(" ")}static from(e){if(G.isFragment(e))return e;if("string"==typeof e)return G.from(A(e));if(e instanceof w){const t=E("error",e),r=_(e);return T(e),new G(B,t,r)}return new G(B,e.name,e.inputs?e.inputs.map(D.from):[])}static isFragment(e){return e&&e[C]===R}}t.ErrorFragment=G;class K extends z{anonymous;constructor(e,t,r,i){super(e,"event",t,r),Object.defineProperty(this,C,{value:M}),(0,n.defineProperties)(this,{anonymous:i})}get topicHash(){return(0,i.id)(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+q(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){t=(t||[]).map((e=>D.from(e)));return new K(B,e,t,!1).topicHash}static from(e){if(K.isFragment(e))return e;if("string"==typeof e)try{return K.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid event fragment","obj",e)}else if(e instanceof w){const t=E("event",e),r=_(e,!0),n=!!S(e,o(["anonymous"])).has("anonymous");return T(e),new K(B,t,r,n)}return new K(B,e.name,e.inputs?e.inputs.map((e=>D.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[C]===M}}t.EventFragment=K;class V extends H{payable;gas;constructor(e,t,r,i,o){super(e,t,r),Object.defineProperty(this,C,{value:U}),(0,n.defineProperties)(this,{payable:i,gas:o})}format(e){if((0,n.assert)(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${q(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(V.isFragment(e))return e;if("string"==typeof e)try{return V.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof w){S(e,o(["constructor"]));const t=_(e),r=!!S(e,a).has("payable"),n=P(e);return T(e),new V(B,"constructor",t,r,n)}return new V(B,"constructor",e.inputs?e.inputs.map(D.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[C]===U}}t.ConstructorFragment=V;class J extends H{payable;constructor(e,t,r){super(e,"fallback",t),Object.defineProperty(this,C,{value:L}),(0,n.defineProperties)(this,{payable:r})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if(J.isFragment(e))return e;if("string"==typeof e)try{return J.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid fallback fragment","obj",e)}else if(e instanceof w){const t=e.toString(),r=e.peekKeyword(o(["fallback","receive"]));(0,n.assertArgument)(r,"type must be fallback or receive","obj",t);if("receive"===e.popKeyword(o(["fallback","receive"]))){const t=_(e);return(0,n.assertArgument)(0===t.length,"receive cannot have arguments","obj.inputs",t),S(e,o(["payable"])),T(e),new J(B,[],!0)}let i=_(e);i.length?(0,n.assertArgument)(1===i.length&&"bytes"===i[0].type,"invalid fallback inputs","obj.inputs",i.map((e=>e.format("minimal"))).join(", ")):i=[D.from("bytes")];const a=x(e);if((0,n.assertArgument)("nonpayable"===a||"payable"===a,"fallback cannot be constants","obj.stateMutability",a),S(e,o(["returns"])).has("returns")){const t=_(e);(0,n.assertArgument)(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return T(e),new J(B,i,"payable"===a)}if("receive"===e.type)return new J(B,[],!0);if("fallback"===e.type){const t=[D.from("bytes")],r="payable"===e.stateMutability;return new J(B,t,r)}(0,n.assertArgument)(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[C]===L}}t.FallbackFragment=J;class W extends z{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,i,o,a){super(e,"function",t,i),Object.defineProperty(this,C,{value:j}),o=Object.freeze(o.slice());const s="view"===r||"pure"===r,u="payable"===r;(0,n.defineProperties)(this,{constant:s,gas:a,outputs:o,payable:u,stateMutability:r})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+q(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(q(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){t=(t||[]).map((e=>D.from(e)));return new W(B,e,"view",t,[],null).selector}static from(e){if(W.isFragment(e))return e;if("string"==typeof e)try{return W.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid function fragment","obj",e)}else if(e instanceof w){const t=E("function",e),r=_(e),n=x(e);let i=[];S(e,o(["returns"])).has("returns")&&(i=_(e));const a=P(e);return T(e),new W(B,t,n,r,i,a)}let t=e.stateMutability;return null==t&&(t="payable","boolean"==typeof e.constant?(t="view",e.constant||(t="payable","boolean"!=typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(t="nonpayable")),new W(B,e.name,t,e.inputs?e.inputs.map(D.from):[],e.outputs?e.outputs.map(D.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[C]===j}}t.FunctionFragment=W;class Q extends z{constructor(e,t,r){super(e,"struct",t,r),Object.defineProperty(this,C,{value:F})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)try{return Q.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid struct fragment","obj",e)}else if(e instanceof w){const t=E("struct",e),r=_(e);return T(e),new Q(B,t,r)}return new Q(B,e.name,e.inputs?e.inputs.map(D.from):[])}static isFragment(e){return e&&e[C]===F}}t.StructFragment=Q},8456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=t.Result=t.TransactionDescription=t.LogDescription=t.ErrorDescription=t.Interface=t.Indexed=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.Fragment=t.FallbackFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.encodeBytes32String=t.decodeBytes32String=t.AbiCoder=void 0;var n=r(954);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return n.AbiCoder}});var i=r(9414);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}});var o=r(189);Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return o.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return o.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return o.EventFragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return o.FallbackFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return o.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return o.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return o.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return o.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return o.StructFragment}});var a=r(5863);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return a.checkResultErrors}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return a.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return a.Interface}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return a.ErrorDescription}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return a.LogDescription}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return a.TransactionDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return a.Result}});var s=r(9976);Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return s.Typed}})},5863:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Interface=t.Indexed=t.ErrorDescription=t.TransactionDescription=t.LogDescription=t.Result=t.checkResultErrors=void 0;const n=r(2291),i=r(3562),o=r(5347),a=r(954),s=r(8869);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return s.Result}});const u=r(189),c=r(9976);class l{fragment;name;signature;topic;args;constructor(e,t,r){const n=e.name,i=e.format();(0,o.defineProperties)(this,{fragment:e,name:n,signature:i,topic:t,args:r})}}t.LogDescription=l;class f{fragment;name;args;signature;selector;value;constructor(e,t,r,n){const i=e.name,a=e.format();(0,o.defineProperties)(this,{fragment:e,name:i,args:r,signature:a,selector:t,value:n})}}t.TransactionDescription=f;class d{fragment;name;args;signature;selector;constructor(e,t,r){const n=e.name,i=e.format();(0,o.defineProperties)(this,{fragment:e,name:n,args:r,signature:i,selector:t})}}t.ErrorDescription=d;class h{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){(0,o.defineProperties)(this,{hash:e,_isIndexed:!0})}}t.Indexed=h;const p={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},y={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&p[e.toString()]&&(t=p[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class m{fragments;deploy;fallback;receive;#p;#y;#m;#g;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#m=new Map,this.#p=new Map,this.#y=new Map;const r=[];for(const e of t)try{r.push(u.Fragment.from(e))}catch(t){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,t.message)}(0,o.defineProperties)(this,{fragments:Object.freeze(r)});let n=null,i=!1;this.#g=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let r;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void(0,o.defineProperties)(this,{deploy:e});case"fallback":return void(0===e.inputs.length?i=!0:((0,o.assertArgument)(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),n=e,i=n.payable));case"function":r=this.#m;break;case"event":r=this.#y;break;case"error":r=this.#p;break;default:return}const a=e.format();r.has(a)||r.set(a,e)})),this.deploy||(0,o.defineProperties)(this,{deploy:u.ConstructorFragment.from("constructor()")}),(0,o.defineProperties)(this,{fallback:n,receive:i})}format(e){const t=e?"minimal":"full";return this.fragments.map((e=>e.format(t)))}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return a.AbiCoder.defaultAbiCoder()}#b(e,t,r){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e of this.#m.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#m)t.split("(")[0]===e&&n.push(r);if(t){const e=t.length>0?t[t.length-1]:null;let r=t.length,i=!0;c.Typed.isTyped(e)&&"overrides"===e.type&&(i=!1,r--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===r||i&&t===r-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let i=0;i=r.length){if("overrides"===t[i].type)continue;n.splice(e,1);break}if(t[i].type!==r[i].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&n.splice(0,1)}if(0===n.length)return null;if(n.length>1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous function description (i.e. matches ${t})`,"key",e)}return n[0]}const n=this.#m.get(u.FunctionFragment.from(e).format());return n||null}getFunctionName(e){const t=this.#b(e,null,!1);return(0,o.assertArgument)(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#b(e,null,!1)}getFunction(e,t){return this.#b(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#m.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r=0;e--)n[e].inputs.length=0;e--){const r=n[e].inputs;for(let i=0;i1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous event description (i.e. matches ${t})`,"key",e)}return n[0]}const n=this.#y.get(u.EventFragment.from(e).format());return n||null}getEventName(e){const t=this.#v(e,null,!1);return(0,o.assertArgument)(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#v(e,null,!1)}getEvent(e,t){return this.#v(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#y.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r1){const r=t.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous error description (i.e. ${r})`,"name",e)}return t[0]}if("Error(string)"===(e=u.ErrorFragment.from(e).format()))return u.ErrorFragment.from("error Error(string)");if("Panic(uint256)"===e)return u.ErrorFragment.from("error Panic(uint256)");const r=this.#p.get(e);return r||null}forEachError(e){const t=Array.from(this.#p.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r"string"===e.type?(0,i.id)(t):"bytes"===e.type?(0,n.keccak256)((0,o.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=(0,o.toBeHex)(t):e.type.match(/^bytes/)?t=(0,o.zeroPadBytes)(t,32):"address"===e.type&&this.#g.encode(["address"],[t]),(0,o.zeroPadValue)((0,o.hexlify)(t),32));for(t.forEach(((t,n)=>{const i=e.inputs[n];i.indexed?null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?(0,o.assertArgument)(!1,"filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map((e=>a(i,e)))):r.push(a(i,t)):(0,o.assertArgument)(null==t,"cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}const r=[],a=[],s=[];return e.anonymous||r.push(e.topicHash),(0,o.assertArgument)(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const u=t[o];if(e.indexed)if("string"===e.type)r.push((0,i.id)(u));else if("bytes"===e.type)r.push((0,n.keccak256)(u));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this.#g.encode([e.type],[u]))}else a.push(e),s.push(u)})),{data:this.#g.encode(a,s),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}if(null!=r&&!e.anonymous){const t=e.topicHash;(0,o.assertArgument)((0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const n=[],i=[],a=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(u.ParamType.from({type:"bytes32",name:e.name})),a.push(!0)):(n.push(e),a.push(!1)):(i.push(e),a.push(!1))}));const c=null!=r?this.#g.decode(n,(0,o.concat)(r)):null,l=this.#g.decode(i,t,!0),f=[],d=[];let p=0,y=0;return e.inputs.forEach(((e,t)=>{let r=null;if(e.indexed)if(null==c)r=new h(null);else if(a[t])r=new h(c[y++]);else try{r=c[y++]}catch(e){r=e}else try{r=l[p++]}catch(e){r=e}f.push(r),d.push(e.name||null)})),s.Result.fromItems(f,d)}parseTransaction(e){const t=(0,o.getBytes)(e.data,"tx.data"),r=(0,o.getBigInt)(null!=e.value?e.value:0,"tx.value"),n=this.getFunction((0,o.hexlify)(t.slice(0,4)));if(!n)return null;const i=this.#g.decode(n.inputs,t.slice(4));return new f(n,n.selector,i,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new l(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=(0,o.hexlify)(e),r=this.getError((0,o.dataSlice)(t,0,4));if(!r)return null;const n=this.#g.decode(r.inputs,(0,o.dataSlice)(t,4));return new d(r,r.selector,n)}static from(e){return e instanceof m?e:"string"==typeof e?new m(JSON.parse(e)):"function"==typeof e.formatJson?new m(e.formatJson()):"function"==typeof e.format?new m(e.format("json")):new m(e)}}t.Interface=m},9976:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=void 0;const n=r(5347),i={};function o(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new u(i,`${r?"":"u"}int${t}`,e,{signed:r,width:t})}function a(e,t){return new u(i,`bytes${t||""}`,e,{size:t})}const s=Symbol.for("_ethers_typed");class u{type;value;#w;_typedSymbol;constructor(e,t,r,o){null==o&&(o=null),(0,n.assertPrivate)(i,e,"Typed"),(0,n.defineProperties)(this,{_typedSymbol:s,type:t,value:r}),this.#w=o,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#w}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#w?-1:!1===this.#w?this.value.length:null}static from(e,t){return new u(i,e,t)}static uint8(e){return o(e,8)}static uint16(e){return o(e,16)}static uint24(e){return o(e,24)}static uint32(e){return o(e,32)}static uint40(e){return o(e,40)}static uint48(e){return o(e,48)}static uint56(e){return o(e,56)}static uint64(e){return o(e,64)}static uint72(e){return o(e,72)}static uint80(e){return o(e,80)}static uint88(e){return o(e,88)}static uint96(e){return o(e,96)}static uint104(e){return o(e,104)}static uint112(e){return o(e,112)}static uint120(e){return o(e,120)}static uint128(e){return o(e,128)}static uint136(e){return o(e,136)}static uint144(e){return o(e,144)}static uint152(e){return o(e,152)}static uint160(e){return o(e,160)}static uint168(e){return o(e,168)}static uint176(e){return o(e,176)}static uint184(e){return o(e,184)}static uint192(e){return o(e,192)}static uint200(e){return o(e,200)}static uint208(e){return o(e,208)}static uint216(e){return o(e,216)}static uint224(e){return o(e,224)}static uint232(e){return o(e,232)}static uint240(e){return o(e,240)}static uint248(e){return o(e,248)}static uint256(e){return o(e,256)}static uint(e){return o(e,256)}static int8(e){return o(e,-8)}static int16(e){return o(e,-16)}static int24(e){return o(e,-24)}static int32(e){return o(e,-32)}static int40(e){return o(e,-40)}static int48(e){return o(e,-48)}static int56(e){return o(e,-56)}static int64(e){return o(e,-64)}static int72(e){return o(e,-72)}static int80(e){return o(e,-80)}static int88(e){return o(e,-88)}static int96(e){return o(e,-96)}static int104(e){return o(e,-104)}static int112(e){return o(e,-112)}static int120(e){return o(e,-120)}static int128(e){return o(e,-128)}static int136(e){return o(e,-136)}static int144(e){return o(e,-144)}static int152(e){return o(e,-152)}static int160(e){return o(e,-160)}static int168(e){return o(e,-168)}static int176(e){return o(e,-176)}static int184(e){return o(e,-184)}static int192(e){return o(e,-192)}static int200(e){return o(e,-200)}static int208(e){return o(e,-208)}static int216(e){return o(e,-216)}static int224(e){return o(e,-224)}static int232(e){return o(e,-232)}static int240(e){return o(e,-240)}static int248(e){return o(e,-248)}static int256(e){return o(e,-256)}static int(e){return o(e,-256)}static bytes1(e){return a(e,1)}static bytes2(e){return a(e,2)}static bytes3(e){return a(e,3)}static bytes4(e){return a(e,4)}static bytes5(e){return a(e,5)}static bytes6(e){return a(e,6)}static bytes7(e){return a(e,7)}static bytes8(e){return a(e,8)}static bytes9(e){return a(e,9)}static bytes10(e){return a(e,10)}static bytes11(e){return a(e,11)}static bytes12(e){return a(e,12)}static bytes13(e){return a(e,13)}static bytes14(e){return a(e,14)}static bytes15(e){return a(e,15)}static bytes16(e){return a(e,16)}static bytes17(e){return a(e,17)}static bytes18(e){return a(e,18)}static bytes19(e){return a(e,19)}static bytes20(e){return a(e,20)}static bytes21(e){return a(e,21)}static bytes22(e){return a(e,22)}static bytes23(e){return a(e,23)}static bytes24(e){return a(e,24)}static bytes25(e){return a(e,25)}static bytes26(e){return a(e,26)}static bytes27(e){return a(e,27)}static bytes28(e){return a(e,28)}static bytes29(e){return a(e,29)}static bytes30(e){return a(e,30)}static bytes31(e){return a(e,31)}static bytes32(e){return a(e,32)}static address(e){return new u(i,"address",e)}static bool(e){return new u(i,"bool",!!e)}static bytes(e){return new u(i,"bytes",e)}static string(e){return new u(i,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new u(i,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===s}static dereference(e,t){if(u.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}t.Typed=u},7262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIcapAddress=t.getAddress=void 0;const n=r(2291),i=r(5347),o=BigInt(0),a=BigInt(36);function s(e){const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const o=(0,i.getBytes)((0,n.keccak256)(r));for(let e=0;e<40;e+=2)o[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&o[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const u={};for(let e=0;e<10;e++)u[String(e)]=String(e);for(let e=0;e<26;e++)u[String.fromCharCode(65+e)]=String(10+e);function c(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>u[e])).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}const l=function(){const e={};for(let t=0;t<36;t++){e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t)}return e}();function f(e){if((0,i.assertArgument)("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=s(e);return(0,i.assertArgument)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,i.assertArgument)(e.substring(2,4)===c(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=o;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=void 0;const n=r(5347),i=r(7262);function o(e){return e&&"function"==typeof e.getAddress}async function a(e,t){const r=await t;return null!=r&&"0x0000000000000000000000000000000000000000"!==r||((0,n.assert)("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),(0,n.assertArgument)(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),(0,i.getAddress)(r)}t.isAddressable=o,t.isAddress=function(e){try{return(0,i.getAddress)(e),!0}catch(e){}return!1},t.resolveAddress=function(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?(0,i.getAddress)(e):((0,n.assert)(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),a(e,t.resolveName(e))):o(e)?a(e,e.getAddress()):e&&"function"==typeof e.then?a(e,e):void(0,n.assertArgument)(!1,"unsupported addressable value","target",e)}},1891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCreate2Address=t.getCreateAddress=void 0;const n=r(2291),i=r(5347),o=r(7262);t.getCreateAddress=function(e){const t=(0,o.getAddress)(e.from);let r=(0,i.getBigInt)(e.nonce,"tx.nonce").toString(16);return r="0"===r?"0x":r.length%2?"0x0"+r:"0x"+r,(0,o.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.encodeRlp)([t,r])),12))},t.getCreate2Address=function(e,t,r){const a=(0,o.getAddress)(e),s=(0,i.getBytes)(t,"salt"),u=(0,i.getBytes)(r,"initCodeHash");return(0,i.assertArgument)(32===s.length,"salt must be 32 bytes","salt",t),(0,i.assertArgument)(32===u.length,"initCodeHash must be 32 bytes","initCodeHash",r),(0,o.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.concat)(["0xff",a,s,u])),12))}},646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=void 0;var n=r(7262);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return n.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return n.getIcapAddress}});var i=r(1891);Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return i.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return i.getCreate2Address}});var o=r(345);Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return o.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return o.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return o.resolveAddress}})},5239:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroAddress=void 0,t.ZeroAddress="0x0000000000000000000000000000000000000000"},5255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroHash=void 0,t.ZeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"},1295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=t.ZeroHash=t.ZeroAddress=void 0;var n=r(5239);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return n.ZeroAddress}});var i=r(5255);Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return i.ZeroHash}});var o=r(9197);Object.defineProperty(t,"N",{enumerable:!0,get:function(){return o.N}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return o.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return o.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return o.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return o.MaxInt256}});var a=r(6245);Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return a.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return a.MessagePrefix}})},9197:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=void 0,t.N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),t.WeiPerEther=BigInt("1000000000000000000"),t.MaxUint256=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MinInt256=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),t.MaxInt256=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},6245:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=void 0,t.EtherSymbol="Ξ",t.MessagePrefix="Ethereum Signed Message:\n"},1008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=t.BaseContract=t.resolveArgs=t.copyOverrides=void 0;const n=r(8456),i=r(646),o=r(3807),a=r(5347),s=r(6526),u=BigInt(0);function c(e){return e&&"function"==typeof e.call}function l(e){return e&&"function"==typeof e.estimateGas}function f(e){return e&&"function"==typeof e.resolveName}function d(e){return e&&"function"==typeof e.sendTransaction}function h(e){if(null!=e){if(f(e))return e;if(e.provider)return e.provider}}class p{#A;fragment;constructor(e,t,r){if((0,a.defineProperties)(this,{fragment:t}),t.inputs.lengthnull==r[t]?null:e.walkAsync(r[t],((e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map((e=>(0,i.resolveAddress)(e,o)))):(0,i.resolveAddress)(t,o):t)))));return e.interface.encodeFilterTopics(t,n)}()}getTopicFilter(){return this.#A}}function y(e,t){return null==e?null:"function"==typeof e[t]?e:e.provider&&"function"==typeof e.provider[t]?e.provider:null}function m(e){return null==e?null:e.provider||null}async function g(e,t){const r=n.Typed.dereference(e,"overrides");(0,a.assertArgument)("object"==typeof r,"invalid overrides parameter","overrides",e);const i=(0,o.copyRequest)(r);return(0,a.assertArgument)(null==i.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",i.to),(0,a.assertArgument)(null==i.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",i.data),i.from&&(i.from=i.from),i}async function b(e,t,r){const o=y(e,"resolveName"),a=f(o)?o:null;return await Promise.all(t.map(((e,t)=>e.walkAsync(r[t],((e,t)=>(t=n.Typed.dereference(t,e),"address"===e?(0,i.resolveAddress)(t,a):t))))))}function v(e){const t=async function(t){const r=await g(t,["data"]);r.to=await e.getAddress(),r.from&&(r.from=await(0,i.resolveAddress)(r.from,h(e.runner)));const n=e.interface,o=(0,a.getBigInt)(r.value||u,"overrides.value")===u,s="0x"===(r.data||"0x");!n.fallback||n.fallback.payable||!n.receive||s||o||(0,a.assertArgument)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),(0,a.assertArgument)(n.fallback||s,"cannot send data to receive-only contract","overrides.data",r.data);const c=n.receive||n.fallback&&n.fallback.payable;return(0,a.assertArgument)(c||o,"cannot send value to non-payable fallback","overrides.value",r.value),(0,a.assertArgument)(n.fallback||s,"cannot send data to receive-only contract","overrides.data",r.data),r},r=async function(r){const n=e.runner;(0,a.assert)(d(n),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await n.sendTransaction(await t(r)),o=m(e.runner);return new s.ContractTransactionResponse(e.interface,o,i)},n=async e=>await r(e);return(0,a.defineProperties)(n,{_contract:e,estimateGas:async function(r){const n=y(e.runner,"estimateGas");return(0,a.assert)(l(n),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await n.estimateGas(await t(r))},populateTransaction:t,send:r,staticCall:async function(r){const n=y(e.runner,"call");(0,a.assert)(c(n),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const i=await t(r);try{return await n.call(i)}catch(t){if((0,a.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,i);throw t}}}),n}t.copyOverrides=g,t.resolveArgs=b;const w=Symbol.for("_ethersInternal_contract"),A=new WeakMap;function k(e){return A.get(e[w])}async function E(e,t){let r,n=null;if(Array.isArray(t)){const n=function(t){if((0,a.isHexString)(t,32))return t;const r=e.interface.getEvent(t);return(0,a.assertArgument)(r,"unknown fragment","name",t),r.topicHash};r=t.map((e=>null==e?null:Array.isArray(e)?e.map(n):n(e)))}else"*"===t?r=[null]:"string"==typeof t?(0,a.isHexString)(t,32)?r=[t]:(n=e.interface.getEvent(t),(0,a.assertArgument)(n,"unknown fragment","event",t),r=[n.topicHash]):(i=t)&&"object"==typeof i&&"getTopicFilter"in i&&"function"==typeof i.getTopicFilter&&i.fragment?r=await t.getTopicFilter():"fragment"in t?(n=t.fragment,r=[n.topicHash]):(0,a.assertArgument)(!1,"unknown event name","event",t);var i;r=r.map((e=>{if(null==e)return null;if(Array.isArray(e)){const t=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()}));return{fragment:n,tag:r.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&"),topics:r}}async function S(e,t){const{subs:r}=k(e);return r.get((await E(e,t)).tag)||null}async function x(e,t,r){const n=m(e.runner);(0,a.assert)(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:o,topics:u}=await E(e,r),{addr:c,subs:l}=k(e);let f=l.get(o);if(!f){const t={address:c||e,topics:u},a=t=>{let n=i;if(null==n)try{n=e.interface.getEvent(t.topics[0])}catch(e){}if(n){const o=n,a=i?e.interface.decodeEventLog(i,t.data,t.topics):[];P(e,r,a,(n=>new s.ContractEventPayload(e,n,r,o,t)))}else P(e,r,[],(n=>new s.ContractUnknownEventPayload(e,n,r,t)))};let d=[];f={tag:o,listeners:[],start:()=>{d.length||d.push(n.on(t,a))},stop:async()=>{if(0==d.length)return;let e=d;d=[],await Promise.all(e),n.off(t,a)}},l.set(o,f)}return f}let _=Promise.resolve();async function P(e,t,r,n){try{await _}catch(e){}const i=async function(e,t,r,n){await _;const i=await S(e,t);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter((({listener:t,once:i})=>{const o=Array.from(r);n&&o.push(n(i?null:t));try{t.call(e,...o)}catch(e){}return!i})),0===i.listeners.length&&(i.stop(),k(e).subs.delete(i.tag)),o>0}(e,t,r,n);return _=i,await i}const T=["then"];class I{target;interface;runner;filters;[w];fallback;constructor(e,t,r,o){(0,a.assertArgument)("string"==typeof e||(0,i.isAddressable)(e),"invalid value for Contract target","target",e),null==r&&(r=null);const u=n.Interface.from(t);let c;(0,a.defineProperties)(this,{target:e,runner:r,interface:u}),Object.defineProperty(this,w,{value:{}});let l=null,d=null;if(o){const e=m(r);d=new s.ContractTransactionResponse(this.interface,e,o)}let h=new Map;if("string"==typeof e)if((0,a.isHexString)(e))l=e,c=Promise.resolve(e);else{const t=y(r,"resolveName");if(!f(t))throw(0,a.makeError)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});c=t.resolveName(e).then((t=>{if(null==t)throw(0,a.makeError)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return k(this).addr=t,t}))}else c=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return k(this).addr=e,e}));var p,g;p=this,g={addrPromise:c,addr:l,deployTx:d,subs:h},A.set(p[w],g);const b=new Proxy({},{get:(e,t,r)=>{if("symbol"==typeof t||T.indexOf(t)>=0)return Reflect.get(e,t,r);try{return this.getEvent(t)}catch(e){if(!(0,a.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>T.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return(0,a.defineProperties)(this,{filters:b}),(0,a.defineProperties)(this,{fallback:u.receive||u.fallback?v(this):null}),new Proxy(this,{get:(e,t,r)=>{if("symbol"==typeof t||t in e||T.indexOf(t)>=0)return Reflect.get(e,t,r);try{return e.getFunction(t)}catch(e){if(!(0,a.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>"symbol"==typeof t||t in e||T.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new I(this.target,this.interface,e)}attach(e){return new I(e,this.interface,this.runner)}async getAddress(){return await k(this).addrPromise}async getDeployedCode(){const e=m(this.runner);(0,a.assert)(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const t=m(this.runner);return(0,a.assert)(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,r)=>{const n=async()=>{try{if(null!=await this.getDeployedCode())return e(this);t.once("block",n)}catch(e){r(e)}};n()}))}deploymentTransaction(){return k(this).deployTx}getFunction(e){"string"!=typeof e&&(e=e.format());const t=function(e,t){const r=function(...r){const n=e.interface.getFunction(t,r);return(0,a.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=async function(...t){const n=r(...t);let o={};if(n.inputs.length+1===t.length&&(o=await g(t.pop()),o.from&&(o.from=await(0,i.resolveAddress)(o.from,h(e.runner)))),n.inputs.length!==t.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const s=await b(e.runner,n.inputs,t);return Object.assign({},o,await(0,a.resolveProperties)({to:e.getAddress(),data:e.interface.encodeFunctionData(n,s)}))},o=async function(...e){const t=await f(...e);return 1===t.length?t[0]:t},u=async function(...t){const r=e.runner;(0,a.assert)(d(r),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await r.sendTransaction(await n(...t)),o=m(e.runner);return new s.ContractTransactionResponse(e.interface,o,i)},f=async function(...t){const i=y(e.runner,"call");(0,a.assert)(c(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const o=await n(...t);let s="0x";try{s=await i.call(o)}catch(t){if((0,a.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,o);throw t}const u=r(...t);return e.interface.decodeFunctionResult(u,s)},p=async(...e)=>r(...e).constant?await o(...e):await u(...e);return(0,a.defineProperties)(p,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:r,estimateGas:async function(...t){const r=y(e.runner,"estimateGas");return(0,a.assert)(l(r),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await r.estimateGas(await n(...t))},populateTransaction:n,send:u,staticCall:o,staticCallResult:f}),Object.defineProperty(p,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getFunction(t);return(0,a.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),p}(this,e);return t}getEvent(e){return"string"!=typeof e&&(e=e.format()),function(e,t){const r=function(...r){const n=e.interface.getEvent(t,r);return(0,a.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=function(...t){return new p(e,r(...t),t)};return(0,a.defineProperties)(n,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getEvent(t);return(0,a.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),n}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,r){null==t&&(t=0),null==r&&(r="latest");const{addr:n,addrPromise:i}=k(this),u=n||await i,{fragment:c,topics:l}=await E(this,e),f={address:u,topics:l,fromBlock:t,toBlock:r},d=m(this.runner);return(0,a.assert)(d,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await d.getLogs(f)).map((e=>{let t=c;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(e){}if(t)try{return new s.EventLog(e,this.interface,t)}catch(t){return new s.UndecodedEventLog(e,t)}return new o.Log(e,d)}))}async on(e,t){const r=await x(this,"on",e);return r.listeners.push({listener:t,once:!1}),r.start(),this}async once(e,t){const r=await x(this,"once",e);return r.listeners.push({listener:t,once:!0}),r.start(),this}async emit(e,...t){return await P(this,e,t,null)}async listenerCount(e){if(e){const t=await S(this,e);return t?t.listeners.length:0}const{subs:t}=k(this);let r=0;for(const{listeners:e}of t.values())r+=e.length;return r}async listeners(e){if(e){const t=await S(this,e);return t?t.listeners.map((({listener:e})=>e)):[]}const{subs:t}=k(this);let r=[];for(const{listeners:e}of t.values())r=r.concat(e.map((({listener:e})=>e)));return r}async off(e,t){const r=await S(this,e);if(!r)return this;if(t){const e=r.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&r.listeners.splice(e,1)}return null!=t&&0!==r.listeners.length||(r.stop(),k(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){const t=await S(this,e);if(!t)return this;t.stop(),k(this).subs.delete(t.tag)}else{const{subs:e}=k(this);for(const{tag:t,stop:r}of e.values())r(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){return class extends I{constructor(t,r=null){super(t,e,r)}}}static from(e,t,r){null==r&&(r=null);return new this(e,t,r)}}t.BaseContract=I;class O extends(function(){return I}()){}t.Contract=O},406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractFactory=void 0;const n=r(8456),i=r(646),o=r(5347),a=r(1008);class s{interface;bytecode;runner;constructor(e,t,r){const i=n.Interface.from(e);t instanceof Uint8Array||("object"==typeof t&&(t=t.object),t.startsWith("0x")||(t="0x"+t)),t=(0,o.hexlify)((0,o.getBytes)(t)),(0,o.defineProperties)(this,{bytecode:t,interface:i,runner:r||null})}attach(e){return new a.BaseContract(e,this.interface,this.runner)}async getDeployTransaction(...e){let t={};const r=this.interface.deploy;if(r.inputs.length+1===e.length&&(t=await(0,a.copyOverrides)(e.pop())),r.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const n=await(0,a.resolveArgs)(this.runner,r.inputs,e),i=(0,o.concat)([this.bytecode,this.interface.encodeDeploy(n)]);return Object.assign({},t,{data:i})}async deploy(...e){const t=await this.getDeployTransaction(...e);(0,o.assert)(this.runner&&"function"==typeof this.runner.sendTransaction,"factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const r=await this.runner.sendTransaction(t),n=(0,i.getCreateAddress)(r);return new a.BaseContract(n,this.interface,this.runner,r)}connect(e){return new s(this.interface,this.bytecode,e)}static fromSolidity(e,t){(0,o.assertArgument)(null!=e,"bad compiler output","output",e),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n="";return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}}t.ContractFactory=s},9288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UndecodedEventLog=t.EventLog=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractUnknownEventPayload=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=void 0;var n=r(1008);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return n.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return n.Contract}});var i=r(406);Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return i.ContractFactory}});var o=r(6526);Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return o.ContractEventPayload}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return o.ContractUnknownEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return o.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return o.ContractTransactionResponse}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return o.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return o.UndecodedEventLog}})},6526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractEventPayload=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.UndecodedEventLog=t.EventLog=void 0;const n=r(3807),i=r(5347);class o extends n.Log{interface;fragment;args;constructor(e,t,r){super(e,e.provider);const n=t.decodeEventLog(r,e.data,e.topics);(0,i.defineProperties)(this,{args:n,fragment:r,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}t.EventLog=o;class a extends n.Log{error;constructor(e,t){super(e,e.provider),(0,i.defineProperties)(this,{error:t})}}t.UndecodedEventLog=a;class s extends n.TransactionReceipt{#k;constructor(e,t,r){super(r,t),this.#k=e}get logs(){return super.logs.map((e=>{const t=e.topics.length?this.#k.getEvent(e.topics[0]):null;if(t)try{return new o(e,this.#k,t)}catch(t){return new a(e,t)}return e}))}}t.ContractTransactionReceipt=s;class u extends n.TransactionResponse{#k;constructor(e,t,r){super(r,t),this.#k=e}async wait(e,t){const r=await super.wait(e,t);return null==r?null:new s(this.#k,this.provider,r)}}t.ContractTransactionResponse=u;class c extends i.EventPayload{log;constructor(e,t,r,n){super(e,t,r),(0,i.defineProperties)(this,{log:n})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}t.ContractUnknownEventPayload=c;t.ContractEventPayload=class extends c{constructor(e,t,r,n,a){super(e,t,r,new o(a,e.interface,n));const s=e.interface.decodeEventLog(n,this.log.data,this.log.topics);(0,i.defineProperties)(this,{args:s,fragment:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}},7155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.pbkdf2Sync=t.createHmac=t.createHash=void 0;const n=r(4542),i=r(9e3),o=r(6978),a=r(9483),s=r(5347);const u=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}(),c=u.crypto||u.msCrypto;t.createHash=function(e){switch(e){case"sha256":return o.sha256.create();case"sha512":return a.sha512.create()}(0,s.assertArgument)(!1,"invalid hashing algorithm name","algorithm",e)},t.createHmac=function(e,t){const r={sha256:o.sha256,sha512:a.sha512}[e];return(0,s.assertArgument)(null!=r,"invalid hmac algorithm","algorithm",e),n.hmac.create(r,t)},t.pbkdf2Sync=function(e,t,r,n,u){const c={sha256:o.sha256,sha512:a.sha512}[u];return(0,s.assertArgument)(null!=c,"invalid pbkdf2 algorithm","algorithm",u),(0,i.pbkdf2)(c,e,t,{c:r,dkLen:n})},t.randomBytes=function(e){(0,s.assert)(null!=c,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),(0,s.assertArgument)(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);const t=new Uint8Array(e);return c.getRandomValues(t),t}},3192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeHmac=void 0;const n=r(7155),i=r(5347);let o=!1;const a=function(e,t,r){return(0,n.createHmac)(e,t).update(r).digest()};let s=a;function u(e,t,r){const n=(0,i.getBytes)(t,"key"),o=(0,i.getBytes)(r,"data");return(0,i.hexlify)(s(e,n,o))}t.computeHmac=u,u._=a,u.lock=function(){o=!0},u.register=function(e){if(o)throw new Error("computeHmac is locked");s=e},Object.freeze(u)},2291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lock=t.Signature=t.SigningKey=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=void 0;const n=r(3192);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return n.computeHmac}});const i=r(3905);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return i.keccak256}});const o=r(7307);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return o.ripemd160}});const a=r(2862);Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return a.pbkdf2}});const s=r(8964);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return s.randomBytes}});const u=r(5456);Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return u.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return u.scryptSync}});const c=r(5059);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return c.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return c.sha512}});var l=r(4534);Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return l.SigningKey}});var f=r(7005);Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return f.Signature}}),t.lock=function(){n.computeHmac.lock(),i.keccak256.lock(),a.pbkdf2.lock(),s.randomBytes.lock(),o.ripemd160.lock(),u.scrypt.lock(),u.scryptSync.lock(),c.sha256.lock(),c.sha512.lock(),s.randomBytes.lock()}},3905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=void 0;const n=r(6534),i=r(5347);let o=!1;const a=function(e){return(0,n.keccak_256)(e)};let s=a;function u(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(s(t))}t.keccak256=u,u._=a,u.lock=function(){o=!0},u.register=function(e){if(o)throw new TypeError("keccak256 is locked");s=e},Object.freeze(u)},2862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2=void 0;const n=r(7155),i=r(5347);let o=!1;const a=function(e,t,r,i,o){return(0,n.pbkdf2Sync)(e,t,r,i,o)};let s=a;function u(e,t,r,n,o){const a=(0,i.getBytes)(e,"password"),u=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(s(a,u,r,n,o))}t.pbkdf2=u,u._=a,u.lock=function(){o=!0},u.register=function(e){if(o)throw new Error("pbkdf2 is locked");s=e},Object.freeze(u)},8964:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=void 0;const n=r(7155);let i=!1;const o=function(e){return new Uint8Array((0,n.randomBytes)(e))};let a=o;function s(e){return a(e)}t.randomBytes=s,s._=o,s.lock=function(){i=!0},s.register=function(e){if(i)throw new Error("randomBytes is locked");a=e},Object.freeze(s)},7307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=void 0;const n=r(6481),i=r(5347);let o=!1;const a=function(e){return(0,n.ripemd160)(e)};let s=a;function u(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(s(t))}t.ripemd160=u,u._=a,u.lock=function(){o=!0},u.register=function(e){if(o)throw new TypeError("ripemd160 is locked");s=e},Object.freeze(u)},5456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptSync=t.scrypt=void 0;const n=r(9462),i=r(5347);let o=!1,a=!1;const s=async function(e,t,r,i,o,a,s){return await(0,n.scryptAsync)(e,t,{N:r,r:i,p:o,dkLen:a,onProgress:s})},u=function(e,t,r,i,o,a){return(0,n.scrypt)(e,t,{N:r,r:i,p:o,dkLen:a})};let c=s,l=u;async function f(e,t,r,n,o,a,s){const u=(0,i.getBytes)(e,"passwd"),l=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(await c(u,l,r,n,o,a,s))}function d(e,t,r,n,o,a){const s=(0,i.getBytes)(e,"passwd"),u=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(l(s,u,r,n,o,a))}t.scrypt=f,f._=s,f.lock=function(){a=!0},f.register=function(e){if(a)throw new Error("scrypt is locked");c=e},Object.freeze(f),t.scryptSync=d,d._=u,d.lock=function(){o=!0},d.register=function(e){if(o)throw new Error("scryptSync is locked");l=e},Object.freeze(d)},5059:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.sha256=void 0;const n=r(7155),i=r(5347),o=function(e){return(0,n.createHash)("sha256").update(e).digest()},a=function(e){return(0,n.createHash)("sha512").update(e).digest()};let s=o,u=a,c=!1,l=!1;function f(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(s(t))}function d(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(u(t))}t.sha256=f,f._=o,f.lock=function(){c=!0},f.register=function(e){if(c)throw new Error("sha256 is locked");s=e},Object.freeze(f),t.sha512=d,d._=a,d.lock=function(){l=!0},d.register=function(e){if(l)throw new Error("sha512 is locked");u=e},Object.freeze(f)},7005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;const n=r(1295),i=r(5347),o=BigInt(0),a=BigInt(1),s=BigInt(2),u=BigInt(27),c=BigInt(28),l=BigInt(35),f={};function d(e){return(0,i.zeroPadValue)((0,i.toBeArray)(e),32)}class h{#E;#S;#x;#_;get r(){return this.#E}set r(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid r","value",e),this.#E=(0,i.hexlify)(e)}get s(){return this.#S}set s(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid s","value",e);const t=(0,i.hexlify)(e);(0,i.assertArgument)(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),this.#S=t}get v(){return this.#x}set v(e){const t=(0,i.getNumber)(e,"value");(0,i.assertArgument)(27===t||28===t,"invalid v","v",e),this.#x=t}get networkV(){return this.#_}get legacyChainId(){const e=this.networkV;return null==e?null:h.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=(0,i.getBytes)(this.s);return this.yParity&&(e[0]|=128),(0,i.hexlify)(e)}get compactSerialized(){return(0,i.concat)([this.r,this.yParityAndS])}get serialized(){return(0,i.concat)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,r,n){(0,i.assertPrivate)(e,f,"Signature"),this.#E=t,this.#S=r,this.#x=n,this.#_=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new h(f,this.r,this.s,this.v);return this.networkV&&(e.#_=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=(0,i.getBigInt)(e,"v");return t==u||t==c?o:((0,i.assertArgument)(t>=l,"invalid EIP-155 v","v",e),(t-l)/s)}static getChainIdV(e,t){return(0,i.getBigInt)(e)*s+BigInt(35+t-27)}static getNormalizedV(e){const t=(0,i.getBigInt)(e);return t===o||t===u?27:t===a||t===c?28:((0,i.assertArgument)(t>=l,"invalid v","v",e),t&a?27:28)}static from(e){function t(t,r){(0,i.assertArgument)(t,r,"signature",e)}if(null==e)return new h(f,n.ZeroHash,n.ZeroHash,27);if("string"==typeof e){const r=(0,i.getBytes)(e,"signature");if(64===r.length){const e=(0,i.hexlify)(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new h(f,e,(0,i.hexlify)(t),n)}if(65===r.length){const e=(0,i.hexlify)(r.slice(0,32)),n=r.slice(32,64);t(!(128&n[0]),"non-canonical s");const o=h.getNormalizedV(r[64]);return new h(f,e,(0,i.hexlify)(n),o)}t(!1,"invalid raw signature length")}if(e instanceof h)return e.clone();const r=e.r;t(null!=r,"missing r");const o=d(r),a=function(e,r){if(null!=e)return d(e);if(null!=r){t((0,i.isHexString)(r,32),"invalid yParityAndS");const e=(0,i.getBytes)(r);return e[0]&=127,(0,i.hexlify)(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(!(128&(0,i.getBytes)(a)[0]),"non-canonical s");const{networkV:s,v:u}=function(e,r,n){if(null!=e){const t=(0,i.getBigInt)(e);return{networkV:t>=l?t:void 0,v:h.getNormalizedV(t)}}if(null!=r)return t((0,i.isHexString)(r,32),"invalid yParityAndS"),{v:128&(0,i.getBytes)(r)[0]?28:27};if(null!=n){switch((0,i.getNumber)(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new h(f,o,a,u);return s&&(c.#_=s),t(null==e.yParity||(0,i.getNumber)(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}}t.Signature=h},4534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0;const n=r(985),i=r(5347),o=r(7005);class a{#P;constructor(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid private key","privateKey","[REDACTED]"),this.#P=(0,i.hexlify)(e)}get privateKey(){return this.#P}get publicKey(){return a.computePublicKey(this.#P)}get compressedPublicKey(){return a.computePublicKey(this.#P,!0)}sign(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);const t=n.secp256k1.sign((0,i.getBytesCopy)(e),(0,i.getBytesCopy)(this.#P),{lowS:!0});return o.Signature.from({r:(0,i.toBeHex)(t.r,32),s:(0,i.toBeHex)(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=a.computePublicKey(e);return(0,i.hexlify)(n.secp256k1.getSharedSecret((0,i.getBytesCopy)(this.#P),(0,i.getBytes)(t),!1))}static computePublicKey(e,t){let r=(0,i.getBytes)(e,"key");if(32===r.length){const e=n.secp256k1.getPublicKey(r,!!t);return(0,i.hexlify)(e)}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}const o=n.secp256k1.ProjectivePoint.fromHex(r);return(0,i.hexlify)(o.toRawBytes(t))}static recoverPublicKey(e,t){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);const r=o.Signature.from(t);let a=n.secp256k1.Signature.fromCompact((0,i.getBytesCopy)((0,i.concat)([r.r,r.s])));a=a.addRecoveryBit(r.yParity);const s=a.recoverPublicKey((0,i.getBytesCopy)(e));return(0,i.assertArgument)(null!=s,"invalid signautre for digest","signature",t),"0x"+s.toHex(!1)}static addPoints(e,t,r){const i=n.secp256k1.ProjectivePoint.fromHex(a.computePublicKey(e).substring(2)),o=n.secp256k1.ProjectivePoint.fromHex(a.computePublicKey(t).substring(2));return"0x"+i.add(o).toHex(!!r)}}t.SigningKey=a},1752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=t.UndecodedEventLog=t.EventLog=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=t.MessagePrefix=t.EtherSymbol=t.ZeroHash=t.N=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.ZeroAddress=t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=t.Typed=t.TransactionDescription=t.Result=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.FallbackFragment=t.Fragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.AbiCoder=t.encodeBytes32String=t.decodeBytes32String=t.version=void 0,t.EnsPlugin=t.Network=t.EnsResolver=t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanProvider=t.CloudflareProvider=t.ChainstackProvider=t.AnkrProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.AbstractProvider=t.VoidSigner=t.NonceManager=t.AbstractSigner=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.getDefaultProvider=t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=t.SigningKey=t.Signature=t.lock=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=void 0,t.getUint=t.getNumber=t.getBigInt=t.FixedNumber=t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.isError=t.isCallException=t.makeError=t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.resolveProperties=t.defineProperties=t.zeroPadValue=t.zeroPadBytes=t.stripZerosLeft=t.isBytesLike=t.isHexString=t.hexlify=t.getBytesCopy=t.getBytes=t.dataSlice=t.dataLength=t.concat=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=t.Transaction=t.recoverAddress=t.computeAddress=t.accessListify=t.showThrottleMessage=t.copyRequest=t.UnmanagedSubscriber=t.SocketSubscriber=t.SocketPendingSubscriber=t.SocketEventSubscriber=t.SocketBlockSubscriber=t.MulticoinProviderPlugin=t.NetworkPlugin=t.GasCostPlugin=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EtherscanPlugin=void 0,t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.decryptCrowdsaleJson=t.isKeystoreJson=t.isCrowdsaleJson=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.Wallet=t.HDNodeVoidWallet=t.HDNodeWallet=t.BaseWallet=t.Mnemonic=t.uuidV4=t.encodeRlp=t.decodeRlp=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.mask=t.toTwos=t.fromTwos=t.toQuantity=t.toNumber=t.toBeHex=t.toBigInt=t.toBeArray=void 0;var n=r(4586);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return n.version}});var i=r(8456);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}}),Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return i.FallbackFragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return i.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return i.StructFragment}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return i.ErrorDescription}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return i.Result}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}}),Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return i.Typed}});var o=r(646);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return o.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return o.getIcapAddress}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return o.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return o.getCreate2Address}}),Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return o.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return o.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return o.resolveAddress}});var a=r(1295);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return a.ZeroAddress}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return a.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return a.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return a.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return a.MaxInt256}}),Object.defineProperty(t,"N",{enumerable:!0,get:function(){return a.N}}),Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return a.ZeroHash}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return a.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return a.MessagePrefix}});var s=r(9288);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return s.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return s.Contract}}),Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return s.ContractFactory}}),Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return s.ContractEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return s.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return s.ContractTransactionResponse}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return s.ContractUnknownEventPayload}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return s.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return s.UndecodedEventLog}});var u=r(2291);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return u.computeHmac}}),Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return u.randomBytes}}),Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return u.keccak256}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return u.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return u.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return u.sha512}}),Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return u.pbkdf2}}),Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return u.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return u.scryptSync}}),Object.defineProperty(t,"lock",{enumerable:!0,get:function(){return u.lock}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return u.Signature}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return u.SigningKey}});var c=r(3562);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return c.id}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return c.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return c.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return c.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return c.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return c.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return c.verifyMessage}}),Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return c.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return c.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return c.solidityPackedSha256}}),Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return c.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return c.verifyTypedData}});var l=r(3996);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return l.getDefaultProvider}}),Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return l.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return l.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return l.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return l.TransactionResponse}}),Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return l.AbstractSigner}}),Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return l.NonceManager}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return l.VoidSigner}}),Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return l.AbstractProvider}}),Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return l.FallbackProvider}}),Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return l.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return l.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return l.JsonRpcSigner}}),Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return l.BrowserProvider}}),Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return l.AlchemyProvider}}),Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return l.AnkrProvider}}),Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return l.ChainstackProvider}}),Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return l.CloudflareProvider}}),Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return l.EtherscanProvider}}),Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return l.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return l.InfuraWebSocketProvider}}),Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return l.PocketProvider}}),Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return l.QuickNodeProvider}}),Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return l.IpcSocketProvider}}),Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return l.SocketProvider}}),Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return l.WebSocketProvider}}),Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return l.EnsResolver}}),Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return l.Network}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return l.EnsPlugin}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return l.EtherscanPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FetchUrlFeeDataNetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return l.GasCostPlugin}}),Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return l.NetworkPlugin}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return l.MulticoinProviderPlugin}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return l.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return l.SocketEventSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return l.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return l.SocketSubscriber}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return l.UnmanagedSubscriber}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return l.copyRequest}}),Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return l.showThrottleMessage}});var f=r(7778);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return f.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return f.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return f.recoverAddress}}),Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return f.Transaction}});var d=r(5347);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return d.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return d.encodeBase58}}),Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return d.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return d.encodeBase64}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return d.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return d.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return d.dataSlice}}),Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return d.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return d.getBytesCopy}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return d.hexlify}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return d.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return d.isBytesLike}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return d.stripZerosLeft}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return d.zeroPadBytes}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return d.zeroPadValue}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return d.defineProperties}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return d.resolveProperties}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return d.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return d.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return d.assertArgumentCount}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return d.assertNormalize}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return d.assertPrivate}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return d.makeError}}),Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return d.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return d.isError}}),Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return d.EventPayload}}),Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return d.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return d.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return d.FetchCancelSignal}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return d.FixedNumber}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return d.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return d.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return d.getUint}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return d.toBeArray}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return d.toBigInt}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return d.toBeHex}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return d.toNumber}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return d.toQuantity}}),Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return d.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return d.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return d.mask}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return d.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return d.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return d.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return d.parseUnits}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return d.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return d.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return d.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return d.Utf8ErrorFuncs}}),Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return d.decodeRlp}}),Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return d.encodeRlp}}),Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return d.uuidV4}});var h=r(3279);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return h.Mnemonic}}),Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return h.BaseWallet}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return h.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return h.HDNodeVoidWallet}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return h.Wallet}}),Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return h.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return h.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return h.getIndexedAccountPath}}),Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return h.isCrowdsaleJson}}),Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return h.isKeystoreJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return h.decryptCrowdsaleJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return h.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return h.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return h.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return h.encryptKeystoreJsonSync}});var p=r(6591);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return p.Wordlist}}),Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return p.LangEn}}),Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return p.WordlistOwl}}),Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return p.WordlistOwlA}}),Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return p.wordlists}})},1993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=void 0;const n=r(2291),i=r(5347);t.id=function(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))}},3562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=void 0;var n=r(1993);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return n.id}});var i=r(3239);Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return i.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return i.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return i.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return i.dnsEncode}});var o=r(8717);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return o.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return o.verifyMessage}});var a=r(6065);Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return a.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return a.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return a.solidityPackedSha256}});var s=r(7215);Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return s.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return s.verifyTypedData}})},8717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=t.hashMessage=void 0;const n=r(2291),i=r(1295),o=r(7778),a=r(5347);function s(e){return"string"==typeof e&&(e=(0,a.toUtf8Bytes)(e)),(0,n.keccak256)((0,a.concat)([(0,a.toUtf8Bytes)(i.MessagePrefix),(0,a.toUtf8Bytes)(String(e.length)),e]))}t.hashMessage=s,t.verifyMessage=function(e,t){const r=s(e);return(0,o.recoverAddress)(r,t)}},3239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=void 0;const n=r(2291),i=r(5347),o=r(3514),a=new Uint8Array(32);function s(e){return(0,i.assertArgument)(0!==e.length,"invalid ENS name; empty component","comp",e),e}function u(e){const t=(0,i.toUtf8Bytes)(c(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e{(0,i.assertArgument)(t.length<=r,`label ${JSON.stringify(e)} exceeds ${r} bytes`,"name",e);const n=new Uint8Array(t.length+1);return n.set(t,1),n[0]=n.length-1,n}))))+"00"}},6065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=void 0;const n=r(646),i=r(2291),o=r(5347),a=new RegExp("^bytes([0-9]+)$"),s=new RegExp("^(u?int)([0-9]*)$"),u=new RegExp("^(.*)\\[([0-9]*)\\]$");function c(e,t,r){switch(e){case"address":return r?(0,o.getBytes)((0,o.zeroPadValue)(t,32)):(0,o.getBytes)((0,n.getAddress)(t));case"string":return(0,o.toUtf8Bytes)(t);case"bytes":return(0,o.getBytes)(t);case"bool":return t=t?"0x01":"0x00",r?(0,o.getBytes)((0,o.zeroPadValue)(t,32)):(0,o.getBytes)(t)}let i=e.match(s);if(i){let n="int"===i[1],a=parseInt(i[2]||"256");return(0,o.assertArgument)((!i[2]||i[2]===String(a))&&a%8==0&&0!==a&&a<=256,"invalid number type","type",e),r&&(a=256),n&&(t=(0,o.toTwos)(t,a)),(0,o.getBytes)((0,o.zeroPadValue)((0,o.toBeArray)(t),a/8))}if(i=e.match(a),i){const n=parseInt(i[1]);return(0,o.assertArgument)(String(n)===i[1]&&0!==n&&n<=32,"invalid bytes type","type",e),(0,o.assertArgument)((0,o.dataLength)(t)===n,`invalid value for ${e}`,"value",t),r?(0,o.getBytes)((0,o.zeroPadBytes)(t,32)):t}if(i=e.match(u),i&&Array.isArray(t)){const r=i[1],n=parseInt(i[2]||String(t.length));(0,o.assertArgument)(n===t.length,`invalid array length for ${e}`,"value",t);const a=[];return t.forEach((function(e){a.push(c(r,e,!0))})),(0,o.getBytes)((0,o.concat)(a))}(0,o.assertArgument)(!1,"invalid type","type",e)}function l(e,t){(0,o.assertArgument)(e.length===t.length,"wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(c(e,t[n]))})),(0,o.hexlify)((0,o.concat)(r))}t.solidityPacked=l,t.solidityPackedKeccak256=function(e,t){return(0,i.keccak256)(l(e,t))},t.solidityPackedSha256=function(e,t){return(0,i.sha256)(l(e,t))}},7215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=void 0;const n=r(646),i=r(2291),o=r(7778),a=r(5347),s=r(1993),u=new Uint8Array(32);u.fill(0);const c=BigInt(-1),l=BigInt(0),f=BigInt(1),d=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const h=(0,a.toBeHex)(f,32),p=(0,a.toBeHex)(l,32),y={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},m=["name","version","chainId","verifyingContract","salt"];function g(e){return function(t){return(0,a.assertArgument)("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const b={name:g("name"),version:g("version"),chainId:function(e){const t=(0,a.getBigInt)(e,"domain.chainId");return(0,a.assertArgument)(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):(0,a.toQuantity)(t)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(e){}(0,a.assertArgument)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=(0,a.getBytes)(e,"domain.salt");return(0,a.assertArgument)(32===t.length,'invalid domain value "salt"',"domain.salt",e),(0,a.hexlify)(t)}};function v(e){{const t=e.match(/^(u?)int(\d+)$/);if(t){const r=""===t[1],n=parseInt(t[2]);(0,a.assertArgument)(n%8==0&&0!==n&&n<=256&&t[2]===String(n),"invalid numeric width","type",e);const i=(0,a.mask)(d,r?n-1:n),o=r?(i+f)*c:l;return function(t){const n=(0,a.getBigInt)(t,"value");return(0,a.assertArgument)(n>=o&&n<=i,`value out-of-bounds for ${e}`,"value",n),(0,a.toBeHex)(r?(0,a.toTwos)(n,256):n,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0,a.assertArgument)(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){const n=(0,a.getBytes)(t);return(0,a.assertArgument)(n.length===r,`invalid length for ${e}`,"value",t),function(e){const t=(0,a.getBytes)(e),r=t.length%32;return r?(0,a.concat)([t,u.slice(r)]):(0,a.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,a.zeroPadValue)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?h:p};case"bytes":return function(e){return(0,i.keccak256)(e)};case"string":return function(e){return(0,s.id)(e)}}return null}function w(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}function A(e){const t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class k{primaryType;#T;get types(){return JSON.parse(this.#T)}#I;#O;constructor(e){this.#I=new Map,this.#O=new Map;const t=new Map,r=new Map,n=new Map,i={};Object.keys(e).forEach((o=>{i[o]=e[o].map((({name:t,type:r})=>{let{base:n,index:i}=A(r);return"int"!==n||e.int||(n="int256"),"uint"!==n||e.uint||(n="uint256"),{name:t,type:n+(i||"")}})),t.set(o,new Set),r.set(o,[]),n.set(o,new Set)})),this.#T=JSON.stringify(i);for(const n in i){const o=new Set;for(const s of i[n]){(0,a.assertArgument)(!o.has(s.name),`duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(n)}`,"types",e),o.add(s.name);const i=A(s.type).base;(0,a.assertArgument)(i!==n,`circular type reference to ${JSON.stringify(i)}`,"types",e);v(i)||((0,a.assertArgument)(r.has(i),`unknown type ${JSON.stringify(i)}`,"types",e),r.get(i).push(n),t.get(n).add(i))}}const o=Array.from(r.keys()).filter((e=>0===r.get(e).length));(0,a.assertArgument)(0!==o.length,"missing primary type","types",e),(0,a.assertArgument)(1===o.length,`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,a.defineProperties)(this,{primaryType:o[0]}),function i(o,s){(0,a.assertArgument)(!s.has(o),`circular type reference to ${JSON.stringify(o)}`,"types",e),s.add(o);for(const e of t.get(o))if(r.has(e)){i(e,s);for(const t of s)n.get(t).add(e)}s.delete(o)}(this.primaryType,new Set);for(const[e,t]of n){const r=Array.from(t);r.sort(),this.#I.set(e,w(e,i[e])+r.map((e=>w(e,i[e]))).join(""))}}getEncoder(e){let t=this.#O.get(e);return t||(t=this.#B(e),this.#O.set(e,t)),t}#B(e){{const t=v(e);if(t)return t}const t=A(e).array;if(t){const e=t.prefix,r=this.getEncoder(e);return n=>{(0,a.assertArgument)(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,"value",n);let o=n.map(r);return this.#I.has(e)&&(o=o.map(i.keccak256)),(0,i.keccak256)((0,a.concat)(o))}}const r=this.types[e];if(r){const t=(0,s.id)(this.#I.get(e));return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#I.has(r)?(0,i.keccak256)(n):n}));return n.unshift(t),(0,a.concat)(n)}}(0,a.assertArgument)(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#I.get(e);return(0,a.assertArgument)(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,i.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(v(e))return r(e,t);const n=A(e).array;if(n)return(0,a.assertArgument)(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,"value",t),t.map((e=>this._visit(n.prefix,e,r)));const i=this.types[e];if(i)return i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{});(0,a.assertArgument)(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new k(e)}static getPrimaryType(e){return k.from(e).primaryType}static hashStruct(e,t,r){return k.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=y[r];(0,a.assertArgument)(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>m.indexOf(e.name)-m.indexOf(t.name))),k.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,a.concat)(["0x1901",k.hashDomain(e),k.from(t).hash(r)])}static hash(e,t,r){return(0,i.keccak256)(k.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const i={};e.verifyingContract&&!(0,a.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=k.from(t);o.visit(r,((e,t)=>("address"!==e||(0,a.isHexString)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=await n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),{domain:e,value:r=o.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t))}}static getPayload(e,t,r){k.hashDomain(e);const n={},i=[];m.forEach((t=>{const r=e[t];null!=r&&(n[t]=b[t](r),i.push({name:t,type:y[t]}))}));const o=k.from(t);t=o.types;const s=Object.assign({},t);return(0,a.assertArgument)(null==s.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),s.EIP712Domain=i,o.encode(r),{types:s,domain:n,primaryType:o.primaryType,message:o.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,a.hexlify)((0,a.getBytes)(t));if(e.match(/^u?int/))return(0,a.getBigInt)(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return(0,a.assertArgument)("string"==typeof t,"invalid string","value",t),t}(0,a.assertArgument)(!1,"unsupported type","type",e)}))}}}t.TypedDataEncoder=k,t.verifyTypedData=function(e,t,r,n){return(0,o.recoverAddress)(k.hash(e,t,r),n)}},4193:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethers=void 0;const n=r(6740),i=n.__importStar(r(1752));t.ethers=i,n.__exportStar(r(1752),t)},8672:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractProvider=t.UnmanagedSubscriber=void 0;const n=r(646),i=r(1295),o=r(9288),a=r(3562),s=r(7778),u=r(5347),c=r(1691),l=r(5601),f=r(5317),d=r(3807),h=r(4338),p=BigInt(2);function y(e){return e&&"function"==typeof e.then}function m(e,t){return e+":"+JSON.stringify(t,((e,t)=>{if(null==t)return"null";if("bigint"==typeof t)return`bigint:${t.toString()}`;if("string"==typeof t)return t.toLowerCase();if("object"==typeof t&&!Array.isArray(t)){const e=Object.keys(t);return e.sort(),e.reduce(((e,r)=>(e[r]=t[r],e)),{})}return t}))}class g{name;constructor(e){(0,u.defineProperties)(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function b(e){return(e=Array.from(new Set(e).values())).sort(),e}async function v(e,t){if(null==e)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"==typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if((0,u.isHexString)(e,32)){const t=e.toLowerCase();return{type:"transaction",tag:m("tx",{hash:t}),hash:t}}if(e.orphan){const t=e;return{type:"orphan",tag:m("orphan",t),filter:(r=t,JSON.parse(JSON.stringify(r)))}}var r;if(e.address||e.topics){const r=e,i={topics:(r.topics||[]).map((e=>null==e?null:Array.isArray(e)?b(e.map((e=>e.toLowerCase()))):e.toLowerCase()))};if(r.address){const e=[],o=[],a=r=>{(0,u.isHexString)(r)?e.push(r):o.push((async()=>{e.push(await(0,n.resolveAddress)(r,t))})())};Array.isArray(r.address)?r.address.forEach(a):a(r.address),o.length&&await Promise.all(o),i.address=b(e.map((e=>e.toLowerCase())))}return{filter:i,tag:m("event",i),type:"event"}}(0,u.assertArgument)(!1,"unknown ProviderEvent","event",e)}function w(){return(new Date).getTime()}t.UnmanagedSubscriber=g;const A={cacheTimeout:250,pollingInterval:4e3};function k(e,t){try{const r=E(e,t);if(r)return(0,u.toUtf8String)(r)}catch(e){}return null}function E(e,t){if("0x"===e)return null;try{const r=(0,u.getNumber)((0,u.dataSlice)(e,t,t+32)),n=(0,u.getNumber)((0,u.dataSlice)(e,r,r+32));return(0,u.dataSlice)(e,r+32,r+32+n)}catch(e){}return null}function S(e){const t=(0,u.toBeArray)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function x(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}t.AbstractProvider=class{#C;#N;#R;#M;#U;#L;#j;#F;#D;#H;#z;#w;constructor(e,t){if(this.#w=Object.assign({},A,t||{}),"any"===e)this.#L=!0,this.#U=null;else if(e){const t=f.Network.from(e);this.#L=!1,this.#U=Promise.resolve(t),setTimeout((()=>{this.emit("network",t,null)}),0)}else this.#L=!1,this.#U=null;this.#F=-1,this.#j=new Map,this.#C=new Map,this.#N=new Map,this.#R=null,this.#M=!1,this.#D=1,this.#H=new Map,this.#z=!1}get pollingInterval(){return this.#w.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#N.values())}attachPlugin(e){if(this.#N.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#N.set(e.name,e.connect(this)),this}getPlugin(e){return this.#N.get(e)||null}get disableCcipRead(){return this.#z}set disableCcipRead(e){this.#z=!!e}async#q(e){const t=this.#w.cacheTimeout;if(t<0)return await this._perform(e);const r=m(e.method,e);let n=this.#j.get(r);return n||(n=this._perform(e),this.#j.set(r,n),setTimeout((()=>{this.#j.get(r)===n&&this.#j.delete(r)}),t)),await n}async ccipReadFetch(e,t,r){if(this.disableCcipRead||0===r.length||null==e.to)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let t=0;t=500,`response not found during CCIP fetch: ${l}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:a,errorMessage:l}}),o.push(l)}(0,u.assert)(!1,`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:o}})}_wrapBlock(e,t){return new d.Block((0,l.formatBlock)(e),this)}_wrapLog(e,t){return new d.Log((0,l.formatLog)(e),this)}_wrapTransactionReceipt(e,t){return new d.TransactionReceipt((0,l.formatTransactionReceipt)(e),this)}_wrapTransactionResponse(e,t){return new d.TransactionResponse((0,l.formatTransactionResponse)(e),this)}_detectNetwork(){(0,u.assert)(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){(0,u.assert)(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=(0,u.getNumber)(await this.#q({method:"getBlockNumber"}),"%response");return this.#F>=0&&(this.#F=e),e}_getAddress(e){return(0,n.resolveAddress)(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return(0,u.isHexString)(e)?(0,u.isHexString)(e,32)?e:(0,u.toQuantity)(e):("bigint"==typeof e&&(e=(0,u.getNumber)(e,"blockTag")),"number"==typeof e?e>=0?(0,u.toQuantity)(e):this.#F>=0?(0,u.toQuantity)(this.#F+e):this.getBlockNumber().then((t=>(0,u.toQuantity)(t+e))):void(0,u.assertArgument)(!1,"invalid blockTag","blockTag",e))}_getFilter(e){const t=(e.topics||[]).map((e=>null==e?null:Array.isArray(e)?b(e.map((e=>e.toLowerCase()))):e.toLowerCase())),r="blockHash"in e?e.blockHash:void 0,n=(e,n,i)=>{let o;switch(e.length){case 0:break;case 1:o=e[0];break;default:e.sort(),o=e}if(r&&(null!=n||null!=i))throw new Error("invalid filter");const a={};return o&&(a.address=o),t.length&&(a.topics=t),n&&(a.fromBlock=n),i&&(a.toBlock=i),r&&(a.blockHash=r),a};let i,o,a=[];if(e.address)if(Array.isArray(e.address))for(const t of e.address)a.push(this._getAddress(t));else a.push(this._getAddress(e.address));return"fromBlock"in e&&(i=this._getBlockTag(e.fromBlock)),"toBlock"in e&&(o=this._getBlockTag(e.toBlock)),a.filter((e=>"string"!=typeof e)).length||null!=i&&"string"!=typeof i||null!=o&&"string"!=typeof o?Promise.all([Promise.all(a),i,o]).then((e=>n(e[0],e[1],e[2]))):n(a,i,o)}_getTransactionRequest(e){const t=(0,d.copyRequest)(e),r=[];if(["to","from"].forEach((e=>{if(null==t[e])return;const i=(0,n.resolveAddress)(t[e],this);y(i)?r.push(async function(){t[e]=await i}()):t[e]=i})),null!=t.blockTag){const e=this._getBlockTag(t.blockTag);y(e)?r.push(async function(){t.blockTag=await e}()):t.blockTag=e}return r.length?async function(){return await Promise.all(r),t}():t}async getNetwork(){if(null==this.#U){const e=(async()=>{try{const e=await this._detectNetwork();return this.emit("network",e,null),e}catch(t){throw this.#U===e&&(this.#U=null),t}})();return this.#U=e,(await e).clone()}const e=this.#U,[t,r]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==r.chainId&&(this.#L?(this.emit("network",r,t),this.#U===e&&(this.#U=Promise.resolve(r))):(0,u.assert)(!1,`network changed: ${t.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:t,gasPrice:r,priorityFee:n}=await(0,u.resolveProperties)({_block:this.#G("latest",!1),gasPrice:(async()=>{try{const e=await this.#q({method:"getGasPrice"});return(0,u.getBigInt)(e,"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{const e=await this.#q({method:"getPriorityFee"});return(0,u.getBigInt)(e,"%response")}catch(e){}return null})()});let i=null,o=null;const a=this._wrapBlock(t,e);return a&&a.baseFeePerGas&&(o=null!=n?n:BigInt("1000000000"),i=a.baseFeePerGas*p+o),new d.FeeData(r,i,o)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const e=new u.FetchRequest(r.url),n=await r.processFunc(t,this,e);return new d.FeeData(n.gasPrice,n.maxFeePerGas,n.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return y(t)&&(t=await t),(0,u.getBigInt)(await this.#q({method:"estimateGas",transaction:t}),"%response")}async#K(e,t,r){(0,u.assert)(r<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:t,enableCcipRead:!0})});const i=(0,d.copyRequest)(e);try{return(0,u.hexlify)(await this._perform({method:"call",transaction:i,blockTag:t}))}catch(e){if(!this.disableCcipRead&&(0,u.isCallException)(e)&&e.data&&r>=0&&"latest"===t&&null!=i.to&&"0x556f1830"===(0,u.dataSlice)(e.data,0,4)){const o=e.data,a=await(0,n.resolveAddress)(i.to,this);let s;try{s=function(e){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};(0,u.assert)((0,u.dataLength)(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=(0,u.dataSlice)(e,0,32);(0,u.assert)((0,u.dataSlice)(r,0,12)===(0,u.dataSlice)(T,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=(0,u.dataSlice)(r,12);try{const r=[],n=(0,u.getNumber)((0,u.dataSlice)(e,32,64)),i=(0,u.getNumber)((0,u.dataSlice)(e,n,n+32)),o=(0,u.dataSlice)(e,n+32);for(let e=0;et[e])),t}((0,u.dataSlice)(e.data,4))}catch(e){(0,u.assert)(!1,e.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}(0,u.assert)(s.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:s.errorArgs}});const c=await this.ccipReadFetch(i,s.calldata,s.urls);(0,u.assert)(null!=c,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:e.data,errorArgs:s.errorArgs}});const l={to:a,data:(0,u.concat)([s.selector,P([c,s.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{const e=await this.#K(l,t,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:e}),e}catch(e){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:e}),e}}throw e}}async#V(e){const{value:t}=await(0,u.resolveProperties)({network:this.getNetwork(),value:e});return t}async call(e){const{tx:t,blockTag:r}=await(0,u.resolveProperties)({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#V(this.#K(t,r,e.enableCcipRead?0:-1))}async#J(e,t,r){let n=this._getAddress(t),i=this._getBlockTag(r);return"string"==typeof n&&"string"==typeof i||([n,i]=await Promise.all([n,i])),await this.#V(this.#q(Object.assign(e,{address:n,blockTag:i})))}async getBalance(e,t){return(0,u.getBigInt)(await this.#J({method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return(0,u.getNumber)(await this.#J({method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return(0,u.hexlify)(await this.#J({method:"getCode"},e,t))}async getStorage(e,t,r){const n=(0,u.getBigInt)(t,"position");return(0,u.hexlify)(await this.#J({method:"getStorage",position:n},e,r))}async broadcastTransaction(e){const{blockNumber:t,hash:r,network:n}=await(0,u.resolveProperties)({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=s.Transaction.from(e);if(i.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,n).replaceableTransaction(t)}async#G(e,t){if((0,u.isHexString)(e,32))return await this.#q({method:"getBlock",blockHash:e,includeTransactions:t});let r=this._getBlockTag(e);return"string"!=typeof r&&(r=await r),await this.#q({method:"getBlock",blockTag:r,includeTransactions:t})}async getBlock(e,t){const{network:r,params:n}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#G(e,!!t)});return null==n?null:this._wrapBlock(n,r)}async getTransaction(e){const{network:t,params:r}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#q({method:"getTransaction",hash:e})});return null==r?null:this._wrapTransactionResponse(r,t)}async getTransactionReceipt(e){const{network:t,params:r}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#q({method:"getTransactionReceipt",hash:e})});if(null==r)return null;if(null==r.gasPrice&&null==r.effectiveGasPrice){const t=await this.#q({method:"getTransaction",hash:e});if(null==t)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=t.gasPrice}return this._wrapTransactionReceipt(r,t)}async getTransactionResult(e){const{result:t}=await(0,u.resolveProperties)({network:this.getNetwork(),result:this.#q({method:"getTransactionResult",hash:e})});return null==t?null:(0,u.hexlify)(t)}async getLogs(e){let t=this._getFilter(e);y(t)&&(t=await t);const{network:r,params:n}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#q({method:"getLogs",filter:t})});return n.map((e=>this._wrapLog(e,r)))}_getProvider(e){(0,u.assert)(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await c.EnsResolver.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=(0,n.getAddress)(e);const t=(0,a.namehash)(e.substring(2).toLowerCase()+".addr.reverse");try{const r=await c.EnsResolver.getEnsAddress(this),n=new o.Contract(r,["function resolver(bytes32) view returns (address)"],this),a=await n.resolver(t);if(null==a||a===i.ZeroAddress)return null;const s=new o.Contract(a,["function name(bytes32) view returns (string)"],this),u=await s.name(t);return await this.resolveName(u)!==e?null:u}catch(e){if((0,u.isError)(e,"BAD_DATA")&&"0x"===e.value)return null;if((0,u.isError)(e,"CALL_EXCEPTION"))return null;throw e}return null}async waitForTransaction(e,t,r){const n=null!=t?t:1;return 0===n?this.getTransactionReceipt(e):new Promise((async(t,i)=>{let o=null;const a=async r=>{try{const i=await this.getTransactionReceipt(e);if(null!=i&&r-i.blockNumber+1>=n)return t(i),void(o&&(clearTimeout(o),o=null))}catch(e){console.log("EEE",e)}this.once("block",a)};null!=r&&(o=setTimeout((()=>{null!=o&&(o=null,this.off("block",a),i((0,u.makeError)("timeout","TIMEOUT",{reason:"timeout"})))}),r)),a(await this.getBlockNumber())}))}async waitForBlock(e){(0,u.assert)(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=this.#H.get(e);t&&(t.timer&&clearTimeout(t.timer),this.#H.delete(e))}_setTimeout(e,t){null==t&&(t=0);const r=this.#D++,n=()=>{this.#H.delete(r),e()};if(this.paused)this.#H.set(r,{timer:null,func:n,time:t});else{const e=setTimeout(n,t);this.#H.set(r,{timer:e,func:n,time:w()})}return r}_forEachSubscriber(e){for(const t of this.#C.values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new g(e.type);case"block":{const e=new h.PollingBlockSubscriber(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new h.PollingBlockTagSubscriber(this,e.type);case"event":return new h.PollingEventSubscriber(this,e.filter);case"transaction":return new h.PollingTransactionSubscriber(this,e.hash);case"orphan":return new h.PollingOrphanSubscriber(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const r of this.#C.values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=t,r.started&&t.start(),null!=this.#R&&t.pause(this.#R);break}}async#W(e,t){let r=await v(e,this);return"event"===r.type&&t&&t.length>0&&!0===t[0].removed&&(r=await v({orphan:"drop-log",log:t[0]},this)),this.#C.get(r.tag)||null}async#Q(e){const t=await v(e,this),r=t.tag;let n=this.#C.get(r);if(!n){n={subscriber:this._getSubscriber(t),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#C.set(r,n)}return n}async on(e,t){const r=await this.#Q(e);return r.listeners.push({listener:t,once:!1}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#R&&r.subscriber.pause(this.#R)),this}async once(e,t){const r=await this.#Q(e);return r.listeners.push({listener:t,once:!0}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#R&&r.subscriber.pause(this.#R)),this}async emit(e,...t){const r=await this.#W(e,t);if(!r||0===r.listeners.length)return!1;const n=r.listeners.length;return r.listeners=r.listeners.filter((({listener:r,once:n})=>{const i=new u.EventPayload(this,n?null:r,e);try{r.call(this,...t,i)}catch(e){}return!n})),0===r.listeners.length&&(r.started&&r.subscriber.stop(),this.#C.delete(r.tag)),n>0}async listenerCount(e){if(e){const t=await this.#W(e);return t?t.listeners.length:0}let t=0;for(const{listeners:e}of this.#C.values())t+=e.length;return t}async listeners(e){if(e){const t=await this.#W(e);return t?t.listeners.map((({listener:e})=>e)):[]}let t=[];for(const{listeners:e}of this.#C.values())t=t.concat(e.map((({listener:e})=>e)));return t}async off(e,t){const r=await this.#W(e);if(!r)return this;if(t){const e=r.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&r.listeners.splice(e,1)}return t&&0!==r.listeners.length||(r.started&&r.subscriber.stop(),this.#C.delete(r.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:r,subscriber:n}=await this.#Q(e);r&&n.stop(),this.#C.delete(t)}else for(const[e,{started:t,subscriber:r}]of this.#C)t&&r.stop(),this.#C.delete(e);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return this.#M}destroy(){this.removeAllListeners();for(const e of this.#H.keys())this._clearTimeout(e);this.#M=!0}get paused(){return null!=this.#R}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#F=-1,null!=this.#R){if(this.#R==!!e)return;(0,u.assert)(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber((t=>t.pause(e))),this.#R=!!e;for(const e of this.#H.values())e.timer&&clearTimeout(e.timer),e.time=w()-e.time}resume(){if(null!=this.#R){this._forEachSubscriber((e=>e.resume())),this.#R=null;for(const e of this.#H.values()){let t=e.time;t<0&&(t=0),e.time=w(),setTimeout(e.func,t)}}}};const _=new Uint8Array([]);function P(e){const t=[];let r=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VoidSigner=t.AbstractSigner=void 0;const n=r(646),i=r(7778),o=r(5347),a=r(3807);function s(e,t){if(e.provider)return e.provider;(0,o.assert)(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function u(e,t){let r=(0,a.copyRequest)(t);if(null!=r.to&&(r.to=(0,n.resolveAddress)(r.to,e)),null!=r.from){const t=r.from;r.from=Promise.all([e.getAddress(),(0,n.resolveAddress)(t,e)]).then((([e,t])=>((0,o.assertArgument)(e.toLowerCase()===t.toLowerCase(),"transaction from mismatch","tx.from",t),e)))}else r.from=e.getAddress();return await(0,o.resolveProperties)(r)}class c{provider;constructor(e){(0,o.defineProperties)(this,{provider:e||null})}async getNonce(e){return s(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await u(this,e)}async populateTransaction(e){const t=s(this,"populateTransaction"),r=await u(this,e);null==r.nonce&&(r.nonce=await this.getNonce("pending")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));const n=await this.provider.getNetwork();if(null!=r.chainId){const t=(0,o.getBigInt)(r.chainId);(0,o.assertArgument)(t===n.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=n.chainId;const i=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null==r.gasPrice||2!==r.type&&!i?0!==r.type&&1!==r.type||!i||(0,o.assertArgument)(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):(0,o.assertArgument)(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas)if(0===r.type||1===r.type){const e=await t.getFeeData();(0,o.assert)(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==r.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(r.type=2,null!=r.gasPrice){const e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?((0,o.assert)(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):(0,o.assert)(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==r.type&&3!==r.type||(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else r.type=2;return await(0,o.resolveProperties)(r)}async estimateGas(e){return s(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return s(this,"call").call(await this.populateCall(e))}async resolveName(e){const t=s(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){const t=s(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const n=i.Transaction.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}}t.AbstractSigner=c;class l extends c{address;constructor(e,t){super(t),(0,o.defineProperties)(this,{address:e})}async getAddress(){return this.address}connect(e){return new l(this.address,e)}#Z(e,t){(0,o.assert)(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:t})}async signTransaction(e){this.#Z("transactions","signTransaction")}async signMessage(e){this.#Z("messages","signMessage")}async signTypedData(e,t,r){this.#Z("typed-data","signTypedData")}}t.VoidSigner=l},9973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showThrottleMessage=void 0;const r=new Set;t.showThrottleMessage=function(e){r.has(e)||(r.add(e),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${e} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}},2347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultProvider=void 0;const n=r(5347),i=r(6806),o=r(7841),a=r(8907),s=r(2271),u=r(5047),c=r(5855),l=r(8817),f=r(9902),d=r(2371),h=r(5317),p=r(873);const y="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");t.getDefaultProvider=function(e,t){null==t&&(t={});const r=e=>"-"!==t[e]&&("string"==typeof t.exclusive?e===t.exclusive:!Array.isArray(t.exclusive)||-1!==t.exclusive.indexOf(e));if("string"==typeof e&&e.match(/^https?:/))return new d.JsonRpcProvider(e);if("string"==typeof e&&e.match(/^wss?:/)||(m=e)&&"function"==typeof m.send&&"function"==typeof m.close)return new p.WebSocketProvider(e);var m;let g=null;try{g=h.Network.from(e)}catch(e){}const b=[];if(r("publicPolygon")&&g&&("matic"===g.name?b.push(new d.JsonRpcProvider("https://polygon-rpc.com/",g,{staticNetwork:g})):"matic-amoy"===g.name&&b.push(new d.JsonRpcProvider("https://rpc-amoy.polygon.technology/",g,{staticNetwork:g}))),r("alchemy"))try{b.push(new o.AlchemyProvider(e,t.alchemy))}catch(e){}if(r("ankr")&&null!=t.ankr)try{b.push(new i.AnkrProvider(e,t.ankr))}catch(e){}if(r("chainstack"))try{b.push(new a.ChainstackProvider(e,t.chainstack))}catch(e){}if(r("cloudflare"))try{b.push(new s.CloudflareProvider(e))}catch(e){}if(r("etherscan"))try{b.push(new u.EtherscanProvider(e,t.etherscan))}catch(e){}if(r("infura"))try{let r,n=t.infura;"object"==typeof n&&(r=n.projectSecret,n=n.projectId),b.push(new c.InfuraProvider(e,n,r))}catch(e){}if(r("quicknode"))try{let r=t.quicknode;b.push(new l.QuickNodeProvider(e,r))}catch(e){}if((0,n.assert)(b.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),1===b.length)return b[0];let v=Math.floor(b.length/2);return v>2&&(v=2),g&&-1!==y.indexOf(g.name)&&(v=1),t&&t.quorum&&(v=t.quorum),new f.FallbackProvider(b,void 0,{quorum:v})}},1691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnsResolver=t.BasicMulticoinProviderPlugin=t.MulticoinProviderPlugin=void 0;const n=r(646),i=r(1295),o=r(9288),a=r(3562),s=r(5347);function u(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):(0,s.assertArgument)(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class c{name;constructor(e){(0,s.defineProperties)(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}t.MulticoinProviderPlugin=c;t.BasicMulticoinProviderPlugin=class extends c{constructor(){super("org.ethers.plugins.provider.BasicMulticoin")}};const l=new RegExp("^(ipfs)://(.*)$","i"),f=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),l,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class d{provider;address;name;#Y;#X;constructor(e,t,r){(0,s.defineProperties)(this,{provider:e,address:t,name:r}),this.#Y=null,this.#X=new o.Contract(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e)}async supportsWildcard(){return null==this.#Y&&(this.#Y=(async()=>{try{return await this.#X.supportsInterface("0x9061b923")}catch(e){if((0,s.isError)(e,"CALL_EXCEPTION"))return!1;throw this.#Y=null,e}})()),await this.#Y}async#$(e,t){t=(t||[]).slice();const r=this.#X.interface;t.unshift((0,a.namehash)(this.name));let n=null;await this.supportsWildcard()&&(n=r.getFunction(e),(0,s.assert)(n,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),t=[(0,a.dnsEncode)(this.name,255),r.encodeFunctionData(n,t)],e="resolve(bytes,bytes)"),t.push({enableCcipRead:!0});try{const i=await this.#X[e](...t);return n?r.decodeFunctionResult(n,i)[0]:i}catch(e){if(!(0,s.isError)(e,"CALL_EXCEPTION"))throw e}return null}async getAddress(e){if(null==e&&(e=60),60===e)try{const e=await this.#$("addr(bytes32)");return null==e||e===i.ZeroAddress?null:e}catch(e){if((0,s.isError)(e,"CALL_EXCEPTION"))return null;throw e}if(e>=0&&e<2147483648){let t=e+2147483648;const r=await this.#$("addr(bytes32,uint)",[t]);if((0,s.isHexString)(r,20))return(0,n.getAddress)(r)}let t=null;for(const r of this.provider.plugins)if(r instanceof c&&r.supportsCoinType(e)){t=r;break}if(null==t)return null;const r=await this.#$("addr(bytes32,uint)",[e]);if(null==r||"0x"===r)return null;const o=await t.decodeAddress(e,r);if(null!=o)return o;(0,s.assert)(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){const t=await this.#$("text(bytes32,string)",[e]);return null==t||"0x"===t?null:t}async getContentHash(){const e=await this.#$("contenthash(bytes32)");if(null==e||"0x"===e)return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e="e3010170"===t[1]?"ipfs":"ipns",r=parseInt(t[4],16);if(t[5].length===2*r)return`${e}://${(0,s.encodeBase58)("0x"+t[2])}`}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&64===r[1].length)return`bzz://${r[1]}`;(0,s.assert)(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const t=await this.getText("avatar");if(null==t)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatTransactionResponse=t.formatTransactionReceipt=t.formatReceiptLog=t.formatBlock=t.formatLog=t.formatUint256=t.formatHash=t.formatData=t.formatBoolean=t.object=t.arrayOf=t.allowNull=void 0;const n=r(646),i=r(2291),o=r(7778),a=r(5347),s=BigInt(0);function u(e,t){return function(r){return null==r?t:e(r)}}function c(e,t){return r=>{if(t&&null==r)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map((t=>e(t)))}}function l(e,t){return r=>{const n={};for(const i in e){let o=i;if(t&&i in t&&!(o in r))for(const e of t[i])if(e in r){o=e;break}try{const t=e[i](r[o]);void 0!==t&&(n[i]=t)}catch(e){const t=e instanceof Error?e.message:"not-an-error";(0,a.assert)(!1,`invalid value for value.${i} (${t})`,"BAD_DATA",{value:r})}}return n}}function f(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}(0,a.assertArgument)(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}function d(e){return(0,a.assertArgument)((0,a.isHexString)(e,!0),"invalid data","value",e),e}function h(e){return(0,a.assertArgument)((0,a.isHexString)(e,32),"invalid hash","value",e),e}t.allowNull=u,t.arrayOf=c,t.object=l,t.formatBoolean=f,t.formatData=d,t.formatHash=h,t.formatUint256=function(e){if(!(0,a.isHexString)(e))throw new Error("invalid uint256");return(0,a.zeroPadValue)(e,32)};const p=l({address:n.getAddress,blockHash:h,blockNumber:a.getNumber,data:d,index:a.getNumber,removed:u(f,!1),topics:c(h),transactionHash:h,transactionIndex:a.getNumber},{index:["logIndex"]});t.formatLog=function(e){return p(e)};const y=l({hash:u(h),parentHash:h,parentBeaconBlockRoot:u(h,null),number:a.getNumber,timestamp:a.getNumber,nonce:u(d),difficulty:a.getBigInt,gasLimit:a.getBigInt,gasUsed:a.getBigInt,stateRoot:u(h,null),receiptsRoot:u(h,null),blobGasUsed:u(a.getBigInt,null),excessBlobGas:u(a.getBigInt,null),miner:u(n.getAddress),prevRandao:u(h,null),extraData:d,baseFeePerGas:u(a.getBigInt)},{prevRandao:["mixHash"]});t.formatBlock=function(e){const t=y(e);return t.transactions=e.transactions.map((e=>"string"==typeof e?e:v(e))),t};const m=l({transactionIndex:a.getNumber,blockNumber:a.getNumber,transactionHash:h,address:n.getAddress,topics:c(h),data:d,index:a.getNumber,blockHash:h},{index:["logIndex"]});function g(e){return m(e)}t.formatReceiptLog=g;const b=l({to:u(n.getAddress,null),from:u(n.getAddress,null),contractAddress:u(n.getAddress,null),index:a.getNumber,root:u(a.hexlify),gasUsed:a.getBigInt,blobGasUsed:u(a.getBigInt,null),logsBloom:u(d),blockHash:h,hash:h,logs:c(g),blockNumber:a.getNumber,cumulativeGasUsed:a.getBigInt,effectiveGasPrice:u(a.getBigInt),blobGasPrice:u(a.getBigInt,null),status:u(a.getNumber),type:u(a.getNumber,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function v(e){e.to&&(0,a.getBigInt)(e.to)===s&&(e.to="0x0000000000000000000000000000000000000000");const t=l({hash:h,index:u(a.getNumber,void 0),type:e=>"0x"===e||null==e?0:(0,a.getNumber)(e),accessList:u(o.accessListify,null),blobVersionedHashes:u(c(h,!0),null),blockHash:u(h,null),blockNumber:u(a.getNumber,null),transactionIndex:u(a.getNumber,null),from:n.getAddress,gasPrice:u(a.getBigInt),maxPriorityFeePerGas:u(a.getBigInt),maxFeePerGas:u(a.getBigInt),maxFeePerBlobGas:u(a.getBigInt,null),gasLimit:a.getBigInt,to:u(n.getAddress,null),value:a.getBigInt,nonce:a.getNumber,data:d,creates:u(n.getAddress,null),chainId:u(a.getBigInt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==t.to&&null==t.creates&&(t.creates=(0,n.getCreateAddress)(t)),1!==e.type&&2!==e.type||null!=e.accessList||(t.accessList=[]),e.signature?t.signature=i.Signature.from(e.signature):t.signature=i.Signature.from(e),null==t.chainId){const e=t.signature.legacyChainId;null!=e&&(t.chainId=e)}return t.blockHash&&(0,a.getBigInt)(t.blockHash)===s&&(t.blockHash=null),t}t.formatTransactionReceipt=function(e){return b(e)},t.formatTransactionResponse=v},3996:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanPlugin=t.EtherscanProvider=t.ChainstackProvider=t.CloudflareProvider=t.AnkrProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.copyRequest=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=t.NonceManager=t.Network=t.MulticoinProviderPlugin=t.EnsResolver=t.getDefaultProvider=t.showThrottleMessage=t.VoidSigner=t.AbstractSigner=t.UnmanagedSubscriber=t.AbstractProvider=void 0;var n=r(8672);Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return n.AbstractProvider}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return n.UnmanagedSubscriber}});var i=r(3071);Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return i.AbstractSigner}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return i.VoidSigner}});var o=r(9973);Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return o.showThrottleMessage}});var a=r(2347);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return a.getDefaultProvider}});var s=r(1691);Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return s.EnsResolver}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return s.MulticoinProviderPlugin}});var u=r(5317);Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return u.Network}});var c=r(9596);Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return c.NonceManager}});var l=r(4491);Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return l.NetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return l.GasCostPlugin}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return l.EnsPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FetchUrlFeeDataNetworkPlugin}});var f=r(3807);Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return f.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return f.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return f.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return f.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return f.TransactionResponse}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return f.copyRequest}});var d=r(9902);Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return d.FallbackProvider}});var h=r(2371);Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return h.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return h.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return h.JsonRpcSigner}});var p=r(254);Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return p.BrowserProvider}});var y=r(7841);Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return y.AlchemyProvider}});var m=r(6806);Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return m.AnkrProvider}});var g=r(2271);Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return g.CloudflareProvider}});var b=r(8907);Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return b.ChainstackProvider}});var v=r(5047);Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return v.EtherscanProvider}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return v.EtherscanPlugin}});var w=r(5855);Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return w.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return w.InfuraWebSocketProvider}});var A=r(2398);Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return A.PocketProvider}});var k=r(8817);Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return k.QuickNodeProvider}});const E=r(4584);Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return E.IpcSocketProvider}});var S=r(4945);Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return S.SocketProvider}});var x=r(873);Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return x.WebSocketProvider}});var _=r(4945);Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return _.SocketSubscriber}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return _.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return _.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return _.SocketEventSubscriber}})},5317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;const n=r(7778),i=r(5347),o=r(4491),a=new Map;class s{#te;#re;#N;constructor(e,t){this.#te=e,this.#re=(0,i.getBigInt)(t),this.#N=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#te}set name(e){this.#te=e}get chainId(){return this.#re}set chainId(e){this.#re=(0,i.getBigInt)(e,"chainId")}matches(e){if(null==e)return!1;if("string"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return this.name===e}if("number"==typeof e||"bigint"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return!1}if("object"==typeof e){if(null!=e.chainId){try{return this.chainId===(0,i.getBigInt)(e.chainId)}catch(e){}return!1}return null!=e.name&&this.name===e.name}return!1}get plugins(){return Array.from(this.#N.values())}attachPlugin(e){if(this.#N.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#N.set(e.name,e.clone()),this}getPlugin(e){return this.#N.get(e)||null}getPlugins(e){return this.plugins.filter((t=>t.name.split("#")[0]===e))}clone(){const e=new s(this.name,this.chainId);return this.plugins.forEach((t=>{e.attachPlugin(t.clone())})),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new o.GasCostPlugin;let r=t.txBase;if(null==e.to&&(r+=t.txCreate),e.data)for(let n=2;n{n.attachPlugin(e)})),n};s.register(e,n),s.register(t,n),r.altNames&&r.altNames.forEach((e=>{s.register(e,n)}))}l=!0,e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{ensNetwork:11155111}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[c("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[c("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",11155420,{}),e("xdai",100,{ensNetwork:1})}(),null==e)return s.from("mainnet");if("number"==typeof e&&(e=BigInt(e)),"string"==typeof e||"bigint"==typeof e){const t=a.get(e);if(t)return t();if("bigint"==typeof e)return new s("unknown",e);(0,i.assertArgument)(!1,"unknown network","network",e)}if("function"==typeof e.clone){return e.clone()}if("object"==typeof e){(0,i.assertArgument)("string"==typeof e.name&&"number"==typeof e.chainId,"invalid network object name or chainId","network",e);const t=new s(e.name,e.chainId);return(e.ensAddress||null!=e.ensNetwork)&&t.attachPlugin(new o.EnsPlugin(e.ensAddress,e.ensNetwork)),t}(0,i.assertArgument)(!1,"invalid network","network",e)}static register(e,t){"number"==typeof e&&(e=BigInt(e));const r=a.get(e);r&&(0,i.assertArgument)(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",e),a.set(e,t)}}function u(e,t){const r=String(e);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${e}`);const n=r.split(".");if(1===n.length&&n.push(""),2!==n.length)throw new Error(`invalid gwei value: ${e}`);for(;n[1].length9){let e=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||e++,n[1]=e.toString()}return BigInt(n[0]+n[1])}function c(e){return new o.FetchUrlFeeDataNetworkPlugin(e,(async(e,t,r)=>{let n;r.setHeader("User-Agent","ethers");try{const[t,i]=await Promise.all([r.send(),e()]);n=t;const o=n.bodyJson.standard;return{gasPrice:i.gasPrice,maxFeePerGas:u(o.maxFee,9),maxPriorityFeePerGas:u(o.maxPriorityFee,9)}}catch(e){(0,i.assert)(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:n,error:e})}}))}t.Network=s;let l=!1},4491:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=void 0;const n=r(8166),i=r(5347);class o{name;constructor(e){(0,n.defineProperties)(this,{name:e})}clone(){return new o(this.name)}}t.NetworkPlugin=o;class a extends o{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,t){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);const r={effectiveBlock:e};function o(e,n){let o=(t||{})[e];null==o&&(o=n),(0,i.assertArgument)("number"==typeof o,`invalud value for ${e}`,"costs",t),r[e]=o}o("txBase",21e3),o("txCreate",32e3),o("txDataZero",4),o("txDataNonzero",16),o("txAccessListStorageKey",1900),o("txAccessListAddress",2400),(0,n.defineProperties)(this,r)}clone(){return new a(this.effectiveBlock,this)}}t.GasCostPlugin=a;class s extends o{address;targetNetwork;constructor(e,t){super("org.ethers.plugins.network.Ens"),(0,n.defineProperties)(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==t?1:t})}clone(){return new s(this.address,this.targetNetwork)}}t.EnsPlugin=s;class u extends o{#ne;get feeDataFunc(){return this.#ne}constructor(e){super("org.ethers.plugins.network.FeeData"),this.#ne=e}async getFeeData(e){return await this.#ne(e)}clone(){return new u(this.#ne)}}t.FeeDataNetworkPlugin=u;t.FetchUrlFeeDataNetworkPlugin=class extends o{#ie;#oe;get url(){return this.#ie}get processFunc(){return this.#oe}constructor(e,t){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#ie=e,this.#oe=t}clone(){return this}}},7841:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlchemyProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371),s="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class u extends a.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=s);super(u.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new u(e,this.apiKey)}catch(e){}return super._getProvider(e)}async _perform(e){if("getTransactionResult"===e.method){const{trace:t,tx:r}=await(0,n.resolveProperties)({trace:this.send("trace_transaction",[e.hash]),tx:this.getTransaction(e.hash)});if(null==t||null==r)return null;let i,o=!1;try{i=t[0].result.output,o="Reverted"===t[0].error}catch(e){}if(i)return(0,n.assert)(!o,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:i,reason:null,transaction:r,invocation:null,revert:null}),i;(0,n.assert)(!1,"could not parse trace result","BAD_DATA",{value:t})}return await super._perform(e)}isCommunityResource(){return this.apiKey===s}static getRequest(e,t){null==t&&(t=s);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v2/${t}`);return r.allowGzip=!0,t===s&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("alchemy"),!0)),r}}t.AlchemyProvider=u},6806:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnkrProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371),s="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";class u extends a.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=s);const i={polling:!0,staticNetwork:r};super(u.getRequest(r,t),r,i),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new u(e,this.apiKey)}catch(e){}return super._getProvider(e)}static getRequest(e,t){null==t&&(t=s);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===s&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("AnkrProvider"),!0)),r}getRpcError(e,t){return"eth_sendRawTransaction"===e.method&&t&&t.error&&"INTERNAL_ERROR: could not replace existing tx"===t.error.message&&(t.error.message="replacement transaction underpriced"),super.getRpcError(e,t)}isCommunityResource(){return this.apiKey===s}}t.AnkrProvider=u},254:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserProvider=void 0;const n=r(5347),i=r(2371);class o extends i.JsonRpcApiPollingProvider{#ae;constructor(e,t,r){const i=Object.assign({},null!=r?r:{},{batchMaxCount:1});(0,n.assertArgument)(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(t,i),this.#ae=async(t,r)=>{const n={method:t,params:r};this.emit("debug",{action:"sendEip1193Request",payload:n});try{const t=await e.request(n);return this.emit("debug",{action:"receiveEip1193Result",result:t}),t}catch(e){const t=new Error(e.message);throw t.code=e.code,t.data=e.data,t.payload=n,this.emit("debug",{action:"receiveEip1193Error",error:t}),t}}}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){(0,n.assertArgument)(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const t=await this.#ae(e.method,e.params||[]);return[{id:e.id,result:t}]}catch(t){return[{id:e.id,error:{code:t.code,data:t.data,message:t.message}}]}}getRpcError(e,t){switch((t=JSON.parse(JSON.stringify(t))).error.code||-1){case 4001:t.error.message=`ethers-user-denied: ${t.error.message}`;break;case 4200:t.error.message=`ethers-unsupported: ${t.error.message}`}return super.getRpcError(e,t)}async hasSigner(e){null==e&&(e=0);const t=await this.send("eth_accounts",[]);return"number"==typeof e?t.length>e:(e=e.toLowerCase(),0!==t.filter((t=>t.toLowerCase()===e)).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#ae("eth_requestAccounts",[])}catch(e){const t=e.payload;throw this.getRpcError(t,{id:t.id,error:e})}return await super.getSigner(e)}}t.BrowserProvider=o},8907:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainstackProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371);function s(e){switch(e){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}(0,n.assertArgument)(!1,"unsupported network","network",e)}class u extends a.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=s(r.name));super(u.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new u(e,this.apiKey)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.apiKey===s(this._network.name)}static getRequest(e,t){null==t&&(t=s(e.name));const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===s(e.name)&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("ChainstackProvider"),!0)),r}}t.ChainstackProvider=u},2271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloudflareProvider=void 0;const n=r(5347),i=r(5317),o=r(2371);class a extends o.JsonRpcProvider{constructor(e){null==e&&(e="mainnet");const t=i.Network.from(e);(0,n.assertArgument)("mainnet"===t.name,"unsupported network","network",e),super("https://cloudflare-eth.com/",t,{staticNetwork:t})}}t.CloudflareProvider=a},5047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherscanProvider=t.EtherscanPlugin=void 0;const n=r(8456),i=r(9288),o=r(7778),a=r(5347),s=r(8672),u=r(5317),c=r(4491),l=r(9973);const f="org.ethers.plugins.provider.Etherscan";class d extends c.NetworkPlugin{baseUrl;constructor(e){super(f),(0,a.defineProperties)(this,{baseUrl:e})}clone(){return new d(this.baseUrl)}}t.EtherscanPlugin=d;const h=["enableCcipRead"];let p=1;class y extends s.AbstractProvider{network;apiKey;#se;constructor(e,t){const r=null!=t?t:null;super();const n=u.Network.from(e);this.#se=n.getPlugin(f),(0,a.defineProperties)(this,{apiKey:r,network:n}),this.getBaseUrl()}getBaseUrl(){if(this.#se)return this.#se.baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}(0,a.assertArgument)(!1,"unsupported network","network",this.network)}getUrl(e,t){const r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${e}${r}${n}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}async detectNetwork(){return this.network}async fetch(e,t,r){const n=p++,i=r?this.getPostUrl():this.getUrl(e,t),o=r?this.getPostData(e,t):null;this.emit("debug",{action:"sendRequest",id:n,url:i,payload:o});const s=new a.FetchRequest(i);s.setThrottleParams({slotInterval:1e3}),s.retryFunc=(e,t,r)=>(this.isCommunityResource()&&(0,l.showThrottleMessage)("Etherscan"),Promise.resolve(!0)),s.processFunc=async(t,r)=>{const i=r.hasBody()?JSON.parse((0,a.toUtf8String)(r.body)):{},o=("string"==typeof i.result?i.result:"").toLowerCase().indexOf("rate limit")>=0;return"proxy"===e?i&&0==i.status&&"NOTOK"==i.message&&o&&(this.emit("debug",{action:"receiveError",id:n,reason:"proxy-NOTOK",error:i}),r.throwThrottleError(i.result,2e3)):o&&(this.emit("debug",{action:"receiveError",id:n,reason:"null result",error:i.result}),r.throwThrottleError(i.result,2e3)),r},o&&(s.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),s.body=Object.keys(o).map((e=>`${e}=${o[e]}`)).join("&"));const u=await s.send();try{u.assertOk()}catch(e){this.emit("debug",{action:"receiveError",id:n,error:e,reason:"assertOk"}),(0,a.assert)(!1,"response error","SERVER_ERROR",{request:s,response:u})}u.hasBody()||(this.emit("debug",{action:"receiveError",id:n,error:"missing body",reason:"null body"}),(0,a.assert)(!1,"missing response","SERVER_ERROR",{request:s,response:u}));const c=JSON.parse((0,a.toUtf8String)(u.body));return"proxy"===e?("2.0"!=c.jsonrpc&&(this.emit("debug",{action:"receiveError",id:n,result:c,reason:"invalid JSON-RPC"}),(0,a.assert)(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:s,response:u,info:{result:c}})),c.error&&(this.emit("debug",{action:"receiveError",id:n,result:c,reason:"JSON-RPC error"}),(0,a.assert)(!1,"error response","SERVER_ERROR",{request:s,response:u,info:{result:c}})),this.emit("debug",{action:"receiveRequest",id:n,result:c}),c.result):0!=c.status||"No records found"!==c.message&&"No transactions found"!==c.message?((1!=c.status||"string"==typeof c.message&&!c.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:n,result:c}),(0,a.assert)(!1,"error response","SERVER_ERROR",{request:s,response:u,info:{result:c}})),this.emit("debug",{action:"receiveRequest",id:n,result:c}),c.result):(this.emit("debug",{action:"receiveRequest",id:n,result:c}),c.result)}_getTransactionPostData(e){const t={};for(let r in e){if(h.indexOf(r)>=0)continue;if(null==e[r])continue;let n=e[r];if(("type"!==r||0!==n)&&("blockTag"!==r||"latest"!==n)){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r])n=(0,a.toQuantity)(n);else if("accessList"===r)n="["+(0,o.accessListify)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]";else if("blobVersionedHashes"===r){if(0===n.length)continue;(0,a.assert)(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:e}})}else n=(0,a.hexlify)(n);t[r]=n}}return t}_checkError(e,t,r){let i="";if((0,a.isError)(t,"SERVER_ERROR")){try{i=t.info.result.error.message}catch(e){}if(!i)try{i=t.info.message}catch(e){}}if("estimateGas"===e.method&&!i.match(/revert/i)&&i.match(/insufficient funds/i)&&(0,a.assert)(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.transaction}),("call"===e.method||"estimateGas"===e.method)&&i.match(/execution reverted/i)){let r="";try{r=t.info.result.error.data}catch(t){}const i=n.AbiCoder.getBuiltinCallException(e.method,e.transaction,r);throw i.info={request:e,error:t},i}if(i&&"broadcastTransaction"===e.method){const t=o.Transaction.from(e.signedTransaction);i.match(/replacement/i)&&i.match(/underpriced/i)&&(0,a.assert)(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t}),i.match(/insufficient funds/)&&(0,a.assert)(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&(0,a.assert)(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:t})}throw t}async _detectNetwork(){return this.network}async _perform(e){switch(e.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if("mainnet"===this.network.name)return"1000000000";if("optimism"===this.network.name)return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch((t=>this._checkError(e,t,e.signedTransaction)));case"getBlock":if("blockTag"in e)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});(0,a.assert)(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.hash});case"call":{if("latest"!==e.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_call";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}case"estimateGas":{const t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_estimateGas";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}}return super._perform(e)}async getNetwork(){return this.network}async getEtherPrice(){return"mainnet"!==this.network.name?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(e){let t=this._getAddress(e);var r;(r=t)&&"function"==typeof r.then&&(t=await t);try{const e=await this.fetch("contract",{action:"getabi",address:t}),r=JSON.parse(e);return new i.Contract(t,r,this)}catch(e){return null}}isCommunityResource(){return null==this.apiKey}}t.EtherscanProvider=y},9902:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackProvider=void 0;const n=r(5347),i=r(8672),o=r(5317),a=BigInt("1"),s=BigInt("2");function u(){return(new Date).getTime()}function c(e){return JSON.stringify(e,((e,t)=>"bigint"==typeof t?{type:"bigint",value:t.toString()}:t))}const l={stallTimeout:400,priority:1,weight:1},f={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};function d(e){if(null==e)return"null";if(Array.isArray(e))return"["+e.map(d).join(",")+"]";if("object"==typeof e&&"function"==typeof e.toJSON)return d(e.toJSON());switch(typeof e){case"boolean":case"symbol":return e.toString();case"bigint":case"number":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{"+t.map((t=>`${JSON.stringify(t)}:${d(e[t])}`)).join(",")+"}"}}throw console.log("Could not serialize",e),new Error("Hmm...")}function h(e){if("error"in e){const t=e.error;return{tag:d(t),value:t}}const t=e.result;return{tag:d(t),value:t}}function p(e,t){const r=new Map;for(const{value:e,tag:n,weight:i}of t){const t=r.get(n)||{value:e,weight:0};t.weight+=i,r.set(n,t)}let n=null;for(const t of r.values())t.weight>=e&&(!n||t.weight>n.weight)&&(n=t);if(n)return n.value}function y(e,t){let r=0;const n=new Map;let i=null;const o=[];for(const{value:e,tag:a,weight:s}of t)if(e instanceof Error){const t=n.get(a)||{value:e,weight:0};t.weight+=s,n.set(a,t),(null==i||t.weight>i.weight)&&(i=t)}else o.push(BigInt(e)),r+=s;if(r=e?i.value:void 0;o.sort(((e,t)=>ee?1:0));const u=Math.floor(o.length/2);return o.length%2?o[u]:(o[u-1]+o[u]+a)/s}function m(e,t){const r=p(e,t);if(void 0!==r)return r;for(const e of t)if(e.value)return e.value}class g extends i.AbstractProvider{quorum;eventQuorum;eventWorkers;#ue;#ce;#le;constructor(e,t,r){super(t,r),this.#ue=e.map((e=>e instanceof i.AbstractProvider?Object.assign({provider:e},l,f):Object.assign({},l,e,f))),this.#ce=-2,this.#le=null,r&&null!=r.quorum?this.quorum=r.quorum:this.quorum=Math.ceil(this.#ue.reduce(((e,t)=>e+=t.weight),0)/2),this.eventQuorum=1,this.eventWorkers=1,(0,n.assertArgument)(this.quorum<=this.#ue.reduce(((e,t)=>e+t.weight),0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return this.#ue.map((e=>{const t=Object.assign({},e);for(const e in t)"_"===e[0]&&delete t[e];return t}))}async _detectNetwork(){return o.Network.from((0,n.getBigInt)(await this._perform({method:"chainId"})))}async _translatePerform(e,t){switch(t.method){case"broadcastTransaction":return await e.broadcastTransaction(t.signedTransaction);case"call":return await e.call(Object.assign({},t.transaction,{blockTag:t.blockTag}));case"chainId":return(await e.getNetwork()).chainId;case"estimateGas":return await e.estimateGas(t.transaction);case"getBalance":return await e.getBalance(t.address,t.blockTag);case"getBlock":{const r="blockHash"in t?t.blockHash:t.blockTag;return await e.getBlock(r,t.includeTransactions)}case"getBlockNumber":return await e.getBlockNumber();case"getCode":return await e.getCode(t.address,t.blockTag);case"getGasPrice":return(await e.getFeeData()).gasPrice;case"getPriorityFee":return(await e.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await e.getLogs(t.filter);case"getStorage":return await e.getStorage(t.address,t.position,t.blockTag);case"getTransaction":return await e.getTransaction(t.hash);case"getTransactionCount":return await e.getTransactionCount(t.address,t.blockTag);case"getTransactionReceipt":return await e.getTransactionReceipt(t.hash);case"getTransactionResult":return await e.getTransactionResult(t.hash)}}#fe(e){const t=Array.from(e).map((e=>e.config)),r=this.#ue.slice();!function(e){for(let t=e.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}}(r),r.sort(((e,t)=>e.priority-t.priority));for(const e of r)if(!e._lastFatalError&&-1===t.indexOf(e))return e;return null}#de(e,t){const r=this.#fe(e);if(null==r)return null;const n={config:r,result:null,didBump:!1,perform:null,staller:null},i=u();return n.perform=(async()=>{try{r.requests++;const e=await this._translatePerform(r.provider,t);n.result={result:e}}catch(e){r.errorResponses++,n.result={error:e}}const e=u()-i;r._totalTime+=e,r.rollingDuration=.95*r.rollingDuration+.05*e,n.perform=null})(),n.staller=(async()=>{var e;await(e=r.stallTimeout,new Promise((t=>{setTimeout(t,e)}))),n.staller=null})(),e.add(n),n}async#he(){let e=this.#le;if(!e){const t=[];this.#ue.forEach((e=>{t.push((async()=>{await async function(e,t){for(;(e.blockNumber<0||e.blockNumber{try{const t=await e.provider.getBlockNumber();t>e.blockNumber&&(e.blockNumber=t)}catch(t){e.blockNumber=-2,e._lastFatalError=t,e._lastFatalErrorTimestamp=u()}e._updateNumber=null})()),await e._updateNumber,e.outOfSync++,!e._lastFatalError););}(e,0),e._lastFatalError||(e._network=await e.provider.getNetwork())})())})),this.#le=e=(async()=>{await Promise.all(t);let e=null;for(const t of this.#ue){if(t._lastFatalError)continue;const r=t._network;null==e?e=r.chainId:r.chainId!==e&&(0,n.assert)(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})()}await e}async#pe(e,t){const r=[];for(const t of e)if(null!=t.result){const{tag:e,value:n}=h(t.result);r.push({tag:e,value:n,weight:t.config.weight})}if(!(r.reduce(((e,t)=>e+t.weight),0)!e._lastFatalError)).map((e=>({value:e.blockNumber,tag:(0,n.getNumber)(e.blockNumber).toString(),weight:e.weight})))))));const e=function(e,t){if(1===e)return(0,n.getNumber)(y(e,t),"%internal");const r=new Map,i=(e,t)=>{const n=r.get(e)||{result:e,weight:0};n.weight+=t,r.set(e,n)};for(const{weight:e,value:r}of t){const t=(0,n.getNumber)(r);i(t-1,e),i(t,e),i(t+1,e)}let o,a=0;for(const{weight:t,result:n}of r.values())t>=e&&(t>a||null!=o&&t===a&&n>o)&&(a=t,o=n);return o}(this.quorum,r);if(void 0===e)return;return e>this.#ce&&(this.#ce=e),this.#ce}case"getGasPrice":case"getPriorityFee":case"estimateGas":return y(this.quorum,r);case"getBlock":return"blockTag"in t&&"pending"===t.blockTag?m(this.quorum,r):p(this.quorum,r);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return p(this.quorum,r);case"broadcastTransaction":return m(this.quorum,r)}(0,n.assert)(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${c(t.method)})`})}}async#ye(e,t){if(0===e.size)throw new Error("no runners?!");const r=[];let i=0;for(const t of e)t.perform&&r.push(t.perform),t.staller?r.push(t.staller):t.didBump||(t.didBump=!0,i++);const o=await this.#pe(e,t);if(void 0!==o){if(o instanceof Error)throw o;return o}for(let r=0;r0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:t,results:Array.from(e).map((e=>c(e.result)))}}),await Promise.race(r),await this.#ye(e,t)}async _perform(e){if("broadcastTransaction"===e.method){const t=this.#ue.map((e=>null)),r=this.#ue.map((async({provider:r,weight:n},i)=>{try{const o=await r._perform(e);t[i]=Object.assign(h({result:o}),{weight:n})}catch(e){t[i]=Object.assign(h({error:e}),{weight:n})}}));for(;;){const e=t.filter((e=>null!=e));for(const{value:t}of e)if(!(t instanceof Error))return t;const i=p(this.quorum,t.filter((e=>null!=e)));if((0,n.isError)(i,"INSUFFICIENT_FUNDS"))throw i;const o=r.filter(((e,r)=>null==t[r]));if(0===o.length)break;await Promise.race(o)}const i=m(this.quorum,t);if((0,n.assert)(void 0!==i,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:t.map(c)}}),i instanceof Error)throw i;return i}await this.#he();const t=new Set;let r=0;for(;;){const n=this.#de(t,e);if(null==n)break;if(r+=n.config.weight,r>=this.quorum)break}const i=await this.#ye(t,e);for(const e of t)e.perform&&null==e.result&&e.config.lateResponses++;return i}async destroy(){for(const{provider:e}of this.#ue)e.destroy();super.destroy()}}t.FallbackProvider=g},5855:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfuraProvider=t.InfuraWebSocketProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371),s=r(873),u="84842078b09946638c03157f83405213";class c extends s.WebSocketProvider{projectId;projectSecret;constructor(e,t){const r=new l(e,t),i=r._getConnection();(0,n.assert)(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});super(i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),r._network),(0,n.defineProperties)(this,{projectId:r.projectId,projectSecret:r.projectSecret})}isCommunityResource(){return this.projectId===u}}t.InfuraWebSocketProvider=c;class l extends a.JsonRpcProvider{projectId;projectSecret;constructor(e,t,r){null==e&&(e="mainnet");const i=o.Network.from(e);null==t&&(t=u),null==r&&(r=null);super(l.getRequest(i,t,r),i,{staticNetwork:i}),(0,n.defineProperties)(this,{projectId:t,projectSecret:r})}_getProvider(e){try{return new l(e,this.projectId,this.projectSecret)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.projectId===u}static getWebSocketProvider(e,t){return new c(e,t)}static getRequest(e,t,r){null==t&&(t=u),null==r&&(r=null);const o=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v3/${t}`);return o.allowGzip=!0,r&&o.setCredentials("",r),t===u&&(o.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("InfuraProvider"),!0)),o}}t.InfuraProvider=l},4584:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IpcSocketProvider=void 0;t.IpcSocketProvider=undefined},2371:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcProvider=t.JsonRpcApiPollingProvider=t.JsonRpcApiProvider=t.JsonRpcSigner=void 0;const n=r(8456),i=r(646),o=r(3562),a=r(7778),s=r(5347),u=r(8672),c=r(3071),l=r(5317),f=r(7966),d=r(4338),h="bigint,boolean,function,number,string,symbol".split(/,/g);function p(e){if(null==e||h.indexOf(typeof e)>=0)return e;if("function"==typeof e.getAddress)return e;if(Array.isArray(e))return e.map(p);if("object"==typeof e)return Object.keys(e).reduce(((t,r)=>(t[r]=e[r],t)),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function y(e){return new Promise((t=>{setTimeout(t,e)}))}function m(e){return e?e.toLowerCase():e}function g(e){return e&&"number"==typeof e.pollingInterval}const b={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class v extends c.AbstractSigner{address;constructor(e,t){super(e),t=(0,i.getAddress)(t),(0,s.defineProperties)(this,{address:t})}connect(e){(0,s.assert)(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const t=p(e),r=[];if(t.from){const n=t.from;r.push((async()=>{const r=await(0,i.resolveAddress)(n,this.provider);(0,s.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r})())}else t.from=this.address;if(null==t.gasLimit&&r.push((async()=>{t.gasLimit=await this.provider.estimateGas({...t,from:this.address})})()),null!=t.to){const e=t.to;r.push((async()=>{t.to=await(0,i.resolveAddress)(e,this.provider)})())}r.length&&await Promise.all(r);const n=this.provider.getRpcTransaction(t);return this.provider.send("eth_sendTransaction",[n])}async sendTransaction(e){const t=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(e);return await new Promise(((e,n)=>{const i=[1e3,100];let o=0;const a=async()=>{try{const n=await this.provider.getTransaction(r);if(null!=n)return void e(n.replaceableTransaction(t))}catch(e){if((0,s.isError)(e,"CANCELLED")||(0,s.isError)(e,"BAD_DATA")||(0,s.isError)(e,"NETWORK_ERROR"))return null==e.info&&(e.info={}),e.info.sendTransactionHash=r,void n(e);if((0,s.isError)(e,"INVALID_ARGUMENT")&&(o++,null==e.info&&(e.info={}),e.info.sendTransactionHash=r,o>10))return void n(e);this.provider.emit("error",(0,s.makeError)("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:e}))}this.provider._setTimeout((()=>{a()}),i.pop()||4e3)};a()}))}async signTransaction(e){const t=p(e);if(t.from){const r=await(0,i.resolveAddress)(t.from,this.provider);(0,s.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r}else t.from=this.address;const r=this.provider.getRpcTransaction(t);return await this.provider.send("eth_signTransaction",[r])}async signMessage(e){const t="string"==typeof e?(0,s.toUtf8Bytes)(e):e;return await this.provider.send("personal_sign",[(0,s.hexlify)(t),this.address.toLowerCase()])}async signTypedData(e,t,r){const n=p(r),a=await o.TypedDataEncoder.resolveNames(e,t,n,(async e=>{const t=await(0,i.resolveAddress)(e);return(0,s.assertArgument)(null!=t,"TypedData does not support null address","value",e),t}));return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(o.TypedDataEncoder.getPayload(a.domain,t,a.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const t="string"==typeof e?(0,s.toUtf8Bytes)(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),(0,s.hexlify)(t)])}}t.JsonRpcSigner=v;class w extends u.AbstractProvider{#w;#me;#ge;#be;#ve;#we;#Ae;#ke(){if(this.#be)return;const e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#be=setTimeout((()=>{this.#be=null;const e=this.#ge;for(this.#ge=[];e.length;){const t=[e.shift()];for(;e.length&&t.length!==this.#w.batchMaxCount;){t.push(e.shift());if(JSON.stringify(t.map((e=>e.payload))).length>this.#w.batchMaxSize){e.unshift(t.pop());break}}(async()=>{const e=1===t.length?t[0].payload:t.map((e=>e.payload));this.emit("debug",{action:"sendRpcPayload",payload:e});try{const r=await this._send(e);this.emit("debug",{action:"receiveRpcResult",result:r});for(const{resolve:e,reject:n,payload:i}of t){if(this.destroyed){n((0,s.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:i.method}));continue}const t=r.filter((e=>e.id===i.id))[0];if(null!=t)"error"in t?n(this.getRpcError(i,t)):e(t.result);else{const e=(0,s.makeError)("missing response for request","BAD_DATA",{value:r,info:{payload:i}});this.emit("error",e),n(e)}}}catch(e){this.emit("debug",{action:"receiveRpcError",error:e});for(const{reject:r}of t)r(e)}})()}}),e)}constructor(e,t){super(e,t),this.#me=1,this.#w=Object.assign({},b,t||{}),this.#ge=[],this.#be=null,this.#we=null,this.#Ae=null;{let e=null;const t=new Promise((t=>{e=t}));this.#ve={promise:t,resolve:e}}const r=this._getOption("staticNetwork");"boolean"==typeof r?((0,s.assertArgument)(!r||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",t),r&&null!=e&&(this.#we=l.Network.from(e))):r&&((0,s.assertArgument)(null==e||r.matches(e),"staticNetwork MUST match network object","options",t),this.#we=r)}_getOption(e){return this.#w[e]}get _network(){return(0,s.assert)(this.#we,"network is not available yet","NETWORK_ERROR"),this.#we}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let t=e.transaction;if(t&&null!=t.type&&(0,s.getBigInt)(t.type)&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const r=await this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},t,{type:void 0})}))}}const t=this.getRpcRequest(e);return null!=t?await this.send(t.method,t.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;if(this.#we)return this.#we}return this.#Ae?await this.#Ae:this.ready?(this.#Ae=(async()=>{try{const e=l.Network.from((0,s.getBigInt)(await this.send("eth_chainId",[])));return this.#Ae=null,e}catch(e){throw this.#Ae=null,e}})(),await this.#Ae):(this.#Ae=(async()=>{const e={id:this.#me++,method:"eth_chainId",params:[],jsonrpc:"2.0"};let t;this.emit("debug",{action:"sendRpcPayload",payload:e});try{t=(await this._send(e))[0],this.#Ae=null}catch(e){throw this.#Ae=null,this.emit("debug",{action:"receiveRpcError",error:e}),e}if(this.emit("debug",{action:"receiveRpcResult",result:t}),"result"in t)return l.Network.from((0,s.getBigInt)(t.result));throw this.getRpcError(e,t)})(),await this.#Ae)}_start(){null!=this.#ve&&null!=this.#ve.resolve&&(this.#ve.resolve(),this.#ve=null,(async()=>{for(;null==this.#we&&!this.destroyed;)try{this.#we=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",(0,s.makeError)("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await y(1e3)}this.#ke()})())}async _waitUntilReady(){if(null!=this.#ve)return await this.#ve.promise}_getSubscriber(e){return"pending"===e.type?new f.FilterIdPendingSubscriber(this):"event"===e.type?this._getOption("polling")?new d.PollingEventSubscriber(this,e.filter):new f.FilterIdEventSubscriber(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new u.UnmanagedSubscriber("orphan"):super._getSubscriber(e)}get ready(){return null==this.#ve}getRpcTransaction(e){const t={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((r=>{if(null==e[r])return;let n=r;"gasLimit"===r&&(n="gas"),t[n]=(0,s.toQuantity)((0,s.getBigInt)(e[r],`tx.${r}`))})),["from","to","data"].forEach((r=>{null!=e[r]&&(t[r]=(0,s.hexlify)(e[r]))})),e.accessList&&(t.accessList=(0,a.accessListify)(e.accessList)),e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.map((e=>e.toLowerCase()))),t}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[m(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[m(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[m(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[m(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(m):e.filter.address=m(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,t){const{method:r}=e,{error:i}=t;if("eth_estimateGas"===r&&i.message){const t=i.message;if(!t.match(/revert/i)&&t.match(/insufficient funds/i))return(0,s.makeError)("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}})}if("eth_call"===r||"eth_estimateGas"===r){const t=k(i),o=n.AbiCoder.getBuiltinCallException("eth_call"===r?"call":"estimateGas",e.params[0],t?t.data:null);return o.info={error:i,payload:e},o}const o=JSON.stringify(function(e){const t=[];return E(e,t),t}(i));if("string"==typeof i.message&&i.message.match(/user denied|ethers-user-denied/i)){const t={eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"};return(0,s.makeError)("user rejected action","ACTION_REJECTED",{action:t[r]||"unknown",reason:"rejected",info:{payload:e,error:i}})}if("eth_sendRawTransaction"===r||"eth_sendTransaction"===r){const t=e.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return(0,s.makeError)("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return(0,s.makeError)("nonce has already been used","NONCE_EXPIRED",{transaction:t,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return(0,s.makeError)("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t,info:{error:i}});if(o.match(/only replay-protected/i))return(0,s.makeError)("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:t,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?(0,s.makeError)("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):(0,s.makeError)("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,t){if(this.destroyed)return Promise.reject((0,s.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const r=this.#me++,n=new Promise(((n,i)=>{this.#ge.push({resolve:n,reject:i,payload:{method:e,params:t,id:r,jsonrpc:"2.0"}})}));return this.#ke(),n}async getSigner(e){null==e&&(e=0);const t=this.send("eth_accounts",[]);if("number"==typeof e){const r=await t;if(e>=r.length)throw new Error("no such account");return new v(this,r[e])}const{accounts:r}=await(0,s.resolveProperties)({network:this.getNetwork(),accounts:t});e=(0,i.getAddress)(e);for(const t of r)if((0,i.getAddress)(t)===e)return new v(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map((e=>new v(this,e)))}destroy(){this.#be&&(clearTimeout(this.#be),this.#be=null);for(const{payload:e,reject:t}of this.#ge)t((0,s.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#ge=[],super.destroy()}}t.JsonRpcApiProvider=w;class A extends w{#Ee;constructor(e,t){super(e,t);let r=this._getOption("pollingInterval");null==r&&(r=b.pollingInterval),this.#Ee=r}_getSubscriber(e){const t=super._getSubscriber(e);return g(t)&&(t.pollingInterval=this.#Ee),t}get pollingInterval(){return this.#Ee}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");this.#Ee=e,this._forEachSubscriber((e=>{g(e)&&(e.pollingInterval=this.#Ee)}))}}t.JsonRpcApiPollingProvider=A;function k(e){if(null==e)return null;if("string"==typeof e.message&&e.message.match(/revert/i)&&(0,s.isHexString)(e.data))return{message:e.message,data:e.data};if("object"==typeof e){for(const t in e){const r=k(e[t]);if(r)return r}return null}if("string"==typeof e)try{return k(JSON.parse(e))}catch(e){}return null}function E(e,t){if(null!=e){if("string"==typeof e.message&&t.push(e.message),"object"==typeof e)for(const r in e)E(e[r],t);if("string"==typeof e)try{return E(JSON.parse(e),t)}catch(e){}}}t.JsonRpcProvider=class extends A{#Se;constructor(e,t,r){null==e&&(e="http://localhost:8545"),super(t,r),this.#Se="string"==typeof e?new s.FetchRequest(e):e.clone()}_getConnection(){return this.#Se.clone()}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){const t=this._getConnection();t.body=JSON.stringify(e),t.setHeader("content-type","application/json");const r=await t.send();r.assertOk();let n=r.bodyJson;return Array.isArray(n)||(n=[n]),n}}},2398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PocketProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371),s="62e1ad51b37b8e00394bda3b";class u extends a.JsonRpcProvider{applicationId;applicationSecret;constructor(e,t,r){null==e&&(e="mainnet");const i=o.Network.from(e);null==t&&(t=s),null==r&&(r=null);const a={staticNetwork:i};super(u.getRequest(i,t,r),i,a),(0,n.defineProperties)(this,{applicationId:t,applicationSecret:r})}_getProvider(e){try{return new u(e,this.applicationId,this.applicationSecret)}catch(e){}return super._getProvider(e)}static getRequest(e,t,r){null==t&&(t=s);const o=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v1/lb/${t}`);return o.allowGzip=!0,r&&o.setCredentials("",r),t===s&&(o.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("PocketProvider"),!0)),o}isCommunityResource(){return this.applicationId===s}}t.PocketProvider=u},8817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickNodeProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),a=r(2371),s="919b412a057b5e9c9b6dce193c5a60242d6efadb";class u extends a.JsonRpcProvider{token;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=s);super(u.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{token:t})}_getProvider(e){try{return new u(e,this.token)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.token===s}static getRequest(e,t){null==t&&(t=s);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===s&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("QuickNodeProvider"),!0)),r}}t.QuickNodeProvider=u},4945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketProvider=t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=void 0;const n=r(8672),i=r(5347),o=r(2371);class a{#xe;#A;get filter(){return JSON.parse(this.#A)}#_e;#Pe;#Te;constructor(e,t){this.#xe=e,this.#A=JSON.stringify(t),this.#_e=null,this.#Pe=null,this.#Te=null}start(){this.#_e=this.#xe.send("eth_subscribe",this.filter).then((e=>(this.#xe._register(e,this),e)))}stop(){this.#_e.then((e=>{this.#xe.destroyed||this.#xe.send("eth_unsubscribe",[e])})),this.#_e=null}pause(e){(0,i.assert)(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),this.#Pe=!!e}resume(){this.#Pe=null}_handleMessage(e){if(null!=this.#_e&&null===this.#Pe){let t=this.#Te;t=null==t?this._emit(this.#xe,e):t.then((async()=>{await this._emit(this.#xe,e)})),this.#Te=t.then((()=>{this.#Te===t&&(this.#Te=null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}t.SocketSubscriber=a;class s extends a{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}t.SocketBlockSubscriber=s;class u extends a{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}t.SocketPendingSubscriber=u;class c extends a{#Ie;get logFilter(){return JSON.parse(this.#Ie)}constructor(e,t){super(e,["logs",t]),this.#Ie=JSON.stringify(t)}async _emit(e,t){e.emit(this.logFilter,e._wrapLog(t,e._network))}}t.SocketEventSubscriber=c;class l extends o.JsonRpcApiProvider{#Oe;#C;#Be;constructor(e,t){const r=Object.assign({},null!=t?t:{});(0,i.assertArgument)(null==r.batchMaxCount||1===r.batchMaxCount,"sockets-based providers do not support batches","options.batchMaxCount",t),r.batchMaxCount=1,null==r.staticNetwork&&(r.staticNetwork=!0),super(e,r),this.#Oe=new Map,this.#C=new Map,this.#Be=new Map}_getSubscriber(e){switch(e.type){case"close":return new n.UnmanagedSubscriber("close");case"block":return new s(this);case"pending":return new u(this);case"event":return new c(this,e.filter);case"orphan":if("drop-log"===e.filter.orphan)return new n.UnmanagedSubscriber("drop-log")}return super._getSubscriber(e)}_register(e,t){this.#C.set(e,t);const r=this.#Be.get(e);if(r){for(const e of r)t._handleMessage(e);this.#Be.delete(e)}}async _send(e){(0,i.assertArgument)(!Array.isArray(e),"WebSocket does not support batch send","payload",e);const t=new Promise(((t,r)=>{this.#Oe.set(e.id,{payload:e,resolve:t,reject:r})}));return await this._waitUntilReady(),await this._write(JSON.stringify(e)),[await t]}async _processMessage(e){const t=JSON.parse(e);if(t&&"object"==typeof t&&"id"in t){const e=this.#Oe.get(t.id);if(null==e)return void this.emit("error",(0,i.makeError)("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:t}));this.#Oe.delete(t.id),e.resolve(t)}else{if(!t||"eth_subscription"!==t.method)return void this.emit("error",(0,i.makeError)("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:t}));{const e=t.params.subscription,r=this.#C.get(e);if(r)r._handleMessage(t.params.result);else{let r=this.#Be.get(e);null==r&&(r=[],this.#Be.set(e,r)),r.push(t.params.result)}}}}async _write(e){throw new Error("sub-classes must override this")}}t.SocketProvider=l},873:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocketProvider=void 0;const n=r(3913),i=r(4945);class o extends i.SocketProvider{#Se;#Ce;get websocket(){if(null==this.#Ce)throw new Error("websocket closed");return this.#Ce}constructor(e,t,r){super(t,r),"string"==typeof e?(this.#Se=()=>new n.WebSocket(e),this.#Ce=this.#Se()):"function"==typeof e?(this.#Se=e,this.#Ce=e()):(this.#Se=null,this.#Ce=e),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(e){console.log("failed to start WebsocketProvider",e)}},this.websocket.onmessage=e=>{this._processMessage(e.data)}}async _write(e){this.websocket.send(e)}async destroy(){null!=this.#Ce&&(this.#Ce.close(),this.#Ce=null),super.destroy()}}t.WebSocketProvider=o},3807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionResponse=t.TransactionReceipt=t.Log=t.Block=t.copyRequest=t.FeeData=void 0;const n=r(5347),i=r(7778),o=BigInt(0);function a(e){return null==e?null:e}function s(e){return null==e?null:e.toString()}t.FeeData=class{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,t,r){(0,n.defineProperties)(this,{gasPrice:a(e),maxFeePerGas:a(t),maxPriorityFeePerGas:a(r)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:s(e),maxFeePerGas:s(t),maxPriorityFeePerGas:s(r)}}},t.copyRequest=function(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=(0,n.hexlify)(e.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)i in e&&null!=e[i]&&(t[i]=(0,n.getBigInt)(e[i],`request.${i}`));const o="type,nonce".split(/,/);for(const r of o)r in e&&null!=e[r]&&(t[r]=(0,n.getNumber)(e[r],`request.${r}`));return e.accessList&&(t.accessList=(0,i.accessListify)(e.accessList)),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map((e=>(0,n.isBytesLike)(e)?(0,n.hexlify)(e):Object.assign({},e)))),t};class u{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#Ne;constructor(e,t){this.#Ne=e.transactions.map((e=>"string"!=typeof e?new f(e,t):e)),(0,n.defineProperties)(this,{provider:t,hash:a(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:a(e.prevRandao),extraData:e.extraData,baseFeePerGas:a(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#Ne.map((e=>"string"==typeof e?e:e.hash))}get prefetchedTransactions(){const e=this.#Ne.slice();return 0===e.length?[]:((0,n.assert)("object"==typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:r,gasLimit:n,gasUsed:i,hash:o,miner:a,prevRandao:u,nonce:c,number:l,parentHash:f,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,timestamp:y,transactions:m}=this;return{_type:"Block",baseFeePerGas:s(e),difficulty:s(t),extraData:r,gasLimit:s(n),gasUsed:s(i),blobGasUsed:s(this.blobGasUsed),excessBlobGas:s(this.excessBlobGas),hash:o,miner:a,prevRandao:u,nonce:c,number:l,parentHash:f,timestamp:y,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,transactions:m}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>enew c(e,t))));let r=o;null!=e.effectiveGasPrice?r=e.effectiveGasPrice:null!=e.gasPrice&&(r=e.gasPrice),(0,n.defineProperties)(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:r,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#Re}toJSON(){const{to:e,from:t,contractAddress:r,hash:n,index:i,blockHash:o,blockNumber:a,logsBloom:u,logs:c,status:l,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:r,cumulativeGasUsed:s(this.cumulativeGasUsed),from:t,gasPrice:s(this.gasPrice),blobGasUsed:s(this.blobGasUsed),blobGasPrice:s(this.blobGasPrice),gasUsed:s(this.gasUsed),hash:n,index:i,logs:c,logsBloom:u,root:f,status:l,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(u)return null;const{blockNumber:e,nonce:t}=await(0,n.resolveProperties)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t{if(null==e||0!==e.status)return e;(0,n.assert)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},f=await this.provider.getTransactionReceipt(this.hash);if(0===r)return l(f);if(f){if(await f.confirmations()>=r)return l(f)}else if(await c(),0===r)return null;const d=new Promise(((e,t)=>{const o=[],s=()=>{o.forEach((e=>e()))};if(o.push((()=>{u=!0})),i>0){const e=setTimeout((()=>{s(),t((0,n.makeError)("wait for transaction timeout","TIMEOUT"))}),i);o.push((()=>{clearTimeout(e)}))}const f=async n=>{if(await n.confirmations()>=r){s();try{e(l(n))}catch(e){t(e)}}};if(o.push((()=>{this.provider.off(this.hash,f)})),this.provider.on(this.hash,f),a>=0){const e=async()=>{try{await c()}catch(e){if((0,n.isError)(e,"TRANSACTION_REPLACED"))return s(),void t(e)}u||this.provider.once("block",e)};o.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await d}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),h(this)}reorderedEvent(e){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,n.assert)(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),d(this,e)}replaceableTransaction(e){(0,n.assertArgument)(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new f(this,this.provider);return t.#Me=e,t}}function d(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function h(e){return{orphan:"drop-transaction",tx:e}}t.TransactionResponse=f},9596:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonceManager=void 0;const n=r(5347),i=r(3071);class o extends i.AbstractSigner{signer;#Ue;#Le;constructor(e){super(e.provider),(0,n.defineProperties)(this,{signer:e}),this.#Ue=null,this.#Le=0}async getAddress(){return this.signer.getAddress()}connect(e){return new o(this.signer.connect(e))}async getNonce(e){if("pending"===e){null==this.#Ue&&(this.#Ue=super.getNonce("pending"));const e=this.#Le;return await this.#Ue+e}return super.getNonce(e)}increment(){this.#Le++}reset(){this.#Le=0,this.#Ue=null}async sendTransaction(e){const t=this.getNonce("pending");return this.increment(),(e=await this.signer.populateTransaction(e)).nonce=await t,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,t,r){return this.signer.signTypedData(e,t,r)}}t.NonceManager=o},7966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterIdPendingSubscriber=t.FilterIdEventSubscriber=t.FilterIdSubscriber=void 0;const n=r(5347),i=r(4338);class o{#xe;#je;#Fe;#De;#we;#He;constructor(e){this.#xe=e,this.#je=null,this.#Fe=this.#ze.bind(this),this.#De=!1,this.#we=null,this.#He=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}async#ze(e){try{null==this.#je&&(this.#je=this._subscribe(this.#xe));let e=null;try{e=await this.#je}catch(e){if(!(0,n.isError)(e,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==e.operation)throw e}if(null==e)return this.#je=null,void this.#xe._recoverSubscriber(this,this._recover(this.#xe));const t=await this.#xe.getNetwork();if(this.#we||(this.#we=t),this.#we.chainId!==t.chainId)throw new Error("chaid changed");if(this.#He)return;const r=await this.#xe.send("eth_getFilterChanges",[e]);await this._emitResults(this.#xe,r)}catch(e){console.log("@TODO",e)}this.#xe.once("block",this.#Fe)}#qe(){const e=this.#je;e&&(this.#je=null,e.then((e=>{this.#xe.destroyed||this.#xe.send("eth_uninstallFilter",[e])})))}start(){this.#De||(this.#De=!0,this.#ze(-2))}stop(){this.#De&&(this.#De=!1,this.#He=!0,this.#qe(),this.#xe.off("block",this.#Fe))}pause(e){e&&this.#qe(),this.#xe.off("block",this.#Fe)}resume(){this.start()}}t.FilterIdSubscriber=o;t.FilterIdEventSubscriber=class extends o{#Ge;constructor(e,t){var r;super(e),this.#Ge=(r=t,JSON.parse(JSON.stringify(r)))}_recover(e){return new i.PollingEventSubscriber(e,this.#Ge)}async _subscribe(e){return await e.send("eth_newFilter",[this.#Ge])}async _emitResults(e,t){for(const r of t)e.emit(this.#Ge,e._wrapLog(r,e._network))}};t.FilterIdPendingSubscriber=class extends o{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const r of t)e.emit("pending",r)}}},4338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PollingEventSubscriber=t.PollingTransactionSubscriber=t.PollingOrphanSubscriber=t.PollingBlockTagSubscriber=t.OnBlockSubscriber=t.PollingBlockSubscriber=t.getPollingSubscriber=void 0;const n=r(5347);function i(e){return JSON.parse(JSON.stringify(e))}t.getPollingSubscriber=function(e,t){return"block"===t?new o(e):(0,n.isHexString)(t,32)?new s(e,t):void(0,n.assert)(!1,"unsupported polling event","UNSUPPORTED_OPERATION",{operation:"getPollingSubscriber",info:{event:t}})};class o{#xe;#Fe;#Ke;#Ve;constructor(e){this.#xe=e,this.#Fe=null,this.#Ke=4e3,this.#Ve=-2}get pollingInterval(){return this.#Ke}set pollingInterval(e){this.#Ke=e}async#ze(){try{const e=await this.#xe.getBlockNumber();if(-2===this.#Ve)return void(this.#Ve=e);if(e!==this.#Ve){for(let t=this.#Ve+1;t<=e;t++){if(null==this.#Fe)return;await this.#xe.emit("block",t)}this.#Ve=e}}catch(e){}null!=this.#Fe&&(this.#Fe=this.#xe._setTimeout(this.#ze.bind(this),this.#Ke))}start(){this.#Fe||(this.#Fe=this.#xe._setTimeout(this.#ze.bind(this),this.#Ke),this.#ze())}stop(){this.#Fe&&(this.#xe._clearTimeout(this.#Fe),this.#Fe=null)}pause(e){this.stop(),e&&(this.#Ve=-2)}resume(){this.start()}}t.PollingBlockSubscriber=o;class a{#xe;#ze;#De;constructor(e){this.#xe=e,this.#De=!1,this.#ze=e=>{this._poll(e,this.#xe)}}async _poll(e,t){throw new Error("sub-classes must override this")}start(){this.#De||(this.#De=!0,this.#ze(-2),this.#xe.on("block",this.#ze))}stop(){this.#De&&(this.#De=!1,this.#xe.off("block",this.#ze))}pause(e){this.stop()}resume(){this.start()}}t.OnBlockSubscriber=a;t.PollingBlockTagSubscriber=class extends a{#Je;#We;constructor(e,t){super(e),this.#Je=t,this.#We=-2}pause(e){e&&(this.#We=-2),super.pause(e)}async _poll(e,t){const r=await t.getBlock(this.#Je);null!=r&&(-2===this.#We?this.#We=r.number:r.number>this.#We&&(t.emit(this.#Je,r.number),this.#We=r.number))}};t.PollingOrphanSubscriber=class extends a{#A;constructor(e,t){super(e),this.#A=i(t)}async _poll(e,t){throw new Error("@TODO")}};class s extends a{#Qe;constructor(e,t){super(e),this.#Qe=t}async _poll(e,t){const r=await t.getTransactionReceipt(this.#Qe);r&&t.emit(this.#Qe,r)}}t.PollingTransactionSubscriber=s;t.PollingEventSubscriber=class{#xe;#A;#Fe;#De;#Ve;constructor(e,t){this.#xe=e,this.#A=i(t),this.#Fe=this.#ze.bind(this),this.#De=!1,this.#Ve=-2}async#ze(e){if(-2===this.#Ve)return;const t=i(this.#A);t.fromBlock=this.#Ve+1,t.toBlock=e;const r=await this.#xe.getLogs(t);if(0!==r.length)for(const e of r)this.#xe.emit(this.#A,e),this.#Ve=e.blockNumber;else this.#Ve{this.#Ve=e})),this.#xe.on("block",this.#Fe))}stop(){this.#De&&(this.#De=!1,this.#xe.off("block",this.#Fe))}pause(e){this.stop(),e&&(this.#Ve=-2)}resume(){this.start()}}},3913:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocket=void 0;const n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}().WebSocket;t.WebSocket=n},7918:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accessListify=void 0;const n=r(646),i=r(5347);function o(e,t){return{address:(0,n.getAddress)(e),storageKeys:t.map(((e,t)=>((0,i.assertArgument)((0,i.isHexString)(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}t.accessListify=function(e){if(Array.isArray(e))return e.map(((t,r)=>Array.isArray(t)?((0,i.assertArgument)(2===t.length,"invalid slot set",`value[${r}]`,t),o(t[0],t[1])):((0,i.assertArgument)(null!=t&&"object"==typeof t,"invalid address-slot set","value",e),o(t.address,t.storageKeys))));(0,i.assertArgument)(null!=e&&"object"==typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return o(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}},778:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=t.computeAddress=void 0;const n=r(646),i=r(2291);function o(e){let t;return t="string"==typeof e?i.SigningKey.computePublicKey(e,!1):e.publicKey,(0,n.getAddress)((0,i.keccak256)("0x"+t.substring(4)).substring(26))}t.computeAddress=o,t.recoverAddress=function(e,t){return o(i.SigningKey.recoverPublicKey(e,t))}},7778:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=t.recoverAddress=t.computeAddress=t.accessListify=void 0;var n=r(7918);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return n.accessListify}});var i=r(778);Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return i.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return i.recoverAddress}});var o=r(1398);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return o.Transaction}})},1398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=void 0;const n=r(646),i=r(5239),o=r(2291),a=r(5347),s=r(7918),u=r(778),c=BigInt(0),l=BigInt(2),f=BigInt(27),d=BigInt(28),h=BigInt(35),p=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),y=131072;function m(e,t){let r=e.toString(16);for(;r.length<2;)r="0"+r;return r+=(0,o.sha256)(t).substring(4),"0x"+r}function g(e){return"0x"===e?null:(0,n.getAddress)(e)}function b(e,t){try{return(0,s.accessListify)(e)}catch(r){(0,a.assertArgument)(!1,r.message,t,e)}}function v(e,t){return"0x"===e?0:(0,a.getNumber)(e,t)}function w(e,t){if("0x"===e)return c;const r=(0,a.getBigInt)(e,t);return(0,a.assertArgument)(r<=p,"value exceeds uint size",t,r),r}function A(e,t){const r=(0,a.getBigInt)(e,"value"),n=(0,a.toBeArray)(r);return(0,a.assertArgument)(n.length<=32,"value too large",`tx.${t}`,r),n}function k(e){return(0,s.accessListify)(e).map((e=>[e.address,e.storageKeys]))}function E(e,t){(0,a.assertArgument)(Array.isArray(e),`invalid ${t}`,"value",e);for(let t=0;tObject.assign({},e)))}set blobs(e){if(null==e)return void(this.#ct=null);const t=[],r=[];for(let n=0;ne.data)),r.map((e=>e.commitment)),r.map((e=>e.proof))])]):(0,a.concat)(["0x03",(0,a.encodeRlp)(n)])}(this,r,t?this.blobs:null)}(0,a.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#lt(!0,!0)}get unsignedSerialized(){return this.#lt(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#at||this.#st;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&(0,a.assert)(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),(0,a.assert)(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),(0,a.assert)(0!==this.type||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return null!=this.type?i.push(this.type):t?i.push(2):e?(i.push(1),r||i.push(0)):r?(i.push(1),i.push(2)):(n&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return x.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new x;if("string"==typeof e){const t=(0,a.getBytes)(e);if(t[0]>=127)return x.from(function(e){const t=(0,a.decodeRlp)(e);(0,a.assertArgument)(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);const r={type:0,nonce:v(t[0],"nonce"),gasPrice:w(t[1],"gasPrice"),gasLimit:w(t[2],"gasLimit"),to:g(t[3]),value:w(t[4],"value"),data:(0,a.hexlify)(t[5]),chainId:c};if(6===t.length)return r;const n=w(t[6],"v"),i=w(t[7],"r"),s=w(t[8],"s");if(i===c&&s===c)r.chainId=n;else{let e=(n-h)/l;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBase58=t.encodeBase58=void 0;const n=r(7415),i=r(1500),o=r(6508),a="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let s=null;function u(e){if(null==s){s={};for(let e=0;e<58;e++)s[a[e]]=BigInt(e)}const t=s[e];return(0,i.assertArgument)(null!=t,"invalid base58 value","letter",e),t}const c=BigInt(0),l=BigInt(58);t.encodeBase58=function(e){const t=(0,n.getBytes)(e);let r=(0,o.toBigInt)(t),i="";for(;r;)i=a[Number(r%l)]+i,r/=l;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBase64=t.decodeBase64=void 0;const n=r(7415);t.decodeBase64=function(e){e=atob(e);const t=new Uint8Array(e.length);for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=void 0;const n=r(1500);function i(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n>4]+s[15&n]}return r}function c(e,t,r){const i=o(e);(0,n.assert)(t>=i.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(i),length:t,offset:t+1});const a=new Uint8Array(t);return a.fill(0),r?a.set(i,t-i.length):a.set(i,0),u(a)}t.hexlify=u,t.concat=function(e){return"0x"+e.map((e=>u(e).substring(2))).join("")},t.dataLength=function(e){return a(e,!0)?(e.length-2)/2:o(e).length},t.dataSlice=function(e,t,r){const i=o(e);return null!=r&&r>i.length&&(0,n.assert)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:i,length:i.length,offset:r}),u(i.slice(null==t?0:t,null==r?i.length:r))},t.stripZerosLeft=function(e){let t=u(e).substring(2);for(;t.startsWith("00");)t=t.substring(2);return"0x"+t},t.zeroPadValue=function(e,t){return c(e,t,!0)},t.zeroPadBytes=function(e,t){return c(e,t,!1)}},1500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.makeError=t.isCallException=t.isError=void 0;const n=r(4586),i=r(8166);function o(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(o).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let r="0x";for(let n=0;n>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return o(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{ "+t.map((t=>`${o(t)}: ${o(e[t])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function a(e,t){return e&&e.code===t}function s(e,t,r){let a,s=e;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${o(r)}`);for(const e in r){if("shortMessage"===e)continue;const t=r[e];i.push(e+"="+o(t))}}i.push(`code=${t}`),i.push(`version=${n.version}`),i.length&&(e+=" ("+i.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":a=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":a=new RangeError(e);break;default:a=new Error(e)}return(0,i.defineProperties)(a,{code:t}),r&&Object.assign(a,r),null==a.shortMessage&&(0,i.defineProperties)(a,{shortMessage:s}),a}function u(e,t,r,n){if(!e)throw s(t,r,n)}t.isError=a,t.isCallException=function(e){return a(e,"CALL_EXCEPTION")},t.makeError=s,t.assert=u,t.assertArgument=function(e,t,r,n){u(e,t,"INVALID_ARGUMENT",{argument:r,value:n})},t.assertArgumentCount=function(e,t,r){null==r&&(r=""),r&&(r=": "+r),u(e>=t,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:e,expectedCount:t}),u(e<=t,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})};const c=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){const e=String.fromCharCode(233).normalize("NFD");if(e!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e}),[]);t.assertNormalize=function(e){u(c.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})},t.assertPrivate=function(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),u(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}},7698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventPayload=void 0;const n=r(8166);t.EventPayload=class{filter;emitter;#ft;constructor(e,t,r){this.#ft=t,(0,n.defineProperties)(this,{emitter:e,filter:r})}async removeListener(){null!=this.#ft&&await this.emitter.off(this.filter,this.#ft)}}},5191:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchResponse=t.FetchRequest=t.FetchCancelSignal=void 0;const n=r(1949),i=r(7415),o=r(1500),a=r(8166),s=r(3948),u=r(3271);let c=(0,u.createGetUrl)();const l=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),f=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let d=!1;async function h(e,t){try{const t=e.match(l);if(!t)throw new Error("invalid data");return new w(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?(0,n.decodeBase64)(t[3]):(r=t[3],(0,s.toUtf8Bytes)(r.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))))))}catch(t){return new w(599,"BAD REQUEST (invalid data: URI)",{},null,new v(e))}var r}function p(e){return async function(t,r){try{const r=t.match(f);if(!r)throw new Error("invalid link");return new v(`${e}${r[2]}`)}catch(e){return new w(599,"BAD REQUEST (invalid IPFS URI)",{},null,new v(t))}}}const y={data:h,ipfs:p("https://gateway.ipfs.io/ipfs/")},m=new WeakMap;class g{#dt;#ht;constructor(e){this.#dt=[],this.#ht=!1,m.set(e,(()=>{if(!this.#ht){this.#ht=!0;for(const e of this.#dt)setTimeout((()=>{e()}),0);this.#dt=[]}}))}addListener(e){(0,o.assert)(!this.#ht,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#dt.push(e)}get cancelled(){return this.#ht}checkSignal(){(0,o.assert)(!this.cancelled,"cancelled","CANCELLED",{})}}function b(e){if(null==e)throw new Error("missing signal; should not happen");return e.checkSignal(),e}t.FetchCancelSignal=g;class v{#pt;#yt;#mt;#gt;#bt;#ie;#vt;#wt;#At;#kt;#Et;#St;#xt;#_t;#Pt;get url(){return this.#ie}set url(e){this.#ie=String(e)}get body(){return null==this.#vt?null:new Uint8Array(this.#vt)}set body(e){if(null==e)this.#vt=void 0,this.#wt=void 0;else if("string"==typeof e)this.#vt=(0,s.toUtf8Bytes)(e),this.#wt="text/plain";else if(e instanceof Uint8Array)this.#vt=e,this.#wt="application/octet-stream";else{if("object"!=typeof e)throw new Error("invalid body");this.#vt=(0,s.toUtf8Bytes)(JSON.stringify(e)),this.#wt="application/json"}}hasBody(){return null!=this.#vt}get method(){return this.#gt?this.#gt:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#gt=String(e).toUpperCase()}get headers(){const e=Object.assign({},this.#mt);return this.#At&&(e.authorization=`Basic ${(0,n.encodeBase64)((0,s.toUtf8Bytes)(this.#At))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),null==e["content-type"]&&this.#wt&&(e["content-type"]=this.#wt),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){this.#mt[String(e).toLowerCase()]=String(t)}clearHeaders(){this.#mt={}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let r=0;return{next:()=>{if(r=0,"timeout must be non-zero","timeout",e),this.#bt=e}get preflightFunc(){return this.#kt||null}set preflightFunc(e){this.#kt=e}get processFunc(){return this.#Et||null}set processFunc(e){this.#Et=e}get retryFunc(){return this.#St||null}set retryFunc(e){this.#St=e}get getUrlFunc(){return this.#Pt||c}set getUrlFunc(e){this.#Pt=e}constructor(e){this.#ie=String(e),this.#pt=!1,this.#yt=!0,this.#mt={},this.#gt="",this.#bt=3e5,this.#_t={slotInterval:250,maxAttempts:12},this.#Pt=null}toString(){return``}setThrottleParams(e){null!=e.slotInterval&&(this.#_t.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#_t.maxAttempts=e.maxAttempts)}async#Tt(e,t,r,n,i){if(e>=this.#_t.maxAttempts)return i.makeServerError("exceeded maximum retry limit");(0,o.assert)(A()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:n}),r>0&&await function(e){return new Promise((t=>setTimeout(t,e)))}(r);let a=this.clone();const s=(a.url.split(":")[0]||"").toLowerCase();if(s in y){const e=await y[s](a.url,b(n.#xt));if(e instanceof w){let t=e;if(this.processFunc){b(n.#xt);try{t=await this.processFunc(a,t)}catch(e){null!=e.throttle&&"number"==typeof e.stall||t.makeServerError("error in post-processing function",e).assertOk()}}return t}a=e}this.preflightFunc&&(a=await this.preflightFunc(a));const u=await this.getUrlFunc(a,b(n.#xt));let c=new w(u.statusCode,u.statusMessage,u.headers,u.body,n);if(301===c.statusCode||302===c.statusCode){try{const r=c.headers.location||"";return a.redirect(r).#Tt(e+1,t,0,n,c)}catch(e){}return c}if(429===c.statusCode&&(null==this.retryFunc||await this.retryFunc(a,c,e))){const r=c.headers["retry-after"];let i=this.#_t.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"==typeof r&&r.match(/^[1-9][0-9]*$/)&&(i=parseInt(r)),a.clone().#Tt(e+1,t,i,n,c)}if(this.processFunc){b(n.#xt);try{c=await this.processFunc(a,c)}catch(r){null!=r.throttle&&"number"==typeof r.stall||c.makeServerError("error in post-processing function",r).assertOk();let i=this.#_t.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return r.stall>=0&&(i=r.stall),a.clone().#Tt(e+1,t,i,n,c)}}return c}send(){return(0,o.assert)(null==this.#xt,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#xt=new g(this),this.#Tt(0,A()+this.timeout,0,this,new w(0,"",{},null,this))}cancel(){(0,o.assert)(null!=this.#xt,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=m.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();(0,o.assert)("GET"===this.method&&("https"!==t||"http"!==r)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const n=new v(e);return n.method="GET",n.allowGzip=this.allowGzip,n.timeout=this.timeout,n.#mt=Object.assign({},this.#mt),this.#vt&&(n.#vt=new Uint8Array(this.#vt)),n.#wt=this.#wt,n}clone(){const e=new v(this.url);return e.#gt=this.#gt,this.#vt&&(e.#vt=this.#vt),e.#wt=this.#wt,e.#mt=Object.assign({},this.#mt),e.#At=this.#At,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#kt=this.#kt,e.#Et=this.#Et,e.#St=this.#St,e.#_t=Object.assign({},this.#_t),e.#Pt=this.#Pt,e}static lockConfig(){d=!0}static getGateway(e){return y[e.toLowerCase()]||null}static registerGateway(e,t){if("http"===(e=e.toLowerCase())||"https"===e)throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(d)throw new Error("gateways locked");y[e]=t}static registerGetUrl(e){if(d)throw new Error("gateways locked");c=e}static createGetUrlFunc(e){return(0,u.createGetUrl)(e)}static createDataGateway(){return h}static createIpfsGatewayFunc(e){return p(e)}}t.FetchRequest=v;class w{#It;#Ot;#mt;#vt;#ae;#Bt;toString(){return``}get statusCode(){return this.#It}get statusMessage(){return this.#Ot}get headers(){return Object.assign({},this.#mt)}get body(){return null==this.#vt?null:new Uint8Array(this.#vt)}get bodyText(){try{return null==this.#vt?"":(0,s.toUtf8String)(this.#vt)}catch(e){(0,o.assert)(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){(0,o.assert)(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let r=0;return{next:()=>{if(r(e[t.toLowerCase()]=String(r[t]),e)),{}),this.#vt=null==n?null:new Uint8Array(n),this.#ae=i||null,this.#Bt={message:""}}makeServerError(e,t){let r;r=e?`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:`CLIENT ESCALATED SERVER ERROR (${e=`${this.statusCode} ${this.statusMessage}`})`;const n=new w(599,r,this.headers,this.body,this.#ae||void 0);return n.#Bt={message:e,error:t},n}throwThrottleError(e,t){null==t?t=-1:(0,o.assertArgument)(Number.isInteger(t)&&t>=0,"invalid stall timeout","stall",t);const r=new Error(e||"throttling requests");throw(0,a.defineProperties)(r,{stall:t,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#vt}get request(){return this.#ae}ok(){return""===this.#Bt.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=this.#Bt;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let n=null;try{this.#vt&&(n=(0,s.toUtf8String)(this.#vt))}catch(e){}(0,o.assert)(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:r,responseBody:n,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function A(){return(new Date).getTime()}t.FetchResponse=w},9412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=void 0;const n=r(7415),i=r(1500),o=r(6508),a=r(8166),s=BigInt(-1),u=BigInt(0),c=BigInt(1),l=BigInt(5),f={};let d="0000";for(;d.length<80;)d+=d;function h(e){let t=d;for(;t.length=-t&&eu?(0,o.fromTwos)((0,o.mask)(e,n),n):-(0,o.fromTwos)((0,o.mask)(-e,n),n)}else{const t=c<=0&&enull==o[e]?r:((0,i.assertArgument)(typeof o[e]===t,"invalid fixed format ("+e+" not "+t+")","format."+e,o[e]),o[e]);t=a("signed","boolean",t),r=a("width","number",r),n=a("decimals","number",n)}(0,i.assertArgument)(r%8==0,"invalid FixedNumber width (not byte aligned)","format.width",r),(0,i.assertArgument)(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);return{signed:t,width:r,decimals:n,name:(t?"":"u")+"fixed"+String(r)+"x"+String(n)}}class m{format;#Ct;#Nt;#Rt;_value;constructor(e,t,r){(0,i.assertPrivate)(e,f,"FixedNumber"),this.#Nt=t,this.#Ct=r;const n=function(e,t){let r="";e0?r*=h(n):n<0&&(t*=h(-n)),tr?1:0}eq(e){return 0===this.cmp(e)}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#Nt;return this.#Ntu&&(e+=this.#Rt-c),e=this.#Nt/this.#Rt*this.#Rt,this.#Ut(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,r=l*h(t-1);let n=this.value+r;const i=h(t);return n=n/i*i,p(n,this.#Ct,"round"),new m(f,n,this.#Ct)}isZero(){return this.#Nt===u}isNegative(){return this.#Nt0){const t=h(c);(0,i.assert)(s%t===u,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),s/=t}else c<0&&(s*=h(-c));return p(s,a,"fromValue"),new m(f,s,a)}static fromString(e,t){const r=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,i.assertArgument)(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",e);const n=y(t);let o=r[2]||"0",a=r[3]||"";for(;a.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=t.createGetUrl=void 0;const n=r(1500);function i(e){return async function(e,t){(0,n.assert)(null==t||!t.cancelled,"request cancelled before sending","CANCELLED");const r=e.url.split(":")[0].toLowerCase();(0,n.assert)("http"===r||"https"===r,`unsupported protocol ${r}`,"UNSUPPORTED_OPERATION",{info:{protocol:r},operation:"request"}),(0,n.assert)("https"===r||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i=null;const o=new AbortController,a=setTimeout((()=>{i=(0,n.makeError)("request timeout","TIMEOUT"),o.abort()}),e.timeout);t&&t.addListener((()=>{i=(0,n.makeError)("request cancelled","CANCELLED"),o.abort()}));const s={method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:o.signal};let u;try{u=await fetch(e.url,s)}catch(e){if(clearTimeout(a),i)throw i;throw e}clearTimeout(a);const c={};u.headers.forEach(((e,t)=>{c[t.toLowerCase()]=e}));const l=await u.arrayBuffer(),f=null==l?null:new Uint8Array(l);return{statusCode:u.status,statusMessage:u.statusText,headers:c,body:f}}}t.createGetUrl=i;const o=i();t.getUrl=async function(e,t){return o(e,t)}},5347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.encodeRlp=t.decodeRlp=t.defineProperties=t.resolveProperties=t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.toBigInt=t.getUint=t.getNumber=t.getBigInt=t.mask=t.toTwos=t.fromTwos=t.FixedNumber=t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.makeError=t.assertNormalize=t.assertPrivate=t.assertArgumentCount=t.assertArgument=t.assert=t.isError=t.isCallException=t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=void 0,t.uuidV4=t.Utf8ErrorFuncs=void 0;var n=r(8567);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return n.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return n.encodeBase58}});var i=r(1949);Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return i.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return i.encodeBase64}});var o=r(7415);Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return o.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return o.getBytesCopy}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return o.isBytesLike}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return o.hexlify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return o.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return o.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return o.dataSlice}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return o.stripZerosLeft}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return o.zeroPadValue}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return o.zeroPadBytes}});var a=r(1500);Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return a.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return a.isError}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return a.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return a.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return a.assertArgumentCount}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return a.assertPrivate}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return a.assertNormalize}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return a.makeError}});var s=r(7698);Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return s.EventPayload}});var u=r(5191);Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return u.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return u.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return u.FetchCancelSignal}});var c=r(9412);Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return c.FixedNumber}});var l=r(6508);Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return l.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return l.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return l.mask}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return l.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return l.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return l.getUint}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return l.toBigInt}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return l.toNumber}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return l.toBeHex}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return l.toBeArray}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return l.toQuantity}});var f=r(8166);Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return f.resolveProperties}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return f.defineProperties}});var d=r(7780);Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return d.decodeRlp}});var h=r(5212);Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return h.encodeRlp}});var p=r(436);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return p.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return p.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return p.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return p.parseUnits}});var y=r(3948);Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return y.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return y.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return y.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return y.Utf8ErrorFuncs}});var m=r(7744);Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return m.uuidV4}})},6508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.getNumber=t.toBigInt=t.getUint=t.getBigInt=t.mask=t.toTwos=t.fromTwos=void 0;const n=r(7415),i=r(1500),o=BigInt(0),a=BigInt(1),s=9007199254740991;function u(e,t){switch(typeof e){case"bigint":return e;case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-s&&e<=s,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){(0,i.assertArgument)(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid BigNumberish value",t||"value",e)}function c(e,t){const r=u(e,t);return(0,i.assert)(r>=o,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}t.fromTwos=function(e,t){const r=c(e,"value"),n=BigInt(d(t,"width"));if((0,i.assert)(r>>n===o,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),r>>n-a){return-((~r&(a<>4],t+=l[15&r];return BigInt(t)}return u(e)}function d(e,t){switch(typeof e){case"bigint":return(0,i.assertArgument)(e>=-s&&e<=s,"overflow",t||"value",e),Number(e);case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-s&&e<=s,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return d(BigInt(e),t)}catch(r){(0,i.assertArgument)(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid numeric value",t||"value",e)}function h(e){const t=c(e,"value");if(t===o)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let e=0;e=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length<2*n;)r="0"+r}return"0x"+r},t.toBeArray=h,t.toQuantity=function(e){let t=(0,n.hexlify)((0,n.isBytesLike)(e)?e:h(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}},8166:(e,t)=>{"use strict";function r(e,t,r){const n=t.split("|").map((e=>e.trim()));for(let r=0;rPromise.resolve(e[t]))))).reduce(((e,r,n)=>(e[t[n]]=r,e)),{})},t.defineProperties=function(e,t,n){for(let i in t){let o=t[i];const a=n?n[i]:null;a&&r(o,a,i),Object.defineProperty(e,i,{enumerable:!0,value:o,writable:!1})}}},7780:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeRlp=void 0;const n=r(7415),i=r(1500),o=r(7415);function a(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function s(e,t,r){let n=0;for(let i=0;i{(0,i.assert)(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const n=e[t]-247;r(t+1+n);const i=s(e,t+1,n);return r(t+1+n+i),u(e,t,t+1+n,n+i)}if(e[t]>=192){const n=e[t]-192;return r(t+1+n),u(e,t,t+1,n)}if(e[t]>=184){const i=e[t]-183;r(t+1+i);const o=s(e,t+1,i);r(t+1+i+o);return{consumed:1+i+o,result:(0,n.hexlify)(e.slice(t+1+i,t+1+i+o))}}if(e[t]>=128){const i=e[t]-128;r(t+1+i);return{consumed:1+i,result:(0,n.hexlify)(e.slice(t+1,t+1+i))}}return{consumed:1,result:a(e[t])}}t.decodeRlp=function(e){const t=(0,o.getBytes)(e,"data"),r=c(t,0);return(0,i.assertArgument)(r.consumed===t.length,"unexpected junk after rlp payload","data",e),r.result}},5212:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRlp=void 0;const n=r(7415);function i(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function o(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(o(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=i(t.length);return r.unshift(247+r.length),r.concat(t)}const t=Array.prototype.slice.call((0,n.getBytes)(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=i(t.length);return r.unshift(183+r.length),r.concat(t)}const a="0123456789abcdef";t.encodeRlp=function(e){let t="0x";for(const r of o(e))t+=a[r>>4],t+=a[15&r];return t}},436:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=t.formatEther=t.parseUnits=t.formatUnits=void 0;const n=r(1500),i=r(9412),o=r(6508),a=["wei","kwei","mwei","gwei","szabo","finney","ether"];function s(e,t){let r=18;if("string"==typeof t){const e=a.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,o.getNumber)(t,"unit"));return i.FixedNumber.fromValue(e,r,{decimals:r,width:512}).toString()}function u(e,t){(0,n.assertArgument)("string"==typeof e,"value must be a string","value",e);let r=18;if("string"==typeof t){const e=a.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,o.getNumber)(t,"unit"));return i.FixedNumber.fromString(e,{decimals:r,width:512}).value}t.formatUnits=s,t.parseUnits=u,t.formatEther=function(e){return s(e,18)},t.parseEther=function(e){return u(e,18)}},3948:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8CodePoints=t.toUtf8String=t.toUtf8Bytes=t.Utf8ErrorFuncs=void 0;const n=r(7415),i=r(1500);function o(e,t,r,n,i){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return"OVERRUN"===e?r.length-t-1:0}function a(e,r){null==r&&(r=t.Utf8ErrorFuncs.error);const i=(0,n.getBytes)(e,"bytes"),o=[];let a=0;for(;a>7)){o.push(e);continue}let t=null,n=null;if(192==(224&e))t=1,n=127;else if(224==(240&e))t=2,n=2047;else{if(240!=(248&e)){a+=r(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",a-1,i,o);continue}t=3,n=65535}if(a-1+t>=i.length){a+=r("OVERRUN",a-1,i,o);continue}let s=e&(1<<8-t-1)-1;for(let e=0;e1114111?a+=r("OUT_OF_RANGE",a-1-t,i,o,s):s>=55296&&s<=57343?a+=r("UTF16_SURROGATE",a-1-t,i,o,s):s<=n?a+=r("OVERLONG",a-1-t,i,o,s):o.push(s))}return o}function s(e,t){(0,i.assertArgument)("string"==typeof e,"invalid string value","str",e),null!=t&&((0,i.assertNormalize)(t),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);(0,i.assertArgument)(t>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}t.Utf8ErrorFuncs=Object.freeze({error:function(e,t,r,n,o){(0,i.assertArgument)(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:o,replace:function(e,t,r,n,a){return"OVERLONG"===e?((0,i.assertArgument)("number"==typeof a,"invalid bad code point for replacement","badCodepoint",a),n.push(a),0):(n.push(65533),o(e,t,r))}}),t.toUtf8Bytes=s,t.toUtf8String=function(e,t){return a(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")},t.toUtf8CodePoints=function(e,t){return a(s(e,t))}},7744:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuidV4=void 0;const n=r(7415);t.uuidV4=function(e){const t=(0,n.getBytes)(e,"randomBytes");t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=(0,n.hexlify)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}},8394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWallet=void 0;const n=r(646),i=r(3562),o=r(3996),a=r(7778),s=r(5347);class u extends o.AbstractSigner{address;#Ht;constructor(e,t){super(t),(0,s.assertArgument)(e&&"function"==typeof e.sign,"invalid private key","privateKey","[ REDACTED ]"),this.#Ht=e;const r=(0,a.computeAddress)(this.signingKey.publicKey);(0,s.defineProperties)(this,{address:r})}get signingKey(){return this.#Ht}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new u(this.#Ht,e)}async signTransaction(e){e=(0,o.copyRequest)(e);const{to:t,from:r}=await(0,s.resolveProperties)({to:e.to?(0,n.resolveAddress)(e.to,this.provider):void 0,from:e.from?(0,n.resolveAddress)(e.from,this.provider):void 0});null!=t&&(e.to=t),null!=r&&(e.from=r),null!=e.from&&((0,s.assertArgument)((0,n.getAddress)(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const i=a.Transaction.from(e);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign((0,i.hashMessage)(e)).serialized}async signTypedData(e,t,r){const n=await i.TypedDataEncoder.resolveNames(e,t,r,(async e=>{(0,s.assert)(null!=this.provider,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:e}});const t=await this.provider.resolveName(e);return(0,s.assert)(null!=t,"unconfigured ENS name","UNCONFIGURED_NAME",{value:e}),t}));return this.signingKey.sign(i.TypedDataEncoder.hash(n.domain,t,n.value)).serialized}}t.BaseWallet=u},22:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIndexedAccountPath=t.getAccountPath=t.HDNodeVoidWallet=t.HDNodeWallet=t.defaultPath=void 0;const n=r(2291),i=r(3996),o=r(7778),a=r(5347),s=r(9943),u=r(8394),c=r(2931),l=r(1650);t.defaultPath="m/44'/60'/0'/0/0";const f=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),d=2147483648,h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");function p(e,t){let r="";for(;e;)r="0123456789abcdef"[e%16]+r,e=Math.trunc(e/16);for(;r.length<2*t;)r="0"+r;return"0x"+r}function y(e){const t=(0,a.getBytes)(e),r=(0,a.dataSlice)((0,n.sha256)((0,n.sha256)(t)),0,4),i=(0,a.concat)([t,r]);return(0,a.encodeBase58)(i)}const m={};function g(e,t,r,i){const o=new Uint8Array(37);e&d?((0,a.assert)(null!=i,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),o.set((0,a.getBytes)(i),1)):o.set((0,a.getBytes)(r));for(let t=24;t>=0;t-=8)o[33+(t>>3)]=e>>24-t&255;const s=(0,a.getBytes)((0,n.computeHmac)("sha512",t,o));return{IL:s.slice(0,32),IR:s.slice(32)}}function b(e,t){const r=t.split("/");(0,a.assertArgument)(r.length>0,"invalid path","path",t),"m"===r[0]&&((0,a.assertArgument)(0===e.depth,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,"path",t),r.shift());let n=e;for(let e=0;e=16&&r.length<=64,"invalid seed","seed","[REDACTED]");const i=(0,a.getBytes)((0,n.computeHmac)("sha512",f,r)),o=new n.SigningKey((0,a.hexlify)(i.slice(0,32)));return new v(m,o,"0x00000000",(0,a.hexlify)(i.slice(32)),"m",0,0,t,null)}static fromExtendedKey(e){const t=(0,a.toBeArray)((0,a.decodeBase58)(e));(0,a.assertArgument)(82===t.length||y(t.slice(0,78))===e,"invalid extended key","extendedKey","[ REDACTED ]");const r=t[4],i=(0,a.hexlify)(t.slice(5,9)),s=parseInt((0,a.hexlify)(t.slice(9,13)).substring(2),16),u=(0,a.hexlify)(t.slice(13,45)),c=t.slice(45,78);switch((0,a.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":{const e=(0,a.hexlify)(c);return new w(m,(0,o.computeAddress)(e),e,i,u,null,s,r,null)}case"0x0488ade4":case"0x04358394 ":if(0!==c[0])break;return new v(m,new n.SigningKey(c.slice(1)),i,u,null,s,r,null,null)}(0,a.assertArgument)(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(e,r,i){null==e&&(e=""),null==r&&(r=t.defaultPath),null==i&&(i=s.LangEn.wordlist());const o=c.Mnemonic.fromEntropy((0,n.randomBytes)(16),e,i);return v.#qt(o.computeSeed(),o).derivePath(r)}static fromMnemonic(e,r){return r||(r=t.defaultPath),v.#qt(e.computeSeed(),e).derivePath(r)}static fromPhrase(e,r,n,i){null==r&&(r=""),null==n&&(n=t.defaultPath),null==i&&(i=s.LangEn.wordlist());const o=c.Mnemonic.fromPhrase(e,r,i);return v.#qt(o.computeSeed(),o).derivePath(n)}static fromSeed(e){return v.#qt(e,null)}}t.HDNodeWallet=v;class w extends i.VoidSigner{publicKey;fingerprint;parentFingerprint;chainCode;path;index;depth;constructor(e,t,r,i,o,s,u,c,l){super(t,l),(0,a.assertPrivate)(e,m,"HDNodeVoidWallet"),(0,a.defineProperties)(this,{publicKey:r});const f=(0,a.dataSlice)((0,n.ripemd160)((0,n.sha256)(r)),0,4);(0,a.defineProperties)(this,{publicKey:r,fingerprint:f,parentFingerprint:i,chainCode:o,path:s,index:u,depth:c})}connect(e){return new w(m,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,e)}get extendedKey(){return(0,a.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),y((0,a.concat)(["0x0488B21E",p(this.depth,1),this.parentFingerprint,p(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return null!=this.path}deriveChild(e){const t=(0,a.getNumber)(e,"index");(0,a.assertArgument)(t<=4294967295,"invalid index","index",t);let r=this.path;r&&(r+="/"+(2147483647&t),t&d&&(r+="'"));const{IR:i,IL:s}=g(t,this.chainCode,this.publicKey,null),u=n.SigningKey.addPoints(s,this.publicKey,!0),c=(0,o.computeAddress)(u);return new w(m,c,u,this.fingerprint,(0,a.hexlify)(i),r,t,this.depth+1,this.provider)}derivePath(e){return b(this,e)}}t.HDNodeVoidWallet=w,t.getAccountPath=function(e){const t=(0,a.getNumber)(e,"index");return(0,a.assertArgument)(t>=0&&t=0&&t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=t.Mnemonic=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=t.decryptCrowdsaleJson=t.isCrowdsaleJson=t.HDNodeVoidWallet=t.HDNodeWallet=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.BaseWallet=void 0;var n=r(8394);Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return n.BaseWallet}});var i=r(22);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return i.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return i.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return i.getIndexedAccountPath}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return i.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return i.HDNodeVoidWallet}});var o=r(7570);Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return o.isCrowdsaleJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return o.decryptCrowdsaleJson}});var a=r(1650);Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return a.isKeystoreJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return a.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return a.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return a.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return a.encryptKeystoreJsonSync}});var s=r(2931);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return s.Mnemonic}});var u=r(6930);Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return u.Wallet}})},7570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decryptCrowdsaleJson=t.isCrowdsaleJson=void 0;const n=r(8165),i=r(646),o=r(2291),a=r(3562),s=r(5347),u=r(8634);t.isCrowdsaleJson=function(e){try{if(JSON.parse(e).encseed)return!0}catch(e){}return!1},t.decryptCrowdsaleJson=function(e,t){const r=JSON.parse(e),c=(0,u.getPassword)(t),l=(0,i.getAddress)((0,u.spelunk)(r,"ethaddr:string!")),f=(0,u.looseArrayify)((0,u.spelunk)(r,"encseed:string!"));(0,s.assertArgument)(f&&f.length%16==0,"invalid encseed","json",e);const d=(0,s.getBytes)((0,o.pbkdf2)(c,c,2e3,32,"sha256")).slice(0,16),h=f.slice(0,16),p=f.slice(16),y=new n.CBC(d,h),m=(0,n.pkcs7Strip)((0,s.getBytes)(y.decrypt(p)));let g="";for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encryptKeystoreJson=t.encryptKeystoreJsonSync=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=void 0;const n=r(8165),i=r(646),o=r(2291),a=r(7778),s=r(5347),u=r(8634),c=r(4586),l="m/44'/60'/0'/0/0";function f(e,t){const r=(0,s.getBytes)(t),c=(0,u.spelunk)(e,"crypto.ciphertext:data!"),f=(0,s.hexlify)((0,o.keccak256)((0,s.concat)([r.slice(16,32),c]))).substring(2);(0,s.assertArgument)(f===(0,u.spelunk)(e,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");const d=function(e,t,r){if("aes-128-ctr"===(0,u.spelunk)(e,"crypto.cipher:string")){const i=(0,u.spelunk)(e,"crypto.cipherparams.iv:data!"),o=new n.CTR(t,i);return(0,s.hexlify)(o.decrypt(r))}(0,s.assert)(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}(e,r.slice(0,16),c),h=(0,a.computeAddress)(d);if(e.address){let t=e.address.toLowerCase();t.startsWith("0x")||(t="0x"+t),(0,s.assertArgument)((0,i.getAddress)(t)===h,"keystore address/privateKey mismatch","address",e.address)}const p={address:h,privateKey:d};if("0.1"===(0,u.spelunk)(e,"x-ethers.version:string")){const t=r.slice(32,64),i=(0,u.spelunk)(e,"x-ethers.mnemonicCiphertext:data!"),o=(0,u.spelunk)(e,"x-ethers.mnemonicCounter:data!"),a=new n.CTR(t,o);p.mnemonic={path:(0,u.spelunk)(e,"x-ethers.path:string")||l,locale:(0,u.spelunk)(e,"x-ethers.locale:string")||"en",entropy:(0,s.hexlify)((0,s.getBytes)(a.decrypt(i)))}}return p}function d(e){const t=(0,u.spelunk)(e,"crypto.kdf:string");if(t&&"string"==typeof t){if("scrypt"===t.toLowerCase()){const r=(0,u.spelunk)(e,"crypto.kdfparams.salt:data!"),n=(0,u.spelunk)(e,"crypto.kdfparams.n:int!"),i=(0,u.spelunk)(e,"crypto.kdfparams.r:int!"),o=(0,u.spelunk)(e,"crypto.kdfparams.p:int!");(0,s.assertArgument)(n>0&&!(n&n-1),"invalid kdf.N","kdf.N",n),(0,s.assertArgument)(i>0&&o>0,"invalid kdf","kdf",t);const a=(0,u.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,s.assertArgument)(32===a,"invalid kdf.dklen","kdf.dflen",a),{name:"scrypt",salt:r,N:n,r:i,p:o,dkLen:64}}if("pbkdf2"===t.toLowerCase()){const t=(0,u.spelunk)(e,"crypto.kdfparams.salt:data!"),r=(0,u.spelunk)(e,"crypto.kdfparams.prf:string!"),n=r.split("-").pop();(0,s.assertArgument)("sha256"===n||"sha512"===n,"invalid kdf.pdf","kdf.pdf",r);const i=(0,u.spelunk)(e,"crypto.kdfparams.c:int!"),o=(0,u.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,s.assertArgument)(32===o,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:t,count:i,dkLen:o,algorithm:n}}}(0,s.assertArgument)(!1,"unsupported key-derivation function","kdf",t)}function h(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}function p(e){const t=null!=e.salt?(0,s.getBytes)(e.salt,"options.salt"):(0,o.randomBytes)(32);let r=1<<17,n=8,i=1;return e.scrypt&&(e.scrypt.N&&(r=e.scrypt.N),e.scrypt.r&&(n=e.scrypt.r),e.scrypt.p&&(i=e.scrypt.p)),(0,s.assertArgument)("number"==typeof r&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),(0,s.assertArgument)("number"==typeof n&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),(0,s.assertArgument)("number"==typeof i&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:t,N:r,r:n,p:i}}function y(e,t,r,i){const a=(0,s.getBytes)(r.privateKey,"privateKey"),f=null!=i.iv?(0,s.getBytes)(i.iv,"options.iv"):(0,o.randomBytes)(16);(0,s.assertArgument)(16===f.length,"invalid options.iv length","options.iv",i.iv);const d=null!=i.uuid?(0,s.getBytes)(i.uuid,"options.uuid"):(0,o.randomBytes)(16);(0,s.assertArgument)(16===d.length,"invalid options.uuid length","options.uuid",i.iv);const h=e.slice(0,16),p=e.slice(16,32),y=new n.CTR(h,f),m=(0,s.getBytes)(y.encrypt(a)),g=(0,o.keccak256)((0,s.concat)([p,m])),b={address:r.address.substring(2).toLowerCase(),id:(0,s.uuidV4)(d),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,s.hexlify)(f).substring(2)},ciphertext:(0,s.hexlify)(m).substring(2),kdf:"scrypt",kdfparams:{salt:(0,s.hexlify)(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:g.substring(2)}};if(r.mnemonic){const t=null!=i.client?i.client:`ethers/${c.version}`,a=r.mnemonic.path||l,f=r.mnemonic.locale||"en",d=e.slice(32,64),h=(0,s.getBytes)(r.mnemonic.entropy,"account.mnemonic.entropy"),p=(0,o.randomBytes)(16),y=new n.CTR(d,p),m=(0,s.getBytes)(y.encrypt(h)),g=new Date,v="UTC--"+(g.getUTCFullYear()+"-"+(0,u.zpad)(g.getUTCMonth()+1,2)+"-"+(0,u.zpad)(g.getUTCDate(),2)+"T"+(0,u.zpad)(g.getUTCHours(),2)+"-"+(0,u.zpad)(g.getUTCMinutes(),2)+"-"+(0,u.zpad)(g.getUTCSeconds(),2)+".0Z")+"--"+b.address;b["x-ethers"]={client:t,gethFilename:v,path:a,locale:f,mnemonicCounter:(0,s.hexlify)(p).substring(2),mnemonicCiphertext:(0,s.hexlify)(m).substring(2),version:"0.1"}}return JSON.stringify(b)}t.isKeystoreJson=function(e){try{const t=JSON.parse(e);if(3===(null!=t.version?parseInt(t.version):0))return!0}catch(e){}return!1},t.decryptKeystoreJsonSync=function(e,t){const r=JSON.parse(e),n=(0,u.getPassword)(t),i=d(r);if("pbkdf2"===i.name){const{salt:e,count:t,dkLen:a,algorithm:s}=i;return f(r,(0,o.pbkdf2)(n,e,t,a,s))}(0,s.assert)("scrypt"===i.name,"cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:a,N:c,r:l,p:h,dkLen:p}=i;return f(r,(0,o.scryptSync)(n,a,c,l,h,p))},t.decryptKeystoreJson=async function(e,t,r){const n=JSON.parse(e),i=(0,u.getPassword)(t),a=d(n);if("pbkdf2"===a.name){r&&(r(0),await h(0));const{salt:e,count:t,dkLen:s,algorithm:u}=a,c=(0,o.pbkdf2)(i,e,t,s,u);return r&&(r(1),await h(0)),f(n,c)}(0,s.assert)("scrypt"===a.name,"cannot be reached","UNKNOWN_ERROR",{params:a});const{salt:c,N:l,r:p,p:y,dkLen:m}=a;return f(n,await(0,o.scrypt)(i,c,l,p,y,m,r))},t.encryptKeystoreJsonSync=function(e,t,r){null==r&&(r={});const n=(0,u.getPassword)(t),i=p(r),a=(0,o.scryptSync)(n,i.salt,i.N,i.r,i.p,64);return y((0,s.getBytes)(a),i,e,r)},t.encryptKeystoreJson=async function(e,t,r){null==r&&(r={});const n=(0,u.getPassword)(t),i=p(r),a=await(0,o.scrypt)(n,i.salt,i.N,i.r,i.p,64,r.progressCallback);return y((0,s.getBytes)(a),i,e,r)}},2931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mnemonic=void 0;const n=r(2291),i=r(5347),o=r(9943);function a(e){return(1<=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const s=new Uint8Array(Math.ceil(11*r.length/8));let u=0;for(let e=0;e=0,`invalid mnemonic word at index ${e}`,"mnemonic","[ REDACTED ]");for(let e=0;e<11;e++)n&1<<10-e&&(s[u>>3]|=1<<7-u%8),u++}const c=32*r.length/3,l=a(r.length/3),f=(0,i.getBytes)((0,n.sha256)(s.slice(0,c/8)))[0]&l;return(0,i.assertArgument)(f===(s[s.length-1]&l),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),(0,i.hexlify)(s.slice(0,c/8))}function u(e,t){(0,i.assertArgument)(e.length%4==0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),null==t&&(t=o.LangEn.wordlist());const r=[0];let s=11;for(let t=0;t8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],s-=8):(r[r.length-1]<<=s,r[r.length-1]|=e[t]>>8-s,r.push(e[t]&((1<<8-s)-1&255)),s+=3);const u=e.length/4,c=parseInt((0,n.sha256)(e).substring(2,4),16)&a(u);return r[r.length-1]<<=u,r[r.length-1]|=c>>8-u,t.join(r.map((e=>t.getWord(e))))}const c={};class l{phrase;password;wordlist;entropy;constructor(e,t,r,n,a){null==n&&(n=""),null==a&&(a=o.LangEn.wordlist()),(0,i.assertPrivate)(e,c,"Mnemonic"),(0,i.defineProperties)(this,{phrase:r,password:n,wordlist:a,entropy:t})}computeSeed(){const e=(0,i.toUtf8Bytes)("mnemonic"+this.password,"NFKD");return(0,n.pbkdf2)((0,i.toUtf8Bytes)(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,t,r){const n=s(e,r);return e=u((0,i.getBytes)(n),r),new l(c,n,e,t,r)}static fromEntropy(e,t,r){const n=(0,i.getBytes)(e,"entropy"),o=u(n,r);return new l(c,(0,i.hexlify)(n),o,t,r)}static entropyToPhrase(e,t){return u((0,i.getBytes)(e,"entropy"),t)}static phraseToEntropy(e,t){return s(e,t)}static isValidMnemonic(e,t){try{return s(e,t),!0}catch(e){}return!1}}t.Mnemonic=l},8634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.spelunk=t.getPassword=t.zpad=t.looseArrayify=void 0;const n=r(5347);function i(e){return"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),(0,n.getBytesCopy)(e)}t.looseArrayify=i,t.zpad=function(e,t){for(e=String(e);e.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;const n=r(2291),i=r(5347),o=r(8394),a=r(22),s=r(7570),u=r(1650),c=r(2931);function l(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}class f extends o.BaseWallet{constructor(e,t){"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),super("string"==typeof e?new n.SigningKey(e):e,t)}connect(e){return new f(this.signingKey,e)}async encrypt(e,t){const r={address:this.address,privateKey:this.privateKey};return await(0,u.encryptKeystoreJson)(r,e,{progressCallback:t})}encryptSync(e){const t={address:this.address,privateKey:this.privateKey};return(0,u.encryptKeystoreJsonSync)(t,e)}static#Gt(e){if((0,i.assertArgument)(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&"en"===e.mnemonic.locale){const t=c.Mnemonic.fromEntropy(e.mnemonic.entropy),r=a.HDNodeWallet.fromMnemonic(t,e.mnemonic.path);if(r.address===e.address&&r.privateKey===e.privateKey)return r;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const t=new f(e.privateKey);return(0,i.assertArgument)(t.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),t}static async fromEncryptedJson(e,t,r){let n=null;return(0,u.isKeystoreJson)(e)?n=await(0,u.decryptKeystoreJson)(e,t,r):(0,s.isCrowdsaleJson)(e)&&(r&&(r(0),await l(0)),n=(0,s.decryptCrowdsaleJson)(e,t),r&&(r(1),await l(0))),f.#Gt(n)}static fromEncryptedJsonSync(e,t){let r=null;return(0,u.isKeystoreJson)(e)?r=(0,u.decryptKeystoreJsonSync)(e,t):(0,s.isCrowdsaleJson)(e)?r=(0,s.decryptCrowdsaleJson)(e,t):(0,i.assertArgument)(!1,"invalid JSON wallet","json","[ REDACTED ]"),f.#Gt(r)}static createRandom(e){const t=a.HDNodeWallet.createRandom();return e?t.connect(e):t}static fromPhrase(e,t){const r=a.HDNodeWallet.fromPhrase(e);return t?r.connect(t):r}}t.Wallet=f},9610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBits=void 0;t.decodeBits=function(e,t){const r=(1<=e;){const t=i>>o-e;i&=(1<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwl=t.decode=void 0;const n=r(5347),i=" !#$%&'()*+,-./<=>?@[]^_`{|}~",o=/^[a-z]*$/i;function a(e,t){let r=97;return e.reduce(((e,n)=>(n===t?r++:n.match(o)?e.push(String.fromCharCode(r)+n):(r=97,e.push(n)),e)),[])}function s(e,t){for(let r=28;r>=0;r--)e=e.split(i[r]).join(t.substring(2*r,2*r+2));const r=[],n=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,((e,t,n,i)=>{if(n)for(let e=parseInt(n);e>=0;e--)r.push(";");else r.push(t.toLowerCase());return""}));if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return a(a(r,";"),":")}t.decode=s,t.decodeOwl=function(e){return(0,n.assertArgument)("0"===e[0],"unsupported auwl data","data",e),s(e.substring(59),e.substring(1,59))}},7703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwlA=void 0;const n=r(5347),i=r(9610),o=r(2426);t.decodeOwlA=function(e,t){let r=(0,o.decodeOwl)(e).join(",");return t.split(/,/g).forEach((e=>{const o=e.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);(0,n.assertArgument)(null!==o,"internal error parsing accents","accents",t);let a=0;const s=(0,i.decodeBits)(parseInt(o[3]),o[4]),u=parseInt(o[2]),c=new RegExp(`([${o[1]}])`,"g");r=r.replace(c,((e,t)=>(0===--s[a]&&(t=String.fromCharCode(t.charCodeAt(0),u),a++),t)))})),r.split(",")}},6591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=void 0;var n=r(9011);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return n.Wordlist}});var i=r(9943);Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return i.LangEn}});var o=r(2684);Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return o.WordlistOwl}});var a=r(8725);Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return a.WordlistOwlA}});var s=r(2431);Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return s.wordlists}})},9943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LangEn=void 0;const n=r(2684);let i=null;class o extends n.WordlistOwl{constructor(){super("en","0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO","0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60")}static wordlist(){return null==i&&(i=new o),i}}t.LangEn=o},2684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwl=void 0;const n=r(3562),i=r(5347),o=r(2426),a=r(9011);class s extends a.Wordlist{#r;#Kt;constructor(e,t,r){super(e),this.#r=t,this.#Kt=r,this.#Vt=null}get _data(){return this.#r}_decodeWords(){return(0,o.decodeOwl)(this.#r)}#Vt;#Jt(){if(null==this.#Vt){const e=this._decodeWords();if((0,n.id)(e.join("\n")+"\n")!==this.#Kt)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#Vt=e}return this.#Vt}getWord(e){const t=this.#Jt();return(0,i.assertArgument)(e>=0&&e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwlA=void 0;const n=r(2684),i=r(7703);class o extends n.WordlistOwl{#Wt;constructor(e,t,r,n){super(e,t,n),this.#Wt=r}get _accent(){return this.#Wt}_decodeWords(){return(0,i.decodeOwlA)(this._data,this._accent)}}t.WordlistOwlA=o},9011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wordlist=void 0;const n=r(5347);t.Wordlist=class{locale;constructor(e){(0,n.defineProperties)(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}},2431:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlists=void 0;const n=r(9943);t.wordlists={en:n.LangEn.wordlist()}},9784:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"assertionExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"}],"name":"createAssertion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"deleteAssertion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"getAssertion","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"}],"internalType":"struct AssertionStructs.Assertion","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"getAssertionChunksNumber","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"getAssertionSize","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"getAssertionTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"getAssertionTriplesNumber","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},3582:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"AssetExpired","type":"error"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"CommitPhaseOngoing","type":"error"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"CommitPhaseSucceeded","type":"error"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"FirstEpochHasAlreadyEnded","type":"error"},{"inputs":[{"internalType":"address","name":"assetStorage","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NoPendingUpdate","type":"error"},{"inputs":[{"internalType":"address","name":"assetStorage","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"latestStateIndex","type":"uint256"}],"name":"PendingUpdateFinalization","type":"error"},{"inputs":[{"internalType":"address","name":"assetStorage","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"latestState","type":"bytes32"}],"name":"UpdateIsNotFinalized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"returnedTokenAmount","type":"uint96"}],"name":"AssetBurnt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"state","type":"bytes32"}],"name":"AssetMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"AssetPaymentIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"stateIndex","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"returnedTokenAmount","type":"uint96"}],"name":"AssetStateUpdateCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"stateIndex","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"AssetStateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"indexed":false,"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"AssetStoringPeriodExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"AssetUpdatePaymentIncreased","type":"event"},{"inputs":[],"name":"assertionContract","outputs":[{"internalType":"contract Assertion","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burnAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"cancelAssetStateUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"clearOldCommitsMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contentAssetStorage","outputs":[{"internalType":"contract ContentAssetStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"},{"internalType":"bool","name":"immutable_","type":"bool"}],"internalType":"struct ContentAssetStructs.AssetInputArgs","name":"args","type":"tuple"}],"name":"createAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"},{"internalType":"bool","name":"immutable_","type":"bool"}],"name":"createAssetWithVariables","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"extendAssetStoringPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hashingProxy","outputs":[{"internalType":"contract HashingProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"increaseAssetTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"increaseAssetUpdateTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"parametersStorage","outputs":[{"internalType":"contract ParametersStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"serviceAgreementStorageProxy","outputs":[{"internalType":"contract ServiceAgreementStorageProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"serviceAgreementV1","outputs":[{"internalType":"contract ServiceAgreementV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_flag","type":"bool"}],"name":"setOldMetadataClearingFlag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unfinalizedStateStorage","outputs":[{"internalType":"contract UnfinalizedStateStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"updateAssetState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},7247:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assetAssertionId","type":"bytes32"}],"name":"assertionExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"deleteAssertionIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"deleteAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generateTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getAssertionIdByIndex","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAssertionIds","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAssertionIdsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint256","name":"assertionIndex","type":"uint256"}],"name":"getAssertionIssuer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAsset","outputs":[{"components":[{"internalType":"bool","name":"immutable_","type":"bool"},{"internalType":"bytes32[]","name":"assertionIds","type":"bytes32[]"}],"internalType":"struct ContentAssetStructs.Asset","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLatestAssertionId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isMutable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"issuers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"}],"name":"pushAssertionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"address","name":"issuer","type":"address"}],"name":"setAssertionIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"immutable_","type":"bool"}],"name":"setMutability","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},7184:e=>{"use strict";e.exports=JSON.parse('[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractName","type":"string"},{"indexed":false,"internalType":"address","name":"newContractAddress","type":"address"}],"name":"AssetStorageChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractName","type":"string"},{"indexed":false,"internalType":"address","name":"newContractAddress","type":"address"}],"name":"ContractChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractName","type":"string"},{"indexed":false,"internalType":"address","name":"newContractAddress","type":"address"}],"name":"NewAssetStorage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractName","type":"string"},{"indexed":false,"internalType":"address","name":"newContractAddress","type":"address"}],"name":"NewContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"getAllAssetStorages","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"internalType":"struct UnorderedNamedContractDynamicSetLib.Contract[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllContracts","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"internalType":"struct UnorderedNamedContractDynamicSetLib.Contract[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"assetStorageName","type":"string"}],"name":"getAssetStorageAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"contractName","type":"string"}],"name":"getContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"assetStorageAddress","type":"address"}],"name":"isAssetStorage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"assetStorageName","type":"string"}],"name":"isAssetStorage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"selectedContractAddress","type":"address"}],"name":"isContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"contractName","type":"string"}],"name":"isContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"assetStorageName","type":"string"},{"internalType":"address","name":"assetStorageAddress","type":"address"}],"name":"setAssetStorageAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractName","type":"string"},{"internalType":"address","name":"newContractAddress","type":"address"}],"name":"setContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},4:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint72","name":"identityId","type":"uint72"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"purpose","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"keyType","type":"uint256"}],"name":"KeyAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint72","name":"identityId","type":"uint72"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"purpose","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"keyType","type":"uint256"}],"name":"KeyRemoved","type":"event"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"uint256","name":"_purpose","type":"uint256"},{"internalType":"uint256","name":"_type","type":"uint256"}],"name":"addKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"deleteIdentity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generateIdentityId","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operational","type":"address"}],"name":"getIdentityId","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"getKey","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint256","name":"_purpose","type":"uint256"}],"name":"getKeysByPurpose","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"identityIds","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"uint256","name":"_purpose","type":"uint256"}],"name":"keyHasPurpose","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"removeKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"operationalKey","type":"bytes32"}],"name":"removeOperationalKeyIdentityId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"operationalKey","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"setOperationalKeyIdentityId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},2566:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"enum ParanetStructs.MinersAccessPolicy[]","name":"expectedAccessPolicies","type":"uint8[]"},{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"actualAccessPolicy","type":"uint8"}],"name":"InvalidParanetMinersAccessPolicy","type":"error"},{"inputs":[{"internalType":"enum ParanetStructs.NodesAccessPolicy[]","name":"expectedAccessPolicies","type":"uint8[]"},{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"actualAccessPolicy","type":"uint8"}],"name":"InvalidParanetNodesAccessPolicy","type":"error"},{"inputs":[{"internalType":"address","name":"paranetKnowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"paranetTokenId","type":"uint256"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"KnowledgeAssetIsAPartOfOtherParanet","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"ParanetCuratedMinerAccessRequestDoesntExist","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"ParanetCuratedMinerAccessRequestInvalidStatus","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"ParanetCuratedMinerDoesntExist","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"ParanetCuratedMinerHasAlreadyBeenAdded","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeDoesntExist","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeHasAlreadyBeenAdded","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeJoinRequestDoesntExist","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"ParanetCuratedNodeJoinRequestInvalidStatus","type":"error"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ParanetDoesntExist","type":"error"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ParanetHasAlreadyBeenRegistered","type":"error"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ParanetServiceDoesntExist","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"paranetServiceId","type":"bytes32"}],"name":"ParanetServiceHasAlreadyBeenAdded","type":"error"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ParanetServiceHasAlreadyBeenRegistered","type":"error"},{"inputs":[{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ProfileDoesntExist","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"knowledgeAssetTokenId","type":"uint256"}],"name":"KnowledgeAssetSubmittedToParanet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"minerAddress","type":"address"}],"name":"ParanetCuratedMinerAccessRequestAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"minerAddress","type":"address"}],"name":"ParanetCuratedMinerAccessRequestCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"minerAddress","type":"address"}],"name":"ParanetCuratedMinerAccessRequestRejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"minerAddress","type":"address"}],"name":"ParanetCuratedMinerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"minerAddress","type":"address"}],"name":"ParanetCuratedMinerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeJoinRequestAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeJoinRequestCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeJoinRequestRejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"ParanetCuratedNodeRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"components":[{"internalType":"string","name":"poolType","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"indexed":false,"internalType":"struct ParanetStructs.IncentivesPool","name":"incentivesPool","type":"tuple"}],"name":"ParanetIncetivesPoolDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newParanetName","type":"string"},{"indexed":false,"internalType":"string","name":"newParanetDescription","type":"string"}],"name":"ParanetMetadataUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"paranetName","type":"string"},{"indexed":false,"internalType":"string","name":"paranetDescription","type":"string"},{"indexed":false,"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"nodesAccessPolicy","type":"uint8"},{"indexed":false,"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"minersAccessPolicy","type":"uint8"},{"indexed":false,"internalType":"enum ParanetStructs.KnowledgeAssetsAccessPolicy","name":"knowledgeAssetsAccessPolicy","type":"uint8"}],"name":"ParanetRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"paranetServiceKAStorageContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"paranetServiceKATokenId","type":"uint256"}],"name":"ParanetServiceAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetServiceKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetServiceKATokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newParanetServiceName","type":"string"},{"indexed":false,"internalType":"string","name":"newParanetServiceDescription","type":"string"},{"indexed":false,"internalType":"address[]","name":"newParanetServiceAddresses","type":"address[]"}],"name":"ParanetServiceMetadataUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetServiceKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetServiceKATokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"paranetServiceName","type":"string"},{"indexed":false,"internalType":"string","name":"paranetServiceDescription","type":"string"},{"indexed":false,"internalType":"address[]","name":"paranetServiceAddresses","type":"address[]"}],"name":"ParanetServiceRegistered","type":"event"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"address[]","name":"minerAddresses","type":"address[]"}],"name":"addParanetCuratedMiners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint72[]","name":"identityIds","type":"uint72[]"}],"name":"addParanetCuratedNodes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"components":[{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct ParanetStructs.UniversalAssetLocator[]","name":"services","type":"tuple[]"}],"name":"addParanetServices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"address","name":"minerAddress","type":"address"}],"name":"approveCuratedMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"approveCuratedNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contentAsset","outputs":[{"internalType":"contract ContentAssetV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contentAssetStorage","outputs":[{"internalType":"contract ContentAssetStorageV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hashingProxy","outputs":[{"internalType":"contract HashingProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract HubV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"identityStorage","outputs":[{"internalType":"contract IdentityStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"components":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint128","name":"size","type":"uint128"},{"internalType":"uint32","name":"triplesNumber","type":"uint32"},{"internalType":"uint96","name":"chunksNumber","type":"uint96"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"},{"internalType":"bool","name":"immutable_","type":"bool"}],"internalType":"struct ContentAssetStructs.AssetInputArgs","name":"knowledgeAssetArgs","type":"tuple"}],"name":"mintKnowledgeAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"paranetKnowledgeAssetsRegistry","outputs":[{"internalType":"contract ParanetKnowledgeAssetsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetKnowledgeMinersRegistry","outputs":[{"internalType":"contract ParanetKnowledgeMinersRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetServicesRegistry","outputs":[{"internalType":"contract ParanetServicesRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetsRegistry","outputs":[{"internalType":"contract ParanetsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"processUpdatedKnowledgeAssetStatesMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"profileStorage","outputs":[{"internalType":"contract ProfileStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"string","name":"paranetName","type":"string"},{"internalType":"string","name":"paranetDescription","type":"string"},{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"nodesAccessPolicy","type":"uint8"},{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"minersAccessPolicy","type":"uint8"}],"name":"registerParanet","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetServiceKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetServiceKATokenId","type":"uint256"},{"internalType":"string","name":"paranetServiceName","type":"string"},{"internalType":"string","name":"paranetServiceDescription","type":"string"},{"internalType":"address[]","name":"paranetServiceAddresses","type":"address[]"}],"name":"registerParanetService","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"address","name":"minerAddress","type":"address"}],"name":"rejectCuratedMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"rejectCuratedNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"address[]","name":"minerAddresses","type":"address[]"}],"name":"removeParanetCuratedMiners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint72[]","name":"identityIds","type":"uint72[]"}],"name":"removeParanetCuratedNodes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"}],"name":"requestParanetCuratedMinerAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"}],"name":"requestParanetCuratedNodeAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"serviceAgreementStorageProxy","outputs":[{"internalType":"contract ServiceAgreementStorageProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"status","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"knowledgeAssetTokenId","type":"uint256"}],"name":"submitKnowledgeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"string","name":"paranetName","type":"string"},{"internalType":"string","name":"paranetDescription","type":"string"}],"name":"updateParanetMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paranetServiceKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetServiceKATokenId","type":"uint256"},{"internalType":"string","name":"paranetServiceName","type":"string"},{"internalType":"string","name":"paranetServiceDescription","type":"string"},{"internalType":"address[]","name":"paranetServiceAddresses","type":"address[]"}],"name":"updateParanetServiceMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},568:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"poolType","type":"string"},{"internalType":"address","name":"poolAddress","type":"address"}],"name":"ParanetIncentivesPoolAlreadyExists","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"components":[{"internalType":"string","name":"poolType","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"indexed":false,"internalType":"struct ParanetStructs.IncentivesPool","name":"incentivesPool","type":"tuple"}],"name":"ParanetIncetivesPoolDeployed","type":"event"},{"inputs":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"uint256","name":"tracToNeuroEmissionMultiplier","type":"uint256"},{"internalType":"uint16","name":"paranetOperatorRewardPercentage","type":"uint16"},{"internalType":"uint16","name":"paranetIncentivizationProposalVotersRewardPercentage","type":"uint16"}],"name":"deployNeuroIncentivesPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract HubV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"paranetsRegistry","outputs":[{"internalType":"contract ParanetsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"status","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},8469:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"addedCumulativeAwardedNeuro","type":"uint256"}],"name":"addCumulativeAwardedNeuro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"addedTracSpent","type":"uint96"}],"name":"addCumulativeTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"}],"name":"addSubmittedKnowledgeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint96","name":"addedTracSpent","type":"uint96"}],"name":"addTotalTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"addedUnrewardedTracSpent","type":"uint96"}],"name":"addUnrewardedTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"addUpdatingKnowledgeAssetState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetStateId","type":"bytes32"},{"internalType":"uint96","name":"addedUpdateTokenAmount","type":"uint96"}],"name":"addUpdatingKnowledgeAssetUpdateTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"decrementTotalSubmittedKnowledgeAssetsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"deleteKnowledgeMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getCumulativeAwardedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getCumulativeTracSpent","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getKnowledgeMinerMetadata","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint96","name":"totalTracSpent","type":"uint96"},{"internalType":"uint256","name":"totalSubmittedKnowledgeAssetsCount","type":"uint256"}],"internalType":"struct ParanetStructs.KnowledgeMinerMetadata","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getSubmittedKnowledgeAssets","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getSubmittedKnowledgeAssets","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"getTotalSubmittedKnowledgeAssetsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"getTotalTracSpent","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getUnrewardedTracSpent","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getUpdatingKnowledgeAssetStates","outputs":[{"components":[{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"internalType":"struct ParanetStructs.UpdatingKnowledgeAssetState[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getUpdatingKnowledgeAssetStates","outputs":[{"components":[{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"internalType":"struct ParanetStructs.UpdatingKnowledgeAssetState[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract HubV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"incrementTotalSubmittedKnowledgeAssetsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"knowledgeMinerExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"paranetsRegistry","outputs":[{"internalType":"contract ParanetsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"}],"name":"registerKnowledgeMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"}],"name":"removeSubmittedKnowledgeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetStateId","type":"bytes32"}],"name":"removeUpdatingKnowledgeAssetState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"cumulativeAwardedNeuro","type":"uint256"}],"name":"setCumulativeAwardedNeuro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"cumulativeTracSpent","type":"uint96"}],"name":"setCumulativeTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint256","name":"totalSubmittedKnowledgeAssetsCount","type":"uint256"}],"name":"setTotalSubmittedKnowledgeAssetsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint96","name":"totalTracSpent","type":"uint96"}],"name":"setTotalTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"unrewardedTracSpent","type":"uint96"}],"name":"setUnrewardedTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetStateId","type":"bytes32"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"setUpdatingKnowledgeAssetUpdateTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"subtractedCumulativeAwardedNeuro","type":"uint256"}],"name":"subCumulativeAwardedNeuro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"subtractedTracSpent","type":"uint96"}],"name":"subCumulativeTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint96","name":"subtractedTracSpent","type":"uint96"}],"name":"subTotalTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"subtractedUnrewardedTracSpent","type":"uint96"}],"name":"subUnrewardedTracSpent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"miner","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetStateId","type":"bytes32"},{"internalType":"uint96","name":"subtractedUpdateTokenAmount","type":"uint96"}],"name":"subUpdatingKnowledgeAssetUpdateTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},5165:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"},{"internalType":"address","name":"paranetsRegistryAddress","type":"address"},{"internalType":"address","name":"knowledgeMinersRegistryAddress","type":"address"},{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"tracToNeuroEmissionMultiplier","type":"uint256"},{"internalType":"uint16","name":"paranetOperatorRewardPercentage_","type":"uint16"},{"internalType":"uint16","name":"paranetIncentivizationProposalVotersRewardPercentage_","type":"uint16"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"currentCumulativeWeight","type":"uint96"},{"internalType":"uint96","name":"targetCumulativeWeight","type":"uint96"}],"name":"InvalidCumulativeVotersWeight","type":"error"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"claimer","type":"address"}],"name":"NoRewardAvailable","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMultiplier","type":"uint256"}],"name":"NeuroEmissionMultiplierUpdateFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"NeuroEmissionMultiplierUpdateInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NeuroRewardDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ParanetIncentivizationProposalVoterRewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"miner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ParanetKnowledgeMinerRewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ParanetOperatorRewardClaimed","type":"event"},{"inputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint96","name":"weight","type":"uint96"}],"internalType":"struct ParanetStructs.ParanetIncentivizationProposalVoterInput[]","name":"voters_","type":"tuple[]"}],"name":"addVoters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimIncentivizationProposalVoterReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimKnowledgeMinerReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimParanetOperatorReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedMinerRewards","outputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimedMinerRewardsIndexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedOperatorRewards","outputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimedOperatorRewardsIndexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cumulativeVotersWeight","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalizeNeuroEmissionMultiplierUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllRewardedMiners","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"internalType":"struct ParanetStructs.ParanetIncentivesPoolClaimedRewardsProfile[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllRewardedOperators","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"internalType":"struct ParanetStructs.ParanetIncentivesPoolClaimedRewardsProfile[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableAllKnowledgeMinersRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableAllProposalVotersRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableKnowledgeMinerRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableParanetOperatorRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimableProposalVoterRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getEffectiveNeuroEmissionMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNeuroBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNeuroEmissionMultipliers","outputs":[{"components":[{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bool","name":"finalized","type":"bool"}],"internalType":"struct ParanetStructs.NeuroEmissionMultiplier[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalAllKnowledgeMinersIncentiveEstimation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalAllProposalVotersIncentiveEstimation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalKnowledgeMinerIncentiveEstimation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalParanetOperatorIncentiveEstimation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalProposalVoterIncentiveEstimation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"voterAddress","type":"address"}],"name":"getVoter","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint96","name":"weight","type":"uint96"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"internalType":"struct ParanetStructs.ParanetIncentivizationProposalVoter","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVoters","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint96","name":"weight","type":"uint96"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"internalType":"struct ParanetStructs.ParanetIncentivizationProposalVoter[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVotersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract HubV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMultiplier","type":"uint256"}],"name":"initiateNeuroEmissionMultiplierUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isKnowledgeMiner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isParanetOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isProposalVoter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minerAddress","type":"address"}],"name":"minerClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"neuroEmissionMultiplierUpdateDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"neuroEmissionMultipliers","outputs":[{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bool","name":"finalized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operatorAddress","type":"address"}],"name":"operatorClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetIncentivizationProposalVotersRewardPercentage","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetKnowledgeMinersRegistry","outputs":[{"internalType":"contract ParanetKnowledgeMinersRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetOperatorRewardPercentage","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paranetsRegistry","outputs":[{"internalType":"contract ParanetsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"parentParanetId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"removeVoters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalMinersClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalNeuroReceived","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalOperatorsClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVotersClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newRegistrar","type":"address"}],"name":"transferVotersRegistrarRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDelay","type":"uint256"}],"name":"updateNeuroEmissionMultiplierUpdateDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"voterAddress","type":"address"}],"name":"voterClaimedNeuro","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"voters","outputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint96","name":"weight","type":"uint96"},{"internalType":"uint256","name":"claimedNeuro","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"votersIndexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votersRegistrar","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]')},684:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"addedKnowledgeValue","type":"uint96"}],"name":"addCumulativeKnowledgeValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes","name":"nodeId","type":"bytes"}],"name":"addCuratedNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"}],"name":"addKnowledgeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"knowledgeMinerAddress","type":"address"}],"name":"addKnowledgeMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"addKnowledgeMinerAccessRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"addNodeJoinRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"serviceId","type":"bytes32"}],"name":"addService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"deleteParanet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getAllIncentivesPools","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"internalType":"struct UnorderedNamedContractDynamicSetStructs.Contract[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getCumulativeKnowledgeValue","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getCuratedNodes","outputs":[{"components":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"bytes","name":"nodeId","type":"bytes"}],"internalType":"struct ParanetStructs.Node[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getCuratedNodesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"incentivesPoolType","type":"string"}],"name":"getIncentivesPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getKnowledgeAssets","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getKnowledgeAssetsAccessPolicy","outputs":[{"internalType":"enum ParanetStructs.KnowledgeAssetsAccessPolicy","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getKnowledgeAssetsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getKnowledgeAssetsStartingFromKnowledgeAssetId","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getKnowledgeAssetsWithPagination","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getKnowledgeMinerAccessRequest","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetKnowledgeMinerAccessRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"getKnowledgeMinerAccessRequests","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetKnowledgeMinerAccessRequest[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"getKnowledgeMinerAccessRequestsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getKnowledgeMiners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getKnowledgeMinersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"}],"name":"getLatestKnowledgeMinerAccessRequest","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetKnowledgeMinerAccessRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"getLatestNodeJoinRequest","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetNodeJoinRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getMinersAccessPolicy","outputs":[{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getNodeJoinRequest","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetNodeJoinRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"getNodeJoinRequests","outputs":[{"components":[{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"internalType":"struct ParanetStructs.ParanetNodeJoinRequest[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"getNodeJoinRequestsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getNodesAccessPolicy","outputs":[{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getParanetKnowledgeAssetLocator","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getParanetMetadata","outputs":[{"components":[{"internalType":"address","name":"paranetKAStorageContract","type":"address"},{"internalType":"uint256","name":"paranetKATokenId","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"nodesAccessPolicy","type":"uint8"},{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"minersAccessPolicy","type":"uint8"},{"internalType":"enum ParanetStructs.KnowledgeAssetsAccessPolicy","name":"knowledgeAssetsAccessPolicy","type":"uint8"},{"internalType":"uint96","name":"cumulativeKnowledgeValue","type":"uint96"}],"internalType":"struct ParanetStructs.ParanetMetadata","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getServices","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"getServicesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"incentivesPoolAddress","type":"address"}],"name":"hasIncentivesPoolByAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"incentivesPoolType","type":"string"}],"name":"hasIncentivesPoolByType","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract HubV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"isCuratedNode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"}],"name":"isKnowledgeAssetRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"knowledgeMinerAddress","type":"address"}],"name":"isKnowledgeMinerRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"serviceId","type":"bytes32"}],"name":"isServiceImplemented","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"}],"name":"paranetExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"knowledgeAssetStorageContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"paranetName","type":"string"},{"internalType":"string","name":"paranetDescription","type":"string"},{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"nodesAccessPolicy","type":"uint8"},{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"minersAccessPolicy","type":"uint8"},{"internalType":"enum ParanetStructs.KnowledgeAssetsAccessPolicy","name":"knowledgeAssetsAccessPolicy","type":"uint8"}],"name":"registerParanet","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"removeCuratedNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"incentivesPoolAddress","type":"address"}],"name":"removeIncentivesPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"incentivesPoolType","type":"string"}],"name":"removeIncentivesPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"knowledgeAssetId","type":"bytes32"}],"name":"removeKnowledgeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"knowledgeMinerAddress","type":"address"}],"name":"removeKnowledgeMiner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"removeKnowledgeMinerAccessRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"removeNodeJoinRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"bytes32","name":"serviceId","type":"bytes32"}],"name":"removeService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"cumulativeKnowledgeValue","type":"uint96"}],"name":"setCumulativeKnowledgeValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"incentivesPoolType","type":"string"},{"internalType":"address","name":"incentivesPoolAddress","type":"address"}],"name":"setIncentivesPoolAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"enum ParanetStructs.KnowledgeAssetsAccessPolicy","name":"knowledgeAssetsAccessPolicy","type":"uint8"}],"name":"setKnowledgeAssetsAccessPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"enum ParanetStructs.MinersAccessPolicy","name":"minersAccessPolicy","type":"uint8"}],"name":"setMinersAccessPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"name_","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"enum ParanetStructs.NodesAccessPolicy","name":"nodesAccessPolicy","type":"uint8"}],"name":"setNodesAccessPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint96","name":"subtractedKnowledgeValue","type":"uint96"}],"name":"subCumulativeKnowledgeValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"string","name":"incentivesPoolType","type":"string"},{"internalType":"address","name":"incentivesPoolAddress","type":"address"}],"name":"updateIncentivesPoolAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"address","name":"miner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"updateKnowledgeMinerAccessRequestStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"paranetId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"enum ParanetStructs.RequestStatus","name":"status","type":"uint8"}],"name":"updateNodeJoinRequestStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},6347:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"agreementV1Exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"agreementV1StorageAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"agreementV1U1Exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"agreementV1U1StorageAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"commitSubmissionExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"commitV1Exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"commitV1U1Exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint72","name":"prevIdentityId","type":"uint72"},{"internalType":"uint72","name":"nextIdentityId","type":"uint72"},{"internalType":"uint40","name":"score","type":"uint40"}],"name":"createV1CommitSubmissionObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint128","name":"epochLength","type":"uint128"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"},{"internalType":"uint8","name":"proofWindowOffsetPerc","type":"uint8"}],"name":"createV1ServiceAgreementObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint72","name":"prevIdentityId","type":"uint72"},{"internalType":"uint72","name":"nextIdentityId","type":"uint72"},{"internalType":"uint40","name":"score","type":"uint40"}],"name":"createV1U1CommitSubmissionObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint128","name":"epochLength","type":"uint128"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"},{"internalType":"uint8","name":"proofWindowOffsetPerc","type":"uint8"}],"name":"createV1U1ServiceAgreementObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"decrementAgreementRewardedNodesNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochStateId","type":"bytes32"}],"name":"decrementCommitsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"deleteAgreementRewardedNodesNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"deleteCommitSubmissionsObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochStateId","type":"bytes32"}],"name":"deleteCommitsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"deleteServiceAgreementObject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"deleteServiceAgreementV1Object","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"deleteServiceAgreementV1U1Object","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"stateId","type":"bytes32"}],"name":"deleteUpdateCommitsDeadline","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementData","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint128","name":"epochLength","type":"uint128"},{"internalType":"uint96[2]","name":"tokens","type":"uint96[2]"},{"internalType":"uint8[2]","name":"scoreFunctionIdAndProofWindowOffsetPerc","type":"uint8[2]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementEpochLength","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementEpochsNumber","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementProofWindowOffsetPerc","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"getAgreementRewardedNodesNumber","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementScoreFunctionId","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementTokenAmount","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"getAgreementUpdateTokenAmount","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"getCommitSubmission","outputs":[{"components":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint72","name":"prevIdentityId","type":"uint72"},{"internalType":"uint72","name":"nextIdentityId","type":"uint72"},{"internalType":"uint40","name":"score","type":"uint40"}],"internalType":"struct ServiceAgreementStructsV1.CommitSubmission","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"getCommitSubmissionIdentityId","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"getCommitSubmissionNextIdentityId","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"getCommitSubmissionPrevIdentityId","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"}],"name":"getCommitSubmissionScore","outputs":[{"internalType":"uint40","name":"","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochStateId","type":"bytes32"}],"name":"getCommitsCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"stateId","type":"bytes32"}],"name":"getUpdateCommitsDeadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"getV1AgreementEpochSubmissionHead","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"},{"internalType":"uint256","name":"stateIndex","type":"uint256"}],"name":"getV1U1AgreementEpochSubmissionHead","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"incrementAgreementRewardedNodesNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochStateId","type":"bytes32"}],"name":"incrementCommitsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"migrateV1ServiceAgreement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"serviceAgreementExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint128","name":"epochLength","type":"uint128"}],"name":"setAgreementEpochLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"}],"name":"setAgreementEpochsNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint8","name":"proofWindowOffsetPerc","type":"uint8"}],"name":"setAgreementProofWindowOffsetPerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"},{"internalType":"uint32","name":"rewardedNodesNumber","type":"uint32"}],"name":"setAgreementRewardedNodesNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint8","name":"newScoreFunctionId","type":"uint8"}],"name":"setAgreementScoreFunctionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"setAgreementStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"setAgreementTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"setAgreementUpdateTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint72","name":"identityId","type":"uint72"}],"name":"setCommitSubmissionIdentityId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint72","name":"nextIdentityId","type":"uint72"}],"name":"setCommitSubmissionNextIdentityId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint72","name":"prevIdentityId","type":"uint72"}],"name":"setCommitSubmissionPrevIdentityId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitId","type":"bytes32"},{"internalType":"uint40","name":"score","type":"uint40"}],"name":"setCommitSubmissionScore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochStateId","type":"bytes32"},{"internalType":"uint8","name":"epochStateCommitsCount","type":"uint8"}],"name":"setCommitsCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"stateId","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"setUpdateCommitsDeadline","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"},{"internalType":"bytes32","name":"headCommitId","type":"bytes32"}],"name":"setV1AgreementEpochSubmissionHead","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"},{"internalType":"uint256","name":"stateIndex","type":"uint256"},{"internalType":"bytes32","name":"headCommitId","type":"bytes32"}],"name":"setV1U1AgreementEpochSubmissionHead","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"storageV1","outputs":[{"internalType":"contract ServiceAgreementStorageV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"storageV1U1","outputs":[{"internalType":"contract ServiceAgreementStorageV1U1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"transferAgreementTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"transferV1AgreementTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"transferV1U1AgreementTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},9033:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ScoreError","type":"error"},{"inputs":[{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"}],"name":"ScoreFunctionDoesntExist","type":"error"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TooLowAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TooLowBalance","type":"error"},{"inputs":[],"name":"ZeroEpochsNumber","type":"error"},{"inputs":[],"name":"ZeroTokenAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"assetContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"keyword","type":"bytes"},{"indexed":false,"internalType":"uint8","name":"hashFunctionId","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"indexed":false,"internalType":"uint128","name":"epochLength","type":"uint128"},{"indexed":false,"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"ServiceAgreementV1Created","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"epochsNumber","type":"uint16"}],"name":"ServiceAgreementV1Extended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"indexed":false,"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"ServiceAgreementV1RewardRaised","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"ServiceAgreementV1Terminated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"indexed":false,"internalType":"uint96","name":"updateTokenAmount","type":"uint96"}],"name":"ServiceAgreementV1UpdateRewardRaised","type":"event"},{"inputs":[{"internalType":"address","name":"assetOwner","type":"address"},{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"addTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"assetOwner","type":"address"},{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"addUpdateTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"commitManagerV1","outputs":[{"internalType":"contract CommitManagerV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commitManagerV1U1","outputs":[{"internalType":"contract CommitManagerV1U1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"assetCreator","type":"address"},{"internalType":"address","name":"assetContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"keyword","type":"bytes"},{"internalType":"uint8","name":"hashFunctionId","type":"uint8"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"},{"internalType":"uint8","name":"scoreFunctionId","type":"uint8"}],"internalType":"struct ServiceAgreementStructsV1.ServiceAgreementInputArgs","name":"args","type":"tuple"}],"name":"createServiceAgreement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"assetOwner","type":"address"},{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epochsNumber","type":"uint16"},{"internalType":"uint96","name":"tokenAmount","type":"uint96"}],"name":"extendStoringPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"assetContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"getChallenge","outputs":[{"internalType":"bytes32","name":"assertionId","type":"bytes32"},{"internalType":"uint256","name":"challenge","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"getTopCommitSubmissions","outputs":[{"components":[{"internalType":"uint72","name":"identityId","type":"uint72"},{"internalType":"uint72","name":"prevIdentityId","type":"uint72"},{"internalType":"uint72","name":"nextIdentityId","type":"uint72"},{"internalType":"uint40","name":"score","type":"uint40"}],"internalType":"struct ServiceAgreementStructsV1.CommitSubmission[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hashingProxy","outputs":[{"internalType":"contract HashingProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"isCommitWindowOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementId","type":"bytes32"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"name":"isProofWindowOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"parametersStorage","outputs":[{"internalType":"contract ParametersStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofManagerV1","outputs":[{"internalType":"contract ProofManagerV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofManagerV1U1","outputs":[{"internalType":"contract ProofManagerV1U1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"scoringProxy","outputs":[{"internalType":"contract ScoringProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"assetContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"keyword","type":"bytes"},{"internalType":"uint8","name":"hashFunctionId","type":"uint8"},{"internalType":"uint16","name":"epoch","type":"uint16"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes32","name":"chunkHash","type":"bytes32"}],"internalType":"struct ServiceAgreementStructsV1.ProofInputArgs","name":"args","type":"tuple"}],"name":"sendProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"serviceAgreementStorageProxy","outputs":[{"internalType":"contract ServiceAgreementStorageProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"status","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"assetContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"keyword","type":"bytes"},{"internalType":"uint8","name":"hashFunctionId","type":"uint8"},{"internalType":"uint16","name":"epoch","type":"uint16"}],"internalType":"struct ServiceAgreementStructsV1.CommitInputArgs","name":"args","type":"tuple"}],"name":"submitCommit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"assetOwner","type":"address"},{"internalType":"bytes32","name":"agreementId","type":"bytes32"}],"name":"terminateAgreement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')},2914:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"tokenSymbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"setupRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]')},3738:e=>{"use strict";e.exports=JSON.parse('[{"inputs":[{"internalType":"address","name":"hubAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"deleteIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"deleteUnfinalizedState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getIssuer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getUnfinalizedState","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"hasPendingUpdate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hub","outputs":[{"internalType":"contract Hub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"issuer","type":"address"}],"name":"setIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"state","type":"bytes32"}],"name":"setUnfinalizedState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.amdO={},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n=r(5237);DKG=n})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2e912871..b002f4c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dkg.js", - "version": "8.0.0-alpha.2", + "version": "8.0.0-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dkg.js", - "version": "8.0.0-alpha.2", + "version": "8.0.0-alpha.3", "license": "Apache-2.0", "dependencies": { "assertion-tools": "^2.1.0", diff --git a/package.json b/package.json index cdd5ce3f..de2e22bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dkg.js", - "version": "8.0.0-alpha.2", + "version": "8.0.0-alpha.3", "description": "Javascript library for interaction with the OriginTrail Decentralized Knowledge Graph", "main": "index.js", "scripts": { diff --git a/services/blockchain-service/blockchain-service-base.js b/services/blockchain-service/blockchain-service-base.js index 25bfb35a..33fa6415 100644 --- a/services/blockchain-service/blockchain-service-base.js +++ b/services/blockchain-service/blockchain-service-base.js @@ -76,8 +76,9 @@ class BlockchainServiceBase { const web3Instance = await this.getWeb3Instance(blockchain); this[blockchain.name].contracts[blockchain.hubContract].Hub = - new web3Instance.eth.Contract(this.abis.Hub, blockchain.hubContract, { from: blockchain.publicKey }); - + new web3Instance.eth.Contract(this.abis.Hub, blockchain.hubContract, { + from: blockchain.publicKey, + }); } } @@ -169,7 +170,7 @@ class BlockchainServiceBase { let gasLimit = Number( await contractInstance.methods[functionName](...args).estimateGas({ from: publicKey, - }) + }), ); gasLimit = Math.round(gasLimit * blockchain.gasLimitMultiplier); @@ -190,7 +191,9 @@ class BlockchainServiceBase { // Search for pending tx in the pending block const pendingTx = Object.values(pendingBlock.transactions).find( - tx => tx.from.toLowerCase() === publicKey.toLowerCase() && tx.nonce === confirmedNonce + (tx) => + tx.from.toLowerCase() === publicKey.toLowerCase() && + tx.nonce === confirmedNonce, ); if (pendingTx) { @@ -199,12 +202,18 @@ class BlockchainServiceBase { } else { // If not found, use default/network gas price increased by 20% // Theoretically this should never happen - gasPrice = Math.round((blockchain.gasPrice || (await this.getNetworkGasPrice(blockchain))) * 1.2); + gasPrice = Math.round( + (blockchain.gasPrice || (await this.getNetworkGasPrice(blockchain))) * 1.2, + ); } } } else { gasPrice = blockchain.gasPrice || (await this.getNetworkGasPrice(blockchain)); } + gasPrice = ( + (BigInt(gasPrice) * BigInt(Math.round(blockchain.gasPriceMultiplier * 100))) / + 100n + ).toString(); if (blockchain.simulateTxs) { await web3Instance.eth.call({ @@ -233,31 +242,50 @@ class BlockchainServiceBase { let reminingTime = 0; let receipt = initialReceipt; let finalized = false; - + try { - while (!finalized && (Date.now() - startTime + reminingTime) < blockchain.transactionFinalityMaxWaitTime) { + while ( + !finalized && + Date.now() - startTime + reminingTime < blockchain.transactionFinalityMaxWaitTime + ) { try { // Check if the block containing the transaction is finalized - const finalizedBlockNumber = (await web3Instance.eth.getBlock('finalized')).number; + const finalizedBlockNumber = (await web3Instance.eth.getBlock('finalized')) + .number; if (finalizedBlockNumber >= receipt.blockNumber) { finalized = true; break; } else { - let currentReceipt = await web3Instance.eth.getTransactionReceipt(receipt.transactionHash); + let currentReceipt = await web3Instance.eth.getTransactionReceipt( + receipt.transactionHash, + ); if (currentReceipt && currentReceipt.blockNumber === receipt.blockNumber) { // Transaction is still in the same block, wait and check again - } else if (currentReceipt && currentReceipt.blockNumber !== receipt.blockNumber) { + } else if ( + currentReceipt && + currentReceipt.blockNumber !== receipt.blockNumber + ) { // Transaction has been re-included in a different block receipt = currentReceipt; // Update the receipt with the new block information } else { // Transaction is no longer mined, wait for it to be mined again const reminingStartTime = Date.now(); - while (!currentReceipt && (Date.now() - reminingStartTime) < blockchain.transactionReminingMaxWaitTime) { - await sleepForMilliseconds(blockchain.transactionReminingPollingInterval); - currentReceipt = await web3Instance.eth.getTransactionReceipt(receipt.transactionHash); + while ( + !currentReceipt && + Date.now() - reminingStartTime < + blockchain.transactionReminingMaxWaitTime + ) { + await sleepForMilliseconds( + blockchain.transactionReminingPollingInterval, + ); + currentReceipt = await web3Instance.eth.getTransactionReceipt( + receipt.transactionHash, + ); } if (!currentReceipt) { - throw new Error('Transaction was not re-mined within the expected time frame.'); + throw new Error( + 'Transaction was not re-mined within the expected time frame.', + ); } reminingTime = Date.now() - reminingStartTime; receipt = currentReceipt; // Update the receipt @@ -269,11 +297,11 @@ class BlockchainServiceBase { throw new Error(`Error during finality polling: ${error.message}`); } } - + if (!finalized) { throw new Error('Transaction was not finalized within the expected time frame.'); } - + return receipt; } catch (error) { throw new Error(`Failed to wait for transaction finalization: ${error.message}`); @@ -320,7 +348,12 @@ class BlockchainServiceBase { return this[blockchain.name].contracts[blockchain.hubContract][contractName]; } - async increaseServiceAgreementV1Allowance(sender, serviceAgreementV1Address, tokenAmount, blockchain) { + async increaseServiceAgreementV1Allowance( + sender, + serviceAgreementV1Address, + tokenAmount, + blockchain, + ) { const allowance = await this.callContractFunction( 'Token', 'allowance', @@ -347,12 +380,18 @@ class BlockchainServiceBase { return { allowanceIncreased: false, allowanceGap, - } + }; } // Knowledge assets operations - async createAsset(requestData, paranetKaContract, paranetTokenId, blockchain, stepHooks = emptyHooks) { + async createAsset( + requestData, + paranetKaContract, + paranetTokenId, + blockchain, + stepHooks = emptyHooks, + ) { const sender = await this.getPublicKey(blockchain); let serviceAgreementV1Address; let allowanceIncreased = false; @@ -368,7 +407,7 @@ class BlockchainServiceBase { sender, serviceAgreementV1Address, requestData.tokenAmount, - blockchain + blockchain, )); stepHooks.afterHook({ @@ -376,7 +415,7 @@ class BlockchainServiceBase { }); let receipt; - if(paranetKaContract == null && paranetTokenId == null) { + if (paranetKaContract == null && paranetTokenId == null) { receipt = await this.executeContractFunction( 'ContentAsset', 'createAsset', @@ -475,7 +514,7 @@ class BlockchainServiceBase { sender, serviceAgreementV1Address, tokenAmount, - blockchain + blockchain, )); return this.executeContractFunction( @@ -513,7 +552,7 @@ class BlockchainServiceBase { sender, serviceAgreementV1Address, tokenAmount, - blockchain + blockchain, )); return this.executeContractFunction( @@ -551,7 +590,7 @@ class BlockchainServiceBase { sender, serviceAgreementV1Address, tokenAmount, - blockchain + blockchain, )); return this.executeContractFunction( @@ -810,33 +849,44 @@ class BlockchainServiceBase { ); } - async getNeuroIncentivesPoolAddress(paranetId,blockchain) { + async getNeuroIncentivesPoolAddress(paranetId, blockchain) { return this.getIncentivesPoolAddress( { paranetId, incentivesPoolType: 'Neuroweb', }, - blockchain - ) + blockchain, + ); } - async setIncentivesPool(contractAddress, blockchain){ + async setIncentivesPool(contractAddress, blockchain) { await this.ensureBlockchainInfo(blockchain); - if (this[blockchain.name].contractAddresses[blockchain.hubContract]['ParanetNeuroIncentivesPool'] !== contractAddress) { - this[blockchain.name].contractAddresses[blockchain.hubContract]['ParanetNeuroIncentivesPool'] = contractAddress; + if ( + this[blockchain.name].contractAddresses[blockchain.hubContract][ + 'ParanetNeuroIncentivesPool' + ] !== contractAddress + ) { + this[blockchain.name].contractAddresses[blockchain.hubContract][ + 'ParanetNeuroIncentivesPool' + ] = contractAddress; const web3Instance = await this.getWeb3Instance(blockchain); this[blockchain.name].contracts[blockchain.hubContract]['ParanetNeuroIncentivesPool'] = await new web3Instance.eth.Contract( this.abis['ParanetNeuroIncentivesPool'], - this[blockchain.name].contractAddresses[blockchain.hubContract]['ParanetNeuroIncentivesPool'], + this[blockchain.name].contractAddresses[blockchain.hubContract][ + 'ParanetNeuroIncentivesPool' + ], { from: blockchain.publicKey }, ); } } async claimKnowledgeMinerReward(paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); @@ -849,7 +899,10 @@ class BlockchainServiceBase { } async claimVoterReward(paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); @@ -862,7 +915,10 @@ class BlockchainServiceBase { } async claimOperatorReward(paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); @@ -875,7 +931,10 @@ class BlockchainServiceBase { } async getClaimableKnowledgeMinerReward(paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); @@ -888,7 +947,10 @@ class BlockchainServiceBase { } async getClaimableAllKnowledgeMinersReward(paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); @@ -901,7 +963,10 @@ class BlockchainServiceBase { } async getClaimableVoterReward(paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); @@ -914,7 +979,10 @@ class BlockchainServiceBase { } async getClaimableAllVotersReward(paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); @@ -927,7 +995,10 @@ class BlockchainServiceBase { } async getClaimableOperatorReward(paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); @@ -939,8 +1010,11 @@ class BlockchainServiceBase { ); } - async isParanetKnowledgeMiner(address ,paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + async isParanetKnowledgeMiner(address, paranetId, blockchain) { + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); @@ -952,8 +1026,11 @@ class BlockchainServiceBase { ); } - async isParanetOperator(address ,paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + async isParanetOperator(address, paranetId, blockchain) { + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); @@ -965,8 +1042,11 @@ class BlockchainServiceBase { ); } - async isParanetProposalVoter(address ,paranetId, blockchain) { - const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress(paranetId, blockchain); + async isParanetProposalVoter(address, paranetId, blockchain) { + const neuroIncentivesPoolAddress = await this.getNeuroIncentivesPoolAddress( + paranetId, + blockchain, + ); await this.setIncentivesPool(neuroIncentivesPoolAddress, blockchain); diff --git a/services/input-service.js b/services/input-service.js index 6e3e7d7a..b0bdacb4 100644 --- a/services/input-service.js +++ b/services/input-service.js @@ -133,6 +133,10 @@ class InputService { options.blockchain?.gasLimitMultiplier ?? this.config.blockchain?.gasLimitMultiplier ?? DEFAULT_PARAMETERS.GAS_LIMIT_MULTIPLIER; + const gasPriceMultiplier = + options.blockchain?.gasPriceMultiplier ?? + this.config.blockchain?.gasPriceMultiplier ?? + DEFAULT_PARAMETERS.GAS_PRICE_MULTIPLIER; const gasPrice = options.blockchain?.gasPrice ?? this.config.blockchain?.gasPrice ?? undefined; const transactionPollingTimeout = @@ -166,6 +170,7 @@ class InputService { simulateTxs, forceReplaceTxs, gasPriceOracleLink, + gasPriceMultiplier, }; if (name && name.startsWith('otp')) {