PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/avalanche/web

Просмотр файла: avalanche.js

/*! For license information please see avalanche.js.LICENSE.txt */
!function webpackUniversalModuleDefinition(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory():"function"==typeof define&&define.amd?define("avalanche",[],factory):"object"==typeof exports?exports.avalanche=factory():root.avalanche=factory()}(self,(()=>(()=>{var __webpack_modules__={6522:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AdminAPI=void 0;const jrpcapi_1=__webpack_require__(5912);class AdminAPI extends jrpcapi_1.JRPCAPI{constructor(core,baseURL="/ext/admin"){super(core,baseURL),this.alias=(endpoint,alias)=>__awaiter(this,void 0,void 0,(function*(){const params={endpoint,alias},response=yield this.callMethod("admin.alias",params);return response.data.result.success?response.data.result.success:response.data.result})),this.aliasChain=(chain,alias)=>__awaiter(this,void 0,void 0,(function*(){const params={chain,alias},response=yield this.callMethod("admin.aliasChain",params);return response.data.result.success?response.data.result.success:response.data.result})),this.getChainAliases=chain=>__awaiter(this,void 0,void 0,(function*(){const params={chain},response=yield this.callMethod("admin.getChainAliases",params);return response.data.result.aliases?response.data.result.aliases:response.data.result})),this.getLoggerLevel=loggerName=>__awaiter(this,void 0,void 0,(function*(){const params={};void 0!==loggerName&&(params.loggerName=loggerName);return(yield this.callMethod("admin.getLoggerLevel",params)).data.result})),this.loadVMs=()=>__awaiter(this,void 0,void 0,(function*(){const response=yield this.callMethod("admin.loadVMs");return response.data.result.aliases?response.data.result.aliases:response.data.result})),this.lockProfile=()=>__awaiter(this,void 0,void 0,(function*(){const response=yield this.callMethod("admin.lockProfile");return response.data.result.success?response.data.result.success:response.data.result})),this.memoryProfile=()=>__awaiter(this,void 0,void 0,(function*(){const response=yield this.callMethod("admin.memoryProfile");return response.data.result.success?response.data.result.success:response.data.result})),this.setLoggerLevel=(loggerName,logLevel,displayLevel)=>__awaiter(this,void 0,void 0,(function*(){const params={};void 0!==loggerName&&(params.loggerName=loggerName),void 0!==logLevel&&(params.logLevel=logLevel),void 0!==displayLevel&&(params.displayLevel=displayLevel);return(yield this.callMethod("admin.setLoggerLevel",params)).data.result})),this.startCPUProfiler=()=>__awaiter(this,void 0,void 0,(function*(){const response=yield this.callMethod("admin.startCPUProfiler");return response.data.result.success?response.data.result.success:response.data.result})),this.stopCPUProfiler=()=>__awaiter(this,void 0,void 0,(function*(){const response=yield this.callMethod("admin.stopCPUProfiler");return response.data.result.success?response.data.result.success:response.data.result}))}}exports.AdminAPI=AdminAPI},7458:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(6522),exports)},3920:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AuthAPI=void 0;const jrpcapi_1=__webpack_require__(5912);class AuthAPI extends jrpcapi_1.JRPCAPI{constructor(core,baseURL="/ext/auth"){super(core,baseURL),this.newToken=(password,endpoints)=>__awaiter(this,void 0,void 0,(function*(){const params={password,endpoints},response=yield this.callMethod("auth.newToken",params);return response.data.result.token?response.data.result.token:response.data.result})),this.revokeToken=(password,token)=>__awaiter(this,void 0,void 0,(function*(){const params={password,token};return(yield this.callMethod("auth.revokeToken",params)).data.result.success})),this.changePassword=(oldPassword,newPassword)=>__awaiter(this,void 0,void 0,(function*(){const params={oldPassword,newPassword};return(yield this.callMethod("auth.changePassword",params)).data.result.success}))}}exports.AuthAPI=AuthAPI},7843:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(3920),exports)},8313:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AVMAPI=void 0;const bn_js_1=__importDefault(__webpack_require__(3550)),buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),utxos_1=__webpack_require__(3140),constants_1=__webpack_require__(6667),keychain_1=__webpack_require__(2209),tx_1=__webpack_require__(2577),payload_1=__webpack_require__(9836),helperfunctions_1=__webpack_require__(5554),jrpcapi_1=__webpack_require__(5912),constants_2=__webpack_require__(8779),output_1=__webpack_require__(8556),errors_1=__webpack_require__(611),utils_1=__webpack_require__(338),bintools=bintools_1.default.getInstance(),serialization=utils_1.Serialization.getInstance();class AVMAPI extends jrpcapi_1.JRPCAPI{constructor(core,baseURL="/ext/bc/X",blockchainID=""){super(core,baseURL),this.keychain=new keychain_1.KeyChain("",""),this.blockchainID="",this.blockchainAlias=void 0,this.AVAXAssetID=void 0,this.txFee=void 0,this.creationTxFee=void 0,this.mintTxFee=void 0,this.getBlockchainAlias=()=>{if(void 0===this.blockchainAlias){const netid=this.core.getNetworkID();return netid in constants_2.Defaults.network&&this.blockchainID in constants_2.Defaults.network[`${netid}`]?(this.blockchainAlias=constants_2.Defaults.network[`${netid}`][this.blockchainID].alias,this.blockchainAlias):void 0}return this.blockchainAlias},this.setBlockchainAlias=alias=>{this.blockchainAlias=alias},this.getBlockchainID=()=>this.blockchainID,this.refreshBlockchainID=blockchainID=>{const netid=this.core.getNetworkID();return void 0===blockchainID&&void 0!==constants_2.Defaults.network[`${netid}`]?(this.blockchainID=constants_2.Defaults.network[`${netid}`].X.blockchainID,!0):"string"==typeof blockchainID&&(this.blockchainID=blockchainID,!0)},this.parseAddress=addr=>{const alias=this.getBlockchainAlias(),blockchainID=this.getBlockchainID();return bintools.parseAddress(addr,blockchainID,alias,constants_1.AVMConstants.ADDRESSLENGTH)},this.addressFromBuffer=address=>{const chainID=this.getBlockchainAlias()?this.getBlockchainAlias():this.getBlockchainID(),hrp=this.core.getHRP();return serialization.bufferToType(address,"bech32",hrp,chainID)},this.getAVAXAssetID=(refresh=!1)=>__awaiter(this,void 0,void 0,(function*(){if(void 0===this.AVAXAssetID||refresh){const asset=yield this.getAssetDescription(constants_2.PrimaryAssetAlias);this.AVAXAssetID=asset.assetID}return this.AVAXAssetID})),this.setAVAXAssetID=avaxAssetID=>{"string"==typeof avaxAssetID&&(avaxAssetID=bintools.cb58Decode(avaxAssetID)),this.AVAXAssetID=avaxAssetID},this.getDefaultTxFee=()=>this.core.getNetworkID()in constants_2.Defaults.network?new bn_js_1.default(constants_2.Defaults.network[this.core.getNetworkID()].X.txFee):new bn_js_1.default(0),this.getTxFee=()=>(void 0===this.txFee&&(this.txFee=this.getDefaultTxFee()),this.txFee),this.setTxFee=fee=>{this.txFee=fee},this.getDefaultCreationTxFee=()=>this.core.getNetworkID()in constants_2.Defaults.network?new bn_js_1.default(constants_2.Defaults.network[this.core.getNetworkID()].X.creationTxFee):new bn_js_1.default(0),this.getDefaultMintTxFee=()=>this.core.getNetworkID()in constants_2.Defaults.network?new bn_js_1.default(constants_2.Defaults.network[this.core.getNetworkID()].X.mintTxFee):new bn_js_1.default(0),this.getMintTxFee=()=>(void 0===this.mintTxFee&&(this.mintTxFee=this.getDefaultMintTxFee()),this.mintTxFee),this.getCreationTxFee=()=>(void 0===this.creationTxFee&&(this.creationTxFee=this.getDefaultCreationTxFee()),this.creationTxFee),this.setMintTxFee=fee=>{this.mintTxFee=fee},this.setCreationTxFee=fee=>{this.creationTxFee=fee},this.keyChain=()=>this.keychain,this.newKeyChain=()=>{const alias=this.getBlockchainAlias();return this.keychain=alias?new keychain_1.KeyChain(this.core.getHRP(),alias):new keychain_1.KeyChain(this.core.getHRP(),this.blockchainID),this.keychain},this.checkGooseEgg=(utx,outTotal=new bn_js_1.default(0))=>__awaiter(this,void 0,void 0,(function*(){const avaxAssetID=yield this.getAVAXAssetID(),outputTotal=outTotal.gt(new bn_js_1.default(0))?outTotal:utx.getOutputTotal(avaxAssetID),fee=utx.getBurn(avaxAssetID);return!(!fee.lte(constants_2.ONEAVAX.mul(new bn_js_1.default(10)))&&!fee.lte(outputTotal))})),this.getBalance=(address,assetID,includePartial=!1)=>__awaiter(this,void 0,void 0,(function*(){if(void 0===this.parseAddress(address))throw new errors_1.AddressError("Error - AVMAPI.getBalance: Invalid address format");const params={address,assetID,includePartial};return(yield this.callMethod("avm.getBalance",params)).data.result})),this.createAddress=(username,password)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password};return(yield this.callMethod("avm.createAddress",params)).data.result.address})),this.createFixedCapAsset=(username,password,name,symbol,denomination,initialHolders)=>__awaiter(this,void 0,void 0,(function*(){const params={name,symbol,denomination,username,password,initialHolders};return(yield this.callMethod("avm.createFixedCapAsset",params)).data.result.assetID})),this.createVariableCapAsset=(username,password,name,symbol,denomination,minterSets)=>__awaiter(this,void 0,void 0,(function*(){const params={name,symbol,denomination,username,password,minterSets};return(yield this.callMethod("avm.createVariableCapAsset",params)).data.result.assetID})),this.createNFTAsset=(username,password,from,changeAddr,name,symbol,minterSet)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,name,symbol,minterSet};if(void 0!==(from=this._cleanAddressArray(from,"createNFTAsset"))&&(params.from=from),void 0!==changeAddr){if(void 0===this.parseAddress(changeAddr))throw new errors_1.AddressError("Error - AVMAPI.createNFTAsset: Invalid address format");params.changeAddr=changeAddr}return(yield this.callMethod("avm.createNFTAsset",params)).data.result.assetID})),this.mint=(username,password,amount,assetID,to,minters)=>__awaiter(this,void 0,void 0,(function*(){let asset,amnt;asset="string"!=typeof assetID?bintools.cb58Encode(assetID):assetID,amnt="number"==typeof amount?new bn_js_1.default(amount):amount;const params={username,password,amount:amnt,assetID:asset,to,minters};return(yield this.callMethod("avm.mint",params)).data.result.txID})),this.mintNFT=(username,password,from,changeAddr,payload,assetID,to,encoding="hex")=>__awaiter(this,void 0,void 0,(function*(){let asset;if(void 0===this.parseAddress(to))throw new errors_1.AddressError("Error - AVMAPI.mintNFT: Invalid address format");asset="string"!=typeof assetID?bintools.cb58Encode(assetID):assetID;const params={username,password,assetID:asset,payload,to,encoding};if(void 0!==(from=this._cleanAddressArray(from,"mintNFT"))&&(params.from=from),void 0!==changeAddr){if(void 0===this.parseAddress(changeAddr))throw new errors_1.AddressError("Error - AVMAPI.mintNFT: Invalid address format");params.changeAddr=changeAddr}return(yield this.callMethod("avm.mintNFT",params)).data.result.txID})),this.sendNFT=(username,password,from,changeAddr,assetID,groupID,to)=>__awaiter(this,void 0,void 0,(function*(){let asset;if(void 0===this.parseAddress(to))throw new errors_1.AddressError("Error - AVMAPI.sendNFT: Invalid address format");asset="string"!=typeof assetID?bintools.cb58Encode(assetID):assetID;const params={username,password,assetID:asset,groupID,to};if(void 0!==(from=this._cleanAddressArray(from,"sendNFT"))&&(params.from=from),void 0!==changeAddr){if(void 0===this.parseAddress(changeAddr))throw new errors_1.AddressError("Error - AVMAPI.sendNFT: Invalid address format");params.changeAddr=changeAddr}return(yield this.callMethod("avm.sendNFT",params)).data.result.txID})),this.exportKey=(username,password,address)=>__awaiter(this,void 0,void 0,(function*(){if(void 0===this.parseAddress(address))throw new errors_1.AddressError("Error - AVMAPI.exportKey: Invalid address format");const params={username,password,address};return(yield this.callMethod("avm.exportKey",params)).data.result.privateKey})),this.importKey=(username,password,privateKey)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,privateKey};return(yield this.callMethod("avm.importKey",params)).data.result.address})),this.export=(username,password,to,amount,assetID)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,to,amount,assetID};return(yield this.callMethod("avm.export",params)).data.result.txID})),this.import=(username,password,to,sourceChain)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,to,sourceChain};return(yield this.callMethod("avm.import",params)).data.result.txID})),this.listAddresses=(username,password)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password};return(yield this.callMethod("avm.listAddresses",params)).data.result.addresses})),this.getAllBalances=address=>__awaiter(this,void 0,void 0,(function*(){if(void 0===this.parseAddress(address))throw new errors_1.AddressError("Error - AVMAPI.getAllBalances: Invalid address format");const params={address};return(yield this.callMethod("avm.getAllBalances",params)).data.result.balances})),this.getAssetDescription=assetID=>__awaiter(this,void 0,void 0,(function*(){let asset;asset="string"!=typeof assetID?bintools.cb58Encode(assetID):assetID;const params={assetID:asset},response=yield this.callMethod("avm.getAssetDescription",params);return{name:response.data.result.name,symbol:response.data.result.symbol,assetID:bintools.cb58Decode(response.data.result.assetID),denomination:parseInt(response.data.result.denomination,10)}})),this.getTx=(txID,encoding="hex")=>__awaiter(this,void 0,void 0,(function*(){const params={txID,encoding};return(yield this.callMethod("avm.getTx",params)).data.result.tx})),this.getTxStatus=txID=>__awaiter(this,void 0,void 0,(function*(){const params={txID};return(yield this.callMethod("avm.getTxStatus",params)).data.result.status})),this.getUTXOs=(addresses,sourceChain,limit=0,startIndex,persistOpts,encoding="hex")=>__awaiter(this,void 0,void 0,(function*(){"string"==typeof addresses&&(addresses=[addresses]);const params={addresses,limit,encoding};void 0!==startIndex&&startIndex&&(params.startIndex=startIndex),void 0!==sourceChain&&(params.sourceChain=sourceChain);const response=yield this.callMethod("avm.getUTXOs",params),utxos=new utxos_1.UTXOSet;let data=response.data.result.utxos;if(persistOpts&&"object"==typeof persistOpts){if(this.db.has(persistOpts.getName())){const selfArray=this.db.get(persistOpts.getName());if(Array.isArray(selfArray)){utxos.addArray(data);const utxoSet=new utxos_1.UTXOSet;utxoSet.addArray(selfArray),utxoSet.mergeByRule(utxos,persistOpts.getMergeRule()),data=utxoSet.getAllUTXOStrings()}}this.db.set(persistOpts.getName(),data,persistOpts.getOverwrite())}if(data.length>0&&"0x"===data[0].substring(0,2)){const cb58Strs=[];data.forEach((str=>{cb58Strs.push(bintools.cb58Encode(new buffer_1.Buffer(str.slice(2),"hex")))})),utxos.addArray(cb58Strs,!1)}else utxos.addArray(data,!1);return response.data.result.utxos=utxos,response.data.result})),this.buildBaseTx=(utxoset,amount,assetID,toAddresses,fromAddresses,changeAddresses,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>__awaiter(this,void 0,void 0,(function*(){const to=this._cleanAddressArray(toAddresses,"buildBaseTx").map((a=>bintools.stringToAddress(a))),from=this._cleanAddressArray(fromAddresses,"buildBaseTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildBaseTx").map((a=>bintools.stringToAddress(a)));"string"==typeof assetID&&(assetID=bintools.cb58Decode(assetID)),memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const networkID=this.core.getNetworkID(),blockchainIDBuf=bintools.cb58Decode(this.blockchainID),fee=this.getTxFee(),feeAssetID=yield this.getAVAXAssetID(),builtUnsignedTx=utxoset.buildBaseTx(networkID,blockchainIDBuf,amount,assetID,to,from,change,fee,feeAssetID,memo,asOf,locktime,threshold);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new errors_1.GooseEggCheckError("Error - AVMAPI.buildBaseTx:Failed Goose Egg Check");return builtUnsignedTx})),this.buildNFTTransferTx=(utxoset,toAddresses,fromAddresses,changeAddresses,utxoid,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>__awaiter(this,void 0,void 0,(function*(){const caller="buildNFTTransferTx",to=this._cleanAddressArray(toAddresses,caller).map((a=>bintools.stringToAddress(a))),from=this._cleanAddressArray(fromAddresses,caller).map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,caller).map((a=>bintools.stringToAddress(a)));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const avaxAssetID=yield this.getAVAXAssetID();let utxoidArray=[];"string"==typeof utxoid?utxoidArray=[utxoid]:Array.isArray(utxoid)&&(utxoidArray=utxoid);const builtUnsignedTx=utxoset.buildNFTTransferTx(this.core.getNetworkID(),bintools.cb58Decode(this.blockchainID),to,from,change,utxoidArray,this.getTxFee(),avaxAssetID,memo,asOf,locktime,threshold);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new errors_1.GooseEggCheckError("Error - AVMAPI.buildNFTTransferTx:Failed Goose Egg Check");return builtUnsignedTx})),this.buildImportTx=(utxoset,ownerAddresses,sourceChain,toAddresses,fromAddresses,changeAddresses,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>__awaiter(this,void 0,void 0,(function*(){const caller="buildImportTx",to=this._cleanAddressArray(toAddresses,caller).map((a=>bintools.stringToAddress(a))),from=this._cleanAddressArray(fromAddresses,caller).map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,caller).map((a=>bintools.stringToAddress(a)));let srcChain;if(void 0===sourceChain)throw new errors_1.ChainIdError("Error - AVMAPI.buildImportTx: Source ChainID is undefined.");if("string"==typeof sourceChain)srcChain=sourceChain,sourceChain=bintools.cb58Decode(sourceChain);else if(!(sourceChain instanceof buffer_1.Buffer))throw new errors_1.ChainIdError("Error - AVMAPI.buildImportTx: Invalid destinationChain type: "+typeof sourceChain);const atomicUTXOs=(yield this.getUTXOs(ownerAddresses,srcChain,0,void 0)).utxos,avaxAssetID=yield this.getAVAXAssetID(),atomics=atomicUTXOs.getAllUTXOs();if(0===atomics.length)throw new errors_1.NoAtomicUTXOsError("Error - AVMAPI.buildImportTx: No atomic UTXOs to import from "+srcChain+" using addresses: "+ownerAddresses.join(", "));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const builtUnsignedTx=utxoset.buildImportTx(this.core.getNetworkID(),bintools.cb58Decode(this.blockchainID),to,from,change,atomics,sourceChain,this.getTxFee(),avaxAssetID,memo,asOf,locktime,threshold);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new errors_1.GooseEggCheckError("Error - AVMAPI.buildImportTx:Failed Goose Egg Check");return builtUnsignedTx})),this.buildExportTx=(utxoset,amount,destinationChain,toAddresses,fromAddresses,changeAddresses,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1,assetID)=>__awaiter(this,void 0,void 0,(function*(){const prefixes={};if(toAddresses.map((a=>{prefixes[a.split("-")[0]]=!0})),1!==Object.keys(prefixes).length)throw new errors_1.AddressError("Error - AVMAPI.buildExportTx: To addresses must have the same chainID prefix.");if(void 0===destinationChain)throw new errors_1.ChainIdError("Error - AVMAPI.buildExportTx: Destination ChainID is undefined.");if("string"==typeof destinationChain)destinationChain=bintools.cb58Decode(destinationChain);else if(!(destinationChain instanceof buffer_1.Buffer))throw new errors_1.ChainIdError("Error - AVMAPI.buildExportTx: Invalid destinationChain type: "+typeof destinationChain);if(32!==destinationChain.length)throw new errors_1.ChainIdError("Error - AVMAPI.buildExportTx: Destination ChainID must be 32 bytes in length.");const to=[];toAddresses.map((a=>{to.push(bintools.stringToAddress(a))}));const from=this._cleanAddressArray(fromAddresses,"buildExportTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildExportTx").map((a=>bintools.stringToAddress(a)));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const avaxAssetID=yield this.getAVAXAssetID();void 0===assetID&&(assetID=bintools.cb58Encode(avaxAssetID));const networkID=this.core.getNetworkID(),blockchainID=bintools.cb58Decode(this.blockchainID),assetIDBuf=bintools.cb58Decode(assetID),fee=this.getTxFee(),builtUnsignedTx=utxoset.buildExportTx(networkID,blockchainID,amount,assetIDBuf,to,from,change,destinationChain,fee,avaxAssetID,memo,asOf,locktime,threshold);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new errors_1.GooseEggCheckError("Error - AVMAPI.buildExportTx:Failed Goose Egg Check");return builtUnsignedTx})),this.buildCreateAssetTx=(utxoset,fromAddresses,changeAddresses,initialStates,name,symbol,denomination,mintOutputs,memo,asOf=(0,helperfunctions_1.UnixNow)())=>__awaiter(this,void 0,void 0,(function*(){const from=this._cleanAddressArray(fromAddresses,"buildCreateAssetTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildCreateAssetTx").map((a=>bintools.stringToAddress(a)));if(memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload()),symbol.length>constants_1.AVMConstants.SYMBOLMAXLEN)throw new errors_1.SymbolError("Error - AVMAPI.buildCreateAssetTx: Symbols may not exceed length of "+constants_1.AVMConstants.SYMBOLMAXLEN);if(name.length>constants_1.AVMConstants.ASSETNAMELEN)throw new errors_1.NameError("Error - AVMAPI.buildCreateAssetTx: Names may not exceed length of "+constants_1.AVMConstants.ASSETNAMELEN);const networkID=this.core.getNetworkID(),blockchainID=bintools.cb58Decode(this.blockchainID),avaxAssetID=yield this.getAVAXAssetID(),fee=this.getDefaultCreationTxFee(),builtUnsignedTx=utxoset.buildCreateAssetTx(networkID,blockchainID,from,change,initialStates,name,symbol,denomination,mintOutputs,fee,avaxAssetID,memo,asOf);if(!(yield this.checkGooseEgg(builtUnsignedTx,fee)))throw new errors_1.GooseEggCheckError("Error - AVMAPI.buildCreateAssetTx:Failed Goose Egg Check");return builtUnsignedTx})),this.buildSECPMintTx=(utxoset,mintOwner,transferOwner,fromAddresses,changeAddresses,mintUTXOID,memo,asOf=(0,helperfunctions_1.UnixNow)())=>__awaiter(this,void 0,void 0,(function*(){const from=this._cleanAddressArray(fromAddresses,"buildSECPMintTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildSECPMintTx").map((a=>bintools.stringToAddress(a)));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const networkID=this.core.getNetworkID(),blockchainID=bintools.cb58Decode(this.blockchainID),avaxAssetID=yield this.getAVAXAssetID(),fee=this.getMintTxFee(),builtUnsignedTx=utxoset.buildSECPMintTx(networkID,blockchainID,mintOwner,transferOwner,from,change,mintUTXOID,fee,avaxAssetID,memo,asOf);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new errors_1.GooseEggCheckError("Error - AVMAPI.buildSECPMintTx:Failed Goose Egg Check");return builtUnsignedTx})),this.buildCreateNFTAssetTx=(utxoset,fromAddresses,changeAddresses,minterSets,name,symbol,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0))=>__awaiter(this,void 0,void 0,(function*(){const caller="buildCreateNFTAssetTx",from=this._cleanAddressArray(fromAddresses,caller).map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,caller).map((a=>bintools.stringToAddress(a)));if(memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload()),name.length>constants_1.AVMConstants.ASSETNAMELEN)throw new errors_1.NameError("Error - AVMAPI.buildCreateNFTAssetTx: Names may not exceed length of "+constants_1.AVMConstants.ASSETNAMELEN);if(symbol.length>constants_1.AVMConstants.SYMBOLMAXLEN)throw new errors_1.SymbolError("Error - AVMAPI.buildCreateNFTAssetTx: Symbols may not exceed length of "+constants_1.AVMConstants.SYMBOLMAXLEN);const networkID=this.core.getNetworkID(),blockchainID=bintools.cb58Decode(this.blockchainID),creationTxFee=this.getCreationTxFee(),avaxAssetID=yield this.getAVAXAssetID(),builtUnsignedTx=utxoset.buildCreateNFTAssetTx(networkID,blockchainID,from,change,minterSets,name,symbol,creationTxFee,avaxAssetID,memo,asOf,locktime);if(!(yield this.checkGooseEgg(builtUnsignedTx,creationTxFee)))throw new errors_1.GooseEggCheckError("Error - AVMAPI.buildCreateNFTAssetTx:Failed Goose Egg Check");return builtUnsignedTx})),this.buildCreateNFTMintTx=(utxoset,owners,fromAddresses,changeAddresses,utxoid,groupID=0,payload,memo,asOf=(0,helperfunctions_1.UnixNow)())=>__awaiter(this,void 0,void 0,(function*(){const caller="buildCreateNFTMintTx",from=this._cleanAddressArray(fromAddresses,caller).map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,caller).map((a=>bintools.stringToAddress(a)));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload()),payload instanceof payload_1.PayloadBase&&(payload=payload.getPayload()),"string"==typeof utxoid&&(utxoid=[utxoid]);const avaxAssetID=yield this.getAVAXAssetID();owners instanceof output_1.OutputOwners&&(owners=[owners]);const networkID=this.core.getNetworkID(),blockchainID=bintools.cb58Decode(this.blockchainID),txFee=this.getTxFee(),builtUnsignedTx=utxoset.buildCreateNFTMintTx(networkID,blockchainID,owners,from,change,utxoid,groupID,payload,txFee,avaxAssetID,memo,asOf);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new errors_1.GooseEggCheckError("Error - AVMAPI.buildCreateNFTMintTx:Failed Goose Egg Check");return builtUnsignedTx})),this.signTx=utx=>utx.sign(this.keychain),this.issueTx=tx=>__awaiter(this,void 0,void 0,(function*(){let Transaction="";if("string"==typeof tx)Transaction=tx;else if(tx instanceof buffer_1.Buffer){const txobj=new tx_1.Tx;txobj.fromBuffer(tx),Transaction=txobj.toStringHex()}else{if(!(tx instanceof tx_1.Tx))throw new errors_1.TransactionError("Error - AVMAPI.issueTx: provided tx is not expected type of string, Buffer, or Tx");Transaction=tx.toStringHex()}const params={tx:Transaction.toString(),encoding:"hex"};return(yield this.callMethod("avm.issueTx",params)).data.result.txID})),this.getAddressTxs=(address,cursor,pageSize,assetID)=>__awaiter(this,void 0,void 0,(function*(){let asset,pageSizeNum;asset="string"!=typeof assetID?bintools.cb58Encode(assetID):assetID,pageSizeNum="number"!=typeof pageSize?0:pageSize;const params={address,cursor,pageSize:pageSizeNum,assetID:asset};return(yield this.callMethod("avm.getAddressTxs",params)).data.result})),this.send=(username,password,assetID,amount,to,from,changeAddr,memo)=>__awaiter(this,void 0,void 0,(function*(){let asset,amnt;if(void 0===this.parseAddress(to))throw new errors_1.AddressError("Error - AVMAPI.send: Invalid address format");asset="string"!=typeof assetID?bintools.cb58Encode(assetID):assetID,amnt="number"==typeof amount?new bn_js_1.default(amount):amount;const params={username,password,assetID:asset,amount:amnt.toString(10),to};if(void 0!==(from=this._cleanAddressArray(from,"send"))&&(params.from=from),void 0!==changeAddr){if(void 0===this.parseAddress(changeAddr))throw new errors_1.AddressError("Error - AVMAPI.send: Invalid address format");params.changeAddr=changeAddr}void 0!==memo&&(params.memo="string"!=typeof memo?bintools.cb58Encode(memo):memo);return(yield this.callMethod("avm.send",params)).data.result})),this.sendMultiple=(username,password,sendOutputs,from,changeAddr,memo)=>__awaiter(this,void 0,void 0,(function*(){let asset,amnt;const sOutputs=[];sendOutputs.forEach((output=>{if(void 0===this.parseAddress(output.to))throw new errors_1.AddressError("Error - AVMAPI.sendMultiple: Invalid address format");asset="string"!=typeof output.assetID?bintools.cb58Encode(output.assetID):output.assetID,amnt="number"==typeof output.amount?new bn_js_1.default(output.amount):output.amount,sOutputs.push({to:output.to,assetID:asset,amount:amnt.toString(10)})}));const params={username,password,outputs:sOutputs};if(void 0!==(from=this._cleanAddressArray(from,"send"))&&(params.from=from),void 0!==changeAddr){if(void 0===this.parseAddress(changeAddr))throw new errors_1.AddressError("Error - AVMAPI.send: Invalid address format");params.changeAddr=changeAddr}void 0!==memo&&(params.memo="string"!=typeof memo?bintools.cb58Encode(memo):memo);return(yield this.callMethod("avm.sendMultiple",params)).data.result})),this.buildGenesis=genesisData=>__awaiter(this,void 0,void 0,(function*(){const params={genesisData};return(yield this.callMethod("avm.buildGenesis",params)).data.result.bytes})),this.blockchainID=blockchainID;const netID=core.getNetworkID();if(netID in constants_2.Defaults.network&&blockchainID in constants_2.Defaults.network[`${netID}`]){const alias=constants_2.Defaults.network[`${netID}`][`${blockchainID}`].alias;this.keychain=new keychain_1.KeyChain(this.core.getHRP(),alias)}else this.keychain=new keychain_1.KeyChain(this.core.getHRP(),blockchainID)}_cleanAddressArray(addresses,caller){const addrs=[],chainID=this.getBlockchainAlias()?this.getBlockchainAlias():this.getBlockchainID();if(addresses&&addresses.length>0)for(let i=0;i<addresses.length;i++)if("string"==typeof addresses[`${i}`]){if(void 0===this.parseAddress(addresses[`${i}`]))throw new errors_1.AddressError("Error - AVMAPI.${caller}: Invalid address format");addrs.push(addresses[`${i}`])}else{const type="bech32";addrs.push(serialization.bufferToType(addresses[`${i}`],type,this.core.getHRP(),chainID))}return addrs}}exports.AVMAPI=AVMAPI},5662:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6667),outputs_1=__webpack_require__(6578),inputs_1=__webpack_require__(4935),credentials_1=__webpack_require__(2819),tx_1=__webpack_require__(613),credentials_2=__webpack_require__(5375),constants_2=__webpack_require__(8779),tx_2=__webpack_require__(2577),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class BaseTx extends tx_1.StandardBaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo){super(networkID,blockchainID,outs,ins,memo),this._typeName="BaseTx",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.BASETX:constants_1.AVMConstants.BASETX_CODECONE}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.outs=fields.outs.map((o=>{let newOut=new outputs_1.TransferableOutput;return newOut.deserialize(o,encoding),newOut})),this.ins=fields.ins.map((i=>{let newIn=new inputs_1.TransferableInput;return newIn.deserialize(i,encoding),newIn})),this.numouts=serialization.decoder(this.outs.length.toString(),"display","decimalString","Buffer",4),this.numins=serialization.decoder(this.ins.length.toString(),"display","decimalString","Buffer",4)}getOuts(){return this.outs}getIns(){return this.ins}getTotalOuts(){return this.getOuts()}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - BaseTx.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.BASETX:constants_1.AVMConstants.BASETX_CODECONE}getTxType(){return this._typeID}fromBuffer(bytes,offset=0){this.networkID=bintools.copyFrom(bytes,offset,offset+4),offset+=4,this.blockchainID=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.numouts=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const outcount=this.numouts.readUInt32BE(0);this.outs=[];for(let i=0;i<outcount;i++){const xferout=new outputs_1.TransferableOutput;offset=xferout.fromBuffer(bytes,offset),this.outs.push(xferout)}this.numins=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const incount=this.numins.readUInt32BE(0);this.ins=[];for(let i=0;i<incount;i++){const xferin=new inputs_1.TransferableInput;offset=xferin.fromBuffer(bytes,offset),this.ins.push(xferin)}let memolen=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.memo=bintools.copyFrom(bytes,offset,offset+memolen),offset+=memolen}sign(msg,kc){const creds=[];for(let i=0;i<this.ins.length;i++){const cred=(0,credentials_1.SelectCredentialClass)(this.ins[`${i}`].getInput().getCredentialID()),sigidxs=this.ins[`${i}`].getInput().getSigIdxs();for(let j=0;j<sigidxs.length;j++){const signval=kc.getKey(sigidxs[`${j}`].getSource()).sign(msg),sig=new credentials_2.Signature;sig.fromBuffer(signval),cred.addSignature(sig)}creds.push(cred)}return creds}clone(){let newbase=new BaseTx;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new BaseTx(...args)}select(id,...args){return(0,tx_2.SelectTxClass)(id,...args)}}exports.BaseTx=BaseTx},6667:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AVMConstants=void 0;class AVMConstants{}exports.AVMConstants=AVMConstants,AVMConstants.LATESTCODEC=0,AVMConstants.SECPFXID=0,AVMConstants.NFTFXID=1,AVMConstants.SECPMINTOUTPUTID=6,AVMConstants.SECPMINTOUTPUTID_CODECONE=65537,AVMConstants.SECPXFEROUTPUTID=7,AVMConstants.SECPXFEROUTPUTID_CODECONE=65538,AVMConstants.NFTXFEROUTPUTID=11,AVMConstants.NFTXFEROUTPUTID_CODECONE=131073,AVMConstants.NFTMINTOUTPUTID=10,AVMConstants.NFTMINTOUTPUTID_CODECONE=131072,AVMConstants.SECPINPUTID=5,AVMConstants.SECPINPUTID_CODECONE=65536,AVMConstants.SECPMINTOPID=8,AVMConstants.SECPMINTOPID_CODECONE=65539,AVMConstants.NFTMINTOPID=12,AVMConstants.NFTMINTOPID_CODECONE=131074,AVMConstants.NFTXFEROPID=13,AVMConstants.NFTXFEROPID_CODECONE=131075,AVMConstants.VERTEX=0,AVMConstants.VERTEX_CODECONE=0,AVMConstants.BASETX=0,AVMConstants.BASETX_CODECONE=0,AVMConstants.CREATEASSETTX=1,AVMConstants.CREATEASSETTX_CODECONE=1,AVMConstants.OPERATIONTX=2,AVMConstants.OPERATIONTX_CODECONE=2,AVMConstants.IMPORTTX=3,AVMConstants.IMPORTTX_CODECONE=3,AVMConstants.EXPORTTX=4,AVMConstants.EXPORTTX_CODECONE=4,AVMConstants.SECPCREDENTIAL=9,AVMConstants.SECPCREDENTIAL_CODECONE=65540,AVMConstants.NFTCREDENTIAL=14,AVMConstants.NFTCREDENTIAL_CODECONE=131076,AVMConstants.ASSETIDLEN=32,AVMConstants.BLOCKCHAINIDLEN=32,AVMConstants.SYMBOLMAXLEN=4,AVMConstants.ASSETNAMELEN=128,AVMConstants.ADDRESSLENGTH=20},1926:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CreateAssetTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6667),initialstates_1=__webpack_require__(2951),basetx_1=__webpack_require__(5662),constants_2=__webpack_require__(8779),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance(),utf8="utf8";class CreateAssetTx extends basetx_1.BaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,name,symbol,denomination,initialState){super(networkID,blockchainID,outs,ins,memo),this._typeName="CreateAssetTx",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.CREATEASSETTX:constants_1.AVMConstants.CREATEASSETTX_CODECONE,this.name="",this.symbol="",this.denomination=buffer_1.Buffer.alloc(1),this.initialState=new initialstates_1.InitialStates,"string"==typeof name&&"string"==typeof symbol&&"number"==typeof denomination&&denomination>=0&&denomination<=32&&void 0!==initialState&&(this.initialState=initialState,this.name=name,this.symbol=symbol,this.denomination.writeUInt8(denomination,0))}serialize(encoding="hex"){const fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{name:serialization.encoder(this.name,encoding,utf8,utf8),symbol:serialization.encoder(this.symbol,encoding,utf8,utf8),denomination:serialization.encoder(this.denomination,encoding,"Buffer","decimalString",1),initialState:this.initialState.serialize(encoding)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.name=serialization.decoder(fields.name,encoding,utf8,utf8),this.symbol=serialization.decoder(fields.symbol,encoding,utf8,utf8),this.denomination=serialization.decoder(fields.denomination,encoding,"decimalString","Buffer",1),this.initialState=new initialstates_1.InitialStates,this.initialState.deserialize(fields.initialState,encoding)}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - CreateAssetTx.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.CREATEASSETTX:constants_1.AVMConstants.CREATEASSETTX_CODECONE}getTxType(){return this._typeID}getInitialStates(){return this.initialState}getName(){return this.name}getSymbol(){return this.symbol}getDenomination(){return this.denomination.readUInt8(0)}getDenominationBuffer(){return this.denomination}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset);const namesize=bintools.copyFrom(bytes,offset,offset+2).readUInt16BE(0);offset+=2,this.name=bintools.copyFrom(bytes,offset,offset+namesize).toString("utf8"),offset+=namesize;const symsize=bintools.copyFrom(bytes,offset,offset+2).readUInt16BE(0);offset+=2,this.symbol=bintools.copyFrom(bytes,offset,offset+symsize).toString("utf8"),offset+=symsize,this.denomination=bintools.copyFrom(bytes,offset,offset+1),offset+=1;const inits=new initialstates_1.InitialStates;return offset=inits.fromBuffer(bytes,offset),this.initialState=inits,offset}toBuffer(){const superbuff=super.toBuffer(),initstatebuff=this.initialState.toBuffer(),namebuff=buffer_1.Buffer.alloc(this.name.length);namebuff.write(this.name,0,this.name.length,utf8);const namesize=buffer_1.Buffer.alloc(2);namesize.writeUInt16BE(this.name.length,0);const symbuff=buffer_1.Buffer.alloc(this.symbol.length);symbuff.write(this.symbol,0,this.symbol.length,utf8);const symsize=buffer_1.Buffer.alloc(2);symsize.writeUInt16BE(this.symbol.length,0);const bsize=superbuff.length+namesize.length+namebuff.length+symsize.length+symbuff.length+this.denomination.length+initstatebuff.length,barr=[superbuff,namesize,namebuff,symsize,symbuff,this.denomination,initstatebuff];return buffer_1.Buffer.concat(barr,bsize)}clone(){let newbase=new CreateAssetTx;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new CreateAssetTx(...args)}}exports.CreateAssetTx=CreateAssetTx},2819:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NFTCredential=exports.SECPCredential=exports.SelectCredentialClass=void 0;const constants_1=__webpack_require__(6667),credentials_1=__webpack_require__(5375),errors_1=__webpack_require__(611);exports.SelectCredentialClass=(credid,...args)=>{if(credid===constants_1.AVMConstants.SECPCREDENTIAL||credid===constants_1.AVMConstants.SECPCREDENTIAL_CODECONE)return new SECPCredential(...args);if(credid===constants_1.AVMConstants.NFTCREDENTIAL||credid===constants_1.AVMConstants.NFTCREDENTIAL_CODECONE)return new NFTCredential(...args);throw new errors_1.CredIdError("Error - SelectCredentialClass: unknown credid")};class SECPCredential extends credentials_1.Credential{constructor(){super(...arguments),this._typeName="SECPCredential",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.SECPCREDENTIAL:constants_1.AVMConstants.SECPCREDENTIAL_CODECONE}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - SECPCredential.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.SECPCREDENTIAL:constants_1.AVMConstants.SECPCREDENTIAL_CODECONE}getCredentialID(){return this._typeID}clone(){let newbase=new SECPCredential;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new SECPCredential(...args)}select(id,...args){return(0,exports.SelectCredentialClass)(id,...args)}}exports.SECPCredential=SECPCredential;class NFTCredential extends credentials_1.Credential{constructor(){super(...arguments),this._typeName="NFTCredential",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.NFTCREDENTIAL:constants_1.AVMConstants.NFTCREDENTIAL_CODECONE}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - NFTCredential.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.NFTCREDENTIAL:constants_1.AVMConstants.NFTCREDENTIAL_CODECONE}getCredentialID(){return this._typeID}clone(){let newbase=new NFTCredential;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new NFTCredential(...args)}select(id,...args){return(0,exports.SelectCredentialClass)(id,...args)}}exports.NFTCredential=NFTCredential},1239:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExportTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6667),outputs_1=__webpack_require__(6578),basetx_1=__webpack_require__(5662),constants_2=__webpack_require__(8779),bn_js_1=__importDefault(__webpack_require__(3550)),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class ExportTx extends basetx_1.BaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,destinationChain,exportOuts){if(super(networkID,blockchainID,outs,ins,memo),this._typeName="ExportTx",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.EXPORTTX:constants_1.AVMConstants.EXPORTTX_CODECONE,this.destinationChain=void 0,this.numOuts=buffer_1.Buffer.alloc(4),this.exportOuts=[],this.destinationChain=destinationChain,void 0!==exportOuts&&Array.isArray(exportOuts)){for(let i=0;i<exportOuts.length;i++)if(!(exportOuts[`${i}`]instanceof outputs_1.TransferableOutput))throw new errors_1.TransferableOutputError(`Error - ExportTx.constructor: invalid TransferableOutput in array parameter ${exportOuts}`);this.exportOuts=exportOuts}}serialize(encoding="hex"){const fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{destinationChain:serialization.encoder(this.destinationChain,encoding,"Buffer","cb58"),exportOuts:this.exportOuts.map((e=>e.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.destinationChain=serialization.decoder(fields.destinationChain,encoding,"cb58","Buffer",32),this.exportOuts=fields.exportOuts.map((e=>{let eo=new outputs_1.TransferableOutput;return eo.deserialize(e,encoding),eo})),this.numOuts=buffer_1.Buffer.alloc(4),this.numOuts.writeUInt32BE(this.exportOuts.length,0)}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - ExportTx.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.EXPORTTX:constants_1.AVMConstants.EXPORTTX_CODECONE}getTxType(){return this._typeID}getExportOutputs(){return this.exportOuts}getExportTotal(){let val=new bn_js_1.default(0);for(let i=0;i<this.exportOuts.length;i++)val=val.add(this.exportOuts[`${i}`].getOutput().getAmount());return val}getTotalOuts(){return[...this.getOuts(),...this.getExportOutputs()]}getDestinationChain(){return this.destinationChain}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset),this.destinationChain=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.numOuts=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const numOuts=this.numOuts.readUInt32BE(0);for(let i=0;i<numOuts;i++){const anOut=new outputs_1.TransferableOutput;offset=anOut.fromBuffer(bytes,offset),this.exportOuts.push(anOut)}return offset}toBuffer(){if(void 0===this.destinationChain)throw new errors_1.ChainIdError("ExportTx.toBuffer -- this.destinationChain is undefined");this.numOuts.writeUInt32BE(this.exportOuts.length,0);let barr=[super.toBuffer(),this.destinationChain,this.numOuts];this.exportOuts=this.exportOuts.sort(outputs_1.TransferableOutput.comparator());for(let i=0;i<this.exportOuts.length;i++)barr.push(this.exportOuts[`${i}`].toBuffer());return buffer_1.Buffer.concat(barr)}clone(){let newbase=new ExportTx;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new ExportTx(...args)}}exports.ExportTx=ExportTx},9857:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.GenesisAsset=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),initialstates_1=__webpack_require__(2951),constants_1=__webpack_require__(8779),serialization_1=__webpack_require__(555),createassettx_1=__webpack_require__(1926),bn_js_1=__importDefault(__webpack_require__(3550)),serialization=serialization_1.Serialization.getInstance(),bintools=bintools_1.default.getInstance(),utf8="utf8";class GenesisAsset extends createassettx_1.CreateAssetTx{constructor(assetAlias,name,symbol,denomination,initialState,memo){super(constants_1.DefaultNetworkID,buffer_1.Buffer.alloc(32),[],[],memo),this._typeName="GenesisAsset",this._codecID=void 0,this._typeID=void 0,this.assetAlias="",this.getAssetAlias=()=>this.assetAlias,"string"==typeof assetAlias&&"string"==typeof name&&"string"==typeof symbol&&"number"==typeof denomination&&denomination>=0&&denomination<=32&&void 0!==initialState&&(this.assetAlias=assetAlias,this.name=name,this.symbol=symbol,this.denomination.writeUInt8(denomination,0),this.initialState=initialState)}serialize(encoding="hex"){const fields=super.serialize(encoding);return delete fields.blockchainID,delete fields.outs,delete fields.ins,Object.assign(Object.assign({},fields),{assetAlias:serialization.encoder(this.assetAlias,encoding,utf8,utf8),name:serialization.encoder(this.name,encoding,utf8,utf8),symbol:serialization.encoder(this.symbol,encoding,utf8,utf8),denomination:serialization.encoder(this.denomination,encoding,"Buffer","decimalString",1),initialState:this.initialState.serialize(encoding)})}deserialize(fields,encoding="hex"){fields.blockchainID=buffer_1.Buffer.alloc(32,16).toString("hex"),fields.outs=[],fields.ins=[],super.deserialize(fields,encoding),this.assetAlias=serialization.decoder(fields.assetAlias,encoding,utf8,utf8),this.name=serialization.decoder(fields.name,encoding,utf8,utf8),this.symbol=serialization.decoder(fields.symbol,encoding,utf8,utf8),this.denomination=serialization.decoder(fields.denomination,encoding,"decimalString","Buffer",1),this.initialState=new initialstates_1.InitialStates,this.initialState.deserialize(fields.initialState,encoding)}fromBuffer(bytes,offset=0){const assetAliasSize=bintools.copyFrom(bytes,offset,offset+2).readUInt16BE(0);return offset+=2,this.assetAlias=bintools.copyFrom(bytes,offset,offset+assetAliasSize).toString("utf8"),offset+=assetAliasSize,offset+=super.fromBuffer(bytes,offset)}toBuffer(networkID=constants_1.DefaultNetworkID){const assetAlias=this.getAssetAlias(),assetAliasbuffSize=buffer_1.Buffer.alloc(2);assetAliasbuffSize.writeUInt16BE(assetAlias.length,0);let bsize=assetAliasbuffSize.length,barr=[assetAliasbuffSize];const assetAliasbuff=buffer_1.Buffer.alloc(assetAlias.length);assetAliasbuff.write(assetAlias,0,assetAlias.length,utf8),bsize+=assetAliasbuff.length,barr.push(assetAliasbuff);const networkIDBuff=buffer_1.Buffer.alloc(4);networkIDBuff.writeUInt32BE(new bn_js_1.default(networkID).toNumber(),0),bsize+=networkIDBuff.length,barr.push(networkIDBuff),bsize+=32,barr.push(buffer_1.Buffer.alloc(32)),bsize+=4,barr.push(buffer_1.Buffer.alloc(4)),bsize+=4,barr.push(buffer_1.Buffer.alloc(4));const memo=this.getMemo(),memobuffSize=buffer_1.Buffer.alloc(4);memobuffSize.writeUInt32BE(memo.length,0),bsize+=memobuffSize.length,barr.push(memobuffSize),bsize+=memo.length,barr.push(memo);const name=this.getName(),namebuffSize=buffer_1.Buffer.alloc(2);namebuffSize.writeUInt16BE(name.length,0),bsize+=namebuffSize.length,barr.push(namebuffSize);const namebuff=buffer_1.Buffer.alloc(name.length);namebuff.write(name,0,name.length,utf8),bsize+=namebuff.length,barr.push(namebuff);const symbol=this.getSymbol(),symbolbuffSize=buffer_1.Buffer.alloc(2);symbolbuffSize.writeUInt16BE(symbol.length,0),bsize+=symbolbuffSize.length,barr.push(symbolbuffSize);const symbolbuff=buffer_1.Buffer.alloc(symbol.length);symbolbuff.write(symbol,0,symbol.length,utf8),bsize+=symbolbuff.length,barr.push(symbolbuff);const denomination=this.getDenomination(),denominationbuffSize=buffer_1.Buffer.alloc(1);return denominationbuffSize.writeUInt8(denomination,0),bsize+=denominationbuffSize.length,barr.push(denominationbuffSize),bsize+=this.initialState.toBuffer().length,barr.push(this.initialState.toBuffer()),buffer_1.Buffer.concat(barr,bsize)}}exports.GenesisAsset=GenesisAsset},6418:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.GenesisData=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),serialization_1=__webpack_require__(555),constants_1=__webpack_require__(6667),_1=__webpack_require__(7996),utils_1=__webpack_require__(338),serialization=serialization_1.Serialization.getInstance(),bintools=bintools_1.default.getInstance();class GenesisData extends serialization_1.Serializable{constructor(genesisAssets=[],networkID=utils_1.DefaultNetworkID){super(),this._typeName="GenesisData",this._codecID=constants_1.AVMConstants.LATESTCODEC,this.networkID=buffer_1.Buffer.alloc(4),this.getGenesisAssets=()=>this.genesisAssets,this.getNetworkID=()=>this.networkID.readUInt32BE(0),this.genesisAssets=genesisAssets,this.networkID.writeUInt32BE(networkID,0)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{genesisAssets:this.genesisAssets.map((genesisAsset=>genesisAsset.serialize(encoding))),networkID:serialization.encoder(this.networkID,encoding,"Buffer","decimalString")})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.genesisAssets=fields.genesisAssets.map((genesisAsset=>{let g=new _1.GenesisAsset;return g.deserialize(genesisAsset,encoding),g})),this.networkID=serialization.decoder(fields.networkID,encoding,"decimalString","Buffer",4)}fromBuffer(bytes,offset=0){this._codecID=bintools.copyFrom(bytes,offset,offset+2).readUInt16BE(0),offset+=2;const numGenesisAssets=bintools.copyFrom(bytes,offset,offset+4);offset+=4;const assetCount=numGenesisAssets.readUInt32BE(0);this.genesisAssets=[];for(let i=0;i<assetCount;i++){const genesisAsset=new _1.GenesisAsset;offset=genesisAsset.fromBuffer(bytes,offset),this.genesisAssets.push(genesisAsset),0===i&&this.networkID.writeUInt32BE(genesisAsset.getNetworkID(),0)}return offset}toBuffer(){const codecbuffSize=buffer_1.Buffer.alloc(2);codecbuffSize.writeUInt16BE(this._codecID,0);const numAssetsbuffSize=buffer_1.Buffer.alloc(4);numAssetsbuffSize.writeUInt32BE(this.genesisAssets.length,0);let bsize=codecbuffSize.length+numAssetsbuffSize.length,barr=[codecbuffSize,numAssetsbuffSize];return this.genesisAssets.forEach((genesisAsset=>{const b=genesisAsset.toBuffer(this.getNetworkID());bsize+=b.length,barr.push(b)})),buffer_1.Buffer.concat(barr,bsize)}}exports.GenesisData=GenesisData},1952:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImportTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6667),inputs_1=__webpack_require__(4935),basetx_1=__webpack_require__(5662),credentials_1=__webpack_require__(2819),credentials_2=__webpack_require__(5375),constants_2=__webpack_require__(8779),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class ImportTx extends basetx_1.BaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,sourceChain,importIns){if(super(networkID,blockchainID,outs,ins,memo),this._typeName="ImportTx",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.IMPORTTX:constants_1.AVMConstants.IMPORTTX_CODECONE,this.sourceChain=buffer_1.Buffer.alloc(32),this.numIns=buffer_1.Buffer.alloc(4),this.importIns=[],this.sourceChain=sourceChain,void 0!==importIns&&Array.isArray(importIns)){for(let i=0;i<importIns.length;i++)if(!(importIns[`${i}`]instanceof inputs_1.TransferableInput))throw new errors_1.TransferableInputError(`Error - ImportTx.constructor: invalid TransferableInput in array parameter ${importIns}`);this.importIns=importIns}}serialize(encoding="hex"){const fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{sourceChain:serialization.encoder(this.sourceChain,encoding,"Buffer","cb58"),importIns:this.importIns.map((i=>i.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.sourceChain=serialization.decoder(fields.sourceChain,encoding,"cb58","Buffer",32),this.importIns=fields.importIns.map((i=>{let ii=new inputs_1.TransferableInput;return ii.deserialize(i,encoding),ii})),this.numIns=buffer_1.Buffer.alloc(4),this.numIns.writeUInt32BE(this.importIns.length,0)}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - ImportTx.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.IMPORTTX:constants_1.AVMConstants.IMPORTTX_CODECONE}getTxType(){return this._typeID}getSourceChain(){return this.sourceChain}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset),this.sourceChain=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.numIns=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const numIns=this.numIns.readUInt32BE(0);for(let i=0;i<numIns;i++){const anIn=new inputs_1.TransferableInput;offset=anIn.fromBuffer(bytes,offset),this.importIns.push(anIn)}return offset}toBuffer(){if(void 0===this.sourceChain)throw new errors_1.ChainIdError("ImportTx.toBuffer -- this.sourceChain is undefined");this.numIns.writeUInt32BE(this.importIns.length,0);let barr=[super.toBuffer(),this.sourceChain,this.numIns];this.importIns=this.importIns.sort(inputs_1.TransferableInput.comparator());for(let i=0;i<this.importIns.length;i++)barr.push(this.importIns[`${i}`].toBuffer());return buffer_1.Buffer.concat(barr)}getImportInputs(){return this.importIns}clone(){let newbase=new ImportTx;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new ImportTx(...args)}sign(msg,kc){const creds=super.sign(msg,kc);for(let i=0;i<this.importIns.length;i++){const cred=(0,credentials_1.SelectCredentialClass)(this.importIns[`${i}`].getInput().getCredentialID()),sigidxs=this.importIns[`${i}`].getInput().getSigIdxs();for(let j=0;j<sigidxs.length;j++){const signval=kc.getKey(sigidxs[`${j}`].getSource()).sign(msg),sig=new credentials_2.Signature;sig.fromBuffer(signval),cred.addSignature(sig)}creds.push(cred)}return creds}}exports.ImportTx=ImportTx},7996:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(8313),exports),__exportStar(__webpack_require__(5662),exports),__exportStar(__webpack_require__(6667),exports),__exportStar(__webpack_require__(1926),exports),__exportStar(__webpack_require__(2819),exports),__exportStar(__webpack_require__(1239),exports),__exportStar(__webpack_require__(9857),exports),__exportStar(__webpack_require__(6418),exports),__exportStar(__webpack_require__(1952),exports),__exportStar(__webpack_require__(2951),exports),__exportStar(__webpack_require__(4935),exports),__exportStar(__webpack_require__(3101),exports),__exportStar(__webpack_require__(2209),exports),__exportStar(__webpack_require__(9609),exports),__exportStar(__webpack_require__(2710),exports),__exportStar(__webpack_require__(4726),exports),__exportStar(__webpack_require__(6578),exports),__exportStar(__webpack_require__(2577),exports),__exportStar(__webpack_require__(3140),exports),__exportStar(__webpack_require__(1485),exports)},2951:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.InitialStates=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),output_1=__webpack_require__(8556),outputs_1=__webpack_require__(6578),constants_1=__webpack_require__(6667),serialization_1=__webpack_require__(555),bintools=bintools_1.default.getInstance();class InitialStates extends serialization_1.Serializable{constructor(){super(...arguments),this._typeName="InitialStates",this._typeID=void 0,this.fxs={}}serialize(encoding="hex"){const fields=super.serialize(encoding),flatfxs={};for(let fxid in this.fxs)flatfxs[`${fxid}`]=this.fxs[`${fxid}`].map((o=>o.serialize(encoding)));return Object.assign(Object.assign({},fields),{fxs:flatfxs})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding);const unflat={};for(let fxid in fields.fxs)unflat[`${fxid}`]=fields.fxs[`${fxid}`].map((o=>{const out=(0,outputs_1.SelectOutputClass)(o._typeID);return out.deserialize(o,encoding),out}));this.fxs=unflat}addOutput(out,fxid=constants_1.AVMConstants.SECPFXID){fxid in this.fxs||(this.fxs[`${fxid}`]=[]),this.fxs[`${fxid}`].push(out)}fromBuffer(bytes,offset=0){const result=[],klen=bintools.copyFrom(bytes,offset,offset+4);offset+=4;const klennum=klen.readUInt32BE(0);for(let i=0;i<klennum;i++){const fxidbuff=bintools.copyFrom(bytes,offset,offset+4);offset+=4;const fxid=fxidbuff.readUInt32BE(0);result[`${fxid}`]=[];const statelenbuff=bintools.copyFrom(bytes,offset,offset+4);offset+=4;const statelen=statelenbuff.readUInt32BE(0);for(let j=0;j<statelen;j++){const outputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4;const out=(0,outputs_1.SelectOutputClass)(outputid);offset=out.fromBuffer(bytes,offset),result[`${fxid}`].push(out)}}return this.fxs=result,offset}toBuffer(){const buff=[],keys=Object.keys(this.fxs).map((k=>parseInt(k,10))).sort(),klen=buffer_1.Buffer.alloc(4);klen.writeUInt32BE(keys.length,0),buff.push(klen);for(let i=0;i<keys.length;i++){const fxid=keys[`${i}`],fxidbuff=buffer_1.Buffer.alloc(4);fxidbuff.writeUInt32BE(fxid,0),buff.push(fxidbuff);const initialState=this.fxs[`${fxid}`].sort(output_1.Output.comparator()),statelen=buffer_1.Buffer.alloc(4);statelen.writeUInt32BE(initialState.length,0),buff.push(statelen);for(let j=0;j<initialState.length;j++){const outputid=buffer_1.Buffer.alloc(4);outputid.writeInt32BE(initialState[`${j}`].getOutputID(),0),buff.push(outputid),buff.push(initialState[`${j}`].toBuffer())}}return buffer_1.Buffer.concat(buff)}}exports.InitialStates=InitialStates},4935:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SECPTransferInput=exports.AmountInput=exports.TransferableInput=exports.SelectInputClass=void 0;const bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6667),input_1=__webpack_require__(1149),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance();exports.SelectInputClass=(inputid,...args)=>{if(inputid===constants_1.AVMConstants.SECPINPUTID||inputid===constants_1.AVMConstants.SECPINPUTID_CODECONE)return new SECPTransferInput(...args);throw new errors_1.InputIdError("Error - SelectInputClass: unknown inputid")};class TransferableInput extends input_1.StandardTransferableInput{constructor(){super(...arguments),this._typeName="TransferableInput",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.input=(0,exports.SelectInputClass)(fields.input._typeID),this.input.deserialize(fields.input,encoding)}fromBuffer(bytes,offset=0){this.txid=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.outputidx=bintools.copyFrom(bytes,offset,offset+4),offset+=4,this.assetID=bintools.copyFrom(bytes,offset,offset+constants_1.AVMConstants.ASSETIDLEN),offset+=32;const inputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.input=(0,exports.SelectInputClass)(inputid),this.input.fromBuffer(bytes,offset)}}exports.TransferableInput=TransferableInput;class AmountInput extends input_1.StandardAmountInput{constructor(){super(...arguments),this._typeName="AmountInput",this._typeID=void 0}select(id,...args){return(0,exports.SelectInputClass)(id,...args)}}exports.AmountInput=AmountInput;class SECPTransferInput extends AmountInput{constructor(){super(...arguments),this._typeName="SECPTransferInput",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.SECPINPUTID:constants_1.AVMConstants.SECPINPUTID_CODECONE}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - SECPTransferInput.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.SECPINPUTID:constants_1.AVMConstants.SECPINPUTID_CODECONE}getInputID(){return this._typeID}getCredentialID(){return 0===this._codecID?constants_1.AVMConstants.SECPCREDENTIAL:1===this._codecID?constants_1.AVMConstants.SECPCREDENTIAL_CODECONE:void 0}create(...args){return new SECPTransferInput(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}}exports.SECPTransferInput=SECPTransferInput},3101:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0})},2209:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.KeyChain=exports.KeyPair=void 0;const bintools_1=__importDefault(__webpack_require__(903)),secp256k1_1=__webpack_require__(181),utils_1=__webpack_require__(338),bintools=bintools_1.default.getInstance();utils_1.Serialization.getInstance();class KeyPair extends secp256k1_1.SECP256k1KeyPair{clone(){const newkp=new KeyPair(this.hrp,this.chainID);return newkp.importKey(bintools.copyFrom(this.getPrivateKey())),newkp}create(...args){return 2==args.length?new KeyPair(args[0],args[1]):new KeyPair(this.hrp,this.chainID)}}exports.KeyPair=KeyPair;class KeyChain extends secp256k1_1.SECP256k1KeyChain{constructor(hrp,chainid){super(),this.hrp="",this.chainid="",this.makeKey=()=>{let keypair=new KeyPair(this.hrp,this.chainid);return this.addKey(keypair),keypair},this.addKey=newKey=>{newKey.setChainID(this.chainid),super.addKey(newKey)},this.importKey=privk=>{let pk,keypair=new KeyPair(this.hrp,this.chainid);return pk="string"==typeof privk?bintools.cb58Decode(privk.split("-")[1]):bintools.copyFrom(privk),keypair.importKey(pk),keypair.getAddress().toString("hex")in this.keys||this.addKey(keypair),keypair},this.hrp=hrp,this.chainid=chainid}create(...args){return 2==args.length?new KeyChain(args[0],args[1]):new KeyChain(this.hrp,this.chainid)}clone(){const newkc=new KeyChain(this.hrp,this.chainid);for(let k in this.keys)newkc.addKey(this.keys[`${k}`].clone());return newkc}union(kc){let newkc=kc.clone();for(let k in this.keys)newkc.addKey(this.keys[`${k}`].clone());return newkc}}exports.KeyChain=KeyChain},9609:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MinterSet=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),serialization_1=__webpack_require__(555),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class MinterSet extends serialization_1.Serializable{constructor(threshold=1,minters=[]){super(),this._typeName="MinterSet",this._typeID=void 0,this.minters=[],this.getThreshold=()=>this.threshold,this.getMinters=()=>this.minters,this._cleanAddresses=addresses=>{let addrs=[];for(let i=0;i<addresses.length;i++)"string"==typeof addresses[`${i}`]?addrs.push(bintools.stringToAddress(addresses[`${i}`])):addresses[`${i}`]instanceof buffer_1.Buffer&&addrs.push(addresses[`${i}`]);return addrs},this.threshold=threshold,this.minters=this._cleanAddresses(minters)}serialize(encoding="hex"){const fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{threshold:serialization.encoder(this.threshold,encoding,"number","decimalString",4),minters:this.minters.map((m=>serialization.encoder(m,encoding,"Buffer","cb58",20)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.threshold=serialization.decoder(fields.threshold,encoding,"decimalString","number",4),this.minters=fields.minters.map((m=>serialization.decoder(m,encoding,"cb58","Buffer",20)))}}exports.MinterSet=MinterSet},2710:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OperationTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6667),ops_1=__webpack_require__(4726),credentials_1=__webpack_require__(2819),credentials_2=__webpack_require__(5375),basetx_1=__webpack_require__(5662),constants_2=__webpack_require__(8779),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance();class OperationTx extends basetx_1.BaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,ops){if(super(networkID,blockchainID,outs,ins,memo),this._typeName="OperationTx",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.OPERATIONTX:constants_1.AVMConstants.OPERATIONTX_CODECONE,this.numOps=buffer_1.Buffer.alloc(4),this.ops=[],void 0!==ops&&Array.isArray(ops)){for(let i=0;i<ops.length;i++)if(!(ops[`${i}`]instanceof ops_1.TransferableOperation))throw new errors_1.OperationError(`Error - OperationTx.constructor: invalid op in array parameter ${ops}`);this.ops=ops}}serialize(encoding="hex"){const fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{ops:this.ops.map((o=>o.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.ops=fields.ops.map((o=>{let op=new ops_1.TransferableOperation;return op.deserialize(o,encoding),op})),this.numOps=buffer_1.Buffer.alloc(4),this.numOps.writeUInt32BE(this.ops.length,0)}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - OperationTx.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.OPERATIONTX:constants_1.AVMConstants.OPERATIONTX_CODECONE}getTxType(){return this._typeID}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset),this.numOps=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const numOps=this.numOps.readUInt32BE(0);for(let i=0;i<numOps;i++){const op=new ops_1.TransferableOperation;offset=op.fromBuffer(bytes,offset),this.ops.push(op)}return offset}toBuffer(){this.numOps.writeUInt32BE(this.ops.length,0);let barr=[super.toBuffer(),this.numOps];this.ops=this.ops.sort(ops_1.TransferableOperation.comparator());for(let i=0;i<this.ops.length;i++)barr.push(this.ops[`${i}`].toBuffer());return buffer_1.Buffer.concat(barr)}getOperations(){return this.ops}sign(msg,kc){const creds=super.sign(msg,kc);for(let i=0;i<this.ops.length;i++){const cred=(0,credentials_1.SelectCredentialClass)(this.ops[`${i}`].getOperation().getCredentialID()),sigidxs=this.ops[`${i}`].getOperation().getSigIdxs();for(let j=0;j<sigidxs.length;j++){const signval=kc.getKey(sigidxs[`${j}`].getSource()).sign(msg),sig=new credentials_2.Signature;sig.fromBuffer(signval),cred.addSignature(sig)}creds.push(cred)}return creds}clone(){const newbase=new OperationTx;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new OperationTx(...args)}}exports.OperationTx=OperationTx},4726:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UTXOID=exports.NFTTransferOperation=exports.NFTMintOperation=exports.SECPMintOperation=exports.TransferableOperation=exports.Operation=exports.SelectOperationClass=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6667),outputs_1=__webpack_require__(6578),nbytes_1=__webpack_require__(4263),credentials_1=__webpack_require__(5375),output_1=__webpack_require__(8556),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();exports.SelectOperationClass=(opid,...args)=>{if(opid===constants_1.AVMConstants.SECPMINTOPID||opid===constants_1.AVMConstants.SECPMINTOPID_CODECONE)return new SECPMintOperation(...args);if(opid===constants_1.AVMConstants.NFTMINTOPID||opid===constants_1.AVMConstants.NFTMINTOPID_CODECONE)return new NFTMintOperation(...args);if(opid===constants_1.AVMConstants.NFTXFEROPID||opid===constants_1.AVMConstants.NFTXFEROPID_CODECONE)return new NFTTransferOperation(...args);throw new errors_1.InvalidOperationIdError(`Error - SelectOperationClass: unknown opid ${opid}`)};class Operation extends serialization_1.Serializable{constructor(){super(...arguments),this._typeName="Operation",this._typeID=void 0,this.sigCount=buffer_1.Buffer.alloc(4),this.sigIdxs=[],this.getSigIdxs=()=>this.sigIdxs,this.addSignatureIdx=(addressIdx,address)=>{const sigidx=new credentials_1.SigIdx,b=buffer_1.Buffer.alloc(4);b.writeUInt32BE(addressIdx,0),sigidx.fromBuffer(b),sigidx.setSource(address),this.sigIdxs.push(sigidx),this.sigCount.writeUInt32BE(this.sigIdxs.length,0)}}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{sigIdxs:this.sigIdxs.map((s=>s.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.sigIdxs=fields.sigIdxs.map((s=>{let sidx=new credentials_1.SigIdx;return sidx.deserialize(s,encoding),sidx})),this.sigCount.writeUInt32BE(this.sigIdxs.length,0)}fromBuffer(bytes,offset=0){this.sigCount=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const sigCount=this.sigCount.readUInt32BE(0);this.sigIdxs=[];for(let i=0;i<sigCount;i++){const sigidx=new credentials_1.SigIdx,sigbuff=bintools.copyFrom(bytes,offset,offset+4);sigidx.fromBuffer(sigbuff),offset+=4,this.sigIdxs.push(sigidx)}return offset}toBuffer(){this.sigCount.writeUInt32BE(this.sigIdxs.length,0);let bsize=this.sigCount.length;const barr=[this.sigCount];for(let i=0;i<this.sigIdxs.length;i++){const b=this.sigIdxs[`${i}`].toBuffer();barr.push(b),bsize+=b.length}return buffer_1.Buffer.concat(barr,bsize)}toString(){return bintools.bufferToB58(this.toBuffer())}}exports.Operation=Operation,Operation.comparator=()=>(a,b)=>{const aoutid=buffer_1.Buffer.alloc(4);aoutid.writeUInt32BE(a.getOperationID(),0);const abuff=a.toBuffer(),boutid=buffer_1.Buffer.alloc(4);boutid.writeUInt32BE(b.getOperationID(),0);const bbuff=b.toBuffer(),asort=buffer_1.Buffer.concat([aoutid,abuff],aoutid.length+abuff.length),bsort=buffer_1.Buffer.concat([boutid,bbuff],boutid.length+bbuff.length);return buffer_1.Buffer.compare(asort,bsort)};class TransferableOperation extends serialization_1.Serializable{constructor(assetID,utxoids,operation){if(super(),this._typeName="TransferableOperation",this._typeID=void 0,this.assetID=buffer_1.Buffer.alloc(32),this.utxoIDs=[],this.getAssetID=()=>this.assetID,this.getUTXOIDs=()=>this.utxoIDs,this.getOperation=()=>this.operation,void 0!==assetID&&assetID.length===constants_1.AVMConstants.ASSETIDLEN&&operation instanceof Operation&&void 0!==utxoids&&Array.isArray(utxoids)){this.assetID=assetID,this.operation=operation;for(let i=0;i<utxoids.length;i++){const utxoid=new UTXOID;"string"==typeof utxoids[`${i}`]?utxoid.fromString(utxoids[`${i}`]):utxoids[`${i}`]instanceof buffer_1.Buffer?utxoid.fromBuffer(utxoids[`${i}`]):utxoids[`${i}`]instanceof UTXOID&&utxoid.fromString(utxoids[`${i}`].toString()),this.utxoIDs.push(utxoid)}}}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{assetID:serialization.encoder(this.assetID,encoding,"Buffer","cb58",32),utxoIDs:this.utxoIDs.map((u=>u.serialize(encoding))),operation:this.operation.serialize(encoding)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.assetID=serialization.decoder(fields.assetID,encoding,"cb58","Buffer",32),this.utxoIDs=fields.utxoIDs.map((u=>{let utxoid=new UTXOID;return utxoid.deserialize(u,encoding),utxoid})),this.operation=(0,exports.SelectOperationClass)(fields.operation._typeID),this.operation.deserialize(fields.operation,encoding)}fromBuffer(bytes,offset=0){this.assetID=bintools.copyFrom(bytes,offset,offset+32),offset+=32;const numutxoIDs=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4,this.utxoIDs=[];for(let i=0;i<numutxoIDs;i++){const utxoid=new UTXOID;offset=utxoid.fromBuffer(bytes,offset),this.utxoIDs.push(utxoid)}const opid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.operation=(0,exports.SelectOperationClass)(opid),this.operation.fromBuffer(bytes,offset)}toBuffer(){const numutxoIDs=buffer_1.Buffer.alloc(4);numutxoIDs.writeUInt32BE(this.utxoIDs.length,0);let bsize=this.assetID.length+numutxoIDs.length;const barr=[this.assetID,numutxoIDs];this.utxoIDs=this.utxoIDs.sort(UTXOID.comparator());for(let i=0;i<this.utxoIDs.length;i++){const b=this.utxoIDs[`${i}`].toBuffer();barr.push(b),bsize+=b.length}const opid=buffer_1.Buffer.alloc(4);opid.writeUInt32BE(this.operation.getOperationID(),0),barr.push(opid),bsize+=opid.length;const b=this.operation.toBuffer();return bsize+=b.length,barr.push(b),buffer_1.Buffer.concat(barr,bsize)}}exports.TransferableOperation=TransferableOperation,TransferableOperation.comparator=()=>function(a,b){return buffer_1.Buffer.compare(a.toBuffer(),b.toBuffer())};class SECPMintOperation extends Operation{constructor(mintOutput,transferOutput){super(),this._typeName="SECPMintOperation",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.SECPMINTOPID:constants_1.AVMConstants.SECPMINTOPID_CODECONE,this.mintOutput=void 0,this.transferOutput=void 0,void 0!==mintOutput&&(this.mintOutput=mintOutput),void 0!==transferOutput&&(this.transferOutput=transferOutput)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{mintOutput:this.mintOutput.serialize(encoding),transferOutputs:this.transferOutput.serialize(encoding)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.mintOutput=new outputs_1.SECPMintOutput,this.mintOutput.deserialize(fields.mintOutput,encoding),this.transferOutput=new outputs_1.SECPTransferOutput,this.transferOutput.deserialize(fields.transferOutputs,encoding)}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - SECPMintOperation.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.SECPMINTOPID:constants_1.AVMConstants.SECPMINTOPID_CODECONE}getOperationID(){return this._typeID}getCredentialID(){return 0===this._codecID?constants_1.AVMConstants.SECPCREDENTIAL:1===this._codecID?constants_1.AVMConstants.SECPCREDENTIAL_CODECONE:void 0}getMintOutput(){return this.mintOutput}getTransferOutput(){return this.transferOutput}fromBuffer(bytes,offset=0){return offset=super.fromBuffer(bytes,offset),this.mintOutput=new outputs_1.SECPMintOutput,offset=this.mintOutput.fromBuffer(bytes,offset),this.transferOutput=new outputs_1.SECPTransferOutput,offset=this.transferOutput.fromBuffer(bytes,offset)}toBuffer(){const superbuff=super.toBuffer(),mintoutBuff=this.mintOutput.toBuffer(),transferOutBuff=this.transferOutput.toBuffer(),bsize=superbuff.length+mintoutBuff.length+transferOutBuff.length,barr=[superbuff,mintoutBuff,transferOutBuff];return buffer_1.Buffer.concat(barr,bsize)}}exports.SECPMintOperation=SECPMintOperation;class NFTMintOperation extends Operation{constructor(groupID,payload,outputOwners){super(),this._typeName="NFTMintOperation",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.NFTMINTOPID:constants_1.AVMConstants.NFTMINTOPID_CODECONE,this.groupID=buffer_1.Buffer.alloc(4),this.outputOwners=[],this.getCredentialID=()=>0===this._codecID?constants_1.AVMConstants.NFTCREDENTIAL:1===this._codecID?constants_1.AVMConstants.NFTCREDENTIAL_CODECONE:void 0,this.getGroupID=()=>bintools.copyFrom(this.groupID,0),this.getPayload=()=>bintools.copyFrom(this.payload,0),this.getPayloadBuffer=()=>{let payloadlen=buffer_1.Buffer.alloc(4);return payloadlen.writeUInt32BE(this.payload.length,0),buffer_1.Buffer.concat([payloadlen,bintools.copyFrom(this.payload,0)])},this.getOutputOwners=()=>this.outputOwners,void 0!==groupID&&void 0!==payload&&outputOwners.length&&(this.groupID.writeUInt32BE(groupID||0,0),this.payload=payload,this.outputOwners=outputOwners)}serialize(encoding="hex"){const fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{groupID:serialization.encoder(this.groupID,encoding,"Buffer","decimalString",4),payload:serialization.encoder(this.payload,encoding,"Buffer","hex"),outputOwners:this.outputOwners.map((o=>o.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.groupID=serialization.decoder(fields.groupID,encoding,"decimalString","Buffer",4),this.payload=serialization.decoder(fields.payload,encoding,"hex","Buffer"),this.outputOwners=fields.outputOwners.map((o=>{let oo=new output_1.OutputOwners;return oo.deserialize(o,encoding),oo}))}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - NFTMintOperation.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.NFTMINTOPID:constants_1.AVMConstants.NFTMINTOPID_CODECONE}getOperationID(){return this._typeID}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset),this.groupID=bintools.copyFrom(bytes,offset,offset+4),offset+=4;let payloadLen=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4,this.payload=bintools.copyFrom(bytes,offset,offset+payloadLen),offset+=payloadLen;let numoutputs=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4,this.outputOwners=[];for(let i=0;i<numoutputs;i++){let outputOwner=new output_1.OutputOwners;offset=outputOwner.fromBuffer(bytes,offset),this.outputOwners.push(outputOwner)}return offset}toBuffer(){const superbuff=super.toBuffer(),payloadlen=buffer_1.Buffer.alloc(4);payloadlen.writeUInt32BE(this.payload.length,0);const outputownerslen=buffer_1.Buffer.alloc(4);outputownerslen.writeUInt32BE(this.outputOwners.length,0);let bsize=superbuff.length+this.groupID.length+payloadlen.length+this.payload.length+outputownerslen.length;const barr=[superbuff,this.groupID,payloadlen,this.payload,outputownerslen];for(let i=0;i<this.outputOwners.length;i++){let b=this.outputOwners[`${i}`].toBuffer();barr.push(b),bsize+=b.length}return buffer_1.Buffer.concat(barr,bsize)}toString(){return bintools.bufferToB58(this.toBuffer())}}exports.NFTMintOperation=NFTMintOperation;class NFTTransferOperation extends Operation{constructor(output){super(),this._typeName="NFTTransferOperation",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.NFTXFEROPID:constants_1.AVMConstants.NFTXFEROPID_CODECONE,this.getOutput=()=>this.output,void 0!==output&&(this.output=output)}serialize(encoding="hex"){const fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{output:this.output.serialize(encoding)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.output=new outputs_1.NFTTransferOutput,this.output.deserialize(fields.output,encoding)}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - NFTTransferOperation.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.NFTXFEROPID:constants_1.AVMConstants.NFTXFEROPID_CODECONE}getOperationID(){return this._typeID}getCredentialID(){return 0===this._codecID?constants_1.AVMConstants.NFTCREDENTIAL:1===this._codecID?constants_1.AVMConstants.NFTCREDENTIAL_CODECONE:void 0}fromBuffer(bytes,offset=0){return offset=super.fromBuffer(bytes,offset),this.output=new outputs_1.NFTTransferOutput,this.output.fromBuffer(bytes,offset)}toBuffer(){const superbuff=super.toBuffer(),outbuff=this.output.toBuffer(),bsize=superbuff.length+outbuff.length,barr=[superbuff,outbuff];return buffer_1.Buffer.concat(barr,bsize)}toString(){return bintools.bufferToB58(this.toBuffer())}}exports.NFTTransferOperation=NFTTransferOperation;class UTXOID extends nbytes_1.NBytes{constructor(){super(),this._typeName="UTXOID",this._typeID=void 0,this.bytes=buffer_1.Buffer.alloc(36),this.bsize=36}toString(){return bintools.cb58Encode(this.toBuffer())}fromString(utxoid){const utxoidbuff=bintools.b58ToBuffer(utxoid);if(40===utxoidbuff.length&&bintools.validateChecksum(utxoidbuff)){const newbuff=bintools.copyFrom(utxoidbuff,0,utxoidbuff.length-4);36===newbuff.length&&(this.bytes=newbuff)}else{if(40===utxoidbuff.length)throw new errors_1.ChecksumError("Error - UTXOID.fromString: invalid checksum on address");if(36!==utxoidbuff.length)throw new errors_1.AddressError("Error - UTXOID.fromString: invalid address");this.bytes=utxoidbuff}return this.getSize()}clone(){const newbase=new UTXOID;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new UTXOID}}exports.UTXOID=UTXOID,UTXOID.comparator=()=>(a,b)=>buffer_1.Buffer.compare(a.toBuffer(),b.toBuffer())},6578:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NFTTransferOutput=exports.NFTMintOutput=exports.SECPMintOutput=exports.SECPTransferOutput=exports.NFTOutput=exports.AmountOutput=exports.TransferableOutput=exports.SelectOutputClass=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6667),output_1=__webpack_require__(8556),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();exports.SelectOutputClass=(outputid,...args)=>{if(outputid===constants_1.AVMConstants.SECPXFEROUTPUTID||outputid===constants_1.AVMConstants.SECPXFEROUTPUTID_CODECONE)return new SECPTransferOutput(...args);if(outputid===constants_1.AVMConstants.SECPMINTOUTPUTID||outputid===constants_1.AVMConstants.SECPMINTOUTPUTID_CODECONE)return new SECPMintOutput(...args);if(outputid===constants_1.AVMConstants.NFTMINTOUTPUTID||outputid===constants_1.AVMConstants.NFTMINTOUTPUTID_CODECONE)return new NFTMintOutput(...args);if(outputid===constants_1.AVMConstants.NFTXFEROUTPUTID||outputid===constants_1.AVMConstants.NFTXFEROUTPUTID_CODECONE)return new NFTTransferOutput(...args);throw new errors_1.OutputIdError("Error - SelectOutputClass: unknown outputid "+outputid)};class TransferableOutput extends output_1.StandardTransferableOutput{constructor(){super(...arguments),this._typeName="TransferableOutput",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.output=(0,exports.SelectOutputClass)(fields.output._typeID),this.output.deserialize(fields.output,encoding)}fromBuffer(bytes,offset=0){this.assetID=bintools.copyFrom(bytes,offset,offset+constants_1.AVMConstants.ASSETIDLEN),offset+=constants_1.AVMConstants.ASSETIDLEN;const outputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.output=(0,exports.SelectOutputClass)(outputid),this.output.fromBuffer(bytes,offset)}}exports.TransferableOutput=TransferableOutput;class AmountOutput extends output_1.StandardAmountOutput{constructor(){super(...arguments),this._typeName="AmountOutput",this._typeID=void 0}makeTransferable(assetID){return new TransferableOutput(assetID,this)}select(id,...args){return(0,exports.SelectOutputClass)(id,...args)}}exports.AmountOutput=AmountOutput;class NFTOutput extends output_1.BaseNFTOutput{constructor(){super(...arguments),this._typeName="NFTOutput",this._typeID=void 0}makeTransferable(assetID){return new TransferableOutput(assetID,this)}select(id,...args){return(0,exports.SelectOutputClass)(id,...args)}}exports.NFTOutput=NFTOutput;class SECPTransferOutput extends AmountOutput{constructor(){super(...arguments),this._typeName="SECPTransferOutput",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.SECPXFEROUTPUTID:constants_1.AVMConstants.SECPXFEROUTPUTID_CODECONE}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - SECPTransferOutput.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.SECPXFEROUTPUTID:constants_1.AVMConstants.SECPXFEROUTPUTID_CODECONE}getOutputID(){return this._typeID}create(...args){return new SECPTransferOutput(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}}exports.SECPTransferOutput=SECPTransferOutput;class SECPMintOutput extends output_1.Output{constructor(){super(...arguments),this._typeName="SECPMintOutput",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.SECPMINTOUTPUTID:constants_1.AVMConstants.SECPMINTOUTPUTID_CODECONE}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - SECPMintOutput.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.SECPMINTOUTPUTID:constants_1.AVMConstants.SECPMINTOUTPUTID_CODECONE}getOutputID(){return this._typeID}makeTransferable(assetID){return new TransferableOutput(assetID,this)}create(...args){return new SECPMintOutput(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}select(id,...args){return(0,exports.SelectOutputClass)(id,...args)}}exports.SECPMintOutput=SECPMintOutput;class NFTMintOutput extends NFTOutput{constructor(groupID,addresses,locktime,threshold){super(addresses,locktime,threshold),this._typeName="NFTMintOutput",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.NFTMINTOUTPUTID:constants_1.AVMConstants.NFTMINTOUTPUTID_CODECONE,void 0!==groupID&&this.groupID.writeUInt32BE(groupID,0)}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - NFTMintOutput.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.NFTMINTOUTPUTID:constants_1.AVMConstants.NFTMINTOUTPUTID_CODECONE}getOutputID(){return this._typeID}fromBuffer(utxobuff,offset=0){return this.groupID=bintools.copyFrom(utxobuff,offset,offset+4),offset+=4,super.fromBuffer(utxobuff,offset)}toBuffer(){let superbuff=super.toBuffer(),bsize=this.groupID.length+superbuff.length,barr=[this.groupID,superbuff];return buffer_1.Buffer.concat(barr,bsize)}create(...args){return new NFTMintOutput(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}}exports.NFTMintOutput=NFTMintOutput;class NFTTransferOutput extends NFTOutput{constructor(groupID,payload,addresses,locktime,threshold){super(addresses,locktime,threshold),this._typeName="NFTTransferOutput",this._codecID=constants_1.AVMConstants.LATESTCODEC,this._typeID=0===this._codecID?constants_1.AVMConstants.NFTXFEROUTPUTID:constants_1.AVMConstants.NFTXFEROUTPUTID_CODECONE,this.sizePayload=buffer_1.Buffer.alloc(4),this.getPayload=()=>bintools.copyFrom(this.payload),this.getPayloadBuffer=()=>buffer_1.Buffer.concat([bintools.copyFrom(this.sizePayload),bintools.copyFrom(this.payload)]),void 0!==groupID&&void 0!==payload&&(this.groupID.writeUInt32BE(groupID,0),this.sizePayload.writeUInt32BE(payload.length,0),this.payload=bintools.copyFrom(payload,0,payload.length))}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{payload:serialization.encoder(this.payload,encoding,"Buffer","hex",this.payload.length)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.payload=serialization.decoder(fields.payload,encoding,"hex","Buffer"),this.sizePayload=buffer_1.Buffer.alloc(4),this.sizePayload.writeUInt32BE(this.payload.length,0)}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new errors_1.CodecIdError("Error - NFTTransferOutput.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.NFTXFEROUTPUTID:constants_1.AVMConstants.NFTXFEROUTPUTID_CODECONE}getOutputID(){return this._typeID}fromBuffer(utxobuff,offset=0){this.groupID=bintools.copyFrom(utxobuff,offset,offset+4),offset+=4,this.sizePayload=bintools.copyFrom(utxobuff,offset,offset+4);let psize=this.sizePayload.readUInt32BE(0);return offset+=4,this.payload=bintools.copyFrom(utxobuff,offset,offset+psize),offset+=psize,super.fromBuffer(utxobuff,offset)}toBuffer(){const superbuff=super.toBuffer(),bsize=this.groupID.length+this.sizePayload.length+this.payload.length+superbuff.length;this.sizePayload.writeUInt32BE(this.payload.length,0);const barr=[this.groupID,this.sizePayload,this.payload,superbuff];return buffer_1.Buffer.concat(barr,bsize)}create(...args){return new NFTTransferOutput(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}}exports.NFTTransferOutput=NFTTransferOutput},2577:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Tx=exports.UnsignedTx=exports.SelectTxClass=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6667),credentials_1=__webpack_require__(2819),tx_1=__webpack_require__(613),create_hash_1=__importDefault(__webpack_require__(3482)),basetx_1=__webpack_require__(5662),createassettx_1=__webpack_require__(1926),operationtx_1=__webpack_require__(2710),importtx_1=__webpack_require__(1952),exporttx_1=__webpack_require__(1239),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance();exports.SelectTxClass=(txtype,...args)=>{if(txtype===constants_1.AVMConstants.BASETX)return new basetx_1.BaseTx(...args);if(txtype===constants_1.AVMConstants.CREATEASSETTX)return new createassettx_1.CreateAssetTx(...args);if(txtype===constants_1.AVMConstants.OPERATIONTX)return new operationtx_1.OperationTx(...args);if(txtype===constants_1.AVMConstants.IMPORTTX)return new importtx_1.ImportTx(...args);if(txtype===constants_1.AVMConstants.EXPORTTX)return new exporttx_1.ExportTx(...args);throw new errors_1.TransactionError("Error - SelectTxClass: unknown txtype")};class UnsignedTx extends tx_1.StandardUnsignedTx{constructor(){super(...arguments),this._typeName="UnsignedTx",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.transaction=(0,exports.SelectTxClass)(fields.transaction._typeID),this.transaction.deserialize(fields.transaction,encoding)}getTransaction(){return this.transaction}fromBuffer(bytes,offset=0){this.codecID=bintools.copyFrom(bytes,offset,offset+2).readUInt16BE(0),offset+=2;const txtype=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.transaction=(0,exports.SelectTxClass)(txtype),this.transaction.fromBuffer(bytes,offset)}sign(kc){const txbuff=this.toBuffer(),msg=buffer_1.Buffer.from((0,create_hash_1.default)("sha256").update(txbuff).digest()),creds=this.transaction.sign(msg,kc);return new Tx(this,creds)}}exports.UnsignedTx=UnsignedTx;class Tx extends tx_1.StandardTx{constructor(){super(...arguments),this._typeName="Tx",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.unsignedTx=new UnsignedTx,this.unsignedTx.deserialize(fields.unsignedTx,encoding),this.credentials=[];for(let i=0;i<fields.credentials.length;i++){const cred=(0,credentials_1.SelectCredentialClass)(fields.credentials[`${i}`]._typeID);cred.deserialize(fields.credentials[`${i}`],encoding),this.credentials.push(cred)}}fromBuffer(bytes,offset=0){this.unsignedTx=new UnsignedTx,offset=this.unsignedTx.fromBuffer(bytes,offset);const numcreds=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4,this.credentials=[];for(let i=0;i<numcreds;i++){const credid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4;const cred=(0,credentials_1.SelectCredentialClass)(credid);offset=cred.fromBuffer(bytes,offset),this.credentials.push(cred)}return offset}}exports.Tx=Tx},3140:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UTXOSet=exports.AssetAmountDestination=exports.UTXO=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),bn_js_1=__importDefault(__webpack_require__(3550)),outputs_1=__webpack_require__(6578),constants_1=__webpack_require__(6667),tx_1=__webpack_require__(2577),inputs_1=__webpack_require__(4935),ops_1=__webpack_require__(4726),helperfunctions_1=__webpack_require__(5554),initialstates_1=__webpack_require__(2951),utxos_1=__webpack_require__(7612),createassettx_1=__webpack_require__(1926),operationtx_1=__webpack_require__(2710),basetx_1=__webpack_require__(5662),exporttx_1=__webpack_require__(1239),importtx_1=__webpack_require__(1952),constants_2=__webpack_require__(8779),assetamount_1=__webpack_require__(6305),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class UTXO extends utxos_1.StandardUTXO{constructor(){super(...arguments),this._typeName="UTXO",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.output=(0,outputs_1.SelectOutputClass)(fields.output._typeID),this.output.deserialize(fields.output,encoding)}fromBuffer(bytes,offset=0){this.codecID=bintools.copyFrom(bytes,offset,offset+2),offset+=2,this.txid=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.outputidx=bintools.copyFrom(bytes,offset,offset+4),offset+=4,this.assetID=bintools.copyFrom(bytes,offset,offset+32),offset+=32;const outputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.output=(0,outputs_1.SelectOutputClass)(outputid),this.output.fromBuffer(bytes,offset)}fromString(serialized){return this.fromBuffer(bintools.cb58Decode(serialized))}toString(){return bintools.cb58Encode(this.toBuffer())}clone(){const utxo=new UTXO;return utxo.fromBuffer(this.toBuffer()),utxo}create(codecID=constants_1.AVMConstants.LATESTCODEC,txid,outputidx,assetID,output){return new UTXO(codecID,txid,outputidx,assetID,output)}}exports.UTXO=UTXO;class AssetAmountDestination extends assetamount_1.StandardAssetAmountDestination{}exports.AssetAmountDestination=AssetAmountDestination;class UTXOSet extends utxos_1.StandardUTXOSet{constructor(){super(...arguments),this._typeName="UTXOSet",this._typeID=void 0,this.getMinimumSpendable=(aad,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>{const utxoArray=this.getAllUTXOs(),outids={};for(let i=0;i<utxoArray.length&&!aad.canComplete();i++){const u=utxoArray[`${i}`],assetKey=u.getAssetID().toString("hex"),fromAddresses=aad.getSenders();if(u.getOutput()instanceof outputs_1.AmountOutput&&aad.assetExists(assetKey)&&u.getOutput().meetsThreshold(fromAddresses,asOf)){const am=aad.getAssetAmount(assetKey);if(am.isFinished()){if(aad.assetExists(assetKey)&&!(u.getOutput()instanceof outputs_1.AmountOutput))continue}else{const uout=u.getOutput();outids[`${assetKey}`]=uout.getOutputID();const amount=uout.getAmount();am.spendAmount(amount);const txid=u.getTxID(),outputidx=u.getOutputIdx(),input=new inputs_1.SECPTransferInput(amount),xferin=new inputs_1.TransferableInput(txid,outputidx,u.getAssetID(),input),spenders=uout.getSpenders(fromAddresses,asOf);for(let j=0;j<spenders.length;j++){const idx=uout.getAddressIdx(spenders[`${j}`]);if(-1===idx)throw new errors_1.AddressError(`Error - UTXOSet.getMinimumSpendable: no such address in output: ${spenders[`${j}`]}`);xferin.getInput().addSignatureIdx(idx,spenders[`${j}`])}aad.addInput(xferin)}}}if(!aad.canComplete())return new errors_1.InsufficientFundsError("Error - UTXOSet.getMinimumSpendable: insufficient funds to create the transaction");const amounts=aad.getAmounts(),zero=new bn_js_1.default(0);for(let i=0;i<amounts.length;i++){const assetKey=amounts[`${i}`].getAssetIDString(),amount=amounts[`${i}`].getAmount();if(amount.gt(zero)){const spendout=(0,outputs_1.SelectOutputClass)(outids[`${assetKey}`],amount,aad.getDestinations(),locktime,threshold),xferout=new outputs_1.TransferableOutput(amounts[`${i}`].getAssetID(),spendout);aad.addOutput(xferout)}const change=amounts[`${i}`].getChange();if(change.gt(zero)){const changeout=(0,outputs_1.SelectOutputClass)(outids[`${assetKey}`],change,aad.getChangeAddresses()),chgxferout=new outputs_1.TransferableOutput(amounts[`${i}`].getAssetID(),changeout);aad.addChange(chgxferout)}}},this.buildBaseTx=(networkID,blockchainID,amount,assetID,toAddresses,fromAddresses,changeAddresses,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>{if(threshold>toAddresses.length)throw new errors_1.ThresholdError("Error - UTXOSet.buildBaseTx: threshold is greater than number of addresses");void 0===changeAddresses&&(changeAddresses=toAddresses),void 0===feeAssetID&&(feeAssetID=assetID);const zero=new bn_js_1.default(0);if(amount.eq(zero))return;const aad=new AssetAmountDestination(toAddresses,fromAddresses,changeAddresses);assetID.toString("hex")===feeAssetID.toString("hex")?aad.addAssetAmount(assetID,amount,fee):(aad.addAssetAmount(assetID,amount,zero),this._feeCheck(fee,feeAssetID)&&aad.addAssetAmount(feeAssetID,zero,fee));let ins=[],outs=[];const success=this.getMinimumSpendable(aad,asOf,locktime,threshold);if(void 0!==success)throw success;ins=aad.getInputs(),outs=aad.getAllOutputs();const baseTx=new basetx_1.BaseTx(networkID,blockchainID,outs,ins,memo);return new tx_1.UnsignedTx(baseTx)},this.buildCreateAssetTx=(networkID,blockchainID,fromAddresses,changeAddresses,initialState,name,symbol,denomination,mintOutputs,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)())=>{const zero=new bn_js_1.default(0);let ins=[],outs=[];if(this._feeCheck(fee,feeAssetID)){const aad=new AssetAmountDestination(fromAddresses,fromAddresses,changeAddresses);aad.addAssetAmount(feeAssetID,zero,fee);const success=this.getMinimumSpendable(aad,asOf);if(void 0!==success)throw success;ins=aad.getInputs(),outs=aad.getAllOutputs()}if(void 0!==mintOutputs)for(let i=0;i<mintOutputs.length;i++){if(!(mintOutputs[`${i}`]instanceof outputs_1.SECPMintOutput))throw new errors_1.SECPMintOutputError("Error - UTXOSet.buildCreateAssetTx: A submitted mintOutput was not of type SECPMintOutput");initialState.addOutput(mintOutputs[`${i}`])}let CAtx=new createassettx_1.CreateAssetTx(networkID,blockchainID,outs,ins,memo,name,symbol,denomination,initialState);return new tx_1.UnsignedTx(CAtx)},this.buildSECPMintTx=(networkID,blockchainID,mintOwner,transferOwner,fromAddresses,changeAddresses,mintUTXOID,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)())=>{const zero=new bn_js_1.default(0);let ins=[],outs=[];if(this._feeCheck(fee,feeAssetID)){const aad=new AssetAmountDestination(fromAddresses,fromAddresses,changeAddresses);aad.addAssetAmount(feeAssetID,zero,fee);const success=this.getMinimumSpendable(aad,asOf);if(void 0!==success)throw success;ins=aad.getInputs(),outs=aad.getAllOutputs()}let ops=[],mintOp=new ops_1.SECPMintOperation(mintOwner,transferOwner),utxo=this.getUTXO(mintUTXOID);if(void 0===utxo)throw new errors_1.UTXOError("Error - UTXOSet.buildSECPMintTx: UTXOID not found");if(utxo.getOutput().getOutputID()!==constants_1.AVMConstants.SECPMINTOUTPUTID)throw new errors_1.SECPMintOutputError("Error - UTXOSet.buildSECPMintTx: UTXO is not a SECPMINTOUTPUTID");let out=utxo.getOutput(),spenders=out.getSpenders(fromAddresses,asOf);for(let j=0;j<spenders.length;j++){let idx=out.getAddressIdx(spenders[`${j}`]);if(-1==idx)throw new Error("Error - UTXOSet.buildSECPMintTx: no such address in output");mintOp.addSignatureIdx(idx,spenders[`${j}`])}let transferableOperation=new ops_1.TransferableOperation(utxo.getAssetID(),[`${mintUTXOID}`],mintOp);ops.push(transferableOperation);let operationTx=new operationtx_1.OperationTx(networkID,blockchainID,outs,ins,memo,ops);return new tx_1.UnsignedTx(operationTx)},this.buildCreateNFTAssetTx=(networkID,blockchainID,fromAddresses,changeAddresses,minterSets,name,symbol,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime)=>{const zero=new bn_js_1.default(0);let ins=[],outs=[];if(this._feeCheck(fee,feeAssetID)){const aad=new AssetAmountDestination(fromAddresses,fromAddresses,changeAddresses);aad.addAssetAmount(feeAssetID,zero,fee);const success=this.getMinimumSpendable(aad,asOf);if(void 0!==success)throw success;ins=aad.getInputs(),outs=aad.getAllOutputs()}let initialState=new initialstates_1.InitialStates;for(let i=0;i<minterSets.length;i++){let nftMintOutput=new outputs_1.NFTMintOutput(i,minterSets[`${i}`].getMinters(),locktime,minterSets[`${i}`].getThreshold());initialState.addOutput(nftMintOutput,constants_1.AVMConstants.NFTFXID)}let CAtx=new createassettx_1.CreateAssetTx(networkID,blockchainID,outs,ins,memo,name,symbol,0,initialState);return new tx_1.UnsignedTx(CAtx)},this.buildCreateNFTMintTx=(networkID,blockchainID,owners,fromAddresses,changeAddresses,utxoids,groupID=0,payload,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)())=>{const zero=new bn_js_1.default(0);let ins=[],outs=[];if(this._feeCheck(fee,feeAssetID)){const aad=new AssetAmountDestination(fromAddresses,fromAddresses,changeAddresses);aad.addAssetAmount(feeAssetID,zero,fee);const success=this.getMinimumSpendable(aad,asOf);if(void 0!==success)throw success;ins=aad.getInputs(),outs=aad.getAllOutputs()}let ops=[],nftMintOperation=new ops_1.NFTMintOperation(groupID,payload,owners);for(let i=0;i<utxoids.length;i++){let utxo=this.getUTXO(utxoids[`${i}`]),out=utxo.getOutput(),spenders=out.getSpenders(fromAddresses,asOf);for(let j=0;j<spenders.length;j++){let idx;if(idx=out.getAddressIdx(spenders[`${j}`]),-1==idx)throw new errors_1.AddressError("Error - UTXOSet.buildCreateNFTMintTx: no such address in output");nftMintOperation.addSignatureIdx(idx,spenders[`${j}`])}let transferableOperation=new ops_1.TransferableOperation(utxo.getAssetID(),utxoids,nftMintOperation);ops.push(transferableOperation)}let operationTx=new operationtx_1.OperationTx(networkID,blockchainID,outs,ins,memo,ops);return new tx_1.UnsignedTx(operationTx)},this.buildNFTTransferTx=(networkID,blockchainID,toAddresses,fromAddresses,changeAddresses,utxoids,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>{const zero=new bn_js_1.default(0);let ins=[],outs=[];if(this._feeCheck(fee,feeAssetID)){const aad=new AssetAmountDestination(fromAddresses,fromAddresses,changeAddresses);aad.addAssetAmount(feeAssetID,zero,fee);const success=this.getMinimumSpendable(aad,asOf);if(void 0!==success)throw success;ins=aad.getInputs(),outs=aad.getAllOutputs()}const ops=[];for(let i=0;i<utxoids.length;i++){const utxo=this.getUTXO(utxoids[`${i}`]),out=utxo.getOutput(),spenders=out.getSpenders(fromAddresses,asOf),outbound=new outputs_1.NFTTransferOutput(out.getGroupID(),out.getPayload(),toAddresses,locktime,threshold),op=new ops_1.NFTTransferOperation(outbound);for(let j=0;j<spenders.length;j++){const idx=out.getAddressIdx(spenders[`${j}`]);if(-1===idx)throw new errors_1.AddressError(`Error - UTXOSet.buildNFTTransferTx: no such address in output: ${spenders[`${j}`]}`);op.addSignatureIdx(idx,spenders[`${j}`])}const xferop=new ops_1.TransferableOperation(utxo.getAssetID(),[utxoids[`${i}`]],op);ops.push(xferop)}const OpTx=new operationtx_1.OperationTx(networkID,blockchainID,outs,ins,memo,ops);return new tx_1.UnsignedTx(OpTx)},this.buildImportTx=(networkID,blockchainID,toAddresses,fromAddresses,changeAddresses,atomics,sourceChain,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>{const zero=new bn_js_1.default(0);let ins=[],outs=[];void 0===fee&&(fee=zero.clone());const importIns=[];let feepaid=new bn_js_1.default(0),feeAssetStr=feeAssetID.toString("hex");for(let i=0;i<atomics.length;i++){const utxo=atomics[`${i}`],assetID=utxo.getAssetID(),output=utxo.getOutput();let amt=output.getAmount().clone(),infeeamount=amt.clone(),assetStr=assetID.toString("hex");void 0!==feeAssetID&&fee.gt(zero)&&feepaid.lt(fee)&&assetStr===feeAssetStr&&(feepaid=feepaid.add(infeeamount),feepaid.gt(fee)?(infeeamount=feepaid.sub(fee),feepaid=fee.clone()):infeeamount=zero.clone());const txid=utxo.getTxID(),outputidx=utxo.getOutputIdx(),input=new inputs_1.SECPTransferInput(amt),xferin=new inputs_1.TransferableInput(txid,outputidx,assetID,input),from=output.getAddresses(),spenders=output.getSpenders(from,asOf);for(let j=0;j<spenders.length;j++){const idx=output.getAddressIdx(spenders[`${j}`]);if(-1===idx)throw new errors_1.AddressError(`Error - UTXOSet.buildImportTx: no such address in output: ${spenders[`${j}`]}`);xferin.getInput().addSignatureIdx(idx,spenders[`${j}`])}if(importIns.push(xferin),infeeamount.gt(zero)){const spendout=(0,outputs_1.SelectOutputClass)(output.getOutputID(),infeeamount,toAddresses,locktime,threshold),xferout=new outputs_1.TransferableOutput(assetID,spendout);outs.push(xferout)}}let feeRemaining=fee.sub(feepaid);if(feeRemaining.gt(zero)&&this._feeCheck(feeRemaining,feeAssetID)){const aad=new AssetAmountDestination(toAddresses,fromAddresses,changeAddresses);aad.addAssetAmount(feeAssetID,zero,feeRemaining);const success=this.getMinimumSpendable(aad,asOf,locktime,threshold);if(void 0!==success)throw success;ins=aad.getInputs(),outs=aad.getAllOutputs()}const importTx=new importtx_1.ImportTx(networkID,blockchainID,outs,ins,memo,sourceChain,importIns);return new tx_1.UnsignedTx(importTx)},this.buildExportTx=(networkID,blockchainID,amount,assetID,toAddresses,fromAddresses,changeAddresses,destinationChain,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>{let ins=[],outs=[],exportouts=[];void 0===changeAddresses&&(changeAddresses=toAddresses);const zero=new bn_js_1.default(0);if(amount.eq(zero))return;void 0===feeAssetID&&(feeAssetID=assetID),void 0===destinationChain&&(destinationChain=bintools.cb58Decode(constants_2.PlatformChainID));const aad=new AssetAmountDestination(toAddresses,fromAddresses,changeAddresses);assetID.toString("hex")===feeAssetID.toString("hex")?aad.addAssetAmount(assetID,amount,fee):(aad.addAssetAmount(assetID,amount,zero),this._feeCheck(fee,feeAssetID)&&aad.addAssetAmount(feeAssetID,zero,fee));const success=this.getMinimumSpendable(aad,asOf,locktime,threshold);if(void 0!==success)throw success;ins=aad.getInputs(),outs=aad.getChangeOutputs(),exportouts=aad.getOutputs();const exportTx=new exporttx_1.ExportTx(networkID,blockchainID,outs,ins,memo,destinationChain,exportouts);return new tx_1.UnsignedTx(exportTx)}}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding);let utxos={};for(let utxoid in fields.utxos){let utxoidCleaned=serialization.decoder(utxoid,encoding,"base58","base58");utxos[`${utxoidCleaned}`]=new UTXO,utxos[`${utxoidCleaned}`].deserialize(fields.utxos[`${utxoid}`],encoding)}let addressUTXOs={};for(let address in fields.addressUTXOs){let addressCleaned=serialization.decoder(address,encoding,"cb58","hex"),utxobalance={};for(let utxoid in fields.addressUTXOs[`${address}`]){utxobalance[`${serialization.decoder(utxoid,encoding,"base58","base58")}`]=serialization.decoder(fields.addressUTXOs[`${address}`][`${utxoid}`],encoding,"decimalString","BN")}addressUTXOs[`${addressCleaned}`]=utxobalance}this.utxos=utxos,this.addressUTXOs=addressUTXOs}parseUTXO(utxo){const utxovar=new UTXO;if("string"==typeof utxo)utxovar.fromBuffer(bintools.cb58Decode(utxo));else{if(!(utxo instanceof UTXO))throw new errors_1.UTXOError("Error - UTXO.parseUTXO: utxo parameter is not a UTXO or string");utxovar.fromBuffer(utxo.toBuffer())}return utxovar}create(...args){return new UTXOSet}clone(){const newset=this.create(),allUTXOs=this.getAllUTXOs();return newset.addArray(allUTXOs),newset}_feeCheck(fee,feeAssetID){return void 0!==fee&&void 0!==feeAssetID&&fee.gt(new bn_js_1.default(0))&&feeAssetID instanceof buffer_1.Buffer}}exports.UTXOSet=UTXOSet},1485:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Vertex=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6667),tx_1=__webpack_require__(2577),utils_1=__webpack_require__(338),bn_js_1=__importDefault(__webpack_require__(3550)),bintools=bintools_1.default.getInstance();class Vertex extends utils_1.Serializable{constructor(networkID=utils_1.DefaultNetworkID,blockchainID="2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",height=new bn_js_1.default(0),epoch=0,parentIDs=[],txs=[],restrictions=[]){super(),this._typeName="Vertex",this._codecID=constants_1.AVMConstants.LATESTCODEC,this.networkID=networkID,this.blockchainID=bintools.cb58Decode(blockchainID),this.height=height,this.epoch=epoch,this.parentIDs=parentIDs,this.numParentIDs=parentIDs.length,this.txs=txs,this.numTxs=txs.length,this.restrictions=restrictions,this.numRestrictions=restrictions.length}getNetworkID(){return this.networkID}getBlockchainID(){return bintools.cb58Encode(this.blockchainID)}getHeight(){return this.height}getEpoch(){return this.epoch}getParentIDs(){return this.parentIDs}getTxs(){return this.txs}getRestrictions(){return this.restrictions}setCodecID(codecID){if(0!==codecID&&1!==codecID)throw new utils_1.CodecIdError("Error - Vertex.setCodecID: invalid codecID. Valid codecIDs are 0 and 1.");this._codecID=codecID,this._typeID=0===this._codecID?constants_1.AVMConstants.VERTEX:constants_1.AVMConstants.VERTEX_CODECONE}fromBuffer(bytes,offset=0){offset+=2,this.blockchainID=bintools.copyFrom(bytes,offset,offset+32),offset+=32;const h=bintools.copyFrom(bytes,offset,offset+8);this.height=bintools.fromBufferToBN(h),offset+=8;const e=bintools.copyFrom(bytes,offset,offset+4);this.epoch=e.readInt32BE(0),offset+=4;const nPIDs=bintools.copyFrom(bytes,offset,offset+4);this.numParentIDs=nPIDs.readInt32BE(0),offset+=4;for(let i=0;i<this.numParentIDs;i++){const parentID=bintools.copyFrom(bytes,offset,offset+32);offset+=32,this.parentIDs.push(parentID)}const nTxs=bintools.copyFrom(bytes,offset,offset+4);this.numTxs=nTxs.readInt32BE(0),offset+=8;for(let i=0;i<this.numTxs;i++){const tx=new tx_1.Tx;offset+=tx.fromBuffer(bintools.copyFrom(bytes,offset)),this.txs.push(tx)}if(bytes.byteLength>offset&&bytes.byteLength-offset>4){const nRs=bintools.copyFrom(bytes,offset,offset+4);this.numRestrictions=nRs.readInt32BE(0),offset+=4;for(let i=0;i<this.numRestrictions;i++){const tx=bintools.copyFrom(bytes,offset,offset+32);offset+=32,this.restrictions.push(tx)}}return offset}toBuffer(){const codec=this.getCodecID(),codecBuf=buffer_1.Buffer.alloc(2);codecBuf.writeUInt16BE(codec,0);const epochBuf=buffer_1.Buffer.alloc(4);epochBuf.writeInt32BE(this.epoch,0);const numParentIDsBuf=buffer_1.Buffer.alloc(4);numParentIDsBuf.writeInt32BE(this.numParentIDs,0);let barr=[codecBuf,this.blockchainID,bintools.fromBNToBuffer(this.height,8),epochBuf,numParentIDsBuf];this.parentIDs.forEach((parentID=>{barr.push(parentID)}));const txs=this.getTxs(),numTxs=buffer_1.Buffer.alloc(4);numTxs.writeUInt32BE(txs.length,0),barr.push(numTxs);let size=0;const txSize=buffer_1.Buffer.alloc(4);return txs.forEach((tx=>{const b=tx.toBuffer();size+=b.byteLength})),txSize.writeUInt32BE(size,0),barr.push(txSize),txs.forEach((tx=>{const b=tx.toBuffer();barr.push(b)})),buffer_1.Buffer.concat(barr)}clone(){let vertex=new Vertex;return vertex.fromBuffer(this.toBuffer()),vertex}}exports.Vertex=Vertex},9084:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.EVMAPI=void 0;const buffer_1=__webpack_require__(8764),bn_js_1=__importDefault(__webpack_require__(3550)),jrpcapi_1=__webpack_require__(5912),bintools_1=__importDefault(__webpack_require__(903)),utxos_1=__webpack_require__(8643),keychain_1=__webpack_require__(1398),constants_1=__webpack_require__(8779),tx_1=__webpack_require__(5544),constants_2=__webpack_require__(6736),inputs_1=__webpack_require__(452),outputs_1=__webpack_require__(1179),exporttx_1=__webpack_require__(72),errors_1=__webpack_require__(611),utils_1=__webpack_require__(338),bintools=bintools_1.default.getInstance(),serialization=utils_1.Serialization.getInstance();class EVMAPI extends jrpcapi_1.JRPCAPI{constructor(core,baseURL="/ext/bc/C/avax",blockchainID=""){super(core,baseURL),this.keychain=new keychain_1.KeyChain("",""),this.blockchainID="",this.blockchainAlias=void 0,this.AVAXAssetID=void 0,this.txFee=void 0,this.getBlockchainAlias=()=>{if(void 0===this.blockchainAlias){const netID=this.core.getNetworkID();return netID in constants_1.Defaults.network&&this.blockchainID in constants_1.Defaults.network[`${netID}`]?(this.blockchainAlias=constants_1.Defaults.network[`${netID}`][this.blockchainID].alias,this.blockchainAlias):void 0}return this.blockchainAlias},this.setBlockchainAlias=alias=>{this.blockchainAlias=alias},this.getBlockchainID=()=>this.blockchainID,this.refreshBlockchainID=blockchainID=>{const netID=this.core.getNetworkID();return void 0===blockchainID&&void 0!==constants_1.Defaults.network[`${netID}`]?(this.blockchainID=constants_1.Defaults.network[`${netID}`].C.blockchainID,!0):"string"==typeof blockchainID&&(this.blockchainID=blockchainID,!0)},this.parseAddress=addr=>{const alias=this.getBlockchainAlias(),blockchainID=this.getBlockchainID();return bintools.parseAddress(addr,blockchainID,alias,constants_2.EVMConstants.ADDRESSLENGTH)},this.addressFromBuffer=address=>{const chainID=this.getBlockchainAlias()?this.getBlockchainAlias():this.getBlockchainID();return serialization.bufferToType(address,"bech32",this.core.getHRP(),chainID)},this.getAssetDescription=assetID=>__awaiter(this,void 0,void 0,(function*(){let asset;asset="string"!=typeof assetID?bintools.cb58Encode(assetID):assetID;const params={assetID:asset},tmpBaseURL=this.getBaseURL();this.setBaseURL("/ext/bc/X");const response=yield this.callMethod("avm.getAssetDescription",params);return this.setBaseURL(tmpBaseURL),{name:response.data.result.name,symbol:response.data.result.symbol,assetID:bintools.cb58Decode(response.data.result.assetID),denomination:parseInt(response.data.result.denomination,10)}})),this.getAVAXAssetID=(refresh=!1)=>__awaiter(this,void 0,void 0,(function*(){if(void 0===this.AVAXAssetID||refresh){const asset=yield this.getAssetDescription(constants_1.PrimaryAssetAlias);this.AVAXAssetID=asset.assetID}return this.AVAXAssetID})),this.setAVAXAssetID=avaxAssetID=>{"string"==typeof avaxAssetID&&(avaxAssetID=bintools.cb58Decode(avaxAssetID)),this.AVAXAssetID=avaxAssetID},this.getDefaultTxFee=()=>this.core.getNetworkID()in constants_1.Defaults.network?new bn_js_1.default(constants_1.Defaults.network[this.core.getNetworkID()].C.txFee):new bn_js_1.default(0),this.getAssetBalance=(hexAddress,blockHeight,assetID)=>__awaiter(this,void 0,void 0,(function*(){const params=[hexAddress,blockHeight,assetID];return(yield this.callMethod("eth_getAssetBalance",params,"ext/bc/C/rpc")).data})),this.getAtomicTxStatus=txID=>__awaiter(this,void 0,void 0,(function*(){const params={txID},response=yield this.callMethod("avax.getAtomicTxStatus",params);return response.data.result.status?response.data.result.status:response.data.result})),this.getAtomicTx=txID=>__awaiter(this,void 0,void 0,(function*(){const params={txID};return(yield this.callMethod("avax.getAtomicTx",params)).data.result.tx})),this.getTxFee=()=>(void 0===this.txFee&&(this.txFee=this.getDefaultTxFee()),this.txFee),this.export=(username,password,to,amount,assetID)=>__awaiter(this,void 0,void 0,(function*(){const params={to,amount:amount.toString(10),username,password,assetID},response=yield this.callMethod("avax.export",params);return response.data.result.txID?response.data.result.txID:response.data.result})),this.exportAVAX=(username,password,to,amount)=>__awaiter(this,void 0,void 0,(function*(){const params={to,amount:amount.toString(10),username,password},response=yield this.callMethod("avax.exportAVAX",params);return response.data.result.txID?response.data.result.txID:response.data.result})),this.getUTXOs=(addresses,sourceChain,limit=0,startIndex,encoding="hex")=>__awaiter(this,void 0,void 0,(function*(){"string"==typeof addresses&&(addresses=[addresses]);const params={addresses,limit,encoding};void 0!==startIndex&&startIndex&&(params.startIndex=startIndex),void 0!==sourceChain&&(params.sourceChain=sourceChain);const response=yield this.callMethod("avax.getUTXOs",params),utxos=new utxos_1.UTXOSet,data=response.data.result.utxos;if(data.length>0&&"0x"===data[0].substring(0,2)){const cb58Strs=[];data.forEach((str=>{cb58Strs.push(bintools.cb58Encode(new buffer_1.Buffer(str.slice(2),"hex")))})),utxos.addArray(cb58Strs,!1)}else utxos.addArray(data,!1);return response.data.result.utxos=utxos,response.data.result})),this.import=(username,password,to,sourceChain)=>__awaiter(this,void 0,void 0,(function*(){const params={to,sourceChain,username,password},response=yield this.callMethod("avax.import",params);return response.data.result.txID?response.data.result.txID:response.data.result})),this.importAVAX=(username,password,to,sourceChain)=>__awaiter(this,void 0,void 0,(function*(){const params={to,sourceChain,username,password},response=yield this.callMethod("avax.importAVAX",params);return response.data.result.txID?response.data.result.txID:response.data.result})),this.importKey=(username,password,privateKey)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,privateKey},response=yield this.callMethod("avax.importKey",params);return response.data.result.address?response.data.result.address:response.data.result})),this.issueTx=tx=>__awaiter(this,void 0,void 0,(function*(){let Transaction="";if("string"==typeof tx)Transaction=tx;else if(tx instanceof buffer_1.Buffer){const txobj=new tx_1.Tx;txobj.fromBuffer(tx),Transaction=txobj.toStringHex()}else{if(!(tx instanceof tx_1.Tx))throw new errors_1.TransactionError("Error - avax.issueTx: provided tx is not expected type of string, Buffer, or Tx");Transaction=tx.toStringHex()}const params={tx:Transaction.toString(),encoding:"hex"},response=yield this.callMethod("avax.issueTx",params);return response.data.result.txID?response.data.result.txID:response.data.result})),this.exportKey=(username,password,address)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,address};return(yield this.callMethod("avax.exportKey",params)).data.result})),this.buildImportTx=(utxoset,toAddress,ownerAddresses,sourceChain,fromAddresses,fee=new bn_js_1.default(0))=>__awaiter(this,void 0,void 0,(function*(){this._cleanAddressArray(fromAddresses,"buildImportTx").map((a=>bintools.stringToAddress(a)));let srcChain;if("string"==typeof sourceChain)srcChain=sourceChain,sourceChain=bintools.cb58Decode(sourceChain);else if(void 0===sourceChain||!(sourceChain instanceof buffer_1.Buffer))throw new errors_1.ChainIdError("Error - EVMAPI.buildImportTx: sourceChain is undefined or invalid sourceChain type.");const atomicUTXOs=(yield this.getUTXOs(ownerAddresses,srcChain,0,void 0)).utxos,networkID=this.core.getNetworkID(),avaxAssetID=constants_1.Defaults.network[`${networkID}`].X.avaxAssetID,avaxAssetIDBuf=bintools.cb58Decode(avaxAssetID),atomics=atomicUTXOs.getAllUTXOs();if(0===atomics.length)throw new errors_1.NoAtomicUTXOsError("Error - EVMAPI.buildImportTx: no atomic utxos to import");return utxoset.buildImportTx(networkID,bintools.cb58Decode(this.blockchainID),toAddress,atomics,sourceChain,fee,avaxAssetIDBuf)})),this.buildExportTx=(amount,assetID,destinationChain,fromAddressHex,fromAddressBech,toAddresses,nonce=0,locktime=new bn_js_1.default(0),threshold=1,fee=new bn_js_1.default(0))=>__awaiter(this,void 0,void 0,(function*(){const prefixes={};if(toAddresses.map((address=>{prefixes[address.split("-")[0]]=!0})),1!==Object.keys(prefixes).length)throw new errors_1.AddressError("Error - EVMAPI.buildExportTx: To addresses must have the same chainID prefix.");if(void 0===destinationChain)throw new errors_1.ChainIdError("Error - EVMAPI.buildExportTx: Destination ChainID is undefined.");if("string"==typeof destinationChain)destinationChain=bintools.cb58Decode(destinationChain);else if(!(destinationChain instanceof buffer_1.Buffer))throw new errors_1.ChainIdError("Error - EVMAPI.buildExportTx: Invalid destinationChain type");if(32!==destinationChain.length)throw new errors_1.ChainIdError("Error - EVMAPI.buildExportTx: Destination ChainID must be 32 bytes in length.");const assetDescription=yield this.getAssetDescription("AVAX");let evmInputs=[];if(bintools.cb58Encode(assetDescription.assetID)===assetID){const evmInput=new inputs_1.EVMInput(fromAddressHex,amount.add(fee),assetID,nonce);evmInput.addSignatureIdx(0,bintools.stringToAddress(fromAddressBech)),evmInputs.push(evmInput)}else{const evmAVAXInput=new inputs_1.EVMInput(fromAddressHex,fee,assetDescription.assetID,nonce);evmAVAXInput.addSignatureIdx(0,bintools.stringToAddress(fromAddressBech)),evmInputs.push(evmAVAXInput);const evmANTInput=new inputs_1.EVMInput(fromAddressHex,amount,assetID,nonce);evmANTInput.addSignatureIdx(0,bintools.stringToAddress(fromAddressBech)),evmInputs.push(evmANTInput)}const to=[];toAddresses.map((address=>{to.push(bintools.stringToAddress(address))}));let exportedOuts=[];const secpTransferOutput=new outputs_1.SECPTransferOutput(amount,to,locktime,threshold),transferableOutput=new outputs_1.TransferableOutput(bintools.cb58Decode(assetID),secpTransferOutput);exportedOuts.push(transferableOutput),evmInputs=evmInputs.sort(inputs_1.EVMInput.comparator()),exportedOuts=exportedOuts.sort(outputs_1.TransferableOutput.comparator());const exportTx=new exporttx_1.ExportTx(this.core.getNetworkID(),bintools.cb58Decode(this.blockchainID),destinationChain,evmInputs,exportedOuts);return new tx_1.UnsignedTx(exportTx)})),this.keyChain=()=>this.keychain,this.newKeyChain=()=>{const alias=this.getBlockchainAlias();return this.keychain=alias?new keychain_1.KeyChain(this.core.getHRP(),alias):new keychain_1.KeyChain(this.core.getHRP(),this.blockchainID),this.keychain},this.getBaseFee=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("eth_baseFee",[],"ext/bc/C/rpc")).data.result})),this.getMaxPriorityFeePerGas=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("eth_maxPriorityFeePerGas",[],"ext/bc/C/rpc")).data.result})),this.blockchainID=blockchainID;const netID=core.getNetworkID();if(netID in constants_1.Defaults.network&&blockchainID in constants_1.Defaults.network[`${netID}`]){const alias=constants_1.Defaults.network[`${netID}`][`${blockchainID}`].alias;this.keychain=new keychain_1.KeyChain(this.core.getHRP(),alias)}else this.keychain=new keychain_1.KeyChain(this.core.getHRP(),blockchainID)}_cleanAddressArray(addresses,caller){const addrs=[],chainid=this.getBlockchainAlias()?this.getBlockchainAlias():this.getBlockchainID();return addresses&&addresses.length>0&&addresses.forEach((address=>{if("string"==typeof address){if(void 0===this.parseAddress(address))throw new errors_1.AddressError("Error - Invalid address format");addrs.push(address)}else{const type="bech32";addrs.push(serialization.bufferToType(address,type,this.core.getHRP(),chainid))}})),addrs}}exports.EVMAPI=EVMAPI},5674:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.EVMBaseTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),evmtx_1=__webpack_require__(7965),constants_1=__webpack_require__(8779),tx_1=__webpack_require__(5544),bintools=bintools_1.default.getInstance();class EVMBaseTx extends evmtx_1.EVMStandardBaseTx{constructor(networkID=constants_1.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16)){super(networkID,blockchainID),this._typeName="BaseTx",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding)}getTxType(){return this._typeID}fromBuffer(bytes,offset=0){return this.networkID=bintools.copyFrom(bytes,offset,offset+4),offset+=4,this.blockchainID=bintools.copyFrom(bytes,offset,offset+32),offset+=32}sign(msg,kc){return[]}clone(){const newEVMBaseTx=new EVMBaseTx;return newEVMBaseTx.fromBuffer(this.toBuffer()),newEVMBaseTx}create(...args){return new EVMBaseTx(...args)}select(id,...args){return(0,tx_1.SelectTxClass)(id,...args)}}exports.EVMBaseTx=EVMBaseTx},6736:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EVMConstants=void 0;class EVMConstants{}exports.EVMConstants=EVMConstants,EVMConstants.SECPCREDENTIAL=9,EVMConstants.IMPORTTX=0,EVMConstants.EXPORTTX=1,EVMConstants.SECPINPUTID=5,EVMConstants.ASSETIDLEN=32,EVMConstants.SECPXFEROUTPUTID=7,EVMConstants.LATESTCODEC=0,EVMConstants.ADDRESSLENGTH=20},2501:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SECPCredential=exports.SelectCredentialClass=void 0;const constants_1=__webpack_require__(6736),credentials_1=__webpack_require__(5375),errors_1=__webpack_require__(611);exports.SelectCredentialClass=(credid,...args)=>{if(credid===constants_1.EVMConstants.SECPCREDENTIAL)return new SECPCredential(...args);throw new errors_1.CredIdError("Error - SelectCredentialClass: unknown credid")};class SECPCredential extends credentials_1.Credential{constructor(){super(...arguments),this._typeName="SECPCredential",this._typeID=constants_1.EVMConstants.SECPCREDENTIAL}getCredentialID(){return this._typeID}clone(){let newbase=new SECPCredential;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new SECPCredential(...args)}select(id,...args){return(0,exports.SelectCredentialClass)(id,...args)}}exports.SECPCredential=SECPCredential},72:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExportTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6736),basetx_1=__webpack_require__(5674),credentials_1=__webpack_require__(2501),credentials_2=__webpack_require__(5375),inputs_1=__webpack_require__(452),serialization_1=__webpack_require__(555),outputs_1=__webpack_require__(1179),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serializer=serialization_1.Serialization.getInstance();class ExportTx extends basetx_1.EVMBaseTx{constructor(networkID,blockchainID=buffer_1.Buffer.alloc(32,16),destinationChain=buffer_1.Buffer.alloc(32,16),inputs,exportedOutputs){super(networkID,blockchainID),this._typeName="ExportTx",this._typeID=constants_1.EVMConstants.EXPORTTX,this.destinationChain=buffer_1.Buffer.alloc(32),this.numInputs=buffer_1.Buffer.alloc(4),this.inputs=[],this.numExportedOutputs=buffer_1.Buffer.alloc(4),this.exportedOutputs=[],this.destinationChain=destinationChain,void 0!==inputs&&Array.isArray(inputs)&&(inputs.forEach((input=>{if(!(input instanceof inputs_1.EVMInput))throw new errors_1.EVMInputError("Error - ExportTx.constructor: invalid EVMInput in array parameter 'inputs'")})),inputs.length>1&&(inputs=inputs.sort(inputs_1.EVMInput.comparator())),this.inputs=inputs),void 0!==exportedOutputs&&Array.isArray(exportedOutputs)&&(exportedOutputs.forEach((exportedOutput=>{if(!(exportedOutput instanceof outputs_1.TransferableOutput))throw new errors_1.TransferableOutputError("Error - ExportTx.constructor: TransferableOutput EVMInput in array parameter 'exportedOutputs'")})),this.exportedOutputs=exportedOutputs)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{destinationChain:serializer.encoder(this.destinationChain,encoding,"Buffer","cb58"),exportedOutputs:this.exportedOutputs.map((i=>i.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.destinationChain=serializer.decoder(fields.destinationChain,encoding,"cb58","Buffer",32),this.exportedOutputs=fields.exportedOutputs.map((i=>{let eo=new outputs_1.TransferableOutput;return eo.deserialize(i,encoding),eo})),this.numExportedOutputs=buffer_1.Buffer.alloc(4),this.numExportedOutputs.writeUInt32BE(this.exportedOutputs.length,0)}getDestinationChain(){return this.destinationChain}getInputs(){return this.inputs}getExportedOutputs(){return this.exportedOutputs}toBuffer(){if(void 0===this.destinationChain)throw new errors_1.ChainIdError("ExportTx.toBuffer -- this.destinationChain is undefined");this.numInputs.writeUInt32BE(this.inputs.length,0),this.numExportedOutputs.writeUInt32BE(this.exportedOutputs.length,0);let barr=[super.toBuffer(),this.destinationChain,this.numInputs],bsize=super.toBuffer().length+this.destinationChain.length+this.numInputs.length;return this.inputs.forEach((importIn=>{bsize+=importIn.toBuffer().length,barr.push(importIn.toBuffer())})),bsize+=this.numExportedOutputs.length,barr.push(this.numExportedOutputs),this.exportedOutputs.forEach((out=>{bsize+=out.toBuffer().length,barr.push(out.toBuffer())})),buffer_1.Buffer.concat(barr,bsize)}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset),this.destinationChain=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.numInputs=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const numInputs=this.numInputs.readUInt32BE(0);for(let i=0;i<numInputs;i++){const anIn=new inputs_1.EVMInput;offset=anIn.fromBuffer(bytes,offset),this.inputs.push(anIn)}this.numExportedOutputs=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const numExportedOutputs=this.numExportedOutputs.readUInt32BE(0);for(let i=0;i<numExportedOutputs;i++){const anOut=new outputs_1.TransferableOutput;offset=anOut.fromBuffer(bytes,offset),this.exportedOutputs.push(anOut)}return offset}toString(){return bintools.bufferToB58(this.toBuffer())}sign(msg,kc){const creds=super.sign(msg,kc);return this.inputs.forEach((input=>{const cred=(0,credentials_1.SelectCredentialClass)(input.getCredentialID());input.getSigIdxs().forEach((sigidx=>{const signval=kc.getKey(sigidx.getSource()).sign(msg),sig=new credentials_2.Signature;sig.fromBuffer(signval),cred.addSignature(sig)})),creds.push(cred)})),creds}}exports.ExportTx=ExportTx},6419:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImportTx=void 0;const buffer_1=__webpack_require__(8764),bn_js_1=__importDefault(__webpack_require__(3550)),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6736),outputs_1=__webpack_require__(1179),inputs_1=__webpack_require__(452),basetx_1=__webpack_require__(5674),credentials_1=__webpack_require__(2501),credentials_2=__webpack_require__(5375),input_1=__webpack_require__(1149),constants_2=__webpack_require__(8779),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serializer=serialization_1.Serialization.getInstance();class ImportTx extends basetx_1.EVMBaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),sourceChainID=buffer_1.Buffer.alloc(32,16),importIns,outs,fee=new bn_js_1.default(0)){super(networkID,blockchainID),this._typeName="ImportTx",this._typeID=constants_1.EVMConstants.IMPORTTX,this.sourceChain=buffer_1.Buffer.alloc(32),this.numIns=buffer_1.Buffer.alloc(4),this.importIns=[],this.numOuts=buffer_1.Buffer.alloc(4),this.outs=[],this.sourceChain=sourceChainID;let inputsPassed=!1,outputsPassed=!1;void 0!==importIns&&Array.isArray(importIns)&&importIns.length>0&&(importIns.forEach((importIn=>{if(!(importIn instanceof inputs_1.TransferableInput))throw new errors_1.TransferableInputError("Error - ImportTx.constructor: invalid TransferableInput in array parameter 'importIns'")})),inputsPassed=!0,this.importIns=importIns),void 0!==outs&&Array.isArray(outs)&&outs.length>0&&(outs.forEach((out=>{if(!(out instanceof outputs_1.EVMOutput))throw new errors_1.EVMOutputError("Error - ImportTx.constructor: invalid EVMOutput in array parameter 'outs'")})),outs.length>1&&(outs=outs.sort(outputs_1.EVMOutput.comparator())),outputsPassed=!0,this.outs=outs),inputsPassed&&outputsPassed&&this.validateOuts(fee)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{sourceChain:serializer.encoder(this.sourceChain,encoding,"Buffer","cb58"),importIns:this.importIns.map((i=>i.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.sourceChain=serializer.decoder(fields.sourceChain,encoding,"cb58","Buffer",32),this.importIns=fields.importIns.map((i=>{let ii=new inputs_1.TransferableInput;return ii.deserialize(i,encoding),ii})),this.numIns=buffer_1.Buffer.alloc(4),this.numIns.writeUInt32BE(this.importIns.length,0)}getTxType(){return this._typeID}getSourceChain(){return this.sourceChain}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset),this.sourceChain=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.numIns=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const numIns=this.numIns.readUInt32BE(0);for(let i=0;i<numIns;i++){const anIn=new inputs_1.TransferableInput;offset=anIn.fromBuffer(bytes,offset),this.importIns.push(anIn)}this.numOuts=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const numOuts=this.numOuts.readUInt32BE(0);for(let i=0;i<numOuts;i++){const anOut=new outputs_1.EVMOutput;offset=anOut.fromBuffer(bytes,offset),this.outs.push(anOut)}return offset}toBuffer(){if(void 0===this.sourceChain)throw new errors_1.ChainIdError("ImportTx.toBuffer -- this.sourceChain is undefined");this.numIns.writeUInt32BE(this.importIns.length,0),this.numOuts.writeUInt32BE(this.outs.length,0);let barr=[super.toBuffer(),this.sourceChain,this.numIns],bsize=super.toBuffer().length+this.sourceChain.length+this.numIns.length;return this.importIns=this.importIns.sort(inputs_1.TransferableInput.comparator()),this.importIns.forEach((importIn=>{bsize+=importIn.toBuffer().length,barr.push(importIn.toBuffer())})),bsize+=this.numOuts.length,barr.push(this.numOuts),this.outs.forEach((out=>{bsize+=out.toBuffer().length,barr.push(out.toBuffer())})),buffer_1.Buffer.concat(barr,bsize)}getImportInputs(){return this.importIns}getOuts(){return this.outs}clone(){let newImportTx=new ImportTx;return newImportTx.fromBuffer(this.toBuffer()),newImportTx}create(...args){return new ImportTx(...args)}sign(msg,kc){const creds=super.sign(msg,kc);return this.importIns.forEach((importIn=>{const cred=(0,credentials_1.SelectCredentialClass)(importIn.getInput().getCredentialID());importIn.getInput().getSigIdxs().forEach((sigidx=>{const signval=kc.getKey(sigidx.getSource()).sign(msg),sig=new credentials_2.Signature;sig.fromBuffer(signval),cred.addSignature(sig)})),creds.push(cred)})),creds}validateOuts(fee){const seenAssetSends=new Map;this.outs.forEach((evmOutput=>{const address=evmOutput.getAddressString(),assetId=bintools.cb58Encode(evmOutput.getAssetID());if(seenAssetSends.has(address)){const assetsSentToAddress=seenAssetSends.get(address);if(assetsSentToAddress.includes(assetId)){const errorMessage=`Error - ImportTx: duplicate (address, assetId) pair found in outputs: (0x${address}, ${assetId})`;throw new errors_1.EVMOutputError(errorMessage)}assetsSentToAddress.push(assetId)}else seenAssetSends.set(address,[assetId])}));const selectedNetwork=this.getNetworkID(),feeDiff=new bn_js_1.default(0),avaxAssetID=constants_2.Defaults.network[`${selectedNetwork}`].X.avaxAssetID;if(this.importIns.forEach((input=>{if(input.getInput()instanceof input_1.StandardAmountInput&&avaxAssetID===bintools.cb58Encode(input.getAssetID())){const i=input.getInput();feeDiff.iadd(i.getAmount())}})),this.outs.forEach((evmOutput=>{avaxAssetID===bintools.cb58Encode(evmOutput.getAssetID())&&feeDiff.isub(evmOutput.getAmount())})),feeDiff.lt(fee)){const errorMessage=`Error - ${fee} nAVAX required for fee and only ${feeDiff} nAVAX provided`;throw new errors_1.EVMFeeError(errorMessage)}}}exports.ImportTx=ImportTx},5743:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(9084),exports),__exportStar(__webpack_require__(5674),exports),__exportStar(__webpack_require__(6736),exports),__exportStar(__webpack_require__(2501),exports),__exportStar(__webpack_require__(452),exports),__exportStar(__webpack_require__(4119),exports),__exportStar(__webpack_require__(72),exports),__exportStar(__webpack_require__(6419),exports),__exportStar(__webpack_require__(1398),exports),__exportStar(__webpack_require__(1179),exports),__exportStar(__webpack_require__(5544),exports),__exportStar(__webpack_require__(8643),exports)},452:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.EVMInput=exports.SECPTransferInput=exports.AmountInput=exports.TransferableInput=exports.SelectInputClass=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6736),input_1=__webpack_require__(1149),outputs_1=__webpack_require__(1179),bn_js_1=__importDefault(__webpack_require__(3550)),credentials_1=__webpack_require__(5375),errors_1=__webpack_require__(611),utils_1=__webpack_require__(338),bintools=bintools_1.default.getInstance();exports.SelectInputClass=(inputID,...args)=>{if(inputID===constants_1.EVMConstants.SECPINPUTID)return new SECPTransferInput(...args);throw new errors_1.InputIdError("Error - SelectInputClass: unknown inputID")};class TransferableInput extends input_1.StandardTransferableInput{constructor(){super(...arguments),this._typeName="TransferableInput",this._typeID=void 0,this.getCost=()=>this.getInput().getSigIdxs().length*utils_1.Defaults.network[1].C.costPerSignature}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.input=(0,exports.SelectInputClass)(fields.input._typeID),this.input.deserialize(fields.input,encoding)}fromBuffer(bytes,offset=0){this.txid=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.outputidx=bintools.copyFrom(bytes,offset,offset+4),offset+=4,this.assetID=bintools.copyFrom(bytes,offset,offset+constants_1.EVMConstants.ASSETIDLEN),offset+=32;const inputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.input=(0,exports.SelectInputClass)(inputid),this.input.fromBuffer(bytes,offset)}}exports.TransferableInput=TransferableInput;class AmountInput extends input_1.StandardAmountInput{constructor(){super(...arguments),this._typeName="AmountInput",this._typeID=void 0}select(id,...args){return(0,exports.SelectInputClass)(id,...args)}}exports.AmountInput=AmountInput;class SECPTransferInput extends AmountInput{constructor(){super(...arguments),this._typeName="SECPTransferInput",this._typeID=constants_1.EVMConstants.SECPINPUTID,this.getCredentialID=()=>constants_1.EVMConstants.SECPCREDENTIAL}getInputID(){return constants_1.EVMConstants.SECPINPUTID}create(...args){return new SECPTransferInput(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}}exports.SECPTransferInput=SECPTransferInput;class EVMInput extends outputs_1.EVMOutput{constructor(address,amount,assetID,nonce){if(super(address,amount,assetID),this.nonce=buffer_1.Buffer.alloc(8),this.nonceValue=new bn_js_1.default(0),this.sigCount=buffer_1.Buffer.alloc(4),this.sigIdxs=[],this.getSigIdxs=()=>this.sigIdxs,this.addSignatureIdx=(addressIdx,address)=>{const sigidx=new credentials_1.SigIdx,b=buffer_1.Buffer.alloc(4);b.writeUInt32BE(addressIdx,0),sigidx.fromBuffer(b),sigidx.setSource(address),this.sigIdxs.push(sigidx),this.sigCount.writeUInt32BE(this.sigIdxs.length,0)},this.getNonce=()=>this.nonceValue.clone(),this.getCredentialID=()=>constants_1.EVMConstants.SECPCREDENTIAL,void 0!==nonce){let n;n="number"==typeof nonce?new bn_js_1.default(nonce):nonce,this.nonceValue=n.clone(),this.nonce=bintools.fromBNToBuffer(n,8)}}toBuffer(){let superbuff=super.toBuffer(),bsize=superbuff.length+this.nonce.length,barr=[superbuff,this.nonce];return buffer_1.Buffer.concat(barr,bsize)}fromBuffer(bytes,offset=0){return offset=super.fromBuffer(bytes,offset),this.nonce=bintools.copyFrom(bytes,offset,offset+8),offset+=8}toString(){return bintools.bufferToB58(this.toBuffer())}create(...args){return new EVMInput(...args)}clone(){const newEVMInput=this.create();return newEVMInput.fromBuffer(this.toBuffer()),newEVMInput}}exports.EVMInput=EVMInput},4119:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0})},1398:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.KeyChain=exports.KeyPair=void 0;const bintools_1=__importDefault(__webpack_require__(903)),secp256k1_1=__webpack_require__(181),utils_1=__webpack_require__(338),bintools=bintools_1.default.getInstance();utils_1.Serialization.getInstance();class KeyPair extends secp256k1_1.SECP256k1KeyPair{clone(){const newkp=new KeyPair(this.hrp,this.chainID);return newkp.importKey(bintools.copyFrom(this.getPrivateKey())),newkp}create(...args){return 2==args.length?new KeyPair(args[0],args[1]):new KeyPair(this.hrp,this.chainID)}}exports.KeyPair=KeyPair;class KeyChain extends secp256k1_1.SECP256k1KeyChain{constructor(hrp,chainID){super(),this.hrp="",this.chainID="",this.makeKey=()=>{const keypair=new KeyPair(this.hrp,this.chainID);return this.addKey(keypair),keypair},this.addKey=newKey=>{newKey.setChainID(this.chainID),super.addKey(newKey)},this.importKey=privk=>{const keypair=new KeyPair(this.hrp,this.chainID);let pk;return pk="string"==typeof privk?bintools.cb58Decode(privk.split("-")[1]):bintools.copyFrom(privk),keypair.importKey(pk),keypair.getAddress().toString("hex")in this.keys||this.addKey(keypair),keypair},this.hrp=hrp,this.chainID=chainID}create(...args){return 2==args.length?new KeyChain(args[0],args[1]):new KeyChain(this.hrp,this.chainID)}clone(){const newkc=new KeyChain(this.hrp,this.chainID);for(let k in this.keys)newkc.addKey(this.keys[`${k}`].clone());return newkc}union(kc){const newkc=kc.clone();for(let k in this.keys)newkc.addKey(this.keys[`${k}`].clone());return newkc}}exports.KeyChain=KeyChain},1179:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.EVMOutput=exports.SECPTransferOutput=exports.AmountOutput=exports.TransferableOutput=exports.SelectOutputClass=void 0;const buffer_1=__webpack_require__(8764),bn_js_1=__importDefault(__webpack_require__(3550)),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6736),output_1=__webpack_require__(8556),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance();exports.SelectOutputClass=(outputID,...args)=>{if(outputID==constants_1.EVMConstants.SECPXFEROUTPUTID)return new SECPTransferOutput(...args);throw new errors_1.OutputIdError("Error - SelectOutputClass: unknown outputID")};class TransferableOutput extends output_1.StandardTransferableOutput{constructor(){super(...arguments),this._typeName="TransferableOutput",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.output=(0,exports.SelectOutputClass)(fields.output._typeID),this.output.deserialize(fields.output,encoding)}fromBuffer(bytes,offset=0){this.assetID=bintools.copyFrom(bytes,offset,offset+constants_1.EVMConstants.ASSETIDLEN),offset+=constants_1.EVMConstants.ASSETIDLEN;const outputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.output=(0,exports.SelectOutputClass)(outputid),this.output.fromBuffer(bytes,offset)}}exports.TransferableOutput=TransferableOutput;class AmountOutput extends output_1.StandardAmountOutput{constructor(){super(...arguments),this._typeName="AmountOutput",this._typeID=void 0}makeTransferable(assetID){return new TransferableOutput(assetID,this)}select(id,...args){return(0,exports.SelectOutputClass)(id,...args)}}exports.AmountOutput=AmountOutput;class SECPTransferOutput extends AmountOutput{constructor(){super(...arguments),this._typeName="SECPTransferOutput",this._typeID=constants_1.EVMConstants.SECPXFEROUTPUTID}getOutputID(){return this._typeID}create(...args){return new SECPTransferOutput(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}}exports.SECPTransferOutput=SECPTransferOutput;class EVMOutput{constructor(address,amount,assetID){if(this.address=buffer_1.Buffer.alloc(20),this.amount=buffer_1.Buffer.alloc(8),this.amountValue=new bn_js_1.default(0),this.assetID=buffer_1.Buffer.alloc(32),this.getAddress=()=>this.address,this.getAddressString=()=>this.address.toString("hex"),this.getAmount=()=>this.amountValue.clone(),this.getAssetID=()=>this.assetID,void 0!==address&&void 0!==amount&&void 0!==assetID){if("string"==typeof address){"0x"===address.substring(0,2)&&(address=address.split("x")[1]),address=buffer_1.Buffer.from(address,"hex")}let amnt;amnt="number"==typeof amount?new bn_js_1.default(amount):amount,assetID instanceof buffer_1.Buffer||(assetID=bintools.cb58Decode(assetID)),this.address=address,this.amountValue=amnt.clone(),this.amount=bintools.fromBNToBuffer(amnt,8),this.assetID=assetID}}toBuffer(){const bsize=this.address.length+this.amount.length+this.assetID.length,barr=[this.address,this.amount,this.assetID];return buffer_1.Buffer.concat(barr,bsize)}fromBuffer(bytes,offset=0){return this.address=bintools.copyFrom(bytes,offset,offset+20),offset+=20,this.amount=bintools.copyFrom(bytes,offset,offset+8),offset+=8,this.assetID=bintools.copyFrom(bytes,offset,offset+32),offset+=32}toString(){return bintools.bufferToB58(this.toBuffer())}create(...args){return new EVMOutput(...args)}clone(){const newEVMOutput=this.create();return newEVMOutput.fromBuffer(this.toBuffer()),newEVMOutput}}exports.EVMOutput=EVMOutput,EVMOutput.comparator=()=>(a,b)=>{let sorta=a.getAddress(),sortb=b.getAddress();return sorta.equals(sortb)&&(sorta=a.getAssetID(),sortb=b.getAssetID()),buffer_1.Buffer.compare(sorta,sortb)}},5544:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Tx=exports.UnsignedTx=exports.SelectTxClass=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(6736),credentials_1=__webpack_require__(2501),evmtx_1=__webpack_require__(7965),create_hash_1=__importDefault(__webpack_require__(3482)),importtx_1=__webpack_require__(6419),exporttx_1=__webpack_require__(72),bintools=bintools_1.default.getInstance();exports.SelectTxClass=(txTypeID,...args)=>{if(txTypeID===constants_1.EVMConstants.IMPORTTX)return new importtx_1.ImportTx(...args);if(txTypeID===constants_1.EVMConstants.EXPORTTX)return new exporttx_1.ExportTx(...args);throw new Error("TransactionError - SelectTxClass: unknown txType")};class UnsignedTx extends evmtx_1.EVMStandardUnsignedTx{constructor(){super(...arguments),this._typeName="UnsignedTx",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.transaction=(0,exports.SelectTxClass)(fields.transaction._typeID),this.transaction.deserialize(fields.transaction,encoding)}getTransaction(){return this.transaction}fromBuffer(bytes,offset=0){this.codecID=bintools.copyFrom(bytes,offset,offset+2).readUInt16BE(0),offset+=2;const txtype=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.transaction=(0,exports.SelectTxClass)(txtype),this.transaction.fromBuffer(bytes,offset)}sign(kc){const txbuff=this.toBuffer(),msg=buffer_1.Buffer.from((0,create_hash_1.default)("sha256").update(txbuff).digest()),creds=this.transaction.sign(msg,kc);return new Tx(this,creds)}}exports.UnsignedTx=UnsignedTx;class Tx extends evmtx_1.EVMStandardTx{constructor(){super(...arguments),this._typeName="Tx",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.unsignedTx=new UnsignedTx,this.unsignedTx.deserialize(fields.unsignedTx,encoding),this.credentials=[];for(let i=0;i<fields.credentials.length;i++){const cred=(0,credentials_1.SelectCredentialClass)(fields.credentials[`${i}`]._typeID);cred.deserialize(fields.credentials[`${i}`],encoding),this.credentials.push(cred)}}fromBuffer(bytes,offset=0){this.unsignedTx=new UnsignedTx,offset=this.unsignedTx.fromBuffer(bytes,offset);const numcreds=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4,this.credentials=[];for(let i=0;i<numcreds;i++){const credid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4;const cred=(0,credentials_1.SelectCredentialClass)(credid);offset=cred.fromBuffer(bytes,offset),this.credentials.push(cred)}return offset}}exports.Tx=Tx},8643:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UTXOSet=exports.AssetAmountDestination=exports.UTXO=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),bn_js_1=__importDefault(__webpack_require__(3550)),outputs_1=__webpack_require__(1179),constants_1=__webpack_require__(6736),inputs_1=__webpack_require__(452),helperfunctions_1=__webpack_require__(5554),utxos_1=__webpack_require__(7612),constants_2=__webpack_require__(8779),assetamount_1=__webpack_require__(6305),serialization_1=__webpack_require__(555),tx_1=__webpack_require__(5544),importtx_1=__webpack_require__(6419),exporttx_1=__webpack_require__(72),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serializer=serialization_1.Serialization.getInstance();class UTXO extends utxos_1.StandardUTXO{constructor(){super(...arguments),this._typeName="UTXO",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.output=(0,outputs_1.SelectOutputClass)(fields.output._typeID),this.output.deserialize(fields.output,encoding)}fromBuffer(bytes,offset=0){this.codecID=bintools.copyFrom(bytes,offset,offset+2),offset+=2,this.txid=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.outputidx=bintools.copyFrom(bytes,offset,offset+4),offset+=4,this.assetID=bintools.copyFrom(bytes,offset,offset+32),offset+=32;const outputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.output=(0,outputs_1.SelectOutputClass)(outputid),this.output.fromBuffer(bytes,offset)}fromString(serialized){return this.fromBuffer(bintools.cb58Decode(serialized))}toString(){return bintools.cb58Encode(this.toBuffer())}clone(){const utxo=new UTXO;return utxo.fromBuffer(this.toBuffer()),utxo}create(codecID=constants_1.EVMConstants.LATESTCODEC,txID,outputidx,assetID,output){return new UTXO(codecID,txID,outputidx,assetID,output)}}exports.UTXO=UTXO;class AssetAmountDestination extends assetamount_1.StandardAssetAmountDestination{}exports.AssetAmountDestination=AssetAmountDestination;class UTXOSet extends utxos_1.StandardUTXOSet{constructor(){super(...arguments),this._typeName="UTXOSet",this._typeID=void 0,this.getMinimumSpendable=(aad,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>{const utxoArray=this.getAllUTXOs(),outids={};for(let i=0;i<utxoArray.length&&!aad.canComplete();i++){const u=utxoArray[`${i}`],assetKey=u.getAssetID().toString("hex"),fromAddresses=aad.getSenders();if(u.getOutput()instanceof outputs_1.AmountOutput&&aad.assetExists(assetKey)&&u.getOutput().meetsThreshold(fromAddresses,asOf)){const am=aad.getAssetAmount(assetKey);if(am.isFinished()){if(aad.assetExists(assetKey)&&!(u.getOutput()instanceof outputs_1.AmountOutput))continue}else{const uout=u.getOutput();outids[`${assetKey}`]=uout.getOutputID();const amount=uout.getAmount();am.spendAmount(amount);const txid=u.getTxID(),outputidx=u.getOutputIdx(),input=new inputs_1.SECPTransferInput(amount),xferin=new inputs_1.TransferableInput(txid,outputidx,u.getAssetID(),input);uout.getSpenders(fromAddresses,asOf).forEach((spender=>{const idx=uout.getAddressIdx(spender);if(-1===idx)throw new errors_1.AddressError("Error - UTXOSet.getMinimumSpendable: no such address in output");xferin.getInput().addSignatureIdx(idx,spender)})),aad.addInput(xferin)}}}if(!aad.canComplete())return new errors_1.InsufficientFundsError("Error - UTXOSet.getMinimumSpendable: insufficient funds to create the transaction");const amounts=aad.getAmounts(),zero=new bn_js_1.default(0);for(let i=0;i<amounts.length;i++){const assetKey=amounts[`${i}`].getAssetIDString(),amount=amounts[`${i}`].getAmount();if(amount.gt(zero)){const spendout=(0,outputs_1.SelectOutputClass)(outids[`${assetKey}`],amount,aad.getDestinations(),locktime,threshold),xferout=new outputs_1.TransferableOutput(amounts[`${i}`].getAssetID(),spendout);aad.addOutput(xferout)}const change=amounts[`${i}`].getChange();if(change.gt(zero)){const changeout=(0,outputs_1.SelectOutputClass)(outids[`${assetKey}`],change,aad.getChangeAddresses()),chgxferout=new outputs_1.TransferableOutput(amounts[`${i}`].getAssetID(),changeout);aad.addChange(chgxferout)}}},this.buildImportTx=(networkID,blockchainID,toAddress,atomics,sourceChain,fee,feeAssetID)=>{const zero=new bn_js_1.default(0),map=new Map;let ins=[],outs=[],feepaid=new bn_js_1.default(0);void 0===fee&&(fee=zero.clone()),atomics.forEach((atomic=>{const assetIDBuf=atomic.getAssetID(),assetID=bintools.cb58Encode(atomic.getAssetID()),output=atomic.getOutput(),amount=output.getAmount().clone();let infeeamount=amount.clone();void 0!==feeAssetID&&fee.gt(zero)&&feepaid.lt(fee)&&0===buffer_1.Buffer.compare(feeAssetID,assetIDBuf)&&(feepaid=feepaid.add(infeeamount),feepaid.gt(fee)?(infeeamount=feepaid.sub(fee),feepaid=fee.clone()):infeeamount=zero.clone());const txid=atomic.getTxID(),outputidx=atomic.getOutputIdx(),input=new inputs_1.SECPTransferInput(amount),xferin=new inputs_1.TransferableInput(txid,outputidx,assetIDBuf,input),from=output.getAddresses();output.getSpenders(from).forEach((spender=>{const idx=output.getAddressIdx(spender);if(-1===idx)throw new errors_1.AddressError("Error - UTXOSet.buildImportTx: no such address in output");xferin.getInput().addSignatureIdx(idx,spender)})),ins.push(xferin),map.has(assetID)&&(infeeamount=infeeamount.add(new bn_js_1.default(map.get(assetID)))),map.set(assetID,infeeamount.toString())}));for(let[assetID,amount]of map){const evmOutput=new outputs_1.EVMOutput(toAddress,new bn_js_1.default(amount),bintools.cb58Decode(assetID));outs.push(evmOutput)}ins=ins.sort(inputs_1.TransferableInput.comparator()),outs=outs.sort(outputs_1.EVMOutput.comparator());const importTx=new importtx_1.ImportTx(networkID,blockchainID,sourceChain,ins,outs,fee);return new tx_1.UnsignedTx(importTx)},this.buildExportTx=(networkID,blockchainID,amount,avaxAssetID,toAddresses,fromAddresses,changeAddresses,destinationChain,fee,feeAssetID,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>{let exportouts=[];void 0===changeAddresses&&(changeAddresses=toAddresses);const zero=new bn_js_1.default(0);if(amount.eq(zero))return;if(void 0===feeAssetID)feeAssetID=avaxAssetID;else if(feeAssetID.toString("hex")!==avaxAssetID.toString("hex"))throw new errors_1.FeeAssetError("Error - UTXOSet.buildExportTx: feeAssetID must match avaxAssetID");void 0===destinationChain&&(destinationChain=bintools.cb58Decode(constants_2.PlatformChainID));const aad=new AssetAmountDestination(toAddresses,fromAddresses,changeAddresses);avaxAssetID.toString("hex")===feeAssetID.toString("hex")?aad.addAssetAmount(avaxAssetID,amount,fee):(aad.addAssetAmount(avaxAssetID,amount,zero),this._feeCheck(fee,feeAssetID)&&aad.addAssetAmount(feeAssetID,zero,fee));const success=this.getMinimumSpendable(aad,asOf,locktime,threshold);if(void 0!==success)throw success;exportouts=aad.getOutputs();const exportTx=new exporttx_1.ExportTx(networkID,blockchainID,destinationChain,[],exportouts);return new tx_1.UnsignedTx(exportTx)}}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding);const utxos={};for(let utxoid in fields.utxos){let utxoidCleaned=serializer.decoder(utxoid,encoding,"base58","base58");utxos[`${utxoidCleaned}`]=new UTXO,utxos[`${utxoidCleaned}`].deserialize(fields.utxos[`${utxoid}`],encoding)}let addressUTXOs={};for(let address in fields.addressUTXOs){let addressCleaned=serializer.decoder(address,encoding,"cb58","hex"),utxobalance={};for(let utxoid in fields.addressUTXOs[`${address}`]){utxobalance[`${serializer.decoder(utxoid,encoding,"base58","base58")}`]=serializer.decoder(fields.addressUTXOs[`${address}`][`${utxoid}`],encoding,"decimalString","BN")}addressUTXOs[`${addressCleaned}`]=utxobalance}this.utxos=utxos,this.addressUTXOs=addressUTXOs}parseUTXO(utxo){const utxovar=new UTXO;if("string"==typeof utxo)utxovar.fromBuffer(bintools.cb58Decode(utxo));else{if(!(utxo instanceof UTXO))throw new errors_1.UTXOError("Error - UTXO.parseUTXO: utxo parameter is not a UTXO or string");utxovar.fromBuffer(utxo.toBuffer())}return utxovar}create(){return new UTXOSet}clone(){const newset=this.create(),allUTXOs=this.getAllUTXOs();return newset.addArray(allUTXOs),newset}_feeCheck(fee,feeAssetID){return void 0!==fee&&void 0!==feeAssetID&&fee.gt(new bn_js_1.default(0))&&feeAssetID instanceof buffer_1.Buffer}}exports.UTXOSet=UTXOSet},6778:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HealthAPI=void 0;const jrpcapi_1=__webpack_require__(5912);class HealthAPI extends jrpcapi_1.JRPCAPI{constructor(core,baseURL="/ext/health"){super(core,baseURL),this.health=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("health.health")).data.result}))}}exports.HealthAPI=HealthAPI},1996:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(6778),exports)},1229:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.IndexAPI=void 0;const jrpcapi_1=__webpack_require__(5912);class IndexAPI extends jrpcapi_1.JRPCAPI{constructor(core,baseURL="/ext/index/X/tx"){super(core,baseURL),this.getLastAccepted=(encoding="hex",baseURL=this.getBaseURL())=>__awaiter(this,void 0,void 0,(function*(){this.setBaseURL(baseURL);const params={encoding};try{return(yield this.callMethod("index.getLastAccepted",params)).data.result}catch(error){console.log(error)}})),this.getContainerByIndex=(index="0",encoding="hex",baseURL=this.getBaseURL())=>__awaiter(this,void 0,void 0,(function*(){this.setBaseURL(baseURL);const params={index,encoding};try{return(yield this.callMethod("index.getContainerByIndex",params)).data.result}catch(error){console.log(error)}})),this.getContainerByID=(id="0",encoding="hex",baseURL=this.getBaseURL())=>__awaiter(this,void 0,void 0,(function*(){this.setBaseURL(baseURL);const params={id,encoding};try{return(yield this.callMethod("index.getContainerByID",params)).data.result}catch(error){console.log(error)}})),this.getContainerRange=(startIndex=0,numToFetch=100,encoding="hex",baseURL=this.getBaseURL())=>__awaiter(this,void 0,void 0,(function*(){this.setBaseURL(baseURL);const params={startIndex,numToFetch,encoding};try{return(yield this.callMethod("index.getContainerRange",params)).data.result}catch(error){console.log(error)}})),this.getIndex=(id="",encoding="hex",baseURL=this.getBaseURL())=>__awaiter(this,void 0,void 0,(function*(){this.setBaseURL(baseURL);const params={id,encoding};try{return(yield this.callMethod("index.getIndex",params)).data.result.index}catch(error){console.log(error)}})),this.isAccepted=(id="",encoding="hex",baseURL=this.getBaseURL())=>__awaiter(this,void 0,void 0,(function*(){this.setBaseURL(baseURL);const params={id,encoding};try{return(yield this.callMethod("index.isAccepted",params)).data.result}catch(error){console.log(error)}}))}}exports.IndexAPI=IndexAPI},6119:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(1229),exports)},8224:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.InfoAPI=void 0;const jrpcapi_1=__webpack_require__(5912),bn_js_1=__importDefault(__webpack_require__(3550));class InfoAPI extends jrpcapi_1.JRPCAPI{constructor(core,baseURL="/ext/info"){super(core,baseURL),this.getBlockchainID=alias=>__awaiter(this,void 0,void 0,(function*(){const params={alias};return(yield this.callMethod("info.getBlockchainID",params)).data.result.blockchainID})),this.getNodeIP=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("info.getBlockchainID")).data.result.ip})),this.getNetworkID=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("info.getNetworkID")).data.result.networkID})),this.getNetworkName=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("info.getNetworkName")).data.result.networkName})),this.getNodeID=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("info.getNodeID")).data.result.nodeID})),this.getNodeVersion=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("info.getNodeVersion")).data.result.version})),this.getTxFee=()=>__awaiter(this,void 0,void 0,(function*(){const response=yield this.callMethod("info.getTxFee");return{txFee:new bn_js_1.default(response.data.result.txFee,10),creationTxFee:new bn_js_1.default(response.data.result.creationTxFee,10)}})),this.isBootstrapped=chain=>__awaiter(this,void 0,void 0,(function*(){const params={chain};return(yield this.callMethod("info.isBootstrapped",params)).data.result.isBootstrapped})),this.peers=(nodeIDs=[])=>__awaiter(this,void 0,void 0,(function*(){const params={nodeIDs};return(yield this.callMethod("info.peers",params)).data.result.peers})),this.uptime=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("info.uptime")).data.result}))}}exports.InfoAPI=InfoAPI},8379:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(8224),exports)},7345:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.KeystoreAPI=void 0;const jrpcapi_1=__webpack_require__(5912);class KeystoreAPI extends jrpcapi_1.JRPCAPI{constructor(core,baseURL="/ext/keystore"){super(core,baseURL),this.createUser=(username,password)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password},response=yield this.callMethod("keystore.createUser",params);return response.data.result.success?response.data.result.success:response.data.result})),this.exportUser=(username,password)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password},response=yield this.callMethod("keystore.exportUser",params);return response.data.result.user?response.data.result.user:response.data.result})),this.importUser=(username,user,password)=>__awaiter(this,void 0,void 0,(function*(){const params={username,user,password},response=yield this.callMethod("keystore.importUser",params);return response.data.result.success?response.data.result.success:response.data.result})),this.listUsers=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("keystore.listUsers")).data.result.users})),this.deleteUser=(username,password)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password},response=yield this.callMethod("keystore.deleteUser",params);return response.data.result.success?response.data.result.success:response.data.result}))}}exports.KeystoreAPI=KeystoreAPI},913:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(7345),exports)},130:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MetricsAPI=void 0;const restapi_1=__webpack_require__(5534);class MetricsAPI extends restapi_1.RESTAPI{constructor(core,baseURL="/ext/metrics"){super(core,baseURL),this.axConf=()=>({baseURL:`${this.core.getProtocol()}://${this.core.getHost()}:${this.core.getPort()}`,responseType:"text"}),this.getMetrics=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.post("")).data}))}}exports.MetricsAPI=MetricsAPI},6413:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(130),exports)},1726:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AddSubnetValidatorTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(7080),credentials_1=__webpack_require__(5375),basetx_1=__webpack_require__(9660),constants_2=__webpack_require__(8779),serialization_1=__webpack_require__(555),_1=__webpack_require__(7679),utils_1=__webpack_require__(338),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class AddSubnetValidatorTx extends basetx_1.BaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,nodeID,startTime,endTime,weight,subnetID){super(networkID,blockchainID,outs,ins,memo),this._typeName="AddSubnetValidatorTx",this._typeID=constants_1.PlatformVMConstants.ADDSUBNETVALIDATORTX,this.nodeID=buffer_1.Buffer.alloc(20),this.startTime=buffer_1.Buffer.alloc(8),this.endTime=buffer_1.Buffer.alloc(8),this.weight=buffer_1.Buffer.alloc(8),this.subnetID=buffer_1.Buffer.alloc(32),this.sigCount=buffer_1.Buffer.alloc(4),this.sigIdxs=[],void 0!==subnetID&&(this.subnetID="string"==typeof subnetID?bintools.cb58Decode(subnetID):subnetID),void 0!==nodeID&&(this.nodeID=nodeID),void 0!==startTime&&(this.startTime=bintools.fromBNToBuffer(startTime,8)),void 0!==endTime&&(this.endTime=bintools.fromBNToBuffer(endTime,8)),void 0!==weight&&(this.weight=bintools.fromBNToBuffer(weight,8));const subnetAuth=new _1.SubnetAuth;this.subnetAuth=subnetAuth}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{subnetID:serialization.encoder(this.subnetID,encoding,"Buffer","cb58")})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.subnetID=serialization.decoder(fields.subnetID,encoding,"cb58","Buffer",32)}getTxType(){return constants_1.PlatformVMConstants.ADDSUBNETVALIDATORTX}getNodeID(){return this.nodeID}getNodeIDString(){return(0,utils_1.bufferToNodeIDString)(this.nodeID)}getStartTime(){return bintools.fromBufferToBN(this.startTime)}getEndTime(){return bintools.fromBufferToBN(this.endTime)}getWeight(){return bintools.fromBufferToBN(this.weight)}getSubnetID(){return bintools.cb58Encode(this.subnetID)}getSubnetAuth(){return this.subnetAuth}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset),this.nodeID=bintools.copyFrom(bytes,offset,offset+20),offset+=20,this.startTime=bintools.copyFrom(bytes,offset,offset+8),offset+=8,this.endTime=bintools.copyFrom(bytes,offset,offset+8),offset+=8,this.weight=bintools.copyFrom(bytes,offset,offset+8),offset+=8,this.subnetID=bintools.copyFrom(bytes,offset,offset+32),offset+=32;const sa=new _1.SubnetAuth;return offset+=sa.fromBuffer(bintools.copyFrom(bytes,offset)),this.subnetAuth=sa,offset}toBuffer(){const superbuff=super.toBuffer(),bsize=superbuff.length+this.nodeID.length+this.startTime.length+this.endTime.length+this.weight.length+this.subnetID.length+this.subnetAuth.toBuffer().length,barr=[superbuff,this.nodeID,this.startTime,this.endTime,this.weight,this.subnetID,this.subnetAuth.toBuffer()];return buffer_1.Buffer.concat(barr,bsize)}clone(){const newAddSubnetValidatorTx=new AddSubnetValidatorTx;return newAddSubnetValidatorTx.fromBuffer(this.toBuffer()),newAddSubnetValidatorTx}create(...args){return new AddSubnetValidatorTx(...args)}addSignatureIdx(addressIdx,address){const addressIndex=buffer_1.Buffer.alloc(4);addressIndex.writeUIntBE(addressIdx,0,4),this.subnetAuth.addAddressIndex(addressIndex);const sigidx=new credentials_1.SigIdx,b=buffer_1.Buffer.alloc(4);b.writeUInt32BE(addressIdx,0),sigidx.fromBuffer(b),sigidx.setSource(address),this.sigIdxs.push(sigidx),this.sigCount.writeUInt32BE(this.sigIdxs.length,0)}getSigIdxs(){return this.sigIdxs}getCredentialID(){return constants_1.PlatformVMConstants.SECPCREDENTIAL}sign(msg,kc){const creds=super.sign(msg,kc),sigidxs=this.getSigIdxs(),cred=(0,_1.SelectCredentialClass)(this.getCredentialID());for(let i=0;i<sigidxs.length;i++){const signval=kc.getKey(sigidxs[`${i}`].getSource()).sign(msg),sig=new credentials_1.Signature;sig.fromBuffer(signval),cred.addSignature(sig)}return creds.push(cred),creds}}exports.AddSubnetValidatorTx=AddSubnetValidatorTx},1631:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PlatformVMAPI=void 0;const buffer_1=__webpack_require__(8764),bn_js_1=__importDefault(__webpack_require__(3550)),jrpcapi_1=__webpack_require__(5912),bintools_1=__importDefault(__webpack_require__(903)),keychain_1=__webpack_require__(2372),constants_1=__webpack_require__(8779),constants_2=__webpack_require__(7080),tx_1=__webpack_require__(8508),payload_1=__webpack_require__(9836),helperfunctions_1=__webpack_require__(5554),utxos_1=__webpack_require__(7248),errors_1=__webpack_require__(611),outputs_1=__webpack_require__(5168),utils_1=__webpack_require__(338),bintools=bintools_1.default.getInstance(),serialization=utils_1.Serialization.getInstance();class PlatformVMAPI extends jrpcapi_1.JRPCAPI{constructor(core,baseURL="/ext/bc/P"){super(core,baseURL),this.keychain=new keychain_1.KeyChain("",""),this.blockchainID=constants_1.PlatformChainID,this.blockchainAlias=void 0,this.AVAXAssetID=void 0,this.txFee=void 0,this.creationTxFee=void 0,this.minValidatorStake=void 0,this.minDelegatorStake=void 0,this.getBlockchainAlias=()=>{if(void 0===this.blockchainAlias){const netid=this.core.getNetworkID();return netid in constants_1.Defaults.network&&this.blockchainID in constants_1.Defaults.network[`${netid}`]?(this.blockchainAlias=constants_1.Defaults.network[`${netid}`][this.blockchainID].alias,this.blockchainAlias):void 0}return this.blockchainAlias},this.setBlockchainAlias=alias=>{this.blockchainAlias=alias},this.getBlockchainID=()=>this.blockchainID,this.refreshBlockchainID=blockchainID=>{const netid=this.core.getNetworkID();return void 0===blockchainID&&void 0!==constants_1.Defaults.network[`${netid}`]?(this.blockchainID=constants_1.PlatformChainID,!0):"string"==typeof blockchainID&&(this.blockchainID=blockchainID,!0)},this.parseAddress=addr=>{const alias=this.getBlockchainAlias(),blockchainID=this.getBlockchainID();return bintools.parseAddress(addr,blockchainID,alias,constants_2.PlatformVMConstants.ADDRESSLENGTH)},this.addressFromBuffer=address=>{const chainid=this.getBlockchainAlias()?this.getBlockchainAlias():this.getBlockchainID();return serialization.bufferToType(address,"bech32",this.core.getHRP(),chainid)},this.getAVAXAssetID=(refresh=!1)=>__awaiter(this,void 0,void 0,(function*(){if(void 0===this.AVAXAssetID||refresh){const assetID=yield this.getStakingAssetID();this.AVAXAssetID=bintools.cb58Decode(assetID)}return this.AVAXAssetID})),this.setAVAXAssetID=avaxAssetID=>{"string"==typeof avaxAssetID&&(avaxAssetID=bintools.cb58Decode(avaxAssetID)),this.AVAXAssetID=avaxAssetID},this.getDefaultTxFee=()=>this.core.getNetworkID()in constants_1.Defaults.network?new bn_js_1.default(constants_1.Defaults.network[this.core.getNetworkID()].P.txFee):new bn_js_1.default(0),this.getTxFee=()=>(void 0===this.txFee&&(this.txFee=this.getDefaultTxFee()),this.txFee),this.getCreateSubnetTxFee=()=>this.core.getNetworkID()in constants_1.Defaults.network?new bn_js_1.default(constants_1.Defaults.network[this.core.getNetworkID()].P.createSubnetTx):new bn_js_1.default(0),this.getCreateChainTxFee=()=>this.core.getNetworkID()in constants_1.Defaults.network?new bn_js_1.default(constants_1.Defaults.network[this.core.getNetworkID()].P.createChainTx):new bn_js_1.default(0),this.setTxFee=fee=>{this.txFee=fee},this.getDefaultCreationTxFee=()=>this.core.getNetworkID()in constants_1.Defaults.network?new bn_js_1.default(constants_1.Defaults.network[this.core.getNetworkID()].P.creationTxFee):new bn_js_1.default(0),this.getCreationTxFee=()=>(void 0===this.creationTxFee&&(this.creationTxFee=this.getDefaultCreationTxFee()),this.creationTxFee),this.setCreationTxFee=fee=>{this.creationTxFee=fee},this.keyChain=()=>this.keychain,this.newKeyChain=()=>{const alias=this.getBlockchainAlias();return this.keychain=alias?new keychain_1.KeyChain(this.core.getHRP(),alias):new keychain_1.KeyChain(this.core.getHRP(),this.blockchainID),this.keychain},this.checkGooseEgg=(utx,outTotal=new bn_js_1.default(0))=>__awaiter(this,void 0,void 0,(function*(){const avaxAssetID=yield this.getAVAXAssetID();let outputTotal=outTotal.gt(new bn_js_1.default(0))?outTotal:utx.getOutputTotal(avaxAssetID);const fee=utx.getBurn(avaxAssetID);return!(!fee.lte(constants_1.ONEAVAX.mul(new bn_js_1.default(10)))&&!fee.lte(outputTotal))})),this.getStakingAssetID=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("platform.getStakingAssetID")).data.result.assetID})),this.createBlockchain=(username,password,subnetID,vmID,fxIDs,name,genesis)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,fxIDs,vmID,name,genesisData:genesis};"string"==typeof subnetID?params.subnetID=subnetID:void 0!==subnetID&&(params.subnetID=bintools.cb58Encode(subnetID));return(yield this.callMethod("platform.createBlockchain",params)).data.result.txID})),this.getBlockchainStatus=blockchainID=>__awaiter(this,void 0,void 0,(function*(){const params={blockchainID};return(yield this.callMethod("platform.getBlockchainStatus",params)).data.result.status})),this.getValidatorsAt=(height,subnetID)=>__awaiter(this,void 0,void 0,(function*(){const params={height};void 0!==subnetID&&(params.subnetID=subnetID);return(yield this.callMethod("platform.getValidatorsAt",params)).data.result})),this.createAddress=(username,password)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password};return(yield this.callMethod("platform.createAddress",params)).data.result.address})),this.getBalance=address=>__awaiter(this,void 0,void 0,(function*(){if(void 0===this.parseAddress(address))throw new errors_1.AddressError("Error - PlatformVMAPI.getBalance: Invalid address format");const params={address};return(yield this.callMethod("platform.getBalance",params)).data.result})),this.listAddresses=(username,password)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password};return(yield this.callMethod("platform.listAddresses",params)).data.result.addresses})),this.getCurrentValidators=(subnetID,nodeIDs)=>__awaiter(this,void 0,void 0,(function*(){const params={};"string"==typeof subnetID?params.subnetID=subnetID:void 0!==subnetID&&(params.subnetID=bintools.cb58Encode(subnetID)),void 0!==nodeIDs&&nodeIDs.length>0&&(params.nodeIDs=nodeIDs);return(yield this.callMethod("platform.getCurrentValidators",params)).data.result})),this.getPendingValidators=(subnetID,nodeIDs)=>__awaiter(this,void 0,void 0,(function*(){const params={};"string"==typeof subnetID?params.subnetID=subnetID:void 0!==subnetID&&(params.subnetID=bintools.cb58Encode(subnetID)),void 0!==nodeIDs&&nodeIDs.length>0&&(params.nodeIDs=nodeIDs);return(yield this.callMethod("platform.getPendingValidators",params)).data.result})),this.sampleValidators=(sampleSize,subnetID)=>__awaiter(this,void 0,void 0,(function*(){const params={size:sampleSize.toString()};"string"==typeof subnetID?params.subnetID=subnetID:void 0!==subnetID&&(params.subnetID=bintools.cb58Encode(subnetID));return(yield this.callMethod("platform.sampleValidators",params)).data.result.validators})),this.addValidator=(username,password,nodeID,startTime,endTime,stakeAmount,rewardAddress,delegationFeeRate)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,nodeID,startTime:startTime.getTime()/1e3,endTime:endTime.getTime()/1e3,stakeAmount:stakeAmount.toString(10),rewardAddress};void 0!==delegationFeeRate&&(params.delegationFeeRate=delegationFeeRate.toString(10));return(yield this.callMethod("platform.addValidator",params)).data.result.txID})),this.addSubnetValidator=(username,password,nodeID,subnetID,startTime,endTime,weight)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,nodeID,startTime:startTime.getTime()/1e3,endTime:endTime.getTime()/1e3,weight};"string"==typeof subnetID?params.subnetID=subnetID:void 0!==subnetID&&(params.subnetID=bintools.cb58Encode(subnetID));return(yield this.callMethod("platform.addSubnetValidator",params)).data.result.txID})),this.addDelegator=(username,password,nodeID,startTime,endTime,stakeAmount,rewardAddress)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,nodeID,startTime:startTime.getTime()/1e3,endTime:endTime.getTime()/1e3,stakeAmount:stakeAmount.toString(10),rewardAddress};return(yield this.callMethod("platform.addDelegator",params)).data.result.txID})),this.createSubnet=(username,password,controlKeys,threshold)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,controlKeys,threshold},response=yield this.callMethod("platform.createSubnet",params);return response.data.result.txID?response.data.result.txID:response.data.result})),this.validatedBy=blockchainID=>__awaiter(this,void 0,void 0,(function*(){const params={blockchainID};return(yield this.callMethod("platform.validatedBy",params)).data.result.subnetID})),this.validates=subnetID=>__awaiter(this,void 0,void 0,(function*(){const params={subnetID};"string"==typeof subnetID?params.subnetID=subnetID:void 0!==subnetID&&(params.subnetID=bintools.cb58Encode(subnetID));return(yield this.callMethod("platform.validates",params)).data.result.blockchainIDs})),this.getBlockchains=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("platform.getBlockchains")).data.result.blockchains})),this.exportAVAX=(username,password,amount,to)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,to,amount:amount.toString(10)},response=yield this.callMethod("platform.exportAVAX",params);return response.data.result.txID?response.data.result.txID:response.data.result})),this.importAVAX=(username,password,to,sourceChain)=>__awaiter(this,void 0,void 0,(function*(){const params={to,sourceChain,username,password},response=yield this.callMethod("platform.importAVAX",params);return response.data.result.txID?response.data.result.txID:response.data.result})),this.issueTx=tx=>__awaiter(this,void 0,void 0,(function*(){let Transaction="";if("string"==typeof tx)Transaction=tx;else if(tx instanceof buffer_1.Buffer){const txobj=new tx_1.Tx;txobj.fromBuffer(tx),Transaction=txobj.toStringHex()}else{if(!(tx instanceof tx_1.Tx))throw new errors_1.TransactionError("Error - platform.issueTx: provided tx is not expected type of string, Buffer, or Tx");Transaction=tx.toStringHex()}const params={tx:Transaction.toString(),encoding:"hex"};return(yield this.callMethod("platform.issueTx",params)).data.result.txID})),this.getCurrentSupply=()=>__awaiter(this,void 0,void 0,(function*(){const response=yield this.callMethod("platform.getCurrentSupply");return new bn_js_1.default(response.data.result.supply,10)})),this.getHeight=()=>__awaiter(this,void 0,void 0,(function*(){const response=yield this.callMethod("platform.getHeight");return new bn_js_1.default(response.data.result.height,10)})),this.getMinStake=(refresh=!1)=>__awaiter(this,void 0,void 0,(function*(){if(!0!==refresh&&void 0!==this.minValidatorStake&&void 0!==this.minDelegatorStake)return{minValidatorStake:this.minValidatorStake,minDelegatorStake:this.minDelegatorStake};const response=yield this.callMethod("platform.getMinStake");return this.minValidatorStake=new bn_js_1.default(response.data.result.minValidatorStake,10),this.minDelegatorStake=new bn_js_1.default(response.data.result.minDelegatorStake,10),{minValidatorStake:this.minValidatorStake,minDelegatorStake:this.minDelegatorStake}})),this.getTotalStake=()=>__awaiter(this,void 0,void 0,(function*(){const response=yield this.callMethod("platform.getTotalStake");return new bn_js_1.default(response.data.result.stake,10)})),this.getMaxStakeAmount=(subnetID,nodeID,startTime,endTime)=>__awaiter(this,void 0,void 0,(function*(){const now=(0,helperfunctions_1.UnixNow)();if(startTime.gt(now)||endTime.lte(startTime))throw new errors_1.TimeError("PlatformVMAPI.getMaxStakeAmount -- startTime must be in the past and endTime must come after startTime");const params={nodeID,startTime,endTime};"string"==typeof subnetID?params.subnetID=subnetID:void 0!==subnetID&&(params.subnetID=bintools.cb58Encode(subnetID));const response=yield this.callMethod("platform.getMaxStakeAmount",params);return new bn_js_1.default(response.data.result.amount,10)})),this.setMinStake=(minValidatorStake,minDelegatorStake)=>{void 0!==minValidatorStake&&(this.minValidatorStake=minValidatorStake),void 0!==minDelegatorStake&&(this.minDelegatorStake=minDelegatorStake)},this.getStake=(addresses,encoding="hex")=>__awaiter(this,void 0,void 0,(function*(){const params={addresses,encoding},response=yield this.callMethod("platform.getStake",params);return{staked:new bn_js_1.default(response.data.result.staked,10),stakedOutputs:response.data.result.stakedOutputs.map((stakedOutput=>{const transferableOutput=new outputs_1.TransferableOutput;let buf;return buf="cb58"===encoding?bintools.cb58Decode(stakedOutput):buffer_1.Buffer.from(stakedOutput.replace(/0x/g,""),"hex"),transferableOutput.fromBuffer(buf,2),transferableOutput}))}})),this.getSubnets=ids=>__awaiter(this,void 0,void 0,(function*(){const params={};void 0!==typeof ids&&(params.ids=ids);return(yield this.callMethod("platform.getSubnets",params)).data.result.subnets})),this.exportKey=(username,password,address)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,address},response=yield this.callMethod("platform.exportKey",params);return response.data.result.privateKey?response.data.result.privateKey:response.data.result})),this.importKey=(username,password,privateKey)=>__awaiter(this,void 0,void 0,(function*(){const params={username,password,privateKey},response=yield this.callMethod("platform.importKey",params);return response.data.result.address?response.data.result.address:response.data.result})),this.getTx=(txID,encoding="hex")=>__awaiter(this,void 0,void 0,(function*(){const params={txID,encoding},response=yield this.callMethod("platform.getTx",params);return response.data.result.tx?response.data.result.tx:response.data.result})),this.getTxStatus=(txid,includeReason=!0)=>__awaiter(this,void 0,void 0,(function*(){const params={txID:txid,includeReason};return(yield this.callMethod("platform.getTxStatus",params)).data.result})),this.getUTXOs=(addresses,sourceChain,limit=0,startIndex,persistOpts,encoding="hex")=>__awaiter(this,void 0,void 0,(function*(){"string"==typeof addresses&&(addresses=[addresses]);const params={addresses,limit,encoding};void 0!==startIndex&&startIndex&&(params.startIndex=startIndex),void 0!==sourceChain&&(params.sourceChain=sourceChain);const response=yield this.callMethod("platform.getUTXOs",params),utxos=new utxos_1.UTXOSet;let data=response.data.result.utxos;if(persistOpts&&"object"==typeof persistOpts){if(this.db.has(persistOpts.getName())){const selfArray=this.db.get(persistOpts.getName());if(Array.isArray(selfArray)){utxos.addArray(data);const self=new utxos_1.UTXOSet;self.addArray(selfArray),self.mergeByRule(utxos,persistOpts.getMergeRule()),data=self.getAllUTXOStrings()}}this.db.set(persistOpts.getName(),data,persistOpts.getOverwrite())}if(data.length>0&&"0x"===data[0].substring(0,2)){const cb58Strs=[];data.forEach((str=>{cb58Strs.push(bintools.cb58Encode(new buffer_1.Buffer(str.slice(2),"hex")))})),utxos.addArray(cb58Strs,!1)}else utxos.addArray(data,!1);return response.data.result.utxos=utxos,response.data.result.numFetched=parseInt(response.data.result.numFetched),response.data.result})),this.buildImportTx=(utxoset,ownerAddresses,sourceChain,toAddresses,fromAddresses,changeAddresses,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>__awaiter(this,void 0,void 0,(function*(){const to=this._cleanAddressArray(toAddresses,"buildImportTx").map((a=>bintools.stringToAddress(a))),from=this._cleanAddressArray(fromAddresses,"buildImportTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildImportTx").map((a=>bintools.stringToAddress(a)));let srcChain;if(void 0===sourceChain)throw new errors_1.ChainIdError("Error - PlatformVMAPI.buildImportTx: Source ChainID is undefined.");if("string"==typeof sourceChain)srcChain=sourceChain,sourceChain=bintools.cb58Decode(sourceChain);else if(!(sourceChain instanceof buffer_1.Buffer))throw new errors_1.ChainIdError("Error - PlatformVMAPI.buildImportTx: Invalid destinationChain type: "+typeof sourceChain);const atomicUTXOs=yield(yield this.getUTXOs(ownerAddresses,srcChain,0,void 0)).utxos,avaxAssetID=yield this.getAVAXAssetID();memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const atomics=atomicUTXOs.getAllUTXOs(),builtUnsignedTx=utxoset.buildImportTx(this.core.getNetworkID(),bintools.cb58Decode(this.blockchainID),to,from,change,atomics,sourceChain,this.getTxFee(),avaxAssetID,memo,asOf,locktime,threshold);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new errors_1.GooseEggCheckError("Failed Goose Egg Check");return builtUnsignedTx})),this.buildExportTx=(utxoset,amount,destinationChain,toAddresses,fromAddresses,changeAddresses,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>__awaiter(this,void 0,void 0,(function*(){let prefixes={};if(toAddresses.map((a=>{prefixes[a.split("-")[0]]=!0})),1!==Object.keys(prefixes).length)throw new errors_1.AddressError("Error - PlatformVMAPI.buildExportTx: To addresses must have the same chainID prefix.");if(void 0===destinationChain)throw new errors_1.ChainIdError("Error - PlatformVMAPI.buildExportTx: Destination ChainID is undefined.");if("string"==typeof destinationChain)destinationChain=bintools.cb58Decode(destinationChain);else if(!(destinationChain instanceof buffer_1.Buffer))throw new errors_1.ChainIdError("Error - PlatformVMAPI.buildExportTx: Invalid destinationChain type: "+typeof destinationChain);if(32!==destinationChain.length)throw new errors_1.ChainIdError("Error - PlatformVMAPI.buildExportTx: Destination ChainID must be 32 bytes in length.");let to=[];toAddresses.map((a=>{to.push(bintools.stringToAddress(a))}));const from=this._cleanAddressArray(fromAddresses,"buildExportTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildExportTx").map((a=>bintools.stringToAddress(a)));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const avaxAssetID=yield this.getAVAXAssetID(),builtUnsignedTx=utxoset.buildExportTx(this.core.getNetworkID(),bintools.cb58Decode(this.blockchainID),amount,avaxAssetID,to,from,change,destinationChain,this.getTxFee(),avaxAssetID,memo,asOf,locktime,threshold);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new errors_1.GooseEggCheckError("Failed Goose Egg Check");return builtUnsignedTx})),this.buildAddSubnetValidatorTx=(utxoset,fromAddresses,changeAddresses,nodeID,startTime,endTime,weight,subnetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),subnetAuthCredentials=[])=>__awaiter(this,void 0,void 0,(function*(){const from=this._cleanAddressArray(fromAddresses,"buildAddSubnetValidatorTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildAddSubnetValidatorTx").map((a=>bintools.stringToAddress(a)));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const avaxAssetID=yield this.getAVAXAssetID(),now=(0,helperfunctions_1.UnixNow)();if(startTime.lt(now)||endTime.lte(startTime))throw new Error("PlatformVMAPI.buildAddSubnetValidatorTx -- startTime must be in the future and endTime must come after startTime");const builtUnsignedTx=utxoset.buildAddSubnetValidatorTx(this.core.getNetworkID(),bintools.cb58Decode(this.blockchainID),from,change,(0,helperfunctions_1.NodeIDStringToBuffer)(nodeID),startTime,endTime,weight,subnetID,this.getDefaultTxFee(),avaxAssetID,memo,asOf,subnetAuthCredentials);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new Error("Failed Goose Egg Check");return builtUnsignedTx})),this.buildAddDelegatorTx=(utxoset,toAddresses,fromAddresses,changeAddresses,nodeID,startTime,endTime,stakeAmount,rewardAddresses,rewardLocktime=new bn_js_1.default(0),rewardThreshold=1,memo,asOf=(0,helperfunctions_1.UnixNow)())=>__awaiter(this,void 0,void 0,(function*(){const to=this._cleanAddressArray(toAddresses,"buildAddDelegatorTx").map((a=>bintools.stringToAddress(a))),from=this._cleanAddressArray(fromAddresses,"buildAddDelegatorTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildAddDelegatorTx").map((a=>bintools.stringToAddress(a))),rewards=this._cleanAddressArray(rewardAddresses,"buildAddDelegatorTx").map((a=>bintools.stringToAddress(a)));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const minStake=(yield this.getMinStake()).minDelegatorStake;if(stakeAmount.lt(minStake))throw new errors_1.StakeError("PlatformVMAPI.buildAddDelegatorTx -- stake amount must be at least "+minStake.toString(10));const avaxAssetID=yield this.getAVAXAssetID(),now=(0,helperfunctions_1.UnixNow)();if(startTime.lt(now)||endTime.lte(startTime))throw new errors_1.TimeError("PlatformVMAPI.buildAddDelegatorTx -- startTime must be in the future and endTime must come after startTime");const builtUnsignedTx=utxoset.buildAddDelegatorTx(this.core.getNetworkID(),bintools.cb58Decode(this.blockchainID),avaxAssetID,to,from,change,(0,helperfunctions_1.NodeIDStringToBuffer)(nodeID),startTime,endTime,stakeAmount,rewardLocktime,rewardThreshold,rewards,new bn_js_1.default(0),avaxAssetID,memo,asOf);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new errors_1.GooseEggCheckError("Failed Goose Egg Check");return builtUnsignedTx})),this.buildAddValidatorTx=(utxoset,toAddresses,fromAddresses,changeAddresses,nodeID,startTime,endTime,stakeAmount,rewardAddresses,delegationFee,rewardLocktime=new bn_js_1.default(0),rewardThreshold=1,memo,asOf=(0,helperfunctions_1.UnixNow)())=>__awaiter(this,void 0,void 0,(function*(){const to=this._cleanAddressArray(toAddresses,"buildAddValidatorTx").map((a=>bintools.stringToAddress(a))),from=this._cleanAddressArray(fromAddresses,"buildAddValidatorTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildAddValidatorTx").map((a=>bintools.stringToAddress(a))),rewards=this._cleanAddressArray(rewardAddresses,"buildAddValidatorTx").map((a=>bintools.stringToAddress(a)));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const minStake=(yield this.getMinStake()).minValidatorStake;if(stakeAmount.lt(minStake))throw new errors_1.StakeError("PlatformVMAPI.buildAddValidatorTx -- stake amount must be at least "+minStake.toString(10));if("number"!=typeof delegationFee||delegationFee>100||delegationFee<0)throw new errors_1.DelegationFeeError("PlatformVMAPI.buildAddValidatorTx -- delegationFee must be a number between 0 and 100");const avaxAssetID=yield this.getAVAXAssetID(),now=(0,helperfunctions_1.UnixNow)();if(startTime.lt(now)||endTime.lte(startTime))throw new errors_1.TimeError("PlatformVMAPI.buildAddValidatorTx -- startTime must be in the future and endTime must come after startTime");const builtUnsignedTx=utxoset.buildAddValidatorTx(this.core.getNetworkID(),bintools.cb58Decode(this.blockchainID),avaxAssetID,to,from,change,(0,helperfunctions_1.NodeIDStringToBuffer)(nodeID),startTime,endTime,stakeAmount,rewardLocktime,rewardThreshold,rewards,delegationFee,new bn_js_1.default(0),avaxAssetID,memo,asOf);if(!(yield this.checkGooseEgg(builtUnsignedTx)))throw new errors_1.GooseEggCheckError("Failed Goose Egg Check");return builtUnsignedTx})),this.buildCreateSubnetTx=(utxoset,fromAddresses,changeAddresses,subnetOwnerAddresses,subnetOwnerThreshold,memo,asOf=(0,helperfunctions_1.UnixNow)())=>__awaiter(this,void 0,void 0,(function*(){const from=this._cleanAddressArray(fromAddresses,"buildCreateSubnetTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildCreateSubnetTx").map((a=>bintools.stringToAddress(a))),owners=this._cleanAddressArray(subnetOwnerAddresses,"buildCreateSubnetTx").map((a=>bintools.stringToAddress(a)));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const avaxAssetID=yield this.getAVAXAssetID(),networkID=this.core.getNetworkID(),blockchainID=bintools.cb58Decode(this.blockchainID),fee=this.getCreateSubnetTxFee(),builtUnsignedTx=utxoset.buildCreateSubnetTx(networkID,blockchainID,from,change,owners,subnetOwnerThreshold,fee,avaxAssetID,memo,asOf);if(!(yield this.checkGooseEgg(builtUnsignedTx,this.getCreationTxFee())))throw new errors_1.GooseEggCheckError("Failed Goose Egg Check");return builtUnsignedTx})),this.buildCreateChainTx=(utxoset,fromAddresses,changeAddresses,subnetID,chainName,vmID,fxIDs,genesisData,memo,asOf=(0,helperfunctions_1.UnixNow)(),subnetAuthCredentials=[])=>__awaiter(this,void 0,void 0,(function*(){const from=this._cleanAddressArray(fromAddresses,"buildCreateChainTx").map((a=>bintools.stringToAddress(a))),change=this._cleanAddressArray(changeAddresses,"buildCreateChainTx").map((a=>bintools.stringToAddress(a)));memo instanceof payload_1.PayloadBase&&(memo=memo.getPayload());const avaxAssetID=yield this.getAVAXAssetID();fxIDs=fxIDs.sort();const networkID=this.core.getNetworkID(),blockchainID=bintools.cb58Decode(this.blockchainID),fee=this.getCreateChainTxFee(),builtUnsignedTx=utxoset.buildCreateChainTx(networkID,blockchainID,from,change,subnetID,chainName,vmID,fxIDs,genesisData,fee,avaxAssetID,memo,asOf,subnetAuthCredentials);if(!(yield this.checkGooseEgg(builtUnsignedTx,this.getCreationTxFee())))throw new errors_1.GooseEggCheckError("Failed Goose Egg Check");return builtUnsignedTx})),this.getTimestamp=()=>__awaiter(this,void 0,void 0,(function*(){return(yield this.callMethod("platform.getTimestamp")).data.result.timestamp})),this.getRewardUTXOs=(txID,encoding)=>__awaiter(this,void 0,void 0,(function*(){const params={txID,encoding};return(yield this.callMethod("platform.getRewardUTXOs",params)).data.result})),this.blockchainID=constants_1.PlatformChainID;const netID=core.getNetworkID();if(netID in constants_1.Defaults.network&&this.blockchainID in constants_1.Defaults.network[`${netID}`]){const alias=constants_1.Defaults.network[`${netID}`][this.blockchainID].alias;this.keychain=new keychain_1.KeyChain(this.core.getHRP(),alias)}else this.keychain=new keychain_1.KeyChain(this.core.getHRP(),this.blockchainID)}_cleanAddressArray(addresses,caller){const addrs=[],chainid=this.getBlockchainAlias()?this.getBlockchainAlias():this.getBlockchainID();if(addresses&&addresses.length>0)for(let i=0;i<addresses.length;i++)if("string"==typeof addresses[`${i}`]){if(void 0===this.parseAddress(addresses[`${i}`]))throw new errors_1.AddressError("Error - Invalid address format");addrs.push(addresses[`${i}`])}else{const bech32="bech32";addrs.push(serialization.bufferToType(addresses[`${i}`],bech32,this.core.getHRP(),chainid))}return addrs}}exports.PlatformVMAPI=PlatformVMAPI},9660:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(7080),outputs_1=__webpack_require__(5168),inputs_1=__webpack_require__(7410),credentials_1=__webpack_require__(6525),tx_1=__webpack_require__(613),credentials_2=__webpack_require__(5375),constants_2=__webpack_require__(8779),tx_2=__webpack_require__(8508),bintools=bintools_1.default.getInstance();class BaseTx extends tx_1.StandardBaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo){super(networkID,blockchainID,outs,ins,memo),this._typeName="BaseTx",this._typeID=constants_1.PlatformVMConstants.CREATESUBNETTX}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.outs=fields.outs.map((o=>{let newOut=new outputs_1.TransferableOutput;return newOut.deserialize(o,encoding),newOut})),this.ins=fields.ins.map((i=>{let newIn=new inputs_1.TransferableInput;return newIn.deserialize(i,encoding),newIn})),this.numouts=buffer_1.Buffer.alloc(4),this.numouts.writeUInt32BE(this.outs.length,0),this.numins=buffer_1.Buffer.alloc(4),this.numins.writeUInt32BE(this.ins.length,0)}getOuts(){return this.outs}getIns(){return this.ins}getTotalOuts(){return this.getOuts()}getTxType(){return constants_1.PlatformVMConstants.BASETX}fromBuffer(bytes,offset=0){this.networkID=bintools.copyFrom(bytes,offset,offset+4),offset+=4,this.blockchainID=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.numouts=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const outcount=this.numouts.readUInt32BE(0);this.outs=[];for(let i=0;i<outcount;i++){const xferout=new outputs_1.TransferableOutput;offset=xferout.fromBuffer(bytes,offset),this.outs.push(xferout)}this.numins=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const incount=this.numins.readUInt32BE(0);this.ins=[];for(let i=0;i<incount;i++){const xferin=new inputs_1.TransferableInput;offset=xferin.fromBuffer(bytes,offset),this.ins.push(xferin)}let memolen=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.memo=bintools.copyFrom(bytes,offset,offset+memolen),offset+=memolen}sign(msg,kc){const creds=[];for(let i=0;i<this.ins.length;i++){const cred=(0,credentials_1.SelectCredentialClass)(this.ins[`${i}`].getInput().getCredentialID()),sigidxs=this.ins[`${i}`].getInput().getSigIdxs();for(let j=0;j<sigidxs.length;j++){const signval=kc.getKey(sigidxs[`${j}`].getSource()).sign(msg),sig=new credentials_2.Signature;sig.fromBuffer(signval),cred.addSignature(sig)}creds.push(cred)}return creds}clone(){let newbase=new BaseTx;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new BaseTx(...args)}select(id,...args){return(0,tx_2.SelectTxClass)(id,...args)}}exports.BaseTx=BaseTx},7080:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PlatformVMConstants=void 0;class PlatformVMConstants{}exports.PlatformVMConstants=PlatformVMConstants,PlatformVMConstants.LATESTCODEC=0,PlatformVMConstants.SECPFXID=0,PlatformVMConstants.SECPXFEROUTPUTID=7,PlatformVMConstants.SUBNETAUTHID=10,PlatformVMConstants.SECPOWNEROUTPUTID=11,PlatformVMConstants.STAKEABLELOCKOUTID=22,PlatformVMConstants.SECPINPUTID=5,PlatformVMConstants.STAKEABLELOCKINID=21,PlatformVMConstants.LOCKEDSTAKEABLES=[PlatformVMConstants.STAKEABLELOCKINID,PlatformVMConstants.STAKEABLELOCKOUTID],PlatformVMConstants.BASETX=0,PlatformVMConstants.SUBNETAUTH=10,PlatformVMConstants.ADDVALIDATORTX=12,PlatformVMConstants.ADDSUBNETVALIDATORTX=13,PlatformVMConstants.ADDDELEGATORTX=14,PlatformVMConstants.CREATECHAINTX=15,PlatformVMConstants.CREATESUBNETTX=16,PlatformVMConstants.IMPORTTX=17,PlatformVMConstants.EXPORTTX=18,PlatformVMConstants.ADVANCETIMETX=19,PlatformVMConstants.REWARDVALIDATORTX=20,PlatformVMConstants.SECPCREDENTIAL=9,PlatformVMConstants.ASSETIDLEN=32,PlatformVMConstants.BLOCKCHAINIDLEN=32,PlatformVMConstants.SYMBOLMAXLEN=4,PlatformVMConstants.ASSETNAMELEN=128,PlatformVMConstants.ADDRESSLENGTH=20},9115:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CreateChainTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(7080),credentials_1=__webpack_require__(5375),basetx_1=__webpack_require__(9660),constants_2=__webpack_require__(8779),serialization_1=__webpack_require__(555),_1=__webpack_require__(7679),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class CreateChainTx extends basetx_1.BaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,subnetID,chainName,vmID,fxIDs,genesisData){if(super(networkID,blockchainID,outs,ins,memo),this._typeName="CreateChainTx",this._typeID=constants_1.PlatformVMConstants.CREATECHAINTX,this.subnetID=buffer_1.Buffer.alloc(32),this.chainName="",this.vmID=buffer_1.Buffer.alloc(32),this.numFXIDs=buffer_1.Buffer.alloc(4),this.fxIDs=[],this.genesisData=buffer_1.Buffer.alloc(32),this.sigCount=buffer_1.Buffer.alloc(4),this.sigIdxs=[],void 0!==subnetID&&(this.subnetID="string"==typeof subnetID?bintools.cb58Decode(subnetID):subnetID),void 0!==chainName&&(this.chainName=chainName),void 0!==vmID){const buf=buffer_1.Buffer.alloc(32);buf.write(vmID,0,vmID.length),this.vmID=buf}if(void 0!==fxIDs){this.numFXIDs.writeUInt32BE(fxIDs.length,0);const fxIDBufs=[];fxIDs.forEach((fxID=>{const buf=buffer_1.Buffer.alloc(32);buf.write(fxID,0,fxID.length,"utf8"),fxIDBufs.push(buf)})),this.fxIDs=fxIDBufs}void 0!==genesisData&&"string"!=typeof genesisData?this.genesisData=genesisData.toBuffer():"string"==typeof genesisData&&(this.genesisData=buffer_1.Buffer.from(genesisData));const subnetAuth=new _1.SubnetAuth;this.subnetAuth=subnetAuth}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{subnetID:serialization.encoder(this.subnetID,encoding,"Buffer","cb58")})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.subnetID=serialization.decoder(fields.subnetID,encoding,"cb58","Buffer",32)}getTxType(){return constants_1.PlatformVMConstants.CREATECHAINTX}getSubnetAuth(){return this.subnetAuth}getSubnetID(){return bintools.cb58Encode(this.subnetID)}getChainName(){return this.chainName}getVMID(){return this.vmID}getFXIDs(){return this.fxIDs}getGenesisData(){return bintools.cb58Encode(this.genesisData)}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset),this.subnetID=bintools.copyFrom(bytes,offset,offset+32),offset+=32;const chainNameSize=bintools.copyFrom(bytes,offset,offset+2).readUInt16BE(0);offset+=2,this.chainName=bintools.copyFrom(bytes,offset,offset+chainNameSize).toString("utf8"),offset+=chainNameSize,this.vmID=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.numFXIDs=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const nfxids=parseInt(this.numFXIDs.toString("hex"),10);for(let i=0;i<nfxids;i++)this.fxIDs.push(bintools.copyFrom(bytes,offset,offset+32)),offset+=32;const genesisDataSize=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4,this.genesisData=bintools.copyFrom(bytes,offset,offset+genesisDataSize),offset+=genesisDataSize;const sa=new _1.SubnetAuth;return offset+=sa.fromBuffer(bintools.copyFrom(bytes,offset)),this.subnetAuth=sa,offset}toBuffer(){const superbuff=super.toBuffer(),chainNameBuff=buffer_1.Buffer.alloc(this.chainName.length);chainNameBuff.write(this.chainName,0,this.chainName.length,"utf8");const chainNameSize=buffer_1.Buffer.alloc(2);chainNameSize.writeUIntBE(this.chainName.length,0,2);let bsize=superbuff.length+this.subnetID.length+chainNameSize.length+chainNameBuff.length+this.vmID.length+this.numFXIDs.length;const barr=[superbuff,this.subnetID,chainNameSize,chainNameBuff,this.vmID,this.numFXIDs];this.fxIDs.forEach((fxID=>{bsize+=fxID.length,barr.push(fxID)})),bsize+=4,bsize+=this.genesisData.length;const gdLength=buffer_1.Buffer.alloc(4);return gdLength.writeUIntBE(this.genesisData.length,0,4),barr.push(gdLength),barr.push(this.genesisData),bsize+=this.subnetAuth.toBuffer().length,barr.push(this.subnetAuth.toBuffer()),buffer_1.Buffer.concat(barr,bsize)}clone(){const newCreateChainTx=new CreateChainTx;return newCreateChainTx.fromBuffer(this.toBuffer()),newCreateChainTx}create(...args){return new CreateChainTx(...args)}addSignatureIdx(addressIdx,address){const addressIndex=buffer_1.Buffer.alloc(4);addressIndex.writeUIntBE(addressIdx,0,4),this.subnetAuth.addAddressIndex(addressIndex);const sigidx=new credentials_1.SigIdx,b=buffer_1.Buffer.alloc(4);b.writeUInt32BE(addressIdx,0),sigidx.fromBuffer(b),sigidx.setSource(address),this.sigIdxs.push(sigidx),this.sigCount.writeUInt32BE(this.sigIdxs.length,0)}getSigIdxs(){return this.sigIdxs}getCredentialID(){return constants_1.PlatformVMConstants.SECPCREDENTIAL}sign(msg,kc){const creds=super.sign(msg,kc),sigidxs=this.getSigIdxs(),cred=(0,_1.SelectCredentialClass)(this.getCredentialID());for(let i=0;i<sigidxs.length;i++){const signval=kc.getKey(sigidxs[`${i}`].getSource()).sign(msg),sig=new credentials_1.Signature;sig.fromBuffer(signval),cred.addSignature(sig)}return creds.push(cred),creds}}exports.CreateChainTx=CreateChainTx},6547:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CreateSubnetTx=void 0;const buffer_1=__webpack_require__(8764),basetx_1=__webpack_require__(9660),constants_1=__webpack_require__(7080),constants_2=__webpack_require__(8779),outputs_1=__webpack_require__(5168),errors_1=__webpack_require__(611);class CreateSubnetTx extends basetx_1.BaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,subnetOwners){super(networkID,blockchainID,outs,ins,memo),this._typeName="CreateSubnetTx",this._typeID=constants_1.PlatformVMConstants.CREATESUBNETTX,this.subnetOwners=void 0,this.subnetOwners=subnetOwners}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{subnetOwners:this.subnetOwners.serialize(encoding)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.subnetOwners=new outputs_1.SECPOwnerOutput,this.subnetOwners.deserialize(fields.subnetOwners,encoding)}getTxType(){return this._typeID}getSubnetOwners(){return this.subnetOwners}fromBuffer(bytes,offset=0){return offset=super.fromBuffer(bytes,offset),offset+=4,this.subnetOwners=new outputs_1.SECPOwnerOutput,offset=this.subnetOwners.fromBuffer(bytes,offset)}toBuffer(){if(void 0===this.subnetOwners||!(this.subnetOwners instanceof outputs_1.SECPOwnerOutput))throw new errors_1.SubnetOwnerError("CreateSubnetTx.toBuffer -- this.subnetOwners is not a SECPOwnerOutput");let typeID=buffer_1.Buffer.alloc(4);typeID.writeUInt32BE(this.subnetOwners.getOutputID(),0);let barr=[super.toBuffer(),typeID,this.subnetOwners.toBuffer()];return buffer_1.Buffer.concat(barr)}}exports.CreateSubnetTx=CreateSubnetTx},6525:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SECPCredential=exports.SelectCredentialClass=void 0;const constants_1=__webpack_require__(7080),credentials_1=__webpack_require__(5375),errors_1=__webpack_require__(611);exports.SelectCredentialClass=(credid,...args)=>{if(credid===constants_1.PlatformVMConstants.SECPCREDENTIAL)return new SECPCredential(...args);throw new errors_1.CredIdError("Error - SelectCredentialClass: unknown credid")};class SECPCredential extends credentials_1.Credential{constructor(){super(...arguments),this._typeName="SECPCredential",this._typeID=constants_1.PlatformVMConstants.SECPCREDENTIAL}getCredentialID(){return this._typeID}clone(){let newbase=new SECPCredential;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new SECPCredential(...args)}select(id,...args){return(0,exports.SelectCredentialClass)(id,...args)}}exports.SECPCredential=SECPCredential},5619:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExportTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(7080),outputs_1=__webpack_require__(5168),basetx_1=__webpack_require__(9660),constants_2=__webpack_require__(8779),bn_js_1=__importDefault(__webpack_require__(3550)),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class ExportTx extends basetx_1.BaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,destinationChain,exportOuts){if(super(networkID,blockchainID,outs,ins,memo),this._typeName="ExportTx",this._typeID=constants_1.PlatformVMConstants.EXPORTTX,this.destinationChain=buffer_1.Buffer.alloc(32),this.numOuts=buffer_1.Buffer.alloc(4),this.exportOuts=[],this.destinationChain=destinationChain,void 0!==exportOuts&&Array.isArray(exportOuts)){for(let i=0;i<exportOuts.length;i++)if(!(exportOuts[`${i}`]instanceof outputs_1.TransferableOutput))throw new errors_1.TransferableOutputError("Error - ExportTx.constructor: invalid TransferableOutput in array parameter 'exportOuts'");this.exportOuts=exportOuts}}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{destinationChain:serialization.encoder(this.destinationChain,encoding,"Buffer","cb58"),exportOuts:this.exportOuts.map((e=>e.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.destinationChain=serialization.decoder(fields.destinationChain,encoding,"cb58","Buffer",32),this.exportOuts=fields.exportOuts.map((e=>{let eo=new outputs_1.TransferableOutput;return eo.deserialize(e,encoding),eo})),this.numOuts=buffer_1.Buffer.alloc(4),this.numOuts.writeUInt32BE(this.exportOuts.length,0)}getTxType(){return constants_1.PlatformVMConstants.EXPORTTX}getExportOutputs(){return this.exportOuts}getExportTotal(){let val=new bn_js_1.default(0);for(let i=0;i<this.exportOuts.length;i++)val=val.add(this.exportOuts[`${i}`].getOutput().getAmount());return val}getTotalOuts(){return[...this.getOuts(),...this.getExportOutputs()]}getDestinationChain(){return this.destinationChain}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset),this.destinationChain=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.numOuts=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const numOuts=this.numOuts.readUInt32BE(0);for(let i=0;i<numOuts;i++){const anOut=new outputs_1.TransferableOutput;offset=anOut.fromBuffer(bytes,offset),this.exportOuts.push(anOut)}return offset}toBuffer(){if(void 0===this.destinationChain)throw new errors_1.ChainIdError("ExportTx.toBuffer -- this.destinationChain is undefined");this.numOuts.writeUInt32BE(this.exportOuts.length,0);let barr=[super.toBuffer(),this.destinationChain,this.numOuts];this.exportOuts=this.exportOuts.sort(outputs_1.TransferableOutput.comparator());for(let i=0;i<this.exportOuts.length;i++)barr.push(this.exportOuts[`${i}`].toBuffer());return buffer_1.Buffer.concat(barr)}clone(){let newbase=new ExportTx;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new ExportTx(...args)}}exports.ExportTx=ExportTx},5416:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImportTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(7080),inputs_1=__webpack_require__(7410),credentials_1=__webpack_require__(6525),credentials_2=__webpack_require__(5375),basetx_1=__webpack_require__(9660),constants_2=__webpack_require__(8779),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class ImportTx extends basetx_1.BaseTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,sourceChain,importIns){if(super(networkID,blockchainID,outs,ins,memo),this._typeName="ImportTx",this._typeID=constants_1.PlatformVMConstants.IMPORTTX,this.sourceChain=buffer_1.Buffer.alloc(32),this.numIns=buffer_1.Buffer.alloc(4),this.importIns=[],this.sourceChain=sourceChain,void 0!==importIns&&Array.isArray(importIns)){for(let i=0;i<importIns.length;i++)if(!(importIns[`${i}`]instanceof inputs_1.TransferableInput))throw new errors_1.TransferableInputError("Error - ImportTx.constructor: invalid TransferableInput in array parameter 'importIns'");this.importIns=importIns}}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{sourceChain:serialization.encoder(this.sourceChain,encoding,"Buffer","cb58"),importIns:this.importIns.map((i=>i.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.sourceChain=serialization.decoder(fields.sourceChain,encoding,"cb58","Buffer",32),this.importIns=fields.importIns.map((i=>{let ii=new inputs_1.TransferableInput;return ii.deserialize(i,encoding),ii})),this.numIns=buffer_1.Buffer.alloc(4),this.numIns.writeUInt32BE(this.importIns.length,0)}getTxType(){return this._typeID}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset),this.sourceChain=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.numIns=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const numIns=this.numIns.readUInt32BE(0);for(let i=0;i<numIns;i++){const anIn=new inputs_1.TransferableInput;offset=anIn.fromBuffer(bytes,offset),this.importIns.push(anIn)}return offset}toBuffer(){if(void 0===this.sourceChain)throw new errors_1.ChainIdError("ImportTx.toBuffer -- this.sourceChain is undefined");this.numIns.writeUInt32BE(this.importIns.length,0);let barr=[super.toBuffer(),this.sourceChain,this.numIns];this.importIns=this.importIns.sort(inputs_1.TransferableInput.comparator());for(let i=0;i<this.importIns.length;i++)barr.push(this.importIns[`${i}`].toBuffer());return buffer_1.Buffer.concat(barr)}getImportInputs(){return this.importIns}getSourceChain(){return this.sourceChain}sign(msg,kc){const creds=super.sign(msg,kc);for(let i=0;i<this.importIns.length;i++){const cred=(0,credentials_1.SelectCredentialClass)(this.importIns[`${i}`].getInput().getCredentialID()),sigidxs=this.importIns[`${i}`].getInput().getSigIdxs();for(let j=0;j<sigidxs.length;j++){const signval=kc.getKey(sigidxs[`${j}`].getSource()).sign(msg),sig=new credentials_2.Signature;sig.fromBuffer(signval),cred.addSignature(sig)}creds.push(cred)}return creds}clone(){let newbase=new ImportTx;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new ImportTx(...args)}}exports.ImportTx=ImportTx},7679:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(1631),exports),__exportStar(__webpack_require__(1726),exports),__exportStar(__webpack_require__(9660),exports),__exportStar(__webpack_require__(7080),exports),__exportStar(__webpack_require__(9115),exports),__exportStar(__webpack_require__(6547),exports),__exportStar(__webpack_require__(6525),exports),__exportStar(__webpack_require__(5619),exports),__exportStar(__webpack_require__(5416),exports),__exportStar(__webpack_require__(7410),exports),__exportStar(__webpack_require__(6333),exports),__exportStar(__webpack_require__(2372),exports),__exportStar(__webpack_require__(5168),exports),__exportStar(__webpack_require__(9968),exports),__exportStar(__webpack_require__(8508),exports),__exportStar(__webpack_require__(7248),exports),__exportStar(__webpack_require__(6237),exports)},7410:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StakeableLockIn=exports.SECPTransferInput=exports.AmountInput=exports.TransferableInput=exports.ParseableInput=exports.SelectInputClass=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(7080),input_1=__webpack_require__(1149),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();exports.SelectInputClass=(inputid,...args)=>{if(inputid===constants_1.PlatformVMConstants.SECPINPUTID)return new SECPTransferInput(...args);if(inputid===constants_1.PlatformVMConstants.STAKEABLELOCKINID)return new StakeableLockIn(...args);throw new errors_1.InputIdError("Error - SelectInputClass: unknown inputid")};class ParseableInput extends input_1.StandardParseableInput{constructor(){super(...arguments),this._typeName="ParseableInput",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.input=(0,exports.SelectInputClass)(fields.input._typeID),this.input.deserialize(fields.input,encoding)}fromBuffer(bytes,offset=0){const inputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.input=(0,exports.SelectInputClass)(inputid),this.input.fromBuffer(bytes,offset)}}exports.ParseableInput=ParseableInput;class TransferableInput extends input_1.StandardTransferableInput{constructor(){super(...arguments),this._typeName="TransferableInput",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.input=(0,exports.SelectInputClass)(fields.input._typeID),this.input.deserialize(fields.input,encoding)}fromBuffer(bytes,offset=0){this.txid=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.outputidx=bintools.copyFrom(bytes,offset,offset+4),offset+=4,this.assetID=bintools.copyFrom(bytes,offset,offset+constants_1.PlatformVMConstants.ASSETIDLEN),offset+=32;const inputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.input=(0,exports.SelectInputClass)(inputid),this.input.fromBuffer(bytes,offset)}}exports.TransferableInput=TransferableInput;class AmountInput extends input_1.StandardAmountInput{constructor(){super(...arguments),this._typeName="AmountInput",this._typeID=void 0}select(id,...args){return(0,exports.SelectInputClass)(id,...args)}}exports.AmountInput=AmountInput;class SECPTransferInput extends AmountInput{constructor(){super(...arguments),this._typeName="SECPTransferInput",this._typeID=constants_1.PlatformVMConstants.SECPINPUTID,this.getCredentialID=()=>constants_1.PlatformVMConstants.SECPCREDENTIAL}getInputID(){return this._typeID}create(...args){return new SECPTransferInput(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}}exports.SECPTransferInput=SECPTransferInput;class StakeableLockIn extends AmountInput{constructor(amount,stakeableLocktime,transferableInput){super(amount),this._typeName="StakeableLockIn",this._typeID=constants_1.PlatformVMConstants.STAKEABLELOCKINID,this.getCredentialID=()=>constants_1.PlatformVMConstants.SECPCREDENTIAL,void 0!==stakeableLocktime&&(this.stakeableLocktime=bintools.fromBNToBuffer(stakeableLocktime,8)),void 0!==transferableInput&&(this.transferableInput=transferableInput,this.synchronize())}serialize(encoding="hex"){let fields=super.serialize(encoding),outobj=Object.assign(Object.assign({},fields),{stakeableLocktime:serialization.encoder(this.stakeableLocktime,encoding,"Buffer","decimalString",8),transferableInput:this.transferableInput.serialize(encoding)});return delete outobj.sigIdxs,delete outobj.sigCount,delete outobj.amount,outobj}deserialize(fields,encoding="hex"){fields.sigIdxs=[],fields.sigCount="0",fields.amount="98",super.deserialize(fields,encoding),this.stakeableLocktime=serialization.decoder(fields.stakeableLocktime,encoding,"decimalString","Buffer",8),this.transferableInput=new ParseableInput,this.transferableInput.deserialize(fields.transferableInput,encoding),this.synchronize()}synchronize(){let input=this.transferableInput.getInput();this.sigIdxs=input.getSigIdxs(),this.sigCount=buffer_1.Buffer.alloc(4),this.sigCount.writeUInt32BE(this.sigIdxs.length,0),this.amount=bintools.fromBNToBuffer(input.getAmount(),8),this.amountValue=input.getAmount()}getStakeableLocktime(){return bintools.fromBufferToBN(this.stakeableLocktime)}getTransferablInput(){return this.transferableInput}getInputID(){return this._typeID}fromBuffer(bytes,offset=0){return this.stakeableLocktime=bintools.copyFrom(bytes,offset,offset+8),offset+=8,this.transferableInput=new ParseableInput,offset=this.transferableInput.fromBuffer(bytes,offset),this.synchronize(),offset}toBuffer(){const xferinBuff=this.transferableInput.toBuffer(),bsize=this.stakeableLocktime.length+xferinBuff.length,barr=[this.stakeableLocktime,xferinBuff];return buffer_1.Buffer.concat(barr,bsize)}create(...args){return new StakeableLockIn(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}select(id,...args){return(0,exports.SelectInputClass)(id,...args)}}exports.StakeableLockIn=StakeableLockIn},6333:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0})},2372:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.KeyChain=exports.KeyPair=void 0;const bintools_1=__importDefault(__webpack_require__(903)),secp256k1_1=__webpack_require__(181),utils_1=__webpack_require__(338),bintools=bintools_1.default.getInstance();utils_1.Serialization.getInstance();class KeyPair extends secp256k1_1.SECP256k1KeyPair{clone(){let newkp=new KeyPair(this.hrp,this.chainID);return newkp.importKey(bintools.copyFrom(this.getPrivateKey())),newkp}create(...args){return 2==args.length?new KeyPair(args[0],args[1]):new KeyPair(this.hrp,this.chainID)}}exports.KeyPair=KeyPair;class KeyChain extends secp256k1_1.SECP256k1KeyChain{constructor(hrp,chainID){super(),this.hrp="",this.chainID="",this.makeKey=()=>{let keypair=new KeyPair(this.hrp,this.chainID);return this.addKey(keypair),keypair},this.addKey=newKey=>{newKey.setChainID(this.chainID),super.addKey(newKey)},this.importKey=privk=>{let pk,keypair=new KeyPair(this.hrp,this.chainID);return pk="string"==typeof privk?bintools.cb58Decode(privk.split("-")[1]):bintools.copyFrom(privk),keypair.importKey(pk),keypair.getAddress().toString("hex")in this.keys||this.addKey(keypair),keypair},this.hrp=hrp,this.chainID=chainID}create(...args){return 2==args.length?new KeyChain(args[0],args[1]):new KeyChain(this.hrp,this.chainID)}clone(){const newkc=new KeyChain(this.hrp,this.chainID);for(let k in this.keys)newkc.addKey(this.keys[`${k}`].clone());return newkc}union(kc){let newkc=kc.clone();for(let k in this.keys)newkc.addKey(this.keys[`${k}`].clone());return newkc}}exports.KeyChain=KeyChain},5168:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SECPOwnerOutput=exports.StakeableLockOut=exports.SECPTransferOutput=exports.AmountOutput=exports.ParseableOutput=exports.TransferableOutput=exports.SelectOutputClass=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(7080),output_1=__webpack_require__(8556),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();exports.SelectOutputClass=(outputid,...args)=>{if(outputid==constants_1.PlatformVMConstants.SECPXFEROUTPUTID)return new SECPTransferOutput(...args);if(outputid==constants_1.PlatformVMConstants.SECPOWNEROUTPUTID)return new SECPOwnerOutput(...args);if(outputid==constants_1.PlatformVMConstants.STAKEABLELOCKOUTID)return new StakeableLockOut(...args);throw new errors_1.OutputIdError("Error - SelectOutputClass: unknown outputid "+outputid)};class TransferableOutput extends output_1.StandardTransferableOutput{constructor(){super(...arguments),this._typeName="TransferableOutput",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.output=(0,exports.SelectOutputClass)(fields.output._typeID),this.output.deserialize(fields.output,encoding)}fromBuffer(bytes,offset=0){this.assetID=bintools.copyFrom(bytes,offset,offset+constants_1.PlatformVMConstants.ASSETIDLEN),offset+=constants_1.PlatformVMConstants.ASSETIDLEN;const outputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.output=(0,exports.SelectOutputClass)(outputid),this.output.fromBuffer(bytes,offset)}}exports.TransferableOutput=TransferableOutput;class ParseableOutput extends output_1.StandardParseableOutput{constructor(){super(...arguments),this._typeName="ParseableOutput",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.output=(0,exports.SelectOutputClass)(fields.output._typeID),this.output.deserialize(fields.output,encoding)}fromBuffer(bytes,offset=0){const outputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.output=(0,exports.SelectOutputClass)(outputid),this.output.fromBuffer(bytes,offset)}}exports.ParseableOutput=ParseableOutput;class AmountOutput extends output_1.StandardAmountOutput{constructor(){super(...arguments),this._typeName="AmountOutput",this._typeID=void 0}makeTransferable(assetID){return new TransferableOutput(assetID,this)}select(id,...args){return(0,exports.SelectOutputClass)(id,...args)}}exports.AmountOutput=AmountOutput;class SECPTransferOutput extends AmountOutput{constructor(){super(...arguments),this._typeName="SECPTransferOutput",this._typeID=constants_1.PlatformVMConstants.SECPXFEROUTPUTID}getOutputID(){return this._typeID}create(...args){return new SECPTransferOutput(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}}exports.SECPTransferOutput=SECPTransferOutput;class StakeableLockOut extends AmountOutput{constructor(amount,addresses,locktime,threshold,stakeableLocktime,transferableOutput){super(amount,addresses,locktime,threshold),this._typeName="StakeableLockOut",this._typeID=constants_1.PlatformVMConstants.STAKEABLELOCKOUTID,void 0!==stakeableLocktime&&(this.stakeableLocktime=bintools.fromBNToBuffer(stakeableLocktime,8)),void 0!==transferableOutput&&(this.transferableOutput=transferableOutput,this.synchronize())}serialize(encoding="hex"){let fields=super.serialize(encoding),outobj=Object.assign(Object.assign({},fields),{stakeableLocktime:serialization.encoder(this.stakeableLocktime,encoding,"Buffer","decimalString",8),transferableOutput:this.transferableOutput.serialize(encoding)});return delete outobj.addresses,delete outobj.locktime,delete outobj.threshold,delete outobj.amount,outobj}deserialize(fields,encoding="hex"){fields.addresses=[],fields.locktime="0",fields.threshold="1",fields.amount="99",super.deserialize(fields,encoding),this.stakeableLocktime=serialization.decoder(fields.stakeableLocktime,encoding,"decimalString","Buffer",8),this.transferableOutput=new ParseableOutput,this.transferableOutput.deserialize(fields.transferableOutput,encoding),this.synchronize()}synchronize(){let output=this.transferableOutput.getOutput();this.addresses=output.getAddresses().map((a=>{let addr=new output_1.Address;return addr.fromBuffer(a),addr})),this.numaddrs=buffer_1.Buffer.alloc(4),this.numaddrs.writeUInt32BE(this.addresses.length,0),this.locktime=bintools.fromBNToBuffer(output.getLocktime(),8),this.threshold=buffer_1.Buffer.alloc(4),this.threshold.writeUInt32BE(output.getThreshold(),0),this.amount=bintools.fromBNToBuffer(output.getAmount(),8),this.amountValue=output.getAmount()}getStakeableLocktime(){return bintools.fromBufferToBN(this.stakeableLocktime)}getTransferableOutput(){return this.transferableOutput}makeTransferable(assetID){return new TransferableOutput(assetID,this)}select(id,...args){return(0,exports.SelectOutputClass)(id,...args)}fromBuffer(outbuff,offset=0){return this.stakeableLocktime=bintools.copyFrom(outbuff,offset,offset+8),offset+=8,this.transferableOutput=new ParseableOutput,offset=this.transferableOutput.fromBuffer(outbuff,offset),this.synchronize(),offset}toBuffer(){let xferoutBuff=this.transferableOutput.toBuffer();const bsize=this.stakeableLocktime.length+xferoutBuff.length,barr=[this.stakeableLocktime,xferoutBuff];return buffer_1.Buffer.concat(barr,bsize)}getOutputID(){return this._typeID}create(...args){return new StakeableLockOut(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}}exports.StakeableLockOut=StakeableLockOut;class SECPOwnerOutput extends output_1.Output{constructor(){super(...arguments),this._typeName="SECPOwnerOutput",this._typeID=constants_1.PlatformVMConstants.SECPOWNEROUTPUTID}getOutputID(){return this._typeID}makeTransferable(assetID){return new TransferableOutput(assetID,this)}create(...args){return new SECPOwnerOutput(...args)}clone(){const newout=this.create();return newout.fromBuffer(this.toBuffer()),newout}select(id,...args){return(0,exports.SelectOutputClass)(id,...args)}}exports.SECPOwnerOutput=SECPOwnerOutput},9968:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SubnetAuth=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),utils_1=__webpack_require__(338),_1=__webpack_require__(7679),bintools=bintools_1.default.getInstance();class SubnetAuth extends utils_1.Serializable{constructor(){super(...arguments),this._typeName="SubnetAuth",this._typeID=_1.PlatformVMConstants.SUBNETAUTH,this.addressIndices=[],this.numAddressIndices=buffer_1.Buffer.alloc(4)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign({},fields)}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding)}addAddressIndex(index){const numAddrIndices=this.getNumAddressIndices();this.numAddressIndices.writeUIntBE(numAddrIndices+1,0,4),this.addressIndices.push(index)}getNumAddressIndices(){return this.numAddressIndices.readUIntBE(0,4)}getAddressIndices(){return this.addressIndices}fromBuffer(bytes,offset=0){offset+=4,this.numAddressIndices=bintools.copyFrom(bytes,offset,offset+4),offset+=4;for(let i=0;i<this.getNumAddressIndices();i++)this.addressIndices.push(bintools.copyFrom(bytes,offset,offset+4)),offset+=4;return offset}toBuffer(){const typeIDBuf=buffer_1.Buffer.alloc(4);typeIDBuf.writeUIntBE(this._typeID,0,4);const numAddressIndices=buffer_1.Buffer.alloc(4);numAddressIndices.writeIntBE(this.addressIndices.length,0,4);const barr=[typeIDBuf,numAddressIndices];let bsize=typeIDBuf.length+numAddressIndices.length;return this.addressIndices.forEach(((addressIndex,i)=>{bsize+=4,barr.push(this.addressIndices[`${i}`])})),buffer_1.Buffer.concat(barr,bsize)}}exports.SubnetAuth=SubnetAuth},8508:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Tx=exports.UnsignedTx=exports.SelectTxClass=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),constants_1=__webpack_require__(7080),credentials_1=__webpack_require__(6525),tx_1=__webpack_require__(613),create_hash_1=__importDefault(__webpack_require__(3482)),basetx_1=__webpack_require__(9660),importtx_1=__webpack_require__(5416),exporttx_1=__webpack_require__(5619),validationtx_1=__webpack_require__(6237),createsubnettx_1=__webpack_require__(6547),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance();exports.SelectTxClass=(txtype,...args)=>{if(txtype===constants_1.PlatformVMConstants.BASETX)return new basetx_1.BaseTx(...args);if(txtype===constants_1.PlatformVMConstants.IMPORTTX)return new importtx_1.ImportTx(...args);if(txtype===constants_1.PlatformVMConstants.EXPORTTX)return new exporttx_1.ExportTx(...args);if(txtype===constants_1.PlatformVMConstants.ADDDELEGATORTX)return new validationtx_1.AddDelegatorTx(...args);if(txtype===constants_1.PlatformVMConstants.ADDVALIDATORTX)return new validationtx_1.AddValidatorTx(...args);if(txtype===constants_1.PlatformVMConstants.CREATESUBNETTX)return new createsubnettx_1.CreateSubnetTx(...args);throw new errors_1.TransactionError("Error - SelectTxClass: unknown txtype")};class UnsignedTx extends tx_1.StandardUnsignedTx{constructor(){super(...arguments),this._typeName="UnsignedTx",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.transaction=(0,exports.SelectTxClass)(fields.transaction._typeID),this.transaction.deserialize(fields.transaction,encoding)}getTransaction(){return this.transaction}fromBuffer(bytes,offset=0){this.codecID=bintools.copyFrom(bytes,offset,offset+2).readUInt16BE(0),offset+=2;const txtype=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.transaction=(0,exports.SelectTxClass)(txtype),this.transaction.fromBuffer(bytes,offset)}sign(kc){const txbuff=this.toBuffer(),msg=buffer_1.Buffer.from((0,create_hash_1.default)("sha256").update(txbuff).digest()),creds=this.transaction.sign(msg,kc);return new Tx(this,creds)}}exports.UnsignedTx=UnsignedTx;class Tx extends tx_1.StandardTx{constructor(){super(...arguments),this._typeName="Tx",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.unsignedTx=new UnsignedTx,this.unsignedTx.deserialize(fields.unsignedTx,encoding),this.credentials=[];for(let i=0;i<fields.credentials.length;i++){const cred=(0,credentials_1.SelectCredentialClass)(fields.credentials[`${i}`]._typeID);cred.deserialize(fields.credentials[`${i}`],encoding),this.credentials.push(cred)}}fromBuffer(bytes,offset=0){this.unsignedTx=new UnsignedTx,offset=this.unsignedTx.fromBuffer(bytes,offset);const numcreds=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4,this.credentials=[];for(let i=0;i<numcreds;i++){const credid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4;const cred=(0,credentials_1.SelectCredentialClass)(credid);offset=cred.fromBuffer(bytes,offset),this.credentials.push(cred)}return offset}}exports.Tx=Tx},7248:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UTXOSet=exports.AssetAmountDestination=exports.UTXO=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),bn_js_1=__importDefault(__webpack_require__(3550)),outputs_1=__webpack_require__(5168),inputs_1=__webpack_require__(7410),helperfunctions_1=__webpack_require__(5554),utxos_1=__webpack_require__(7612),constants_1=__webpack_require__(7080),tx_1=__webpack_require__(8508),exporttx_1=__webpack_require__(5619),constants_2=__webpack_require__(8779),importtx_1=__webpack_require__(5416),basetx_1=__webpack_require__(9660),assetamount_1=__webpack_require__(6305),validationtx_1=__webpack_require__(6237),createsubnettx_1=__webpack_require__(6547),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),_1=__webpack_require__(7679),addsubnetvalidatortx_1=__webpack_require__(1726),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class UTXO extends utxos_1.StandardUTXO{constructor(){super(...arguments),this._typeName="UTXO",this._typeID=void 0}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.output=(0,outputs_1.SelectOutputClass)(fields.output._typeID),this.output.deserialize(fields.output,encoding)}fromBuffer(bytes,offset=0){this.codecID=bintools.copyFrom(bytes,offset,offset+2),offset+=2,this.txid=bintools.copyFrom(bytes,offset,offset+32),offset+=32,this.outputidx=bintools.copyFrom(bytes,offset,offset+4),offset+=4,this.assetID=bintools.copyFrom(bytes,offset,offset+32),offset+=32;const outputid=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.output=(0,outputs_1.SelectOutputClass)(outputid),this.output.fromBuffer(bytes,offset)}fromString(serialized){return this.fromBuffer(bintools.cb58Decode(serialized))}toString(){return bintools.cb58Encode(this.toBuffer())}clone(){const utxo=new UTXO;return utxo.fromBuffer(this.toBuffer()),utxo}create(codecID=constants_1.PlatformVMConstants.LATESTCODEC,txid,outputidx,assetID,output){return new UTXO(codecID,txid,outputidx,assetID,output)}}exports.UTXO=UTXO;class AssetAmountDestination extends assetamount_1.StandardAssetAmountDestination{}exports.AssetAmountDestination=AssetAmountDestination;class UTXOSet extends utxos_1.StandardUTXOSet{constructor(){super(...arguments),this._typeName="UTXOSet",this._typeID=void 0,this.getConsumableUXTO=(asOf=(0,helperfunctions_1.UnixNow)(),stakeable=!1)=>this.getAllUTXOs().filter((utxo=>{if(stakeable)return!0;const output=utxo.getOutput();if(!(output instanceof outputs_1.StakeableLockOut))return!0;return!!output.getStakeableLocktime().lt(asOf)})),this.getMinimumSpendable=(aad,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1,stakeable=!1)=>{let utxoArray=this.getConsumableUXTO(asOf,stakeable),tmpUTXOArray=[];stakeable&&(utxoArray.forEach((utxo=>{22===utxo.getOutput().getTypeID()&&tmpUTXOArray.push(utxo)})),tmpUTXOArray.sort(((a,b)=>{let stakeableLockOut1=a.getOutput();return b.getOutput().getStakeableLocktime().toNumber()-stakeableLockOut1.getStakeableLocktime().toNumber()})),utxoArray.forEach((utxo=>{7===utxo.getOutput().getTypeID()&&tmpUTXOArray.push(utxo)})),utxoArray=tmpUTXOArray);const outs={};if(utxoArray.forEach(((utxo,index)=>{const assetID=utxo.getAssetID(),assetKey=assetID.toString("hex"),fromAddresses=aad.getSenders(),output=utxo.getOutput();if(!(output instanceof outputs_1.AmountOutput&&aad.assetExists(assetKey)&&output.meetsThreshold(fromAddresses,asOf)))return;const assetAmount=aad.getAssetAmount(assetKey);if(assetAmount.isFinished())return;assetKey in outs||(outs[`${assetKey}`]={lockedStakeable:[],unlocked:[]});const amountOutput=output,amount=amountOutput.getAmount();let input=new inputs_1.SECPTransferInput(amount),locked=!1;if(amountOutput instanceof outputs_1.StakeableLockOut){const stakeableLocktime=amountOutput.getStakeableLocktime();stakeableLocktime.gt(asOf)&&(input=new inputs_1.StakeableLockIn(amount,stakeableLocktime,new inputs_1.ParseableInput(input)),locked=!0)}assetAmount.spendAmount(amount,locked),locked?outs[`${assetKey}`].lockedStakeable.push(amountOutput):outs[`${assetKey}`].unlocked.push(amountOutput);amountOutput.getSpenders(fromAddresses,asOf).forEach((spender=>{const idx=amountOutput.getAddressIdx(spender);if(-1===idx)throw new errors_1.AddressError(`Error - UTXOSet.getMinimumSpendable: no such address in output: ${spender}`);input.addSignatureIdx(idx,spender)}));const txID=utxo.getTxID(),outputIdx=utxo.getOutputIdx(),transferInput=new inputs_1.TransferableInput(txID,outputIdx,assetID,input);aad.addInput(transferInput)})),!aad.canComplete())return new errors_1.InsufficientFundsError("Error - UTXOSet.getMinimumSpendable: insufficient funds to create the transaction");const zero=new bn_js_1.default(0);aad.getAmounts().forEach((assetAmount=>{const change=assetAmount.getChange(),isStakeableLockChange=assetAmount.getStakeableLockChange(),lockedChange=isStakeableLockChange?change:zero.clone(),assetID=assetAmount.getAssetID(),assetKey=assetAmount.getAssetIDString(),lockedOutputs=outs[`${assetKey}`].lockedStakeable;lockedOutputs.forEach(((lockedOutput,i)=>{const stakeableLocktime=lockedOutput.getStakeableLocktime(),output=lockedOutput.getTransferableOutput().getOutput();let outputAmountRemaining=output.getAmount();if(i==lockedOutputs.length-1&&lockedChange.gt(zero)){outputAmountRemaining=outputAmountRemaining.sub(lockedChange);const newChangeOutput=(0,outputs_1.SelectOutputClass)(output.getOutputID(),lockedChange,output.getAddresses(),output.getLocktime(),output.getThreshold());let newLockedChangeOutput=(0,outputs_1.SelectOutputClass)(lockedOutput.getOutputID(),lockedChange,output.getAddresses(),output.getLocktime(),output.getThreshold(),stakeableLocktime,new outputs_1.ParseableOutput(newChangeOutput));const transferOutput=new outputs_1.TransferableOutput(assetID,newLockedChangeOutput);aad.addChange(transferOutput)}const newOutput=(0,outputs_1.SelectOutputClass)(output.getOutputID(),outputAmountRemaining,output.getAddresses(),output.getLocktime(),output.getThreshold()),newLockedOutput=(0,outputs_1.SelectOutputClass)(lockedOutput.getOutputID(),outputAmountRemaining,output.getAddresses(),output.getLocktime(),output.getThreshold(),stakeableLocktime,new outputs_1.ParseableOutput(newOutput)),transferOutput=new outputs_1.TransferableOutput(assetID,newLockedOutput);aad.addOutput(transferOutput)}));const unlockedChange=isStakeableLockChange?zero.clone():change;if(unlockedChange.gt(zero)){const newChangeOutput=new outputs_1.SECPTransferOutput(unlockedChange,aad.getChangeAddresses(),zero.clone(),threshold),transferOutput=new outputs_1.TransferableOutput(assetID,newChangeOutput);aad.addChange(transferOutput)}const totalAmountSpent=assetAmount.getSpent(),stakeableLockedAmount=assetAmount.getStakeableLockSpent(),totalUnlockedSpent=totalAmountSpent.sub(stakeableLockedAmount),amountBurnt=assetAmount.getBurn(),unlockedAmount=totalUnlockedSpent.sub(amountBurnt).sub(unlockedChange);if(unlockedAmount.gt(zero)){const newOutput=new outputs_1.SECPTransferOutput(unlockedAmount,aad.getDestinations(),locktime,threshold),transferOutput=new outputs_1.TransferableOutput(assetID,newOutput);aad.addOutput(transferOutput)}}))},this.buildBaseTx=(networkID,blockchainID,amount,assetID,toAddresses,fromAddresses,changeAddresses,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>{if(threshold>toAddresses.length)throw new errors_1.ThresholdError("Error - UTXOSet.buildBaseTx: threshold is greater than number of addresses");void 0===changeAddresses&&(changeAddresses=toAddresses),void 0===feeAssetID&&(feeAssetID=assetID);const zero=new bn_js_1.default(0);if(amount.eq(zero))return;const aad=new AssetAmountDestination(toAddresses,fromAddresses,changeAddresses);assetID.toString("hex")===feeAssetID.toString("hex")?aad.addAssetAmount(assetID,amount,fee):(aad.addAssetAmount(assetID,amount,zero),this._feeCheck(fee,feeAssetID)&&aad.addAssetAmount(feeAssetID,zero,fee));let ins=[],outs=[];const minSpendableErr=this.getMinimumSpendable(aad,asOf,locktime,threshold);if(void 0!==minSpendableErr)throw minSpendableErr;ins=aad.getInputs(),outs=aad.getAllOutputs();const baseTx=new basetx_1.BaseTx(networkID,blockchainID,outs,ins,memo);return new tx_1.UnsignedTx(baseTx)},this.buildImportTx=(networkID,blockchainID,toAddresses,fromAddresses,changeAddresses,atomics,sourceChain,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>{const zero=new bn_js_1.default(0);let ins=[],outs=[];void 0===fee&&(fee=zero.clone());const importIns=[];let feepaid=new bn_js_1.default(0),feeAssetStr=feeAssetID.toString("hex");for(let i=0;i<atomics.length;i++){const utxo=atomics[`${i}`],assetID=utxo.getAssetID(),output=utxo.getOutput();let amt=output.getAmount().clone(),infeeamount=amt.clone(),assetStr=assetID.toString("hex");void 0!==feeAssetID&&fee.gt(zero)&&feepaid.lt(fee)&&assetStr===feeAssetStr&&(feepaid=feepaid.add(infeeamount),feepaid.gte(fee)?(infeeamount=feepaid.sub(fee),feepaid=fee.clone()):infeeamount=zero.clone());const txid=utxo.getTxID(),outputidx=utxo.getOutputIdx(),input=new inputs_1.SECPTransferInput(amt),xferin=new inputs_1.TransferableInput(txid,outputidx,assetID,input),from=output.getAddresses(),spenders=output.getSpenders(from,asOf);for(let j=0;j<spenders.length;j++){const idx=output.getAddressIdx(spenders[`${j}`]);if(-1===idx)throw new errors_1.AddressError(`Error - UTXOSet.buildImportTx: no such address in output: ${spenders[`${j}`]}`);xferin.getInput().addSignatureIdx(idx,spenders[`${j}`])}if(importIns.push(xferin),infeeamount.gt(zero)){const spendout=(0,outputs_1.SelectOutputClass)(output.getOutputID(),infeeamount,toAddresses,locktime,threshold),xferout=new outputs_1.TransferableOutput(assetID,spendout);outs.push(xferout)}}let feeRemaining=fee.sub(feepaid);if(feeRemaining.gt(zero)&&this._feeCheck(feeRemaining,feeAssetID)){const aad=new AssetAmountDestination(toAddresses,fromAddresses,changeAddresses);aad.addAssetAmount(feeAssetID,zero,feeRemaining);const minSpendableErr=this.getMinimumSpendable(aad,asOf,locktime,threshold);if(void 0!==minSpendableErr)throw minSpendableErr;ins=aad.getInputs(),outs=aad.getAllOutputs()}const importTx=new importtx_1.ImportTx(networkID,blockchainID,outs,ins,memo,sourceChain,importIns);return new tx_1.UnsignedTx(importTx)},this.buildExportTx=(networkID,blockchainID,amount,avaxAssetID,toAddresses,fromAddresses,changeAddresses,destinationChain,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),locktime=new bn_js_1.default(0),threshold=1)=>{let ins=[],outs=[],exportouts=[];void 0===changeAddresses&&(changeAddresses=toAddresses);const zero=new bn_js_1.default(0);if(amount.eq(zero))return;if(void 0===feeAssetID)feeAssetID=avaxAssetID;else if(feeAssetID.toString("hex")!==avaxAssetID.toString("hex"))throw new errors_1.FeeAssetError("Error - UTXOSet.buildExportTx: feeAssetID must match avaxAssetID");void 0===destinationChain&&(destinationChain=bintools.cb58Decode(constants_2.Defaults.network[`${networkID}`].X.blockchainID));const aad=new AssetAmountDestination(toAddresses,fromAddresses,changeAddresses);avaxAssetID.toString("hex")===feeAssetID.toString("hex")?aad.addAssetAmount(avaxAssetID,amount,fee):(aad.addAssetAmount(avaxAssetID,amount,zero),this._feeCheck(fee,feeAssetID)&&aad.addAssetAmount(feeAssetID,zero,fee));const minSpendableErr=this.getMinimumSpendable(aad,asOf,locktime,threshold);if(void 0!==minSpendableErr)throw minSpendableErr;ins=aad.getInputs(),outs=aad.getChangeOutputs(),exportouts=aad.getOutputs();const exportTx=new exporttx_1.ExportTx(networkID,blockchainID,outs,ins,memo,destinationChain,exportouts);return new tx_1.UnsignedTx(exportTx)},this.buildAddSubnetValidatorTx=(networkID=constants_2.DefaultNetworkID,blockchainID,fromAddresses,changeAddresses,nodeID,startTime,endTime,weight,subnetID,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),subnetAuthCredentials=[])=>{let ins=[],outs=[];const zero=new bn_js_1.default(0),now=(0,helperfunctions_1.UnixNow)();if(startTime.lt(now)||endTime.lte(startTime))throw new Error("UTXOSet.buildAddSubnetValidatorTx -- startTime must be in the future and endTime must come after startTime");if(this._feeCheck(fee,feeAssetID)){const aad=new AssetAmountDestination(fromAddresses,fromAddresses,changeAddresses);aad.addAssetAmount(feeAssetID,zero,fee);const success=this.getMinimumSpendable(aad,asOf,void 0,void 0,!0);if(void 0!==success)throw success;ins=aad.getInputs(),outs=aad.getAllOutputs()}const addSubnetValidatorTx=new addsubnetvalidatortx_1.AddSubnetValidatorTx(networkID,blockchainID,outs,ins,memo,nodeID,startTime,endTime,weight,subnetID);return subnetAuthCredentials.forEach((subnetAuthCredential=>{addSubnetValidatorTx.addSignatureIdx(subnetAuthCredential[0],subnetAuthCredential[1])})),new tx_1.UnsignedTx(addSubnetValidatorTx)},this.buildAddDelegatorTx=(networkID=constants_2.DefaultNetworkID,blockchainID,avaxAssetID,toAddresses,fromAddresses,changeAddresses,nodeID,startTime,endTime,stakeAmount,rewardLocktime,rewardThreshold,rewardAddresses,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),changeThreshold=1)=>{if(rewardThreshold>rewardAddresses.length)throw new errors_1.ThresholdError("Error - UTXOSet.buildAddDelegatorTx: reward threshold is greater than number of addresses");void 0===changeAddresses&&(changeAddresses=toAddresses);let ins=[],outs=[],stakeOuts=[];const zero=new bn_js_1.default(0),now=(0,helperfunctions_1.UnixNow)();if(startTime.lt(now)||endTime.lte(startTime))throw new errors_1.TimeError("UTXOSet.buildAddDelegatorTx -- startTime must be in the future and endTime must come after startTime");const aad=new AssetAmountDestination(toAddresses,fromAddresses,changeAddresses);avaxAssetID.toString("hex")===feeAssetID.toString("hex")?aad.addAssetAmount(avaxAssetID,stakeAmount,fee):(aad.addAssetAmount(avaxAssetID,stakeAmount,zero),this._feeCheck(fee,feeAssetID)&&aad.addAssetAmount(feeAssetID,zero,fee));const minSpendableErr=this.getMinimumSpendable(aad,asOf,void 0,changeThreshold,!0);if(void 0!==minSpendableErr)throw minSpendableErr;ins=aad.getInputs(),outs=aad.getChangeOutputs(),stakeOuts=aad.getOutputs();const rewardOutputOwners=new outputs_1.SECPOwnerOutput(rewardAddresses,rewardLocktime,rewardThreshold),UTx=new validationtx_1.AddDelegatorTx(networkID,blockchainID,outs,ins,memo,nodeID,startTime,endTime,stakeAmount,stakeOuts,new outputs_1.ParseableOutput(rewardOutputOwners));return new tx_1.UnsignedTx(UTx)},this.buildAddValidatorTx=(networkID=constants_2.DefaultNetworkID,blockchainID,avaxAssetID,toAddresses,fromAddresses,changeAddresses,nodeID,startTime,endTime,stakeAmount,rewardLocktime,rewardThreshold,rewardAddresses,delegationFee,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)())=>{let ins=[],outs=[],stakeOuts=[];const zero=new bn_js_1.default(0),now=(0,helperfunctions_1.UnixNow)();if(startTime.lt(now)||endTime.lte(startTime))throw new errors_1.TimeError("UTXOSet.buildAddValidatorTx -- startTime must be in the future and endTime must come after startTime");if(delegationFee>100||delegationFee<0)throw new errors_1.TimeError("UTXOSet.buildAddValidatorTx -- startTime must be in the range of 0 to 100, inclusively");const aad=new AssetAmountDestination(toAddresses,fromAddresses,changeAddresses);avaxAssetID.toString("hex")===feeAssetID.toString("hex")?aad.addAssetAmount(avaxAssetID,stakeAmount,fee):(aad.addAssetAmount(avaxAssetID,stakeAmount,zero),this._feeCheck(fee,feeAssetID)&&aad.addAssetAmount(feeAssetID,zero,fee));const minSpendableErr=this.getMinimumSpendable(aad,asOf,void 0,void 0,!0);if(void 0!==minSpendableErr)throw minSpendableErr;ins=aad.getInputs(),outs=aad.getChangeOutputs(),stakeOuts=aad.getOutputs();const rewardOutputOwners=new outputs_1.SECPOwnerOutput(rewardAddresses,rewardLocktime,rewardThreshold),UTx=new validationtx_1.AddValidatorTx(networkID,blockchainID,outs,ins,memo,nodeID,startTime,endTime,stakeAmount,stakeOuts,new outputs_1.ParseableOutput(rewardOutputOwners),delegationFee);return new tx_1.UnsignedTx(UTx)},this.buildCreateSubnetTx=(networkID=constants_2.DefaultNetworkID,blockchainID,fromAddresses,changeAddresses,subnetOwnerAddresses,subnetOwnerThreshold,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)())=>{const zero=new bn_js_1.default(0);let ins=[],outs=[];if(this._feeCheck(fee,feeAssetID)){const aad=new AssetAmountDestination(fromAddresses,fromAddresses,changeAddresses);aad.addAssetAmount(feeAssetID,zero,fee);const minSpendableErr=this.getMinimumSpendable(aad,asOf,void 0,void 0);if(void 0!==minSpendableErr)throw minSpendableErr;ins=aad.getInputs(),outs=aad.getAllOutputs()}const locktime=new bn_js_1.default(0),subnetOwners=new outputs_1.SECPOwnerOutput(subnetOwnerAddresses,locktime,subnetOwnerThreshold),createSubnetTx=new createsubnettx_1.CreateSubnetTx(networkID,blockchainID,outs,ins,memo,subnetOwners);return new tx_1.UnsignedTx(createSubnetTx)},this.buildCreateChainTx=(networkID=constants_2.DefaultNetworkID,blockchainID,fromAddresses,changeAddresses,subnetID,chainName,vmID,fxIDs,genesisData,fee,feeAssetID,memo,asOf=(0,helperfunctions_1.UnixNow)(),subnetAuthCredentials=[])=>{const zero=new bn_js_1.default(0);let ins=[],outs=[];if(this._feeCheck(fee,feeAssetID)){const aad=new AssetAmountDestination(fromAddresses,fromAddresses,changeAddresses);aad.addAssetAmount(feeAssetID,zero,fee);const minSpendableErr=this.getMinimumSpendable(aad,asOf,void 0,void 0);if(void 0!==minSpendableErr)throw minSpendableErr;ins=aad.getInputs(),outs=aad.getAllOutputs()}const createChainTx=new _1.CreateChainTx(networkID,blockchainID,outs,ins,memo,subnetID,chainName,vmID,fxIDs,genesisData);return subnetAuthCredentials.forEach((subnetAuthCredential=>{createChainTx.addSignatureIdx(subnetAuthCredential[0],subnetAuthCredential[1])})),new tx_1.UnsignedTx(createChainTx)}}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding);let utxos={};for(let utxoid in fields.utxos){let utxoidCleaned=serialization.decoder(utxoid,encoding,"base58","base58");utxos[`${utxoidCleaned}`]=new UTXO,utxos[`${utxoidCleaned}`].deserialize(fields.utxos[`${utxoid}`],encoding)}let addressUTXOs={};for(let address in fields.addressUTXOs){let addressCleaned=serialization.decoder(address,encoding,"cb58","hex"),utxobalance={};for(let utxoid in fields.addressUTXOs[`${address}`]){utxobalance[`${serialization.decoder(utxoid,encoding,"base58","base58")}`]=serialization.decoder(fields.addressUTXOs[`${address}`][`${utxoid}`],encoding,"decimalString","BN")}addressUTXOs[`${addressCleaned}`]=utxobalance}this.utxos=utxos,this.addressUTXOs=addressUTXOs}parseUTXO(utxo){const utxovar=new UTXO;if("string"==typeof utxo)utxovar.fromBuffer(bintools.cb58Decode(utxo));else{if(!(utxo instanceof utxos_1.StandardUTXO))throw new errors_1.UTXOError("Error - UTXO.parseUTXO: utxo parameter is not a UTXO or string");utxovar.fromBuffer(utxo.toBuffer())}return utxovar}create(...args){return new UTXOSet}clone(){const newset=this.create(),allUTXOs=this.getAllUTXOs();return newset.addArray(allUTXOs),newset}_feeCheck(fee,feeAssetID){return void 0!==fee&&void 0!==feeAssetID&&fee.gt(new bn_js_1.default(0))&&feeAssetID instanceof buffer_1.Buffer}}exports.UTXOSet=UTXOSet},6237:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AddValidatorTx=exports.AddDelegatorTx=exports.WeightedValidatorTx=exports.ValidatorTx=void 0;const bn_js_1=__importDefault(__webpack_require__(3550)),bintools_1=__importDefault(__webpack_require__(903)),basetx_1=__webpack_require__(9660),outputs_1=__webpack_require__(5168),buffer_1=__webpack_require__(8764),constants_1=__webpack_require__(7080),constants_2=__webpack_require__(8779),helperfunctions_1=__webpack_require__(5554),outputs_2=__webpack_require__(5168),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class ValidatorTx extends basetx_1.BaseTx{constructor(networkID,blockchainID,outs,ins,memo,nodeID,startTime,endTime){super(networkID,blockchainID,outs,ins,memo),this._typeName="ValidatorTx",this._typeID=void 0,this.nodeID=buffer_1.Buffer.alloc(20),this.startTime=buffer_1.Buffer.alloc(8),this.endTime=buffer_1.Buffer.alloc(8),this.nodeID=nodeID,this.startTime=bintools.fromBNToBuffer(startTime,8),this.endTime=bintools.fromBNToBuffer(endTime,8)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{nodeID:serialization.encoder(this.nodeID,encoding,"Buffer","nodeID"),startTime:serialization.encoder(this.startTime,encoding,"Buffer","decimalString"),endTime:serialization.encoder(this.endTime,encoding,"Buffer","decimalString")})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.nodeID=serialization.decoder(fields.nodeID,encoding,"nodeID","Buffer",20),this.startTime=serialization.decoder(fields.startTime,encoding,"decimalString","Buffer",8),this.endTime=serialization.decoder(fields.endTime,encoding,"decimalString","Buffer",8)}getNodeID(){return this.nodeID}getNodeIDString(){return(0,helperfunctions_1.bufferToNodeIDString)(this.nodeID)}getStartTime(){return bintools.fromBufferToBN(this.startTime)}getEndTime(){return bintools.fromBufferToBN(this.endTime)}fromBuffer(bytes,offset=0){return offset=super.fromBuffer(bytes,offset),this.nodeID=bintools.copyFrom(bytes,offset,offset+20),offset+=20,this.startTime=bintools.copyFrom(bytes,offset,offset+8),offset+=8,this.endTime=bintools.copyFrom(bytes,offset,offset+8),offset+=8}toBuffer(){const superbuff=super.toBuffer(),bsize=superbuff.length+this.nodeID.length+this.startTime.length+this.endTime.length;return buffer_1.Buffer.concat([superbuff,this.nodeID,this.startTime,this.endTime],bsize)}}exports.ValidatorTx=ValidatorTx;class WeightedValidatorTx extends ValidatorTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,nodeID,startTime,endTime,weight){super(networkID,blockchainID,outs,ins,memo,nodeID,startTime,endTime),this._typeName="WeightedValidatorTx",this._typeID=void 0,this.weight=buffer_1.Buffer.alloc(8),void 0!==typeof weight&&(this.weight=bintools.fromBNToBuffer(weight,8))}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{weight:serialization.encoder(this.weight,encoding,"Buffer","decimalString")})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.weight=serialization.decoder(fields.weight,encoding,"decimalString","Buffer",8)}getWeight(){return bintools.fromBufferToBN(this.weight)}getWeightBuffer(){return this.weight}fromBuffer(bytes,offset=0){return offset=super.fromBuffer(bytes,offset),this.weight=bintools.copyFrom(bytes,offset,offset+8),offset+=8}toBuffer(){const superbuff=super.toBuffer();return buffer_1.Buffer.concat([superbuff,this.weight])}}exports.WeightedValidatorTx=WeightedValidatorTx;class AddDelegatorTx extends WeightedValidatorTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,nodeID,startTime,endTime,stakeAmount,stakeOuts,rewardOwners){super(networkID,blockchainID,outs,ins,memo,nodeID,startTime,endTime,stakeAmount),this._typeName="AddDelegatorTx",this._typeID=constants_1.PlatformVMConstants.ADDDELEGATORTX,this.stakeOuts=[],this.rewardOwners=void 0,void 0!==typeof stakeOuts&&(this.stakeOuts=stakeOuts),this.rewardOwners=rewardOwners}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{stakeOuts:this.stakeOuts.map((s=>s.serialize(encoding))),rewardOwners:this.rewardOwners.serialize(encoding)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.stakeOuts=fields.stakeOuts.map((s=>{let xferout=new outputs_1.TransferableOutput;return xferout.deserialize(s,encoding),xferout})),this.rewardOwners=new outputs_2.ParseableOutput,this.rewardOwners.deserialize(fields.rewardOwners,encoding)}getTxType(){return this._typeID}getStakeAmount(){return this.getWeight()}getStakeAmountBuffer(){return this.weight}getStakeOuts(){return this.stakeOuts}getStakeOutsTotal(){let val=new bn_js_1.default(0);for(let i=0;i<this.stakeOuts.length;i++)val=val.add(this.stakeOuts[`${i}`].getOutput().getAmount());return val}getRewardOwners(){return this.rewardOwners}getTotalOuts(){return[...this.getOuts(),...this.getStakeOuts()]}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset);const numstakeouts=bintools.copyFrom(bytes,offset,offset+4);offset+=4;const outcount=numstakeouts.readUInt32BE(0);this.stakeOuts=[];for(let i=0;i<outcount;i++){const xferout=new outputs_1.TransferableOutput;offset=xferout.fromBuffer(bytes,offset),this.stakeOuts.push(xferout)}return this.rewardOwners=new outputs_2.ParseableOutput,offset=this.rewardOwners.fromBuffer(bytes,offset)}toBuffer(){let bsize=super.toBuffer().length;const numouts=buffer_1.Buffer.alloc(4);numouts.writeUInt32BE(this.stakeOuts.length,0);let barr=[super.toBuffer(),numouts];bsize+=numouts.length,this.stakeOuts=this.stakeOuts.sort(outputs_1.TransferableOutput.comparator());for(let i=0;i<this.stakeOuts.length;i++){let out=this.stakeOuts[`${i}`].toBuffer();barr.push(out),bsize+=out.length}let ro=this.rewardOwners.toBuffer();return barr.push(ro),bsize+=ro.length,buffer_1.Buffer.concat(barr,bsize)}clone(){let newbase=new AddDelegatorTx;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new AddDelegatorTx(...args)}}exports.AddDelegatorTx=AddDelegatorTx;class AddValidatorTx extends AddDelegatorTx{constructor(networkID=constants_2.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo,nodeID,startTime,endTime,stakeAmount,stakeOuts,rewardOwners,delegationFee){if(super(networkID,blockchainID,outs,ins,memo,nodeID,startTime,endTime,stakeAmount,stakeOuts,rewardOwners),this._typeName="AddValidatorTx",this._typeID=constants_1.PlatformVMConstants.ADDVALIDATORTX,this.delegationFee=0,"number"==typeof delegationFee){if(!(delegationFee>=0&&delegationFee<=100))throw new errors_1.DelegationFeeError("AddValidatorTx.constructor -- delegationFee must be in the range of 0 and 100, inclusively.");this.delegationFee=parseFloat(delegationFee.toFixed(4))}}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{delegationFee:serialization.encoder(this.getDelegationFeeBuffer(),encoding,"Buffer","decimalString",4)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding);let dbuff=serialization.decoder(fields.delegationFee,encoding,"decimalString","Buffer",4);this.delegationFee=dbuff.readUInt32BE(0)/AddValidatorTx.delegatorMultiplier}getTxType(){return this._typeID}getDelegationFee(){return this.delegationFee}getDelegationFeeBuffer(){let dBuff=buffer_1.Buffer.alloc(4),buffnum=parseFloat(this.delegationFee.toFixed(4))*AddValidatorTx.delegatorMultiplier;return dBuff.writeUInt32BE(buffnum,0),dBuff}fromBuffer(bytes,offset=0){offset=super.fromBuffer(bytes,offset);let dbuff=bintools.copyFrom(bytes,offset,offset+4);return offset+=4,this.delegationFee=dbuff.readUInt32BE(0)/AddValidatorTx.delegatorMultiplier,offset}toBuffer(){let superBuff=super.toBuffer(),feeBuff=this.getDelegationFeeBuffer();return buffer_1.Buffer.concat([superBuff,feeBuff])}}exports.AddValidatorTx=AddValidatorTx,AddValidatorTx.delegatorMultiplier=1e4},4115:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Socket=void 0;const isomorphic_ws_1=__importDefault(__webpack_require__(6792)),utils_1=__webpack_require__(338);class Socket extends isomorphic_ws_1.default{constructor(url=`wss://${utils_1.MainnetAPI}:443/ext/bc/X/events`,options){super(url,options)}send(data,cb){super.send(data,cb)}close(mcode,data){super.close(mcode,data)}}exports.Socket=Socket},9837:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});const axios_1=__importDefault(__webpack_require__(9669)),apibase_1=__webpack_require__(17),errors_1=__webpack_require__(611),fetchadapter_1=__webpack_require__(3064),helperfunctions_1=__webpack_require__(5554);exports.default=class AvalancheCore{constructor(host,port,protocol="http"){this.networkID=0,this.hrp="",this.auth=void 0,this.headers={},this.requestConfig={},this.apis={},this.setAddress=(host,port,protocol="http",baseEndpoint="")=>{host=host.replace(/[&#,@+()$~%'":*?<>{}]/g,""),protocol=protocol.replace(/[&#,@+()$~%'":*?<>{}]/g,"");if(!["http","https"].includes(protocol))throw new errors_1.ProtocolError("Error - AvalancheCore.setAddress: Invalid protocol");this.host=host,this.port=port,this.protocol=protocol,this.baseEndpoint=baseEndpoint;let url=`${protocol}://${host}`;null!=port&&"number"==typeof port&&port>=0&&(url=`${url}:${port}`),null!=baseEndpoint&&"string"==typeof baseEndpoint&&baseEndpoint.length>0&&("/"!=baseEndpoint[0]&&(baseEndpoint=`/${baseEndpoint}`),url=`${url}${baseEndpoint}`),this.url=url},this.getProtocol=()=>this.protocol,this.getHost=()=>this.host,this.getIP=()=>this.host,this.getPort=()=>this.port,this.getBaseEndpoint=()=>this.baseEndpoint,this.getURL=()=>this.url,this.getHeaders=()=>this.headers,this.getRequestConfig=()=>this.requestConfig,this.getNetworkID=()=>this.networkID,this.setNetworkID=netID=>{this.networkID=netID,this.hrp=(0,helperfunctions_1.getPreferredHRP)(this.networkID)},this.getHRP=()=>this.hrp,this.setHRP=hrp=>{this.hrp=hrp},this.setHeader=(key,value)=>{this.headers[`${key}`]=value},this.removeHeader=key=>{delete this.headers[`${key}`]},this.removeAllHeaders=()=>{for(const prop in this.headers)Object.prototype.hasOwnProperty.call(this.headers,prop)&&delete this.headers[`${prop}`]},this.setRequestConfig=(key,value)=>{this.requestConfig[`${key}`]=value},this.removeRequestConfig=key=>{delete this.requestConfig[`${key}`]},this.removeAllRequestConfigs=()=>{for(const prop in this.requestConfig)Object.prototype.hasOwnProperty.call(this.requestConfig,prop)&&delete this.requestConfig[`${prop}`]},this.setAuthToken=auth=>{this.auth=auth},this._setHeaders=headers=>{if("object"==typeof this.headers)for(const[key,value]of Object.entries(this.headers))headers[`${key}`]=value;return"string"==typeof this.auth&&(headers.Authorization=`Bearer ${this.auth}`),headers},this.addAPI=(apiName,ConstructorFN,baseurl,...args)=>{this.apis[`${apiName}`]=void 0===baseurl?new ConstructorFN(this,void 0,...args):new ConstructorFN(this,baseurl,...args)},this.api=apiName=>this.apis[`${apiName}`],this._request=(xhrmethod,baseurl,getdata,postdata,headers={},axiosConfig)=>__awaiter(this,void 0,void 0,(function*(){let config;config=axiosConfig?Object.assign(Object.assign({},axiosConfig),this.requestConfig):Object.assign({baseURL:this.url,responseType:"text"},this.requestConfig),config.url=baseurl,config.method=xhrmethod,config.headers=headers,config.data=postdata,config.params=getdata,"undefined"!=typeof fetch&&(config.adapter=fetchadapter_1.fetchAdapter);const resp=yield axios_1.default.request(config);return new apibase_1.RequestResponseData(resp.data,resp.headers,resp.status,resp.statusText,resp.request)})),this.get=(baseurl,getdata,headers={},axiosConfig)=>this._request("GET",baseurl,getdata,{},this._setHeaders(headers),axiosConfig),this.delete=(baseurl,getdata,headers={},axiosConfig)=>this._request("DELETE",baseurl,getdata,{},this._setHeaders(headers),axiosConfig),this.post=(baseurl,getdata,postdata,headers={},axiosConfig)=>this._request("POST",baseurl,getdata,postdata,this._setHeaders(headers),axiosConfig),this.put=(baseurl,getdata,postdata,headers={},axiosConfig)=>this._request("PUT",baseurl,getdata,postdata,this._setHeaders(headers),axiosConfig),this.patch=(baseurl,getdata,postdata,headers={},axiosConfig)=>this._request("PATCH",baseurl,getdata,postdata,this._setHeaders(headers),axiosConfig),null!=host&&this.setAddress(host,port,protocol)}}},17:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.APIBase=exports.RequestResponseData=void 0;const db_1=__importDefault(__webpack_require__(7911));exports.RequestResponseData=class RequestResponseData{constructor(data,headers,status,statusText,request){this.data=data,this.headers=headers,this.status=status,this.statusText=statusText,this.request=request}};exports.APIBase=class APIBase{constructor(core,baseURL){this.setBaseURL=baseURL=>{if(this.db&&this.baseURL!==baseURL){const backup=this.db.getAll();this.db.clearAll(),this.baseURL=baseURL,this.db=db_1.default.getNamespace(baseURL),this.db.setAll(backup,!0)}else this.baseURL=baseURL,this.db=db_1.default.getNamespace(baseURL)},this.getBaseURL=()=>this.baseURL,this.getDB=()=>this.db,this.core=core,this.setBaseURL(baseURL)}}},6305:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StandardAssetAmountDestination=exports.AssetAmount=void 0;const buffer_1=__webpack_require__(8764),bn_js_1=__importDefault(__webpack_require__(3550)),errors_1=__webpack_require__(611);class AssetAmount{constructor(assetID,amount,burn){this.assetID=buffer_1.Buffer.alloc(32),this.amount=new bn_js_1.default(0),this.burn=new bn_js_1.default(0),this.spent=new bn_js_1.default(0),this.stakeableLockSpent=new bn_js_1.default(0),this.change=new bn_js_1.default(0),this.stakeableLockChange=!1,this.finished=!1,this.getAssetID=()=>this.assetID,this.getAssetIDString=()=>this.assetID.toString("hex"),this.getAmount=()=>this.amount,this.getSpent=()=>this.spent,this.getBurn=()=>this.burn,this.getChange=()=>this.change,this.getStakeableLockSpent=()=>this.stakeableLockSpent,this.getStakeableLockChange=()=>this.stakeableLockChange,this.isFinished=()=>this.finished,this.spendAmount=(amt,stakeableLocked=!1)=>{if(this.finished)throw new errors_1.InsufficientFundsError("Error - AssetAmount.spendAmount: attempted to spend excess funds");this.spent=this.spent.add(amt),stakeableLocked&&(this.stakeableLockSpent=this.stakeableLockSpent.add(amt));const total=this.amount.add(this.burn);return this.spent.gte(total)&&(this.change=this.spent.sub(total),stakeableLocked&&(this.stakeableLockChange=!0),this.finished=!0),this.finished},this.assetID=assetID,this.amount=void 0===amount?new bn_js_1.default(0):amount,this.burn=void 0===burn?new bn_js_1.default(0):burn,this.spent=new bn_js_1.default(0),this.stakeableLockSpent=new bn_js_1.default(0),this.stakeableLockChange=!1}}exports.AssetAmount=AssetAmount;exports.StandardAssetAmountDestination=class StandardAssetAmountDestination{constructor(destinations,senders,changeAddresses){this.amounts=[],this.destinations=[],this.senders=[],this.changeAddresses=[],this.amountkey={},this.inputs=[],this.outputs=[],this.change=[],this.addAssetAmount=(assetID,amount,burn)=>{let aa=new AssetAmount(assetID,amount,burn);this.amounts.push(aa),this.amountkey[aa.getAssetIDString()]=aa},this.addInput=input=>{this.inputs.push(input)},this.addOutput=output=>{this.outputs.push(output)},this.addChange=output=>{this.change.push(output)},this.getAmounts=()=>this.amounts,this.getDestinations=()=>this.destinations,this.getSenders=()=>this.senders,this.getChangeAddresses=()=>this.changeAddresses,this.getAssetAmount=assetHexStr=>this.amountkey[`${assetHexStr}`],this.assetExists=assetHexStr=>assetHexStr in this.amountkey,this.getInputs=()=>this.inputs,this.getOutputs=()=>this.outputs,this.getChangeOutputs=()=>this.change,this.getAllOutputs=()=>this.outputs.concat(this.change),this.canComplete=()=>{for(let i=0;i<this.amounts.length;i++)if(!this.amounts[`${i}`].isFinished())return!1;return!0},this.destinations=destinations,this.changeAddresses=changeAddresses,this.senders=senders}}},5375:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Credential=exports.Signature=exports.SigIdx=void 0;const nbytes_1=__webpack_require__(4263),buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),serialization_1=__webpack_require__(555),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class SigIdx extends nbytes_1.NBytes{constructor(){super(),this._typeName="SigIdx",this._typeID=void 0,this.source=buffer_1.Buffer.alloc(20),this.bytes=buffer_1.Buffer.alloc(4),this.bsize=4,this.setSource=address=>{this.source=address},this.getSource=()=>this.source}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{source:serialization.encoder(this.source,encoding,"Buffer","hex")})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.source=serialization.decoder(fields.source,encoding,"hex","Buffer")}clone(){let newbase=new SigIdx;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new SigIdx}}exports.SigIdx=SigIdx;class Signature extends nbytes_1.NBytes{constructor(){super(),this._typeName="Signature",this._typeID=void 0,this.bytes=buffer_1.Buffer.alloc(65),this.bsize=65}clone(){let newbase=new Signature;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new Signature}}exports.Signature=Signature;class Credential extends serialization_1.Serializable{constructor(sigarray){super(),this._typeName="Credential",this._typeID=void 0,this.sigArray=[],this.addSignature=sig=>(this.sigArray.push(sig),this.sigArray.length-1),void 0!==sigarray&&(this.sigArray=sigarray)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{sigArray:this.sigArray.map((s=>s.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.sigArray=fields.sigArray.map((s=>{let sig=new Signature;return sig.deserialize(s,encoding),sig}))}setCodecID(codecID){}fromBuffer(bytes,offset=0){const siglen=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);offset+=4,this.sigArray=[];for(let i=0;i<siglen;i++){const sig=new Signature;offset=sig.fromBuffer(bytes,offset),this.sigArray.push(sig)}return offset}toBuffer(){const siglen=buffer_1.Buffer.alloc(4);siglen.writeInt32BE(this.sigArray.length,0);const barr=[siglen];let bsize=siglen.length;for(let i=0;i<this.sigArray.length;i++){const sigbuff=this.sigArray[`${i}`].toBuffer();bsize+=sigbuff.length,barr.push(sigbuff)}return buffer_1.Buffer.concat(barr,bsize)}}exports.Credential=Credential},7965:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.EVMStandardTx=exports.EVMStandardUnsignedTx=exports.EVMStandardBaseTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),bn_js_1=__importDefault(__webpack_require__(3550)),input_1=__webpack_require__(1149),output_1=__webpack_require__(8556),constants_1=__webpack_require__(8779),serialization_1=__webpack_require__(555),bintools=bintools_1.default.getInstance(),serializer=serialization_1.Serialization.getInstance();class EVMStandardBaseTx extends serialization_1.Serializable{constructor(networkID=constants_1.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16)){super(),this._typeName="EVMStandardBaseTx",this._typeID=void 0,this.networkID=buffer_1.Buffer.alloc(4),this.blockchainID=buffer_1.Buffer.alloc(32),this.networkID.writeUInt32BE(networkID,0),this.blockchainID=blockchainID}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{networkID:serializer.encoder(this.networkID,encoding,"Buffer","decimalString"),blockchainID:serializer.encoder(this.blockchainID,encoding,"Buffer","cb58")})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.networkID=serializer.decoder(fields.networkID,encoding,"decimalString","Buffer",4),this.blockchainID=serializer.decoder(fields.blockchainID,encoding,"cb58","Buffer",32)}getNetworkID(){return this.networkID.readUInt32BE(0)}getBlockchainID(){return this.blockchainID}toBuffer(){let bsize=this.networkID.length+this.blockchainID.length;const barr=[this.networkID,this.blockchainID];return buffer_1.Buffer.concat(barr,bsize)}toString(){return bintools.bufferToB58(this.toBuffer())}}exports.EVMStandardBaseTx=EVMStandardBaseTx;class EVMStandardUnsignedTx extends serialization_1.Serializable{constructor(transaction,codecID=0){super(),this._typeName="StandardUnsignedTx",this._typeID=void 0,this.codecID=0,this.codecID=codecID,this.transaction=transaction}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{codecID:serializer.encoder(this.codecID,encoding,"number","decimalString",2),transaction:this.transaction.serialize(encoding)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.codecID=serializer.decoder(fields.codecID,encoding,"decimalString","number")}getCodecID(){return this.codecID}getCodecIDBuffer(){let codecBuf=buffer_1.Buffer.alloc(2);return codecBuf.writeUInt16BE(this.codecID,0),codecBuf}getInputTotal(assetID){const aIDHex=assetID.toString("hex");let total=new bn_js_1.default(0);return[].forEach((input=>{if(input.getInput()instanceof input_1.StandardAmountInput&&aIDHex===input.getAssetID().toString("hex")){const i=input.getInput();total=total.add(i.getAmount())}})),total}getOutputTotal(assetID){const aIDHex=assetID.toString("hex");let total=new bn_js_1.default(0);return[].forEach((out=>{if(out.getOutput()instanceof output_1.StandardAmountOutput&&aIDHex===out.getAssetID().toString("hex")){const output=out.getOutput();total=total.add(output.getAmount())}})),total}getBurn(assetID){return this.getInputTotal(assetID).sub(this.getOutputTotal(assetID))}toBuffer(){const codecID=this.getCodecIDBuffer(),txtype=buffer_1.Buffer.alloc(4);txtype.writeUInt32BE(this.transaction.getTxType(),0);const basebuff=this.transaction.toBuffer();return buffer_1.Buffer.concat([codecID,txtype,basebuff],codecID.length+txtype.length+basebuff.length)}}exports.EVMStandardUnsignedTx=EVMStandardUnsignedTx;class EVMStandardTx extends serialization_1.Serializable{constructor(unsignedTx,credentials){super(),this._typeName="StandardTx",this._typeID=void 0,this.unsignedTx=void 0,this.credentials=[],void 0!==unsignedTx&&(this.unsignedTx=unsignedTx,void 0!==credentials&&(this.credentials=credentials))}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{unsignedTx:this.unsignedTx.serialize(encoding),credentials:this.credentials.map((c=>c.serialize(encoding)))})}getUnsignedTx(){return this.unsignedTx}toBuffer(){const txbuff=this.unsignedTx.toBuffer();let bsize=txbuff.length;const credlen=buffer_1.Buffer.alloc(4);credlen.writeUInt32BE(this.credentials.length,0);const barr=[txbuff,credlen];bsize+=credlen.length,this.credentials.forEach((credential=>{const credid=buffer_1.Buffer.alloc(4);credid.writeUInt32BE(credential.getCredentialID(),0),barr.push(credid),bsize+=credid.length;const credbuff=credential.toBuffer();bsize+=credbuff.length,barr.push(credbuff)}));return buffer_1.Buffer.concat(barr,bsize)}fromString(serialized){return this.fromBuffer(bintools.cb58Decode(serialized))}toString(){return bintools.cb58Encode(this.toBuffer())}toStringHex(){return`0x${bintools.addChecksum(this.toBuffer()).toString("hex")}`}}exports.EVMStandardTx=EVMStandardTx},999:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(17),exports),__exportStar(__webpack_require__(6305),exports),__exportStar(__webpack_require__(5375),exports),__exportStar(__webpack_require__(7965),exports),__exportStar(__webpack_require__(1149),exports),__exportStar(__webpack_require__(5277),exports),__exportStar(__webpack_require__(5912),exports),__exportStar(__webpack_require__(62),exports),__exportStar(__webpack_require__(4263),exports),__exportStar(__webpack_require__(8556),exports),__exportStar(__webpack_require__(5534),exports),__exportStar(__webpack_require__(181),exports),__exportStar(__webpack_require__(613),exports),__exportStar(__webpack_require__(7612),exports)},1149:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StandardAmountInput=exports.StandardTransferableInput=exports.StandardParseableInput=exports.Input=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),bn_js_1=__importDefault(__webpack_require__(3550)),credentials_1=__webpack_require__(5375),serialization_1=__webpack_require__(555),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class Input extends serialization_1.Serializable{constructor(){super(...arguments),this._typeName="Input",this._typeID=void 0,this.sigCount=buffer_1.Buffer.alloc(4),this.sigIdxs=[],this.getSigIdxs=()=>this.sigIdxs,this.addSignatureIdx=(addressIdx,address)=>{const sigidx=new credentials_1.SigIdx,b=buffer_1.Buffer.alloc(4);b.writeUInt32BE(addressIdx,0),sigidx.fromBuffer(b),sigidx.setSource(address),this.sigIdxs.push(sigidx),this.sigCount.writeUInt32BE(this.sigIdxs.length,0)}}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{sigIdxs:this.sigIdxs.map((s=>s.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.sigIdxs=fields.sigIdxs.map((s=>{let sidx=new credentials_1.SigIdx;return sidx.deserialize(s,encoding),sidx})),this.sigCount.writeUInt32BE(this.sigIdxs.length,0)}fromBuffer(bytes,offset=0){this.sigCount=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const sigCount=this.sigCount.readUInt32BE(0);this.sigIdxs=[];for(let i=0;i<sigCount;i++){const sigidx=new credentials_1.SigIdx,sigbuff=bintools.copyFrom(bytes,offset,offset+4);sigidx.fromBuffer(sigbuff),offset+=4,this.sigIdxs.push(sigidx)}return offset}toBuffer(){this.sigCount.writeUInt32BE(this.sigIdxs.length,0);let bsize=this.sigCount.length;const barr=[this.sigCount];for(let i=0;i<this.sigIdxs.length;i++){const b=this.sigIdxs[`${i}`].toBuffer();barr.push(b),bsize+=b.length}return buffer_1.Buffer.concat(barr,bsize)}toString(){return bintools.bufferToB58(this.toBuffer())}}exports.Input=Input,Input.comparator=()=>(a,b)=>{const aoutid=buffer_1.Buffer.alloc(4);aoutid.writeUInt32BE(a.getInputID(),0);const abuff=a.toBuffer(),boutid=buffer_1.Buffer.alloc(4);boutid.writeUInt32BE(b.getInputID(),0);const bbuff=b.toBuffer(),asort=buffer_1.Buffer.concat([aoutid,abuff],aoutid.length+abuff.length),bsort=buffer_1.Buffer.concat([boutid,bbuff],boutid.length+bbuff.length);return buffer_1.Buffer.compare(asort,bsort)};class StandardParseableInput extends serialization_1.Serializable{constructor(input){super(),this._typeName="StandardParseableInput",this._typeID=void 0,this.getInput=()=>this.input,input instanceof Input&&(this.input=input)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{input:this.input.serialize(encoding)})}toBuffer(){const inbuff=this.input.toBuffer(),inid=buffer_1.Buffer.alloc(4);inid.writeUInt32BE(this.input.getInputID(),0);const barr=[inid,inbuff];return buffer_1.Buffer.concat(barr,inid.length+inbuff.length)}}exports.StandardParseableInput=StandardParseableInput,StandardParseableInput.comparator=()=>(a,b)=>{const sorta=a.toBuffer(),sortb=b.toBuffer();return buffer_1.Buffer.compare(sorta,sortb)};exports.StandardTransferableInput=class StandardTransferableInput extends StandardParseableInput{constructor(txid,outputidx,assetID,input){super(),this._typeName="StandardTransferableInput",this._typeID=void 0,this.txid=buffer_1.Buffer.alloc(32),this.outputidx=buffer_1.Buffer.alloc(4),this.assetID=buffer_1.Buffer.alloc(32),this.getTxID=()=>this.txid,this.getOutputIdx=()=>this.outputidx,this.getUTXOID=()=>bintools.bufferToB58(buffer_1.Buffer.concat([this.txid,this.outputidx])),this.getInput=()=>this.input,this.getAssetID=()=>this.assetID,void 0!==txid&&void 0!==outputidx&&void 0!==assetID&&input instanceof Input&&(this.input=input,this.txid=txid,this.outputidx=outputidx,this.assetID=assetID)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{txid:serialization.encoder(this.txid,encoding,"Buffer","cb58"),outputidx:serialization.encoder(this.outputidx,encoding,"Buffer","decimalString"),assetID:serialization.encoder(this.assetID,encoding,"Buffer","cb58")})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.txid=serialization.decoder(fields.txid,encoding,"cb58","Buffer",32),this.outputidx=serialization.decoder(fields.outputidx,encoding,"decimalString","Buffer",4),this.assetID=serialization.decoder(fields.assetID,encoding,"cb58","Buffer",32)}toBuffer(){const parseableBuff=super.toBuffer(),bsize=this.txid.length+this.outputidx.length+this.assetID.length+parseableBuff.length,barr=[this.txid,this.outputidx,this.assetID,parseableBuff];return buffer_1.Buffer.concat(barr,bsize)}toString(){return bintools.bufferToB58(this.toBuffer())}};exports.StandardAmountInput=class StandardAmountInput extends Input{constructor(amount){super(),this._typeName="StandardAmountInput",this._typeID=void 0,this.amount=buffer_1.Buffer.alloc(8),this.amountValue=new bn_js_1.default(0),this.getAmount=()=>this.amountValue.clone(),amount&&(this.amountValue=amount.clone(),this.amount=bintools.fromBNToBuffer(amount,8))}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{amount:serialization.encoder(this.amount,encoding,"Buffer","decimalString",8)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.amount=serialization.decoder(fields.amount,encoding,"decimalString","Buffer",8),this.amountValue=bintools.fromBufferToBN(this.amount)}fromBuffer(bytes,offset=0){return this.amount=bintools.copyFrom(bytes,offset,offset+8),this.amountValue=bintools.fromBufferToBN(this.amount),offset+=8,super.fromBuffer(bytes,offset)}toBuffer(){const superbuff=super.toBuffer(),bsize=this.amount.length+superbuff.length,barr=[this.amount,superbuff];return buffer_1.Buffer.concat(barr,bsize)}}},5277:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0})},5912:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.JRPCAPI=void 0;const utils_1=__webpack_require__(338),apibase_1=__webpack_require__(17);class JRPCAPI extends apibase_1.APIBase{constructor(core,baseURL,jrpcVersion="2.0"){super(core,baseURL),this.jrpcVersion="2.0",this.rpcID=1,this.callMethod=(method,params,baseURL,headers)=>__awaiter(this,void 0,void 0,(function*(){const ep=baseURL||this.baseURL,rpc={};rpc.id=this.rpcID,rpc.method=method,params?rpc.params=params:"1.0"===this.jrpcVersion&&(rpc.params=[]),"1.0"!==this.jrpcVersion&&(rpc.jsonrpc=this.jrpcVersion);let headrs={"Content-Type":"application/json;charset=UTF-8"};headers&&(headrs=Object.assign(Object.assign({},headrs),headers));const axConf={baseURL:baseURL=this.core.getURL(),responseType:"json",adapter:"undefined"!=typeof fetch?utils_1.fetchAdapter:void 0},resp=yield this.core.post(ep,{},JSON.stringify(rpc),headrs,axConf);if(resp.status>=200&&resp.status<300&&(this.rpcID+=1,"string"==typeof resp.data&&(resp.data=JSON.parse(resp.data)),"object"==typeof resp.data&&(null===resp.data||"error"in resp.data)))throw new Error(resp.data.error.message);return resp})),this.getRPCID=()=>this.rpcID,this.jrpcVersion=jrpcVersion,this.rpcID=1}}exports.JRPCAPI=JRPCAPI},62:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StandardKeyChain=exports.StandardKeyPair=void 0;const buffer_1=__webpack_require__(8764);exports.StandardKeyPair=class StandardKeyPair{getPrivateKey(){return this.privk}getPublicKey(){return this.pubk}};exports.StandardKeyChain=class StandardKeyChain{constructor(){this.keys={},this.getAddresses=()=>Object.values(this.keys).map((kp=>kp.getAddress())),this.getAddressStrings=()=>Object.values(this.keys).map((kp=>kp.getAddressString())),this.removeKey=key=>{let kaddr;return kaddr=key instanceof buffer_1.Buffer?key.toString("hex"):key.getAddress().toString("hex"),kaddr in this.keys&&(delete this.keys[`${kaddr}`],!0)},this.hasKey=address=>address.toString("hex")in this.keys,this.getKey=address=>this.keys[address.toString("hex")]}addKey(newKey){this.keys[newKey.getAddress().toString("hex")]=newKey}}},4263:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NBytes=void 0;const bintools_1=__importDefault(__webpack_require__(903)),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class NBytes extends serialization_1.Serializable{constructor(){super(...arguments),this._typeName="NBytes",this._typeID=void 0,this.getSize=()=>this.bsize}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{bsize:serialization.encoder(this.bsize,encoding,"number","decimalString",4),bytes:serialization.encoder(this.bytes,encoding,"Buffer","hex",this.bsize)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.bsize=serialization.decoder(fields.bsize,encoding,"decimalString","number",4),this.bytes=serialization.decoder(fields.bytes,encoding,"hex","Buffer",this.bsize)}fromString(b58str){try{this.fromBuffer(bintools.b58ToBuffer(b58str))}catch(e){throw new Error(`Error - NBytes.fromString: ${e}`)}return this.bsize}fromBuffer(buff,offset=0){try{if(buff.length-offset<this.bsize)throw new errors_1.BufferSizeError("Error - NBytes.fromBuffer: not enough space available in buffer.");this.bytes=bintools.copyFrom(buff,offset,offset+this.bsize)}catch(e){throw new Error(`Error - NBytes.fromBuffer: ${e}`)}return offset+this.bsize}toBuffer(){return this.bytes}toString(){return bintools.bufferToB58(this.toBuffer())}}exports.NBytes=NBytes},8556:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseNFTOutput=exports.StandardAmountOutput=exports.StandardTransferableOutput=exports.StandardParseableOutput=exports.Output=exports.OutputOwners=exports.Address=void 0;const buffer_1=__webpack_require__(8764),bn_js_1=__importDefault(__webpack_require__(3550)),bintools_1=__importDefault(__webpack_require__(903)),nbytes_1=__webpack_require__(4263),helperfunctions_1=__webpack_require__(5554),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class Address extends nbytes_1.NBytes{constructor(){super(),this._typeName="Address",this._typeID=void 0,this.bytes=buffer_1.Buffer.alloc(20),this.bsize=20}toString(){return bintools.cb58Encode(this.toBuffer())}fromString(addr){const addrbuff=bintools.b58ToBuffer(addr);if(24===addrbuff.length&&bintools.validateChecksum(addrbuff)){const newbuff=bintools.copyFrom(addrbuff,0,addrbuff.length-4);20===newbuff.length&&(this.bytes=newbuff)}else{if(24===addrbuff.length)throw new errors_1.ChecksumError("Error - Address.fromString: invalid checksum on address");if(20!==addrbuff.length)throw new errors_1.AddressError("Error - Address.fromString: invalid address");this.bytes=addrbuff}return this.getSize()}clone(){let newbase=new Address;return newbase.fromBuffer(this.toBuffer()),newbase}create(...args){return new Address}}exports.Address=Address,Address.comparator=()=>(a,b)=>buffer_1.Buffer.compare(a.toBuffer(),b.toBuffer());class OutputOwners extends serialization_1.Serializable{constructor(addresses,locktime,threshold){if(super(),this._typeName="OutputOwners",this._typeID=void 0,this.locktime=buffer_1.Buffer.alloc(8),this.threshold=buffer_1.Buffer.alloc(4),this.numaddrs=buffer_1.Buffer.alloc(4),this.addresses=[],this.getThreshold=()=>this.threshold.readUInt32BE(0),this.getLocktime=()=>bintools.fromBufferToBN(this.locktime),this.getAddresses=()=>{const result=[];for(let i=0;i<this.addresses.length;i++)result.push(this.addresses[`${i}`].toBuffer());return result},this.getAddressIdx=address=>{for(let i=0;i<this.addresses.length;i++)if(this.addresses[`${i}`].toBuffer().toString("hex")===address.toString("hex"))return i;return-1},this.getAddress=idx=>{if(idx<this.addresses.length)return this.addresses[`${idx}`].toBuffer();throw new errors_1.AddressIndexError("Error - Output.getAddress: idx out of range")},this.meetsThreshold=(addresses,asOf)=>{let now;now=void 0===asOf?(0,helperfunctions_1.UnixNow)():asOf;const qualified=this.getSpenders(addresses,now),threshold=this.threshold.readUInt32BE(0);return qualified.length>=threshold},this.getSpenders=(addresses,asOf)=>{const qualified=[];let now;now=void 0===asOf?(0,helperfunctions_1.UnixNow)():asOf;const locktime=bintools.fromBufferToBN(this.locktime);if(now.lte(locktime))return qualified;const threshold=this.threshold.readUInt32BE(0);for(let i=0;i<this.addresses.length&&qualified.length<threshold;i++)for(let j=0;j<addresses.length&&qualified.length<threshold;j++)addresses[`${j}`].toString("hex")===this.addresses[`${i}`].toBuffer().toString("hex")&&qualified.push(addresses[`${j}`]);return qualified},void 0!==addresses&&addresses.length){const addrs=[];for(let i=0;i<addresses.length;i++)addrs[`${i}`]=new Address,addrs[`${i}`].fromBuffer(addresses[`${i}`]);this.addresses=addrs,this.addresses.sort(Address.comparator()),this.numaddrs.writeUInt32BE(this.addresses.length,0)}void 0!==typeof threshold&&this.threshold.writeUInt32BE(threshold||1,0),void 0!==locktime&&(this.locktime=bintools.fromBNToBuffer(locktime,8))}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{locktime:serialization.encoder(this.locktime,encoding,"Buffer","decimalString",8),threshold:serialization.encoder(this.threshold,encoding,"Buffer","decimalString",4),addresses:this.addresses.map((a=>a.serialize(encoding)))})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.locktime=serialization.decoder(fields.locktime,encoding,"decimalString","Buffer",8),this.threshold=serialization.decoder(fields.threshold,encoding,"decimalString","Buffer",4),this.addresses=fields.addresses.map((a=>{let addr=new Address;return addr.deserialize(a,encoding),addr})),this.numaddrs=buffer_1.Buffer.alloc(4),this.numaddrs.writeUInt32BE(this.addresses.length,0)}fromBuffer(bytes,offset=0){this.locktime=bintools.copyFrom(bytes,offset,offset+8),offset+=8,this.threshold=bintools.copyFrom(bytes,offset,offset+4),offset+=4,this.numaddrs=bintools.copyFrom(bytes,offset,offset+4),offset+=4;const numaddrs=this.numaddrs.readUInt32BE(0);this.addresses=[];for(let i=0;i<numaddrs;i++){const addr=new Address;offset=addr.fromBuffer(bytes,offset),this.addresses.push(addr)}return this.addresses.sort(Address.comparator()),offset}toBuffer(){this.addresses.sort(Address.comparator()),this.numaddrs.writeUInt32BE(this.addresses.length,0);let bsize=this.locktime.length+this.threshold.length+this.numaddrs.length;const barr=[this.locktime,this.threshold,this.numaddrs];for(let i=0;i<this.addresses.length;i++){const b=this.addresses[`${i}`].toBuffer();barr.push(b),bsize+=b.length}return buffer_1.Buffer.concat(barr,bsize)}toString(){return bintools.bufferToB58(this.toBuffer())}}exports.OutputOwners=OutputOwners,OutputOwners.comparator=()=>(a,b)=>{const aoutid=buffer_1.Buffer.alloc(4);aoutid.writeUInt32BE(a.getOutputID(),0);const abuff=a.toBuffer(),boutid=buffer_1.Buffer.alloc(4);boutid.writeUInt32BE(b.getOutputID(),0);const bbuff=b.toBuffer(),asort=buffer_1.Buffer.concat([aoutid,abuff],aoutid.length+abuff.length),bsort=buffer_1.Buffer.concat([boutid,bbuff],boutid.length+bbuff.length);return buffer_1.Buffer.compare(asort,bsort)};class Output extends OutputOwners{constructor(){super(...arguments),this._typeName="Output",this._typeID=void 0}}exports.Output=Output;class StandardParseableOutput extends serialization_1.Serializable{constructor(output){super(),this._typeName="StandardParseableOutput",this._typeID=void 0,this.getOutput=()=>this.output,output instanceof Output&&(this.output=output)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{output:this.output.serialize(encoding)})}toBuffer(){const outbuff=this.output.toBuffer(),outid=buffer_1.Buffer.alloc(4);outid.writeUInt32BE(this.output.getOutputID(),0);const barr=[outid,outbuff];return buffer_1.Buffer.concat(barr,outid.length+outbuff.length)}}exports.StandardParseableOutput=StandardParseableOutput,StandardParseableOutput.comparator=()=>(a,b)=>{const sorta=a.toBuffer(),sortb=b.toBuffer();return buffer_1.Buffer.compare(sorta,sortb)};exports.StandardTransferableOutput=class StandardTransferableOutput extends StandardParseableOutput{constructor(assetID,output){super(output),this._typeName="StandardTransferableOutput",this._typeID=void 0,this.assetID=void 0,this.getAssetID=()=>this.assetID,void 0!==assetID&&(this.assetID=assetID)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{assetID:serialization.encoder(this.assetID,encoding,"Buffer","cb58")})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.assetID=serialization.decoder(fields.assetID,encoding,"cb58","Buffer",32)}toBuffer(){const parseableBuff=super.toBuffer(),barr=[this.assetID,parseableBuff];return buffer_1.Buffer.concat(barr,this.assetID.length+parseableBuff.length)}};exports.StandardAmountOutput=class StandardAmountOutput extends Output{constructor(amount,addresses,locktime,threshold){super(addresses,locktime,threshold),this._typeName="StandardAmountOutput",this._typeID=void 0,this.amount=buffer_1.Buffer.alloc(8),this.amountValue=new bn_js_1.default(0),void 0!==amount&&(this.amountValue=amount.clone(),this.amount=bintools.fromBNToBuffer(amount,8))}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{amount:serialization.encoder(this.amount,encoding,"Buffer","decimalString",8)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.amount=serialization.decoder(fields.amount,encoding,"decimalString","Buffer",8),this.amountValue=bintools.fromBufferToBN(this.amount)}getAmount(){return this.amountValue.clone()}fromBuffer(outbuff,offset=0){return this.amount=bintools.copyFrom(outbuff,offset,offset+8),this.amountValue=bintools.fromBufferToBN(this.amount),offset+=8,super.fromBuffer(outbuff,offset)}toBuffer(){const superbuff=super.toBuffer(),bsize=this.amount.length+superbuff.length;this.numaddrs.writeUInt32BE(this.addresses.length,0);const barr=[this.amount,superbuff];return buffer_1.Buffer.concat(barr,bsize)}};exports.BaseNFTOutput=class BaseNFTOutput extends Output{constructor(){super(...arguments),this._typeName="BaseNFTOutput",this._typeID=void 0,this.groupID=buffer_1.Buffer.alloc(4),this.getGroupID=()=>this.groupID.readUInt32BE(0)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{groupID:serialization.encoder(this.groupID,encoding,"Buffer","decimalString",4)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.groupID=serialization.decoder(fields.groupID,encoding,"decimalString","Buffer",4)}}},5534:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.RESTAPI=void 0;const apibase_1=__webpack_require__(17);class RESTAPI extends apibase_1.APIBase{constructor(core,baseURL,contentType="application/json;charset=UTF-8",acceptType){super(core,baseURL),this.prepHeaders=(contentType,acceptType)=>{const headers={};return headers["Content-Type"]=void 0!==contentType?contentType:this.contentType,void 0!==acceptType?headers.Accept=acceptType:void 0!==this.acceptType&&(headers.Accept=this.acceptType),headers},this.axConf=()=>({baseURL:this.core.getURL(),responseType:"json"}),this.get=(baseURL,contentType,acceptType)=>__awaiter(this,void 0,void 0,(function*(){const ep=baseURL||this.baseURL,headers=this.prepHeaders(contentType,acceptType);return yield this.core.get(ep,{},headers,this.axConf())})),this.post=(method,params,baseURL,contentType,acceptType)=>__awaiter(this,void 0,void 0,(function*(){const ep=baseURL||this.baseURL,rpc={};rpc.method=method,params&&(rpc.params=params);const headers=this.prepHeaders(contentType,acceptType);return yield this.core.post(ep,{},JSON.stringify(rpc),headers,this.axConf())})),this.put=(method,params,baseURL,contentType,acceptType)=>__awaiter(this,void 0,void 0,(function*(){const ep=baseURL||this.baseURL,rpc={};rpc.method=method,params&&(rpc.params=params);const headers=this.prepHeaders(contentType,acceptType);return yield this.core.put(ep,{},JSON.stringify(rpc),headers,this.axConf())})),this.delete=(method,params,baseURL,contentType,acceptType)=>__awaiter(this,void 0,void 0,(function*(){const ep=baseURL||this.baseURL,rpc={};rpc.method=method,params&&(rpc.params=params);const headers=this.prepHeaders(contentType,acceptType);return yield this.core.delete(ep,{},headers,this.axConf())})),this.patch=(method,params,baseURL,contentType,acceptType)=>__awaiter(this,void 0,void 0,(function*(){const ep=baseURL||this.baseURL,rpc={};rpc.method=method,params&&(rpc.params=params);const headers=this.prepHeaders(contentType,acceptType);return yield this.core.patch(ep,{},JSON.stringify(rpc),headers,this.axConf())})),this.getContentType=()=>this.contentType,this.getAcceptType=()=>this.acceptType,this.contentType=contentType,this.acceptType=acceptType}}exports.RESTAPI=RESTAPI},181:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(null!=mod)for(var k in mod)"default"!==k&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SECP256k1KeyChain=exports.SECP256k1KeyPair=void 0;const buffer_1=__webpack_require__(8764),elliptic=__importStar(__webpack_require__(6266)),create_hash_1=__importDefault(__webpack_require__(3482)),bintools_1=__importDefault(__webpack_require__(903)),keychain_1=__webpack_require__(62),errors_1=__webpack_require__(611),utils_1=__webpack_require__(338),ec=new(0,elliptic.ec)("secp256k1"),BN=ec.curve.n.constructor,bintools=bintools_1.default.getInstance(),serialization=utils_1.Serialization.getInstance();class SECP256k1KeyPair extends keychain_1.StandardKeyPair{constructor(hrp,chainID){super(),this.chainID="",this.hrp="",this.chainID=chainID,this.hrp=hrp,this.generateKey()}_sigFromSigBuffer(sig){return{r:new BN(bintools.copyFrom(sig,0,32)),s:new BN(bintools.copyFrom(sig,32,64)),recoveryParam:bintools.copyFrom(sig,64,65).readUIntBE(0,1)}}generateKey(){this.keypair=ec.genKeyPair(),this.privk=buffer_1.Buffer.from(this.keypair.getPrivate("hex").padStart(64,"0"),"hex"),this.pubk=buffer_1.Buffer.from(this.keypair.getPublic(!0,"hex").padStart(66,"0"),"hex")}importKey(privk){this.keypair=ec.keyFromPrivate(privk.toString("hex"),"hex");try{return this.privk=buffer_1.Buffer.from(this.keypair.getPrivate("hex").padStart(64,"0"),"hex"),this.pubk=buffer_1.Buffer.from(this.keypair.getPublic(!0,"hex").padStart(66,"0"),"hex"),!0}catch(error){return!1}}getAddress(){return SECP256k1KeyPair.addressFromPublicKey(this.pubk)}getAddressString(){const addr=SECP256k1KeyPair.addressFromPublicKey(this.pubk);return serialization.bufferToType(addr,"bech32",this.hrp,this.chainID)}static addressFromPublicKey(pubk){if(65===pubk.length&&(pubk=buffer_1.Buffer.from(ec.keyFromPublic(pubk).getPublic(!0,"hex").padStart(66,"0"),"hex")),33===pubk.length){const sha256=buffer_1.Buffer.from((0,create_hash_1.default)("sha256").update(pubk).digest());return buffer_1.Buffer.from((0,create_hash_1.default)("ripemd160").update(sha256).digest())}throw new errors_1.PublicKeyError("Unable to make address.")}getPrivateKeyString(){return`PrivateKey-${bintools.cb58Encode(this.privk)}`}getPublicKeyString(){return bintools.cb58Encode(this.pubk)}sign(msg){const sigObj=this.keypair.sign(msg,void 0,{canonical:!0}),recovery=buffer_1.Buffer.alloc(1);recovery.writeUInt8(sigObj.recoveryParam,0);const r=buffer_1.Buffer.from(sigObj.r.toArray("be",32)),s=buffer_1.Buffer.from(sigObj.s.toArray("be",32));return buffer_1.Buffer.concat([r,s,recovery],65)}verify(msg,sig){const sigObj=this._sigFromSigBuffer(sig);return ec.verify(msg,sigObj,this.keypair)}recover(msg,sig){const sigObj=this._sigFromSigBuffer(sig),pubk=ec.recoverPubKey(msg,sigObj,sigObj.recoveryParam);return buffer_1.Buffer.from(pubk.encodeCompressed())}getChainID(){return this.chainID}setChainID(chainID){this.chainID=chainID}getHRP(){return this.hrp}setHRP(hrp){this.hrp=hrp}}exports.SECP256k1KeyPair=SECP256k1KeyPair;class SECP256k1KeyChain extends keychain_1.StandardKeyChain{addKey(newKey){super.addKey(newKey)}}exports.SECP256k1KeyChain=SECP256k1KeyChain},613:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StandardTx=exports.StandardUnsignedTx=exports.StandardBaseTx=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),bn_js_1=__importDefault(__webpack_require__(3550)),input_1=__webpack_require__(1149),output_1=__webpack_require__(8556),constants_1=__webpack_require__(8779),serialization_1=__webpack_require__(555),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class StandardBaseTx extends serialization_1.Serializable{constructor(networkID=constants_1.DefaultNetworkID,blockchainID=buffer_1.Buffer.alloc(32,16),outs,ins,memo){super(),this._typeName="StandardBaseTx",this._typeID=void 0,this.networkID=buffer_1.Buffer.alloc(4),this.blockchainID=buffer_1.Buffer.alloc(32),this.numouts=buffer_1.Buffer.alloc(4),this.numins=buffer_1.Buffer.alloc(4),this.memo=buffer_1.Buffer.alloc(0),this.networkID.writeUInt32BE(networkID,0),this.blockchainID=blockchainID,void 0!==memo&&(this.memo=memo),void 0!==ins&&void 0!==outs&&(this.numouts.writeUInt32BE(outs.length,0),this.outs=outs.sort(output_1.StandardTransferableOutput.comparator()),this.numins.writeUInt32BE(ins.length,0),this.ins=ins.sort(input_1.StandardTransferableInput.comparator()))}serialize(encoding="hex"){const fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{networkID:serialization.encoder(this.networkID,encoding,"Buffer","decimalString"),blockchainID:serialization.encoder(this.blockchainID,encoding,"Buffer","cb58"),outs:this.outs.map((o=>o.serialize(encoding))),ins:this.ins.map((i=>i.serialize(encoding))),memo:serialization.encoder(this.memo,encoding,"Buffer","hex")})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.networkID=serialization.decoder(fields.networkID,encoding,"decimalString","Buffer",4),this.blockchainID=serialization.decoder(fields.blockchainID,encoding,"cb58","Buffer",32),this.memo=serialization.decoder(fields.memo,encoding,"hex","Buffer")}getNetworkID(){return this.networkID.readUInt32BE(0)}getBlockchainID(){return this.blockchainID}getMemo(){return this.memo}toBuffer(){this.outs.sort(output_1.StandardTransferableOutput.comparator()),this.ins.sort(input_1.StandardTransferableInput.comparator()),this.numouts.writeUInt32BE(this.outs.length,0),this.numins.writeUInt32BE(this.ins.length,0);let bsize=this.networkID.length+this.blockchainID.length+this.numouts.length;const barr=[this.networkID,this.blockchainID,this.numouts];for(let i=0;i<this.outs.length;i++){const b=this.outs[`${i}`].toBuffer();barr.push(b),bsize+=b.length}barr.push(this.numins),bsize+=this.numins.length;for(let i=0;i<this.ins.length;i++){const b=this.ins[`${i}`].toBuffer();barr.push(b),bsize+=b.length}let memolen=buffer_1.Buffer.alloc(4);memolen.writeUInt32BE(this.memo.length,0),barr.push(memolen),bsize+=4,barr.push(this.memo),bsize+=this.memo.length;return buffer_1.Buffer.concat(barr,bsize)}toString(){return bintools.bufferToB58(this.toBuffer())}toStringHex(){return`0x${bintools.addChecksum(this.toBuffer()).toString("hex")}`}}exports.StandardBaseTx=StandardBaseTx;class StandardUnsignedTx extends serialization_1.Serializable{constructor(transaction,codecID=0){super(),this._typeName="StandardUnsignedTx",this._typeID=void 0,this.codecID=0,this.codecID=codecID,this.transaction=transaction}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{codecID:serialization.encoder(this.codecID,encoding,"number","decimalString",2),transaction:this.transaction.serialize(encoding)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.codecID=serialization.decoder(fields.codecID,encoding,"decimalString","number")}getCodecID(){return this.codecID}getCodecIDBuffer(){let codecBuf=buffer_1.Buffer.alloc(2);return codecBuf.writeUInt16BE(this.codecID,0),codecBuf}getInputTotal(assetID){const ins=this.getTransaction().getIns(),aIDHex=assetID.toString("hex");let total=new bn_js_1.default(0);for(let i=0;i<ins.length;i++)if(ins[`${i}`].getInput()instanceof input_1.StandardAmountInput&&aIDHex===ins[`${i}`].getAssetID().toString("hex")){const input=ins[`${i}`].getInput();total=total.add(input.getAmount())}return total}getOutputTotal(assetID){const outs=this.getTransaction().getTotalOuts(),aIDHex=assetID.toString("hex");let total=new bn_js_1.default(0);for(let i=0;i<outs.length;i++)if(outs[`${i}`].getOutput()instanceof output_1.StandardAmountOutput&&aIDHex===outs[`${i}`].getAssetID().toString("hex")){const output=outs[`${i}`].getOutput();total=total.add(output.getAmount())}return total}getBurn(assetID){return this.getInputTotal(assetID).sub(this.getOutputTotal(assetID))}toBuffer(){const codecBuf=buffer_1.Buffer.alloc(2);codecBuf.writeUInt16BE(this.transaction.getCodecID(),0);const txtype=buffer_1.Buffer.alloc(4);txtype.writeUInt32BE(this.transaction.getTxType(),0);const basebuff=this.transaction.toBuffer();return buffer_1.Buffer.concat([codecBuf,txtype,basebuff],codecBuf.length+txtype.length+basebuff.length)}}exports.StandardUnsignedTx=StandardUnsignedTx;class StandardTx extends serialization_1.Serializable{constructor(unsignedTx,credentials){super(),this._typeName="StandardTx",this._typeID=void 0,this.unsignedTx=void 0,this.credentials=[],void 0!==unsignedTx&&(this.unsignedTx=unsignedTx,void 0!==credentials&&(this.credentials=credentials))}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{unsignedTx:this.unsignedTx.serialize(encoding),credentials:this.credentials.map((c=>c.serialize(encoding)))})}getCredentials(){return this.credentials}getUnsignedTx(){return this.unsignedTx}toBuffer(){const codecID=this.unsignedTx.getTransaction().getCodecID(),txbuff=this.unsignedTx.toBuffer();let bsize=txbuff.length;const credlen=buffer_1.Buffer.alloc(4);credlen.writeUInt32BE(this.credentials.length,0);const barr=[txbuff,credlen];bsize+=credlen.length;for(let i=0;i<this.credentials.length;i++){this.credentials[`${i}`].setCodecID(codecID);const credID=buffer_1.Buffer.alloc(4);credID.writeUInt32BE(this.credentials[`${i}`].getCredentialID(),0),barr.push(credID),bsize+=credID.length;const credbuff=this.credentials[`${i}`].toBuffer();bsize+=credbuff.length,barr.push(credbuff)}return buffer_1.Buffer.concat(barr,bsize)}fromString(serialized){return this.fromBuffer(bintools.cb58Decode(serialized))}toString(){return bintools.cb58Encode(this.toBuffer())}toStringHex(){return`0x${bintools.addChecksum(this.toBuffer()).toString("hex")}`}}exports.StandardTx=StandardTx},7612:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StandardUTXOSet=exports.StandardUTXO=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),bn_js_1=__importDefault(__webpack_require__(3550)),output_1=__webpack_require__(8556),helperfunctions_1=__webpack_require__(5554),serialization_1=__webpack_require__(555),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class StandardUTXO extends serialization_1.Serializable{constructor(codecID=0,txID,outputidx,assetID,output){super(),this._typeName="StandardUTXO",this._typeID=void 0,this.codecID=buffer_1.Buffer.alloc(2),this.txid=buffer_1.Buffer.alloc(32),this.outputidx=buffer_1.Buffer.alloc(4),this.assetID=buffer_1.Buffer.alloc(32),this.output=void 0,this.getCodecID=()=>this.codecID.readUInt8(0),this.getCodecIDBuffer=()=>this.codecID,this.getTxID=()=>this.txid,this.getOutputIdx=()=>this.outputidx,this.getAssetID=()=>this.assetID,this.getUTXOID=()=>bintools.bufferToB58(buffer_1.Buffer.concat([this.getTxID(),this.getOutputIdx()])),this.getOutput=()=>this.output,void 0!==codecID&&this.codecID.writeUInt8(codecID,0),void 0!==txID&&(this.txid=txID),"number"==typeof outputidx?this.outputidx.writeUInt32BE(outputidx,0):outputidx instanceof buffer_1.Buffer&&(this.outputidx=outputidx),void 0!==assetID&&(this.assetID=assetID),void 0!==output&&(this.output=output)}serialize(encoding="hex"){let fields=super.serialize(encoding);return Object.assign(Object.assign({},fields),{codecID:serialization.encoder(this.codecID,encoding,"Buffer","decimalString"),txid:serialization.encoder(this.txid,encoding,"Buffer","cb58"),outputidx:serialization.encoder(this.outputidx,encoding,"Buffer","decimalString"),assetID:serialization.encoder(this.assetID,encoding,"Buffer","cb58"),output:this.output.serialize(encoding)})}deserialize(fields,encoding="hex"){super.deserialize(fields,encoding),this.codecID=serialization.decoder(fields.codecID,encoding,"decimalString","Buffer",2),this.txid=serialization.decoder(fields.txid,encoding,"cb58","Buffer",32),this.outputidx=serialization.decoder(fields.outputidx,encoding,"decimalString","Buffer",4),this.assetID=serialization.decoder(fields.assetID,encoding,"cb58","Buffer",32)}toBuffer(){const outbuff=this.output.toBuffer(),outputidbuffer=buffer_1.Buffer.alloc(4);outputidbuffer.writeUInt32BE(this.output.getOutputID(),0);const barr=[this.codecID,this.txid,this.outputidx,this.assetID,outputidbuffer,outbuff];return buffer_1.Buffer.concat(barr,this.codecID.length+this.txid.length+this.outputidx.length+this.assetID.length+outputidbuffer.length+outbuff.length)}}exports.StandardUTXO=StandardUTXO;class StandardUTXOSet extends serialization_1.Serializable{constructor(){super(...arguments),this._typeName="StandardUTXOSet",this._typeID=void 0,this.utxos={},this.addressUTXOs={},this.includes=utxo=>{let utxoX,utxoid;try{utxoX=this.parseUTXO(utxo),utxoid=utxoX.getUTXOID()}catch(e){return e instanceof Error?console.log(e.message):console.log(e),!1}return utxoid in this.utxos},this.remove=utxo=>{let utxovar;try{utxovar=this.parseUTXO(utxo)}catch(e){return void(e instanceof Error?console.log(e.message):console.log(e))}const utxoid=utxovar.getUTXOID();if(!(utxoid in this.utxos))return;delete this.utxos[`${utxoid}`];const addresses=Object.keys(this.addressUTXOs);for(let i=0;i<addresses.length;i++)utxoid in this.addressUTXOs[addresses[`${i}`]]&&delete this.addressUTXOs[addresses[`${i}`]][`${utxoid}`];return utxovar},this.removeArray=utxos=>{const removed=[];for(let i=0;i<utxos.length;i++){const result=this.remove(utxos[`${i}`]);void 0!==result&&removed.push(result)}return removed},this.getUTXO=utxoid=>this.utxos[`${utxoid}`],this.getAllUTXOs=utxoids=>{let results=[];return results=void 0!==utxoids&&Array.isArray(utxoids)?utxoids.filter((utxoid=>this.utxos[`${utxoid}`])).map((utxoid=>this.utxos[`${utxoid}`])):Object.values(this.utxos),results},this.getAllUTXOStrings=utxoids=>{const results=[],utxos=Object.keys(this.utxos);if(void 0!==utxoids&&Array.isArray(utxoids))for(let i=0;i<utxoids.length;i++)utxoids[`${i}`]in this.utxos&&results.push(this.utxos[utxoids[`${i}`]].toString());else for(const u of utxos)results.push(this.utxos[`${u}`].toString());return results},this.getUTXOIDs=(addresses,spendable=!0)=>{if(void 0!==addresses){const results=[],now=(0,helperfunctions_1.UnixNow)();for(let i=0;i<addresses.length;i++)if(addresses[`${i}`].toString("hex")in this.addressUTXOs){const entries=Object.entries(this.addressUTXOs[addresses[`${i}`].toString("hex")]);for(const[utxoid,locktime]of entries)(-1===results.indexOf(utxoid)&&spendable&&locktime.lte(now)||!spendable)&&results.push(utxoid)}return results}return Object.keys(this.utxos)},this.getAddresses=()=>Object.keys(this.addressUTXOs).map((k=>buffer_1.Buffer.from(k,"hex"))),this.getBalance=(addresses,assetID,asOf)=>{const utxoids=this.getUTXOIDs(addresses),utxos=this.getAllUTXOs(utxoids);let asset,spend=new bn_js_1.default(0);asset="string"==typeof assetID?bintools.cb58Decode(assetID):assetID;for(let i=0;i<utxos.length;i++)utxos[`${i}`].getOutput()instanceof output_1.StandardAmountOutput&&utxos[`${i}`].getAssetID().toString("hex")===asset.toString("hex")&&utxos[`${i}`].getOutput().meetsThreshold(addresses,asOf)&&(spend=spend.add(utxos[`${i}`].getOutput().getAmount()));return spend},this.getAssetIDs=addresses=>{const results=new Set;let utxoids=[];utxoids=void 0!==addresses?this.getUTXOIDs(addresses):this.getUTXOIDs();for(let i=0;i<utxoids.length;i++)utxoids[`${i}`]in this.utxos&&!(utxoids[`${i}`]in results)&&results.add(this.utxos[utxoids[`${i}`]].getAssetID());return[...results]},this.merge=(utxoset,hasUTXOIDs)=>{const results=this.create(),utxos1=this.getAllUTXOs(hasUTXOIDs),utxos2=utxoset.getAllUTXOs(hasUTXOIDs),process=utxo=>{results.add(utxo)};return utxos1.forEach(process),utxos2.forEach(process),results},this.intersection=utxoset=>{const us1=this.getUTXOIDs(),us2=utxoset.getUTXOIDs(),results=us1.filter((utxoid=>us2.includes(utxoid)));return this.merge(utxoset,results)},this.difference=utxoset=>{const us1=this.getUTXOIDs(),us2=utxoset.getUTXOIDs(),results=us1.filter((utxoid=>!us2.includes(utxoid)));return this.merge(utxoset,results)},this.symDifference=utxoset=>{const us1=this.getUTXOIDs(),us2=utxoset.getUTXOIDs(),results=us1.filter((utxoid=>!us2.includes(utxoid))).concat(us2.filter((utxoid=>!us1.includes(utxoid))));return this.merge(utxoset,results)},this.union=utxoset=>this.merge(utxoset),this.mergeByRule=(utxoset,mergeRule)=>{let uSet;switch(mergeRule){case"intersection":return this.intersection(utxoset);case"differenceSelf":return this.difference(utxoset);case"differenceNew":return utxoset.difference(this);case"symDifference":return this.symDifference(utxoset);case"union":return this.union(utxoset);case"unionMinusNew":return uSet=this.union(utxoset),uSet.difference(utxoset);case"unionMinusSelf":return uSet=this.union(utxoset),uSet.difference(this);default:throw new errors_1.MergeRuleError("Error - StandardUTXOSet.mergeByRule: bad MergeRule")}}}serialize(encoding="hex"){let fields=super.serialize(encoding),utxos={};for(let utxoid in this.utxos){utxos[`${serialization.encoder(utxoid,encoding,"base58","base58")}`]=this.utxos[`${utxoid}`].serialize(encoding)}let addressUTXOs={};for(let address in this.addressUTXOs){let addressCleaned=serialization.encoder(address,encoding,"hex","cb58"),utxobalance={};for(let utxoid in this.addressUTXOs[`${address}`]){utxobalance[`${serialization.encoder(utxoid,encoding,"base58","base58")}`]=serialization.encoder(this.addressUTXOs[`${address}`][`${utxoid}`],encoding,"BN","decimalString")}addressUTXOs[`${addressCleaned}`]=utxobalance}return Object.assign(Object.assign({},fields),{utxos,addressUTXOs})}add(utxo,overwrite=!1){let utxovar;try{utxovar=this.parseUTXO(utxo)}catch(e){return void(e instanceof Error?console.log(e.message):console.log(e))}const utxoid=utxovar.getUTXOID();if(!(utxoid in this.utxos)||!0===overwrite){this.utxos[`${utxoid}`]=utxovar;const addresses=utxovar.getOutput().getAddresses(),locktime=utxovar.getOutput().getLocktime();for(let i=0;i<addresses.length;i++){const address=addresses[`${i}`].toString("hex");address in this.addressUTXOs||(this.addressUTXOs[`${address}`]={}),this.addressUTXOs[`${address}`][`${utxoid}`]=locktime}return utxovar}}addArray(utxos,overwrite=!1){const added=[];for(let i=0;i<utxos.length;i++){let result=this.add(utxos[`${i}`],overwrite);void 0!==result&&added.push(result)}return added}filter(args,lambda){let newset=this.clone(),utxos=this.getAllUTXOs();for(let i=0;i<utxos.length;i++)!1===lambda(utxos[`${i}`],...args)&&newset.remove(utxos[`${i}`]);return newset}}exports.StandardUTXOSet=StandardUTXOSet},5590:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(null!=mod)for(var k in mod)"default"!==k&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.utils=exports.platformvm=exports.metrics=exports.keystore=exports.info=exports.index=exports.health=exports.evm=exports.common=exports.avm=exports.auth=exports.admin=exports.Socket=exports.PubSub=exports.Mnemonic=exports.GenesisData=exports.GenesisAsset=exports.HDNode=exports.DB=exports.Buffer=exports.BN=exports.BinTools=exports.AvalancheCore=exports.Avalanche=void 0;const avalanche_1=__importDefault(__webpack_require__(9837));exports.AvalancheCore=avalanche_1.default;const api_1=__webpack_require__(6522),api_2=__webpack_require__(3920),api_3=__webpack_require__(8313),api_4=__webpack_require__(9084),genesisasset_1=__webpack_require__(9857);Object.defineProperty(exports,"GenesisAsset",{enumerable:!0,get:function(){return genesisasset_1.GenesisAsset}});const genesisdata_1=__webpack_require__(6418);Object.defineProperty(exports,"GenesisData",{enumerable:!0,get:function(){return genesisdata_1.GenesisData}});const api_5=__webpack_require__(6778),api_6=__webpack_require__(1229),api_7=__webpack_require__(8224),api_8=__webpack_require__(7345),api_9=__webpack_require__(130),api_10=__webpack_require__(1631),socket_1=__webpack_require__(4115);Object.defineProperty(exports,"Socket",{enumerable:!0,get:function(){return socket_1.Socket}});const constants_1=__webpack_require__(8779),helperfunctions_1=__webpack_require__(5554),bintools_1=__importDefault(__webpack_require__(903));exports.BinTools=bintools_1.default;const db_1=__importDefault(__webpack_require__(7911));exports.DB=db_1.default;const mnemonic_1=__importDefault(__webpack_require__(8309));exports.Mnemonic=mnemonic_1.default;const pubsub_1=__importDefault(__webpack_require__(2216));exports.PubSub=pubsub_1.default;const hdnode_1=__importDefault(__webpack_require__(59));exports.HDNode=hdnode_1.default;const bn_js_1=__importDefault(__webpack_require__(3550));exports.BN=bn_js_1.default;const buffer_1=__webpack_require__(8764);Object.defineProperty(exports,"Buffer",{enumerable:!0,get:function(){return buffer_1.Buffer}});class Avalanche extends avalanche_1.default{constructor(host,port,protocol="http",networkID=constants_1.DefaultNetworkID,XChainID,CChainID,hrp,skipinit=!1){super(host,port,protocol),this.Admin=()=>this.apis.admin,this.Auth=()=>this.apis.auth,this.CChain=()=>this.apis.cchain,this.XChain=()=>this.apis.xchain,this.Health=()=>this.apis.health,this.Index=()=>this.apis.index,this.Info=()=>this.apis.info,this.Metrics=()=>this.apis.metrics,this.NodeKeys=()=>this.apis.keystore,this.PChain=()=>this.apis.pchain;let xchainid=XChainID,cchainid=CChainID;void 0!==XChainID&&XChainID&&"x"!==XChainID.toLowerCase()||(xchainid=networkID.toString()in constants_1.Defaults.network?constants_1.Defaults.network[`${networkID}`].X.blockchainID:constants_1.Defaults.network[12345].X.blockchainID),void 0!==CChainID&&CChainID&&"c"!==CChainID.toLowerCase()||(cchainid=networkID.toString()in constants_1.Defaults.network?constants_1.Defaults.network[`${networkID}`].C.blockchainID:constants_1.Defaults.network[12345].C.blockchainID),"number"==typeof networkID&&networkID>=0?this.networkID=networkID:void 0===networkID&&(networkID=constants_1.DefaultNetworkID),this.hrp=void 0!==hrp?hrp:(0,helperfunctions_1.getPreferredHRP)(this.networkID),skipinit||(this.addAPI("admin",api_1.AdminAPI),this.addAPI("auth",api_2.AuthAPI),this.addAPI("xchain",api_3.AVMAPI,"/ext/bc/X",xchainid),this.addAPI("cchain",api_4.EVMAPI,"/ext/bc/C/avax",cchainid),this.addAPI("health",api_5.HealthAPI),this.addAPI("info",api_7.InfoAPI),this.addAPI("index",api_6.IndexAPI),this.addAPI("keystore",api_8.KeystoreAPI),this.addAPI("metrics",api_9.MetricsAPI),this.addAPI("pchain",api_10.PlatformVMAPI))}}exports.default=Avalanche,exports.Avalanche=Avalanche,exports.admin=__importStar(__webpack_require__(7458)),exports.auth=__importStar(__webpack_require__(7843)),exports.avm=__importStar(__webpack_require__(7996)),exports.common=__importStar(__webpack_require__(999)),exports.evm=__importStar(__webpack_require__(5743)),exports.health=__importStar(__webpack_require__(1996)),exports.index=__importStar(__webpack_require__(6119)),exports.info=__importStar(__webpack_require__(8379)),exports.keystore=__importStar(__webpack_require__(913)),exports.metrics=__importStar(__webpack_require__(6413)),exports.platformvm=__importStar(__webpack_require__(7679)),exports.utils=__importStar(__webpack_require__(338))},978:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Base58=void 0;const bn_js_1=__importDefault(__webpack_require__(3550)),buffer_1=__webpack_require__(8764),errors_1=__webpack_require__(611);class Base58{constructor(){this.b58alphabet="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",this.alphabetIdx0="1",this.b58=[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,255,255,255,255,255,255,255,9,10,11,12,13,14,15,16,255,17,18,19,20,21,255,22,23,24,25,26,27,28,29,30,31,32,255,255,255,255,255,255,33,34,35,36,37,38,39,40,41,42,43,255,44,45,46,47,48,49,50,51,52,53,54,55,56,57,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],this.big58Radix=new bn_js_1.default(58),this.bigZero=new bn_js_1.default(0),this.encode=buff=>{let x=new bn_js_1.default(buff.toString("hex"),"hex","be"),answer="";for(;x.cmp(this.bigZero)>0;){const mod=x.mod(this.big58Radix);x=x.div(this.big58Radix),answer+=this.b58alphabet[mod.toNumber()]}for(let i=0;i<buff.length&&0===buff.readUInt8(i);i++)answer+=this.alphabetIdx0;return answer.split("").reverse().join("")},this.decode=b=>{const answer=new bn_js_1.default(0),j=new bn_js_1.default(1);for(let i=b.length-1;i>=0;i--){const tmp=this.b58[b.charCodeAt(i)];if(255===tmp)throw new errors_1.Base58Error("Error - Base58.decode: not a valid base58 string");const scratch=new bn_js_1.default(tmp);scratch.imul(j),answer.iadd(scratch),j.imul(this.big58Radix)}let anshex=answer.toString("hex");anshex=anshex.length%2?`0${anshex}`:anshex;const tmpval=buffer_1.Buffer.from(anshex,"hex");let numZeros;for(numZeros=0;numZeros<b.length&&b[`${numZeros}`]===this.alphabetIdx0;numZeros++);const xlen=numZeros+tmpval.length,result=buffer_1.Buffer.alloc(xlen,0);return tmpval.copy(result,numZeros),result}}static getInstance(){return Base58.instance||(Base58.instance=new Base58),Base58.instance}}exports.Base58=Base58},903:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(null!=mod)for(var k in mod)"default"!==k&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});const bn_js_1=__importDefault(__webpack_require__(3550)),buffer_1=__webpack_require__(8764),create_hash_1=__importDefault(__webpack_require__(3482)),bech32=__importStar(__webpack_require__(7715)),base58_1=__webpack_require__(978),errors_1=__webpack_require__(611),ethers_1=__webpack_require__(6444);class BinTools{constructor(){this.isPrimaryBechAddress=address=>{const parts=address.trim().split("-");if(2!==parts.length)return!1;try{bech32.bech32.fromWords(bech32.bech32.decode(parts[1]).words)}catch(err){return!1}return!0},this.bufferToString=buff=>this.copyFrom(buff,2).toString("utf8"),this.stringToBuffer=str=>{const buff=buffer_1.Buffer.alloc(2+str.length);return buff.writeUInt16BE(str.length,0),buff.write(str,2,str.length,"utf8"),buff},this.copyFrom=(buff,start=0,end)=>(void 0===end&&(end=buff.length),buffer_1.Buffer.from(Uint8Array.prototype.slice.call(buff.slice(start,end)))),this.bufferToB58=buff=>this.b58.encode(buff),this.b58ToBuffer=b58str=>this.b58.decode(b58str),this.fromBufferToArrayBuffer=buff=>{const ab=new ArrayBuffer(buff.length),view=new Uint8Array(ab);for(let i=0;i<buff.length;++i)view[`${i}`]=buff[`${i}`];return view},this.fromArrayBufferToBuffer=ab=>{const buf=buffer_1.Buffer.alloc(ab.byteLength);for(let i=0;i<ab.byteLength;++i)buf[`${i}`]=ab[`${i}`];return buf},this.fromBufferToBN=buff=>{if(void 0!==buff)return new bn_js_1.default(buff.toString("hex"),16,"be")},this.fromBNToBuffer=(bn,length)=>{if(void 0===bn)return;const newarr=bn.toArray("be");if(length){const x=length-newarr.length;for(let i=0;i<x;i++)newarr.unshift(0)}return buffer_1.Buffer.from(newarr)},this.addChecksum=buff=>{const hashslice=buffer_1.Buffer.from((0,create_hash_1.default)("sha256").update(buff).digest().slice(28));return buffer_1.Buffer.concat([buff,hashslice])},this.validateChecksum=buff=>{const checkslice=buff.slice(buff.length-4),hashslice=buffer_1.Buffer.from((0,create_hash_1.default)("sha256").update(buff.slice(0,buff.length-4)).digest().slice(28));return checkslice.toString("hex")===hashslice.toString("hex")},this.cb58Encode=bytes=>{const x=this.addChecksum(bytes);return this.bufferToB58(x)},this.cb58Decode=bytes=>{if("string"==typeof bytes&&(bytes=this.b58ToBuffer(bytes)),this.validateChecksum(bytes))return this.copyFrom(bytes,0,bytes.length-4);throw new errors_1.ChecksumError("Error - BinTools.cb58Decode: invalid checksum")},this.cb58DecodeWithChecksum=bytes=>{if("string"==typeof bytes&&(bytes=this.b58ToBuffer(bytes)),this.validateChecksum(bytes))return`0x${this.copyFrom(bytes,0,bytes.length).toString("hex")}`;throw new errors_1.ChecksumError("Error - BinTools.cb58Decode: invalid checksum")},this.addressToString=(hrp,chainid,bytes)=>`${chainid}-${bech32.bech32.encode(hrp,bech32.bech32.toWords(bytes))}`,this.stringToAddress=(address,hrp)=>{if("0x"===address.substring(0,2)){if(ethers_1.utils.isAddress(address))return buffer_1.Buffer.from(address.substring(2),"hex");throw new errors_1.HexError("Error - Invalid address")}const parts=address.trim().split("-");if(parts.length<2)throw new errors_1.Bech32Error("Error - Valid address should include -");if(parts[0].length<1)throw new errors_1.Bech32Error("Error - Valid address must have prefix before -");const split=parts[1].lastIndexOf("1");if(split<0)throw new errors_1.Bech32Error("Error - Valid address must include separator (1)");const humanReadablePart=parts[1].slice(0,split);if(humanReadablePart.length<1)throw new errors_1.Bech32Error("Error - HRP should be at least 1 character");if("avax"!==humanReadablePart&&"fuji"!==humanReadablePart&&"local"!=humanReadablePart&&"custom"!=humanReadablePart&&humanReadablePart!=hrp)throw new errors_1.Bech32Error("Error - Invalid HRP");return buffer_1.Buffer.from(bech32.bech32.fromWords(bech32.bech32.decode(parts[1]).words))},this.parseAddress=(addr,blockchainID,alias,addrlen=20)=>{const abc=addr.split("-");if(2===abc.length&&(alias&&abc[0]===alias||blockchainID&&abc[0]===blockchainID)){const addrbuff=this.stringToAddress(addr);if(addrlen&&addrbuff.length===addrlen||!addrlen)return addrbuff}},this.b58=base58_1.Base58.getInstance()}static getInstance(){return BinTools.instance||(BinTools.instance=new BinTools),BinTools.instance}isBase64(str){if(""===str||""===str.trim())return!1;try{return buffer_1.Buffer.from(str,"base64").toString("base64")===str}catch(err){return!1}}isCB58(cb58){return this.isBase58(cb58)}isBase58(base58){if(""===base58||""===base58.trim())return!1;try{return this.b58.encode(this.b58.decode(base58))===base58}catch(err){return!1}}isHex(hex){return""!==hex&&""!==hex.trim()&&!!(hex.startsWith("0x")&&hex.slice(2).match(/^[0-9A-Fa-f]/g)||hex.match(/^[0-9A-Fa-f]/g))}isDecimal(str){if(""===str||""===str.trim())return!1;try{return new bn_js_1.default(str,10).toString(10)===str.trim()}catch(err){return!1}}}exports.default=BinTools},8779:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Defaults=exports.AVAXSTAKECAP=exports.AVAXGWEI=exports.GWEI=exports.WEI=exports.NANOAVAX=exports.MICROAVAX=exports.MILLIAVAX=exports.CENTIAVAX=exports.DECIAVAX=exports.ONEAVAX=exports.mnemonic=exports.DefaultEVMLocalGenesisAddress=exports.DefaultEVMLocalGenesisPrivateKey=exports.DefaultLocalGenesisPrivateKey=exports.PChainVMName=exports.CChainVMName=exports.XChainVMName=exports.PChainAlias=exports.CChainAlias=exports.XChainAlias=exports.PrimaryNetworkID=exports.PlatformChainID=exports.DefaultNetworkID=exports.FallbackEVMChainID=exports.FallbackNetworkName=exports.FallbackHRP=exports.NetworkNameToNetworkID=exports.NetworkIDToNetworkNames=exports.HRPToNetworkID=exports.NetworkIDToHRP=exports.FujiAPI=exports.MainnetAPI=exports.PrimaryAssetAlias=exports.NodeIDPrefix=exports.PrivateKeyPrefix=void 0;const bn_js_1=__importDefault(__webpack_require__(3550));exports.PrivateKeyPrefix="PrivateKey-",exports.NodeIDPrefix="NodeID-",exports.PrimaryAssetAlias="AVAX",exports.MainnetAPI="api.avax.network",exports.FujiAPI="api.avax-test.network",exports.NetworkIDToHRP={0:"custom",1:"avax",2:"cascade",3:"denali",4:"everest",5:"fuji",1337:"custom",12345:"local"},exports.HRPToNetworkID={manhattan:0,avax:1,cascade:2,denali:3,everest:4,fuji:5,custom:1337,local:12345},exports.NetworkIDToNetworkNames={0:["Manhattan"],1:["Avalanche","Mainnet"],2:["Cascade"],3:["Denali"],4:["Everest"],5:["Fuji","Testnet"],1337:["Custom Network"],12345:["Local Network"]},exports.NetworkNameToNetworkID={Manhattan:0,Avalanche:1,Mainnet:1,Cascade:2,Denali:3,Everest:4,Fuji:5,Testnet:5,Custom:1337,"Custom Network":1337,Local:12345,"Local Network":12345},exports.FallbackHRP="custom",exports.FallbackNetworkName="Custom Network",exports.FallbackEVMChainID=43112,exports.DefaultNetworkID=1,exports.PlatformChainID="11111111111111111111111111111111LpoYY",exports.PrimaryNetworkID="11111111111111111111111111111111LpoYY",exports.XChainAlias="X",exports.CChainAlias="C",exports.PChainAlias="P",exports.XChainVMName="avm",exports.CChainVMName="evm",exports.PChainVMName="platformvm",exports.DefaultLocalGenesisPrivateKey="ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN",exports.DefaultEVMLocalGenesisPrivateKey="0x56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027",exports.DefaultEVMLocalGenesisAddress="0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC",exports.mnemonic="output tooth keep tooth bracket fox city sustain blood raise install pond stem reject long scene clap gloom purpose mean music piece unknown light",exports.ONEAVAX=new bn_js_1.default(1e9),exports.DECIAVAX=exports.ONEAVAX.div(new bn_js_1.default(10)),exports.CENTIAVAX=exports.ONEAVAX.div(new bn_js_1.default(100)),exports.MILLIAVAX=exports.ONEAVAX.div(new bn_js_1.default(1e3)),exports.MICROAVAX=exports.ONEAVAX.div(new bn_js_1.default(1e6)),exports.NANOAVAX=exports.ONEAVAX.div(new bn_js_1.default(1e9)),exports.WEI=new bn_js_1.default(1),exports.GWEI=exports.WEI.mul(new bn_js_1.default(1e9)),exports.AVAXGWEI=exports.NANOAVAX.clone(),exports.AVAXSTAKECAP=exports.ONEAVAX.mul(new bn_js_1.default(3e6));const n0X={blockchainID:"2vrXWHgGxh5n3YsLHMV16YVVJTpT4z45Fmb4y3bL6si8kLCyg9",alias:exports.XChainAlias,vm:exports.XChainVMName,fee:exports.MILLIAVAX,creationTxFee:exports.CENTIAVAX,mintTxFee:exports.MILLIAVAX},n0P={blockchainID:exports.PlatformChainID,alias:exports.PChainAlias,vm:exports.PChainVMName,fee:exports.MILLIAVAX,creationTxFee:exports.CENTIAVAX,createSubnetTx:exports.ONEAVAX,createChainTx:exports.ONEAVAX,minConsumption:.1,maxConsumption:.12,maxStakingDuration:new bn_js_1.default(31536e3),maxSupply:new bn_js_1.default(72e7).mul(exports.ONEAVAX),minStake:exports.ONEAVAX.mul(new bn_js_1.default(2e3)),minStakeDuration:1209600,maxStakeDuration:31536e3,minDelegationStake:exports.ONEAVAX.mul(new bn_js_1.default(25)),minDelegationFee:new bn_js_1.default(2)},n0C={blockchainID:"2fFZQibQXcd6LTE4rpBPBAkLVXFE91Kit8pgxaBG1mRnh5xqbb",alias:exports.CChainAlias,vm:exports.CChainVMName,fee:exports.MILLIAVAX,gasPrice:exports.GWEI.mul(new bn_js_1.default(470)),chainID:43111};let avaxAssetID="FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z";const n1X={blockchainID:"2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",avaxAssetID,alias:exports.XChainAlias,vm:exports.XChainVMName,txFee:exports.MILLIAVAX,creationTxFee:exports.CENTIAVAX,mintTxFee:exports.MILLIAVAX},n1P={blockchainID:exports.PlatformChainID,avaxAssetID,alias:exports.PChainAlias,vm:exports.PChainVMName,txFee:exports.MILLIAVAX,createSubnetTx:exports.ONEAVAX,createChainTx:exports.ONEAVAX,creationTxFee:exports.CENTIAVAX,minConsumption:.1,maxConsumption:.12,maxStakingDuration:new bn_js_1.default(31536e3),maxSupply:new bn_js_1.default(72e7).mul(exports.ONEAVAX),minStake:exports.ONEAVAX.mul(new bn_js_1.default(2e3)),minStakeDuration:1209600,maxStakeDuration:31536e3,minDelegationStake:exports.ONEAVAX.mul(new bn_js_1.default(25)),minDelegationFee:new bn_js_1.default(2)},n1C={blockchainID:"2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5",alias:exports.CChainAlias,vm:exports.CChainVMName,txBytesGas:1,costPerSignature:1e3,txFee:exports.MILLIAVAX,gasPrice:exports.GWEI.mul(new bn_js_1.default(225)),minGasPrice:exports.GWEI.mul(new bn_js_1.default(25)),maxGasPrice:exports.GWEI.mul(new bn_js_1.default(1e3)),chainID:43114},n2X={blockchainID:"4ktRjsAKxgMr2aEzv9SWmrU7Xk5FniHUrVCX4P1TZSfTLZWFM",alias:exports.XChainAlias,vm:exports.XChainVMName,txFee:0,creationTxFee:0,mintTxFee:new bn_js_1.default(0)},n2P={blockchainID:exports.PlatformChainID,alias:exports.PChainAlias,vm:exports.PChainVMName,txFee:0,creationTxFee:0,createSubnetTx:exports.ONEAVAX,createChainTx:exports.ONEAVAX,minConsumption:.1,maxConsumption:.12,maxStakingDuration:new bn_js_1.default(31536e3),maxSupply:new bn_js_1.default(72e7).mul(exports.ONEAVAX),minStake:exports.ONEAVAX.mul(new bn_js_1.default(2e3)),minStakeDuration:1209600,maxStakeDuration:31536e3,minDelegationStake:exports.ONEAVAX.mul(new bn_js_1.default(25)),minDelegationFee:new bn_js_1.default(2)},n2C={blockchainID:"2mUYSXfLrDtigwbzj1LxKVsHwELghc5sisoXrzJwLqAAQHF4i",alias:exports.CChainAlias,vm:exports.CChainVMName,gasPrice:0},n3X={blockchainID:"rrEWX7gc7D9mwcdrdBxBTdqh1a7WDVsMuadhTZgyXfFcRz45L",alias:exports.XChainAlias,vm:exports.XChainVMName,txFee:0,creationTxFee:0,mintTxFee:new bn_js_1.default(0)},n3P={blockchainID:"",alias:exports.PChainAlias,vm:exports.PChainVMName,txFee:0,creationTxFee:0,createSubnetTx:exports.ONEAVAX,createChainTx:exports.ONEAVAX,minConsumption:.1,maxConsumption:.12,maxStakingDuration:new bn_js_1.default(31536e3),maxSupply:new bn_js_1.default(72e7).mul(exports.ONEAVAX),minStake:exports.ONEAVAX.mul(new bn_js_1.default(2e3)),minStakeDuration:1209600,maxStakeDuration:31536e3,minDelegationStake:exports.ONEAVAX.mul(new bn_js_1.default(25)),minDelegationFee:new bn_js_1.default(2)},n3C={blockchainID:"zJytnh96Pc8rM337bBrtMvJDbEdDNjcXG3WkTNCiLp18ergm9",alias:exports.CChainAlias,vm:exports.CChainVMName,gasPrice:0},n4X={blockchainID:"jnUjZSRt16TcRnZzmh5aMhavwVHz3zBrSN8GfFMTQkzUnoBxC",alias:exports.XChainAlias,vm:exports.XChainVMName,txFee:exports.MILLIAVAX,creationTxFee:exports.CENTIAVAX,mintTxFee:exports.MILLIAVAX},n4P={blockchainID:exports.PlatformChainID,alias:exports.PChainAlias,vm:exports.PChainVMName,txFee:exports.MILLIAVAX,creationTxFee:exports.CENTIAVAX,createSubnetTx:exports.ONEAVAX,createChainTx:exports.ONEAVAX,minConsumption:.1,maxConsumption:.12,maxStakingDuration:new bn_js_1.default(31536e3),maxSupply:new bn_js_1.default(72e7).mul(exports.ONEAVAX),minStake:exports.ONEAVAX.mul(new bn_js_1.default(2e3)),minStakeDuration:1209600,maxStakeDuration:31536e3,minDelegationStake:exports.ONEAVAX.mul(new bn_js_1.default(25)),minDelegationFee:new bn_js_1.default(2)},n4C={blockchainID:"saMG5YgNsFxzjz4NMkEkt3bAH6hVxWdZkWcEnGB3Z15pcAmsK",alias:exports.CChainAlias,vm:exports.CChainVMName,gasPrice:exports.GWEI.mul(new bn_js_1.default(470)),chainID:43110};avaxAssetID="U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK";const n5X={blockchainID:"2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",avaxAssetID,alias:exports.XChainAlias,vm:exports.XChainVMName,txFee:exports.MILLIAVAX,creationTxFee:exports.CENTIAVAX,mintTxFee:exports.MILLIAVAX},n5P={blockchainID:exports.PlatformChainID,avaxAssetID,alias:exports.PChainAlias,vm:exports.PChainVMName,txFee:exports.MILLIAVAX,creationTxFee:exports.CENTIAVAX,createSubnetTx:exports.ONEAVAX,createChainTx:exports.ONEAVAX,minConsumption:.1,maxConsumption:.12,maxStakingDuration:new bn_js_1.default(31536e3),maxSupply:new bn_js_1.default(72e7).mul(exports.ONEAVAX),minStake:exports.ONEAVAX,minStakeDuration:86400,maxStakeDuration:31536e3,minDelegationStake:exports.ONEAVAX,minDelegationFee:new bn_js_1.default(2)},n5C={blockchainID:"yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp",alias:exports.CChainAlias,vm:exports.CChainVMName,txBytesGas:1,costPerSignature:1e3,txFee:exports.MILLIAVAX,gasPrice:exports.GWEI.mul(new bn_js_1.default(225)),minGasPrice:exports.GWEI.mul(new bn_js_1.default(25)),maxGasPrice:exports.GWEI.mul(new bn_js_1.default(1e3)),chainID:43113};avaxAssetID="BUuypiq2wyuLMvyhzFXcPyxPMCgSp7eeDohhQRqTChoBjKziC";const n1337X=Object.assign({},n5X);n1337X.blockchainID="qzfF3A11KzpcHkkqznEyQgupQrCNS6WV6fTUTwZpEKqhj1QE7",n1337X.avaxAssetID=avaxAssetID;const n1337P=Object.assign({},n5P);n1337P.blockchainID=exports.PlatformChainID;const n1337C=Object.assign({},n5C);n1337C.blockchainID="BR28ypgLATNS6PbtHMiJ7NQ61vfpT27Hj8tAcZ1AHsfU5cz88",n1337C.avaxAssetID=avaxAssetID,n1337C.chainID=43112,avaxAssetID="2fombhL7aGPwj3KH4bfrmJwW6PVnMobf9Y2fn9GwxiAAJyFDbe";const n12345X=Object.assign({},n5X);n12345X.blockchainID="2eNy1mUFdmaxXNj1eQHUe7Np4gju9sJsEtWQ4MX3ToiNKuADed",n12345X.avaxAssetID=avaxAssetID;const n12345P=Object.assign({},n5P);n12345P.blockchainID=exports.PlatformChainID;const n12345C=Object.assign({},n5C);n12345C.blockchainID="2CA6j5zYzasynPsFeNoqWkmTCt3VScMvXUZHbfDJ8k3oGzAPtU",n12345C.avaxAssetID=avaxAssetID,n12345C.chainID=43112;class Defaults{}exports.Defaults=Defaults,Defaults.network={0:{hrp:exports.NetworkIDToHRP[0],X:n0X,"2vrXWHgGxh5n3YsLHMV16YVVJTpT4z45Fmb4y3bL6si8kLCyg9":n0X,P:n0P,"11111111111111111111111111111111LpoYY":n0P,C:n0C,"2fFZQibQXcd6LTE4rpBPBAkLVXFE91Kit8pgxaBG1mRnh5xqbb":n0C},1:{hrp:exports.NetworkIDToHRP[1],X:n1X,"2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM":n1X,P:n1P,"11111111111111111111111111111111LpoYY":n1P,C:n1C,"2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5":n1C},2:{hrp:exports.NetworkIDToHRP[2],X:n2X,"4ktRjsAKxgMr2aEzv9SWmrU7Xk5FniHUrVCX4P1TZSfTLZWFM":n2X,P:n2P,"11111111111111111111111111111111LpoYY":n2P,C:n2C,"2mUYSXfLrDtigwbzj1LxKVsHwELghc5sisoXrzJwLqAAQHF4i":n2C},3:{hrp:exports.NetworkIDToHRP[3],X:n3X,rrEWX7gc7D9mwcdrdBxBTdqh1a7WDVsMuadhTZgyXfFcRz45L:n3X,P:n3P,"11111111111111111111111111111111LpoYY":n3P,C:n3C,zJytnh96Pc8rM337bBrtMvJDbEdDNjcXG3WkTNCiLp18ergm9:n3C},4:{hrp:exports.NetworkIDToHRP[4],X:n4X,jnUjZSRt16TcRnZzmh5aMhavwVHz3zBrSN8GfFMTQkzUnoBxC:n4X,P:n4P,"11111111111111111111111111111111LpoYY":n4P,C:n4C,saMG5YgNsFxzjz4NMkEkt3bAH6hVxWdZkWcEnGB3Z15pcAmsK:n4C},5:{hrp:exports.NetworkIDToHRP[5],X:n5X,"2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm":n5X,P:n5P,"11111111111111111111111111111111LpoYY":n5P,C:n5C,yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp:n5C},1337:{hrp:exports.NetworkIDToHRP[1337],X:n1337X,qzfF3A11KzpcHkkqznEyQgupQrCNS6WV6fTUTwZpEKqhj1QE7:n1337X,P:n1337P,"11111111111111111111111111111111LpoYY":n1337P,C:n1337C,BR28ypgLATNS6PbtHMiJ7NQ61vfpT27Hj8tAcZ1AHsfU5cz88:n1337C},12345:{hrp:exports.NetworkIDToHRP[12345],X:n12345X,"2eNy1mUFdmaxXNj1eQHUe7Np4gju9sJsEtWQ4MX3ToiNKuADed":n12345X,P:n12345P,"11111111111111111111111111111111LpoYY":n12345P,C:n12345C,"2CA6j5zYzasynPsFeNoqWkmTCt3VScMvXUZHbfDJ8k3oGzAPtU":n12345C}}},7911:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});const store2_1=__importDefault(__webpack_require__(1860));class DB{constructor(){}static getInstance(){return DB.instance||(DB.instance=new DB),DB.instance}static getNamespace(ns){return this.store.namespace(ns)}}exports.default=DB,DB.store=store2_1.default},611:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SubnetAddressError=exports.SubnetThresholdError=exports.SubnetIdError=exports.ProtocolError=exports.InvalidEntropy=exports.EVMFeeError=exports.Bech32Error=exports.UnknownTypeError=exports.TypeNameError=exports.TypeIdError=exports.HexError=exports.NodeIdError=exports.PrivateKeyError=exports.Base58Error=exports.MergeRuleError=exports.PublicKeyError=exports.AddressIndexError=exports.BufferSizeError=exports.SubnetOwnerError=exports.DelegationFeeError=exports.TimeError=exports.StakeError=exports.FeeAssetError=exports.EVMOutputError=exports.EVMInputError=exports.SECPMintOutputError=exports.ThresholdError=exports.InsufficientFundsError=exports.UTXOError=exports.OutputIdError=exports.ChecksumError=exports.InvalidOperationIdError=exports.OperationError=exports.InputIdError=exports.TransferableInputError=exports.TransferableOutputError=exports.CredIdError=exports.CodecIdError=exports.TransactionError=exports.NameError=exports.SymbolError=exports.NoAtomicUTXOsError=exports.ChainIdError=exports.GooseEggCheckError=exports.AddressError=exports.AvalancheError=void 0;class AvalancheError extends Error{constructor(m,code){super(m),Object.setPrototypeOf(this,AvalancheError.prototype),this.errorCode=code}getCode(){return this.errorCode}}exports.AvalancheError=AvalancheError;class AddressError extends AvalancheError{constructor(m){super(m,"1000"),Object.setPrototypeOf(this,AddressError.prototype)}}exports.AddressError=AddressError;class GooseEggCheckError extends AvalancheError{constructor(m){super(m,"1001"),Object.setPrototypeOf(this,GooseEggCheckError.prototype)}}exports.GooseEggCheckError=GooseEggCheckError;class ChainIdError extends AvalancheError{constructor(m){super(m,"1002"),Object.setPrototypeOf(this,ChainIdError.prototype)}}exports.ChainIdError=ChainIdError;class NoAtomicUTXOsError extends AvalancheError{constructor(m){super(m,"1003"),Object.setPrototypeOf(this,NoAtomicUTXOsError.prototype)}}exports.NoAtomicUTXOsError=NoAtomicUTXOsError;class SymbolError extends AvalancheError{constructor(m){super(m,"1004"),Object.setPrototypeOf(this,SymbolError.prototype)}}exports.SymbolError=SymbolError;class NameError extends AvalancheError{constructor(m){super(m,"1005"),Object.setPrototypeOf(this,NameError.prototype)}}exports.NameError=NameError;class TransactionError extends AvalancheError{constructor(m){super(m,"1006"),Object.setPrototypeOf(this,TransactionError.prototype)}}exports.TransactionError=TransactionError;class CodecIdError extends AvalancheError{constructor(m){super(m,"1007"),Object.setPrototypeOf(this,CodecIdError.prototype)}}exports.CodecIdError=CodecIdError;class CredIdError extends AvalancheError{constructor(m){super(m,"1008"),Object.setPrototypeOf(this,CredIdError.prototype)}}exports.CredIdError=CredIdError;class TransferableOutputError extends AvalancheError{constructor(m){super(m,"1009"),Object.setPrototypeOf(this,TransferableOutputError.prototype)}}exports.TransferableOutputError=TransferableOutputError;class TransferableInputError extends AvalancheError{constructor(m){super(m,"1010"),Object.setPrototypeOf(this,TransferableInputError.prototype)}}exports.TransferableInputError=TransferableInputError;class InputIdError extends AvalancheError{constructor(m){super(m,"1011"),Object.setPrototypeOf(this,InputIdError.prototype)}}exports.InputIdError=InputIdError;class OperationError extends AvalancheError{constructor(m){super(m,"1012"),Object.setPrototypeOf(this,OperationError.prototype)}}exports.OperationError=OperationError;class InvalidOperationIdError extends AvalancheError{constructor(m){super(m,"1013"),Object.setPrototypeOf(this,InvalidOperationIdError.prototype)}}exports.InvalidOperationIdError=InvalidOperationIdError;class ChecksumError extends AvalancheError{constructor(m){super(m,"1014"),Object.setPrototypeOf(this,ChecksumError.prototype)}}exports.ChecksumError=ChecksumError;class OutputIdError extends AvalancheError{constructor(m){super(m,"1015"),Object.setPrototypeOf(this,OutputIdError.prototype)}}exports.OutputIdError=OutputIdError;class UTXOError extends AvalancheError{constructor(m){super(m,"1016"),Object.setPrototypeOf(this,UTXOError.prototype)}}exports.UTXOError=UTXOError;class InsufficientFundsError extends AvalancheError{constructor(m){super(m,"1017"),Object.setPrototypeOf(this,InsufficientFundsError.prototype)}}exports.InsufficientFundsError=InsufficientFundsError;class ThresholdError extends AvalancheError{constructor(m){super(m,"1018"),Object.setPrototypeOf(this,ThresholdError.prototype)}}exports.ThresholdError=ThresholdError;class SECPMintOutputError extends AvalancheError{constructor(m){super(m,"1019"),Object.setPrototypeOf(this,SECPMintOutputError.prototype)}}exports.SECPMintOutputError=SECPMintOutputError;class EVMInputError extends AvalancheError{constructor(m){super(m,"1020"),Object.setPrototypeOf(this,EVMInputError.prototype)}}exports.EVMInputError=EVMInputError;class EVMOutputError extends AvalancheError{constructor(m){super(m,"1021"),Object.setPrototypeOf(this,EVMOutputError.prototype)}}exports.EVMOutputError=EVMOutputError;class FeeAssetError extends AvalancheError{constructor(m){super(m,"1022"),Object.setPrototypeOf(this,FeeAssetError.prototype)}}exports.FeeAssetError=FeeAssetError;class StakeError extends AvalancheError{constructor(m){super(m,"1023"),Object.setPrototypeOf(this,StakeError.prototype)}}exports.StakeError=StakeError;class TimeError extends AvalancheError{constructor(m){super(m,"1024"),Object.setPrototypeOf(this,TimeError.prototype)}}exports.TimeError=TimeError;class DelegationFeeError extends AvalancheError{constructor(m){super(m,"1025"),Object.setPrototypeOf(this,DelegationFeeError.prototype)}}exports.DelegationFeeError=DelegationFeeError;class SubnetOwnerError extends AvalancheError{constructor(m){super(m,"1026"),Object.setPrototypeOf(this,SubnetOwnerError.prototype)}}exports.SubnetOwnerError=SubnetOwnerError;class BufferSizeError extends AvalancheError{constructor(m){super(m,"1027"),Object.setPrototypeOf(this,BufferSizeError.prototype)}}exports.BufferSizeError=BufferSizeError;class AddressIndexError extends AvalancheError{constructor(m){super(m,"1028"),Object.setPrototypeOf(this,AddressIndexError.prototype)}}exports.AddressIndexError=AddressIndexError;class PublicKeyError extends AvalancheError{constructor(m){super(m,"1029"),Object.setPrototypeOf(this,PublicKeyError.prototype)}}exports.PublicKeyError=PublicKeyError;class MergeRuleError extends AvalancheError{constructor(m){super(m,"1030"),Object.setPrototypeOf(this,MergeRuleError.prototype)}}exports.MergeRuleError=MergeRuleError;class Base58Error extends AvalancheError{constructor(m){super(m,"1031"),Object.setPrototypeOf(this,Base58Error.prototype)}}exports.Base58Error=Base58Error;class PrivateKeyError extends AvalancheError{constructor(m){super(m,"1032"),Object.setPrototypeOf(this,PrivateKeyError.prototype)}}exports.PrivateKeyError=PrivateKeyError;class NodeIdError extends AvalancheError{constructor(m){super(m,"1033"),Object.setPrototypeOf(this,NodeIdError.prototype)}}exports.NodeIdError=NodeIdError;class HexError extends AvalancheError{constructor(m){super(m,"1034"),Object.setPrototypeOf(this,HexError.prototype)}}exports.HexError=HexError;class TypeIdError extends AvalancheError{constructor(m){super(m,"1035"),Object.setPrototypeOf(this,TypeIdError.prototype)}}exports.TypeIdError=TypeIdError;class TypeNameError extends AvalancheError{constructor(m){super(m,"1042"),Object.setPrototypeOf(this,TypeNameError.prototype)}}exports.TypeNameError=TypeNameError;class UnknownTypeError extends AvalancheError{constructor(m){super(m,"1036"),Object.setPrototypeOf(this,UnknownTypeError.prototype)}}exports.UnknownTypeError=UnknownTypeError;class Bech32Error extends AvalancheError{constructor(m){super(m,"1037"),Object.setPrototypeOf(this,Bech32Error.prototype)}}exports.Bech32Error=Bech32Error;class EVMFeeError extends AvalancheError{constructor(m){super(m,"1038"),Object.setPrototypeOf(this,EVMFeeError.prototype)}}exports.EVMFeeError=EVMFeeError;class InvalidEntropy extends AvalancheError{constructor(m){super(m,"1039"),Object.setPrototypeOf(this,InvalidEntropy.prototype)}}exports.InvalidEntropy=InvalidEntropy;class ProtocolError extends AvalancheError{constructor(m){super(m,"1040"),Object.setPrototypeOf(this,ProtocolError.prototype)}}exports.ProtocolError=ProtocolError;class SubnetIdError extends AvalancheError{constructor(m){super(m,"1041"),Object.setPrototypeOf(this,SubnetIdError.prototype)}}exports.SubnetIdError=SubnetIdError;class SubnetThresholdError extends AvalancheError{constructor(m){super(m,"1043"),Object.setPrototypeOf(this,SubnetThresholdError.prototype)}}exports.SubnetThresholdError=SubnetThresholdError;class SubnetAddressError extends AvalancheError{constructor(m){super(m,"1044"),Object.setPrototypeOf(this,SubnetAddressError.prototype)}}exports.SubnetAddressError=SubnetAddressError},3064:function(__unused_webpack_module,exports){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};function getResponse(request,config){return __awaiter(this,void 0,void 0,(function*(){let stageOne;try{stageOne=yield fetch(request)}catch(e){const error=Object.assign(Object.assign({},new Error("Network Error")),{config,request,isAxiosError:!0,toJSON:()=>error});return Promise.reject(error)}const response={status:stageOne.status,statusText:stageOne.statusText,headers:Object.assign({},stageOne.headers),config,request,data:void 0};if(stageOne.status>=200&&204!==stageOne.status)switch(config.responseType){case"arraybuffer":response.data=yield stageOne.arrayBuffer();break;case"blob":response.data=yield stageOne.blob();break;case"json":response.data=yield stageOne.json();break;case"formData":response.data=yield stageOne.formData();break;default:response.data=yield stageOne.text()}return Promise.resolve(response)}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.fetchAdapter=void 0,exports.fetchAdapter=function fetchAdapter(config){return __awaiter(this,void 0,void 0,(function*(){const request=function createRequest(config){const headers=new Headers(config.headers);if(config.auth){const username=config.auth.username||"",password=config.auth.password?encodeURIComponent(config.auth.password):"";headers.set("Authorization",`Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`)}const method=config.method.toUpperCase(),options={headers,method};"GET"!==method&&"HEAD"!==method&&(options.body=config.data),config.withCredentials&&(options.credentials=config.withCredentials?"include":"omit");const fullPath=new URL(config.url,config.baseURL),params=new URLSearchParams(config.params);return new Request(`${fullPath}${params}`,options)}(config),promiseChain=[getResponse(request,config)];config.timeout&&config.timeout>0&&promiseChain.push(new Promise(((res,reject)=>{setTimeout((()=>{const message=config.timeoutErrorMessage?config.timeoutErrorMessage:"timeout of "+config.timeout+"ms exceeded",error=Object.assign(Object.assign({},new Error(message)),{config,request,code:"ECONNABORTED",isAxiosError:!0,toJSON:()=>error});reject(error)}),config.timeout)})));const response=yield Promise.race(promiseChain);return new Promise(((resolve,reject)=>{if(response instanceof Error)reject(response);else if(response.status&&response.config.validateStatus&&!response.config.validateStatus(response.status)){const error=Object.assign(Object.assign({},new Error("Request failed with status code "+response.status)),{config,request,code:response.status>=500?"ERR_BAD_RESPONSE":"ERR_BAD_REQUEST",isAxiosError:!0,toJSON:()=>error});reject(error)}else resolve(response)}))}))}},59:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});const buffer_1=__webpack_require__(8764),hdkey_1=__importDefault(__webpack_require__(9840)),bintools=__importDefault(__webpack_require__(903)).default.getInstance();class HDNode{constructor(from){"string"==typeof from&&"xp"===from.substring(0,2)?this.hdkey=hdkey_1.default.fromExtendedKey(from):buffer_1.Buffer.isBuffer(from)?this.hdkey=hdkey_1.default.fromMasterSeed(from):this.hdkey=hdkey_1.default.fromMasterSeed(buffer_1.Buffer.from(from)),this.publicKey=this.hdkey.publicKey,this.privateKey=this.hdkey.privateKey,this.privateKey?this.privateKeyCB58=`PrivateKey-${bintools.cb58Encode(this.privateKey)}`:this.privateExtendedKey=null,this.chainCode=this.hdkey.chainCode,this.privateExtendedKey=this.hdkey.privateExtendedKey,this.publicExtendedKey=this.hdkey.publicExtendedKey}derive(path){const hdKey=this.hdkey.derive(path);let hdNode;return hdNode=null!=hdKey.privateExtendedKey?new HDNode(hdKey.privateExtendedKey):new HDNode(hdKey.publicExtendedKey),hdNode}sign(hash){const sig=this.hdkey.sign(hash);return buffer_1.Buffer.from(sig)}verify(hash,signature){return this.hdkey.verify(hash,signature)}wipePrivateData(){this.privateKey=null,this.privateExtendedKey=null,this.privateKeyCB58=null,this.hdkey.wipePrivateData()}}exports.default=HDNode},5554:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.costExportTx=exports.calcBytesCost=exports.costImportTx=exports.NodeIDStringToBuffer=exports.bufferToNodeIDString=exports.privateKeyStringToBuffer=exports.bufferToPrivateKeyString=exports.UnixNow=exports.MaxWeightFormula=exports.getPreferredHRP=void 0;const constants_1=__webpack_require__(8779),bn_js_1=__importDefault(__webpack_require__(3550)),bintools_1=__importDefault(__webpack_require__(903)),errors_1=__webpack_require__(611),bintools=bintools_1.default.getInstance();function calcBytesCost(len){return len*constants_1.Defaults.network[1].C.txBytesGas}exports.getPreferredHRP=function getPreferredHRP(networkID){return networkID in constants_1.NetworkIDToHRP?constants_1.NetworkIDToHRP[`${networkID}`]:void 0===networkID?constants_1.NetworkIDToHRP[`${constants_1.DefaultNetworkID}`]:constants_1.FallbackHRP},exports.MaxWeightFormula=function MaxWeightFormula(staked,cap){return bn_js_1.default.min(staked.mul(new bn_js_1.default(5)),cap)},exports.UnixNow=function UnixNow(){return new bn_js_1.default(Math.round((new Date).getTime()/1e3))},exports.bufferToPrivateKeyString=function bufferToPrivateKeyString(pk){return`PrivateKey-${bintools.cb58Encode(pk)}`},exports.privateKeyStringToBuffer=function privateKeyStringToBuffer(pk){if(!pk.startsWith("PrivateKey-"))throw new errors_1.PrivateKeyError("Error - privateKeyStringToBuffer: private keys must start with 'PrivateKey-'");const pksplit=pk.split("-");return bintools.cb58Decode(pksplit[pksplit.length-1])},exports.bufferToNodeIDString=function bufferToNodeIDString(pk){return`NodeID-${bintools.cb58Encode(pk)}`},exports.NodeIDStringToBuffer=function NodeIDStringToBuffer(pk){if(!pk.startsWith("NodeID-"))throw new errors_1.NodeIdError("Error - privateNodeIDToBuffer: nodeID must start with 'NodeID-'");const pksplit=pk.split("-");return bintools.cb58Decode(pksplit[pksplit.length-1])},exports.costImportTx=function costImportTx(tx){let bytesCost=calcBytesCost(tx.toBuffer().byteLength);return tx.getTransaction().getImportInputs().forEach((input=>{const inCost=input.getCost();bytesCost+=inCost})),bytesCost+1e4},exports.calcBytesCost=calcBytesCost,exports.costExportTx=function costExportTx(tx){return calcBytesCost(tx.toBuffer().byteLength)+tx.getTransaction().getInputs().length*constants_1.Defaults.network[1].C.costPerSignature+1e4}},338:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(978),exports),__exportStar(__webpack_require__(903),exports),__exportStar(__webpack_require__(8309),exports),__exportStar(__webpack_require__(8779),exports),__exportStar(__webpack_require__(7911),exports),__exportStar(__webpack_require__(611),exports),__exportStar(__webpack_require__(3064),exports),__exportStar(__webpack_require__(59),exports),__exportStar(__webpack_require__(5554),exports),__exportStar(__webpack_require__(9836),exports),__exportStar(__webpack_require__(2272),exports),__exportStar(__webpack_require__(2216),exports),__exportStar(__webpack_require__(555),exports)},8309:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0});const buffer_1=__webpack_require__(8764),errors_1=__webpack_require__(611),bip39=__webpack_require__(2153),randomBytes=__webpack_require__(1798);class Mnemonic{constructor(){this.wordlists=bip39.wordlists}static getInstance(){return Mnemonic.instance||(Mnemonic.instance=new Mnemonic),Mnemonic.instance}getWordlists(language){return void 0!==language?this.wordlists[`${language}`]:this.wordlists}mnemonicToSeedSync(mnemonic,password=""){const seed=bip39.mnemonicToSeedSync(mnemonic,password);return buffer_1.Buffer.from(seed)}mnemonicToSeed(mnemonic,password=""){return __awaiter(this,void 0,void 0,(function*(){const seed=yield bip39.mnemonicToSeed(mnemonic,password);return buffer_1.Buffer.from(seed)}))}mnemonicToEntropy(mnemonic,wordlist){return bip39.mnemonicToEntropy(mnemonic,wordlist)}entropyToMnemonic(entropy,wordlist){return bip39.entropyToMnemonic(entropy,wordlist)}validateMnemonic(mnemonic,wordlist){return bip39.validateMnemonic(mnemonic,wordlist)}setDefaultWordlist(language){bip39.setDefaultWordlist(language)}getDefaultWordlist(){return bip39.getDefaultWordlist()}generateMnemonic(strength,rng,wordlist){if((strength=strength||256)%32!=0)throw new errors_1.InvalidEntropy("Error - Invalid entropy");return rng=rng||randomBytes,bip39.generateMnemonic(strength,rng,wordlist)}}exports.default=Mnemonic},9836:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MAGNETPayload=exports.ONIONPayload=exports.IPFSPayload=exports.URLPayload=exports.EMAILPayload=exports.YAMLPayload=exports.JSONPayload=exports.CSVPayload=exports.SVGPayload=exports.ICOPayload=exports.BMPPayload=exports.PNGPayload=exports.JPEGPayload=exports.SECPENCPayload=exports.SECPSIGPayload=exports.NODEIDPayload=exports.CHAINIDPayload=exports.SUBNETIDPayload=exports.NFTIDPayload=exports.UTXOIDPayload=exports.ASSETIDPayload=exports.TXIDPayload=exports.cb58EncodedPayload=exports.CCHAINADDRPayload=exports.PCHAINADDRPayload=exports.XCHAINADDRPayload=exports.ChainAddressPayload=exports.BIGNUMPayload=exports.B64STRPayload=exports.B58STRPayload=exports.HEXSTRPayload=exports.UTF8Payload=exports.BINPayload=exports.PayloadBase=exports.PayloadTypes=void 0;const buffer_1=__webpack_require__(8764),bintools_1=__importDefault(__webpack_require__(903)),bn_js_1=__importDefault(__webpack_require__(3550)),errors_1=__webpack_require__(611),serialization_1=__webpack_require__(555),bintools=bintools_1.default.getInstance(),serialization=serialization_1.Serialization.getInstance();class PayloadTypes{constructor(){this.types=[],this.types=["BIN","UTF8","HEXSTR","B58STR","B64STR","BIGNUM","XCHAINADDR","PCHAINADDR","CCHAINADDR","TXID","ASSETID","UTXOID","NFTID","SUBNETID","CHAINID","NODEID","SECPSIG","SECPENC","JPEG","PNG","BMP","ICO","SVG","CSV","JSON","YAML","EMAIL","URL","IPFS","ONION","MAGNET"]}getContent(payload){return bintools.copyFrom(payload,5)}getPayload(payload){return bintools.copyFrom(payload,4)}getTypeID(payload){return bintools.copyFrom(payload,4,5).readUInt8(0)}lookupID(typestr){return this.types.indexOf(typestr)}lookupType(value){return this.types[`${value}`]}select(typeID,...args){switch(typeID){case 0:return new BINPayload(...args);case 1:return new UTF8Payload(...args);case 2:return new HEXSTRPayload(...args);case 3:return new B58STRPayload(...args);case 4:return new B64STRPayload(...args);case 5:return new BIGNUMPayload(...args);case 6:return new XCHAINADDRPayload(...args);case 7:return new PCHAINADDRPayload(...args);case 8:return new CCHAINADDRPayload(...args);case 9:return new TXIDPayload(...args);case 10:return new ASSETIDPayload(...args);case 11:return new UTXOIDPayload(...args);case 12:return new NFTIDPayload(...args);case 13:return new SUBNETIDPayload(...args);case 14:return new CHAINIDPayload(...args);case 15:return new NODEIDPayload(...args);case 16:return new SECPSIGPayload(...args);case 17:return new SECPENCPayload(...args);case 18:return new JPEGPayload(...args);case 19:return new PNGPayload(...args);case 20:return new BMPPayload(...args);case 21:return new ICOPayload(...args);case 22:return new SVGPayload(...args);case 23:return new CSVPayload(...args);case 24:return new JSONPayload(...args);case 25:return new YAMLPayload(...args);case 26:return new EMAILPayload(...args);case 27:return new URLPayload(...args);case 28:return new IPFSPayload(...args);case 29:return new ONIONPayload(...args);case 30:return new MAGNETPayload(...args)}throw new errors_1.TypeIdError(`Error - PayloadTypes.select: unknown typeid ${typeID}`)}recast(unknowPayload){return this.select(unknowPayload.typeID(),unknowPayload.returnType())}static getInstance(){return PayloadTypes.instance||(PayloadTypes.instance=new PayloadTypes),PayloadTypes.instance}}exports.PayloadTypes=PayloadTypes;class PayloadBase{constructor(){this.payload=buffer_1.Buffer.alloc(0),this.typeid=void 0}typeID(){return this.typeid}typeName(){return PayloadTypes.getInstance().lookupType(this.typeid)}getContent(){return bintools.copyFrom(this.payload)}getPayload(){const typeID=buffer_1.Buffer.alloc(1);typeID.writeUInt8(this.typeid,0);return buffer_1.Buffer.concat([typeID,bintools.copyFrom(this.payload)])}fromBuffer(bytes,offset=0){const size=bintools.copyFrom(bytes,offset,offset+4).readUInt32BE(0);return offset+=4,this.typeid=bintools.copyFrom(bytes,offset,offset+1).readUInt8(0),offset+=1,this.payload=bintools.copyFrom(bytes,offset,offset+size-1),offset+=size-1}toBuffer(){const sizebuff=buffer_1.Buffer.alloc(4);sizebuff.writeUInt32BE(this.payload.length+1,0);const typebuff=buffer_1.Buffer.alloc(1);return typebuff.writeUInt8(this.typeid,0),buffer_1.Buffer.concat([sizebuff,typebuff,this.payload])}}exports.PayloadBase=PayloadBase;class BINPayload extends PayloadBase{constructor(payload){super(),this.typeid=0,payload instanceof buffer_1.Buffer?this.payload=payload:"string"==typeof payload&&(this.payload=bintools.b58ToBuffer(payload))}returnType(){return this.payload}}exports.BINPayload=BINPayload;class UTF8Payload extends PayloadBase{constructor(payload){super(),this.typeid=1,payload instanceof buffer_1.Buffer?this.payload=payload:"string"==typeof payload&&(this.payload=buffer_1.Buffer.from(payload,"utf8"))}returnType(){return this.payload.toString("utf8")}}exports.UTF8Payload=UTF8Payload;class HEXSTRPayload extends PayloadBase{constructor(payload){if(super(),this.typeid=2,payload instanceof buffer_1.Buffer)this.payload=payload;else if("string"==typeof payload){if(payload.startsWith("0x")||!payload.match(/^[0-9A-Fa-f]+$/))throw new errors_1.HexError("HEXSTRPayload.constructor -- hex string may not start with 0x and must be in /^[0-9A-Fa-f]+$/: "+payload);this.payload=buffer_1.Buffer.from(payload,"hex")}}returnType(){return this.payload.toString("hex")}}exports.HEXSTRPayload=HEXSTRPayload;class B58STRPayload extends PayloadBase{constructor(payload){super(),this.typeid=3,payload instanceof buffer_1.Buffer?this.payload=payload:"string"==typeof payload&&(this.payload=bintools.b58ToBuffer(payload))}returnType(){return bintools.bufferToB58(this.payload)}}exports.B58STRPayload=B58STRPayload;class B64STRPayload extends PayloadBase{constructor(payload){super(),this.typeid=4,payload instanceof buffer_1.Buffer?this.payload=payload:"string"==typeof payload&&(this.payload=buffer_1.Buffer.from(payload,"base64"))}returnType(){return this.payload.toString("base64")}}exports.B64STRPayload=B64STRPayload;class BIGNUMPayload extends PayloadBase{constructor(payload){super(),this.typeid=5,payload instanceof buffer_1.Buffer?this.payload=payload:payload instanceof bn_js_1.default?this.payload=bintools.fromBNToBuffer(payload):"string"==typeof payload&&(this.payload=buffer_1.Buffer.from(payload,"hex"))}returnType(){return bintools.fromBufferToBN(this.payload)}}exports.BIGNUMPayload=BIGNUMPayload;class ChainAddressPayload extends PayloadBase{constructor(payload,hrp){super(),this.typeid=6,this.chainid="",payload instanceof buffer_1.Buffer?this.payload=payload:"string"==typeof payload&&(this.payload=null!=hrp?bintools.stringToAddress(payload,hrp):bintools.stringToAddress(payload))}returnChainID(){return this.chainid}returnType(hrp){return serialization.bufferToType(this.payload,"bech32",hrp,this.chainid)}}exports.ChainAddressPayload=ChainAddressPayload;class XCHAINADDRPayload extends ChainAddressPayload{constructor(){super(...arguments),this.typeid=6,this.chainid="X"}}exports.XCHAINADDRPayload=XCHAINADDRPayload;class PCHAINADDRPayload extends ChainAddressPayload{constructor(){super(...arguments),this.typeid=7,this.chainid="P"}}exports.PCHAINADDRPayload=PCHAINADDRPayload;class CCHAINADDRPayload extends ChainAddressPayload{constructor(){super(...arguments),this.typeid=8,this.chainid="C"}}exports.CCHAINADDRPayload=CCHAINADDRPayload;class cb58EncodedPayload extends PayloadBase{returnType(){return bintools.cb58Encode(this.payload)}constructor(payload){super(),payload instanceof buffer_1.Buffer?this.payload=payload:"string"==typeof payload&&(this.payload=bintools.cb58Decode(payload))}}exports.cb58EncodedPayload=cb58EncodedPayload;class TXIDPayload extends cb58EncodedPayload{constructor(){super(...arguments),this.typeid=9}}exports.TXIDPayload=TXIDPayload;class ASSETIDPayload extends cb58EncodedPayload{constructor(){super(...arguments),this.typeid=10}}exports.ASSETIDPayload=ASSETIDPayload;class UTXOIDPayload extends cb58EncodedPayload{constructor(){super(...arguments),this.typeid=11}}exports.UTXOIDPayload=UTXOIDPayload;class NFTIDPayload extends UTXOIDPayload{constructor(){super(...arguments),this.typeid=12}}exports.NFTIDPayload=NFTIDPayload;class SUBNETIDPayload extends cb58EncodedPayload{constructor(){super(...arguments),this.typeid=13}}exports.SUBNETIDPayload=SUBNETIDPayload;class CHAINIDPayload extends cb58EncodedPayload{constructor(){super(...arguments),this.typeid=14}}exports.CHAINIDPayload=CHAINIDPayload;class NODEIDPayload extends cb58EncodedPayload{constructor(){super(...arguments),this.typeid=15}}exports.NODEIDPayload=NODEIDPayload;class SECPSIGPayload extends B58STRPayload{constructor(){super(...arguments),this.typeid=16}}exports.SECPSIGPayload=SECPSIGPayload;class SECPENCPayload extends B58STRPayload{constructor(){super(...arguments),this.typeid=17}}exports.SECPENCPayload=SECPENCPayload;class JPEGPayload extends BINPayload{constructor(){super(...arguments),this.typeid=18}}exports.JPEGPayload=JPEGPayload;class PNGPayload extends BINPayload{constructor(){super(...arguments),this.typeid=19}}exports.PNGPayload=PNGPayload;class BMPPayload extends BINPayload{constructor(){super(...arguments),this.typeid=20}}exports.BMPPayload=BMPPayload;class ICOPayload extends BINPayload{constructor(){super(...arguments),this.typeid=21}}exports.ICOPayload=ICOPayload;class SVGPayload extends UTF8Payload{constructor(){super(...arguments),this.typeid=22}}exports.SVGPayload=SVGPayload;class CSVPayload extends UTF8Payload{constructor(){super(...arguments),this.typeid=23}}exports.CSVPayload=CSVPayload;class JSONPayload extends PayloadBase{constructor(payload){if(super(),this.typeid=24,payload instanceof buffer_1.Buffer)this.payload=payload;else if("string"==typeof payload)this.payload=buffer_1.Buffer.from(payload,"utf8");else if(payload){let jsonstr=JSON.stringify(payload);this.payload=buffer_1.Buffer.from(jsonstr,"utf8")}}returnType(){return JSON.parse(this.payload.toString("utf8"))}}exports.JSONPayload=JSONPayload;class YAMLPayload extends UTF8Payload{constructor(){super(...arguments),this.typeid=25}}exports.YAMLPayload=YAMLPayload;class EMAILPayload extends UTF8Payload{constructor(){super(...arguments),this.typeid=26}}exports.EMAILPayload=EMAILPayload;class URLPayload extends UTF8Payload{constructor(){super(...arguments),this.typeid=27}}exports.URLPayload=URLPayload;class IPFSPayload extends B58STRPayload{constructor(){super(...arguments),this.typeid=28}}exports.IPFSPayload=IPFSPayload;class ONIONPayload extends UTF8Payload{constructor(){super(...arguments),this.typeid=29}}exports.ONIONPayload=ONIONPayload;class MAGNETPayload extends UTF8Payload{constructor(){super(...arguments),this.typeid=30}}exports.MAGNETPayload=MAGNETPayload},2272:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PersistanceOptions=void 0;exports.PersistanceOptions=class PersistanceOptions{constructor(name,overwrite=!1,mergeRule){this.name=void 0,this.overwrite=!1,this.mergeRule="union",this.getName=()=>this.name,this.getOverwrite=()=>this.overwrite,this.getMergeRule=()=>this.mergeRule,this.name=name,this.overwrite=overwrite,this.mergeRule=mergeRule}}},2216:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.default=class PubSub{newSet(){return JSON.stringify({newSet:{}})}newBloom(maxElements=1e3,collisionProb=.01){return JSON.stringify({newBloom:{maxElements,collisionProb}})}addAddresses(addresses){return JSON.stringify({addAddresses:{addresses}})}}},555:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Serialization=exports.Serializable=exports.SERIALIZATIONVERSION=void 0;const bintools_1=__importDefault(__webpack_require__(903)),bn_js_1=__importDefault(__webpack_require__(3550)),buffer_1=__webpack_require__(8764),xss_1=__importDefault(__webpack_require__(8924)),helperfunctions_1=__webpack_require__(5554),errors_1=__webpack_require__(611);exports.SERIALIZATIONVERSION=0;exports.Serializable=class Serializable{constructor(){this._typeName=void 0,this._typeID=void 0,this._codecID=void 0}getTypeName(){return this._typeName}getTypeID(){return this._typeID}getCodecID(){return this._codecID}sanitizeObject(obj){for(const k in obj)"object"==typeof obj[`${k}`]&&null!==obj[`${k}`]?this.sanitizeObject(obj[`${k}`]):"string"==typeof obj[`${k}`]&&(obj[`${k}`]=(0,xss_1.default)(obj[`${k}`]));return obj}serialize(encoding){return{_typeName:(0,xss_1.default)(this._typeName),_typeID:void 0===this._typeID?null:this._typeID,_codecID:void 0===this._codecID?null:this._codecID}}deserialize(fields,encoding){if("string"!=typeof(fields=this.sanitizeObject(fields))._typeName)throw new errors_1.TypeNameError("Error - Serializable.deserialize: _typeName must be a string, found: "+typeof fields._typeName);if(fields._typeName!==this._typeName)throw new errors_1.TypeNameError("Error - Serializable.deserialize: _typeName mismatch -- expected: "+this._typeName+" -- received: "+fields._typeName);if(void 0!==fields._typeID&&null!==fields._typeID){if("number"!=typeof fields._typeID)throw new errors_1.TypeIdError("Error - Serializable.deserialize: _typeID must be a number, found: "+typeof fields._typeID);if(fields._typeID!==this._typeID)throw new errors_1.TypeIdError("Error - Serializable.deserialize: _typeID mismatch -- expected: "+this._typeID+" -- received: "+fields._typeID)}if(void 0!==fields._codecID&&null!==fields._codecID){if("number"!=typeof fields._codecID)throw new errors_1.CodecIdError("Error - Serializable.deserialize: _codecID must be a number, found: "+typeof fields._codecID);if(fields._codecID!==this._codecID)throw new errors_1.CodecIdError("Error - Serializable.deserialize: _codecID mismatch -- expected: "+this._codecID+" -- received: "+fields._codecID)}}};class Serialization{constructor(){this.bintools=bintools_1.default.getInstance()}static getInstance(){return Serialization.instance||(Serialization.instance=new Serialization),Serialization.instance}bufferToType(vb,type,...args){return"BN"===type?new bn_js_1.default(vb.toString("hex"),"hex"):"Buffer"===type?(1==args.length&&"number"==typeof args[0]&&(vb=buffer_1.Buffer.from(vb.toString("hex").padStart(2*args[0],"0"),"hex")),vb):"bech32"===type?this.bintools.addressToString(args[0],args[1],vb):"nodeID"===type?(0,helperfunctions_1.bufferToNodeIDString)(vb):"privateKey"===type?(0,helperfunctions_1.bufferToPrivateKeyString)(vb):"cb58"===type?this.bintools.cb58Encode(vb):"base58"===type?this.bintools.bufferToB58(vb):"base64"===type?vb.toString("base64"):"hex"===type?vb.toString("hex"):"decimalString"===type?new bn_js_1.default(vb.toString("hex"),"hex").toString(10):"number"===type?new bn_js_1.default(vb.toString("hex"),"hex").toNumber():"utf8"===type?vb.toString("utf8"):void 0}typeToBuffer(v,type,...args){if("BN"===type){let str=v.toString("hex");return 1==args.length&&"number"==typeof args[0]?buffer_1.Buffer.from(str.padStart(2*args[0],"0"),"hex"):buffer_1.Buffer.from(str,"hex")}if("Buffer"===type)return v;if("bech32"===type)return this.bintools.stringToAddress(v,...args);if("nodeID"===type)return(0,helperfunctions_1.NodeIDStringToBuffer)(v);if("privateKey"===type)return(0,helperfunctions_1.privateKeyStringToBuffer)(v);if("cb58"===type)return this.bintools.cb58Decode(v);if("base58"===type)return this.bintools.b58ToBuffer(v);if("base64"===type)return buffer_1.Buffer.from(v,"base64");if("hex"===type)return v.startsWith("0x")&&(v=v.slice(2)),buffer_1.Buffer.from(v,"hex");if("decimalString"===type){let str=new bn_js_1.default(v,10).toString("hex");return 1==args.length&&"number"==typeof args[0]?buffer_1.Buffer.from(str.padStart(2*args[0],"0"),"hex"):buffer_1.Buffer.from(str,"hex")}if("number"===type){let str=new bn_js_1.default(v,10).toString("hex");return 1==args.length&&"number"==typeof args[0]?buffer_1.Buffer.from(str.padStart(2*args[0],"0"),"hex"):buffer_1.Buffer.from(str,"hex")}if("utf8"===type){if(1==args.length&&"number"==typeof args[0]){let b=buffer_1.Buffer.alloc(args[0]);return b.write(v),b}return buffer_1.Buffer.from(v,"utf8")}}encoder(value,encoding,intype,outtype,...args){if(void 0===value)throw new errors_1.UnknownTypeError("Error - Serializable.encoder: value passed is undefined");"display"!==encoding&&(outtype=encoding);const vb=this.typeToBuffer(value,intype,...args);return this.bufferToType(vb,outtype,...args)}decoder(value,encoding,intype,outtype,...args){if(void 0===value)throw new errors_1.UnknownTypeError("Error - Serializable.decoder: value passed is undefined");"display"!==encoding&&(intype=encoding);const vb=this.typeToBuffer(value,intype,...args);return this.bufferToType(vb,outtype,...args)}serialize(serialize,vm,encoding="display",notes){return void 0===notes&&(notes=serialize.getTypeName()),{vm,encoding,version:exports.SERIALIZATIONVERSION,notes,fields:serialize.serialize(encoding)}}deserialize(input,output){output.deserialize(input.fields,input.encoding)}}exports.Serialization=Serialization},5751:module=>{"use strict";for(var ALPHABET="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ALPHABET_MAP={},z=0;z<ALPHABET.length;z++){var x=ALPHABET.charAt(z);if(void 0!==ALPHABET_MAP[x])throw new TypeError(x+" is ambiguous");ALPHABET_MAP[x]=z}function polymodStep(pre){var b=pre>>25;return(33554431&pre)<<5^996825010&-(b>>0&1)^642813549&-(b>>1&1)^513874426&-(b>>2&1)^1027748829&-(b>>3&1)^705979059&-(b>>4&1)}function prefixChk(prefix){for(var chk=1,i=0;i<prefix.length;++i){var c=prefix.charCodeAt(i);if(c<33||c>126)return"Invalid prefix ("+prefix+")";chk=polymodStep(chk)^c>>5}for(chk=polymodStep(chk),i=0;i<prefix.length;++i){var v=prefix.charCodeAt(i);chk=polymodStep(chk)^31&v}return chk}function __decode(str,LIMIT){if(LIMIT=LIMIT||90,str.length<8)return str+" too short";if(str.length>LIMIT)return"Exceeds length limit";var lowered=str.toLowerCase(),uppered=str.toUpperCase();if(str!==lowered&&str!==uppered)return"Mixed-case string "+str;var split=(str=lowered).lastIndexOf("1");if(-1===split)return"No separator character for "+str;if(0===split)return"Missing prefix for "+str;var prefix=str.slice(0,split),wordChars=str.slice(split+1);if(wordChars.length<6)return"Data too short";var chk=prefixChk(prefix);if("string"==typeof chk)return chk;for(var words=[],i=0;i<wordChars.length;++i){var c=wordChars.charAt(i),v=ALPHABET_MAP[c];if(void 0===v)return"Unknown character "+c;chk=polymodStep(chk)^v,i+6>=wordChars.length||words.push(v)}return 1!==chk?"Invalid checksum for "+str:{prefix,words}}function convert(data,inBits,outBits,pad){for(var value=0,bits=0,maxV=(1<<outBits)-1,result=[],i=0;i<data.length;++i)for(value=value<<inBits|data[i],bits+=inBits;bits>=outBits;)bits-=outBits,result.push(value>>bits&maxV);if(pad)bits>0&&result.push(value<<outBits-bits&maxV);else{if(bits>=inBits)return"Excess padding";if(value<<outBits-bits&maxV)return"Non-zero padding"}return result}module.exports={decodeUnsafe:function decodeUnsafe(){var res=__decode.apply(null,arguments);if("object"==typeof res)return res},decode:function decode(str){var res=__decode.apply(null,arguments);if("object"==typeof res)return res;throw new Error(res)},encode:function encode(prefix,words,LIMIT){if(LIMIT=LIMIT||90,prefix.length+7+words.length>LIMIT)throw new TypeError("Exceeds length limit");var chk=prefixChk(prefix=prefix.toLowerCase());if("string"==typeof chk)throw new Error(chk);for(var result=prefix+"1",i=0;i<words.length;++i){var x=words[i];if(x>>5!=0)throw new Error("Non 5-bit word");chk=polymodStep(chk)^x,result+=ALPHABET.charAt(x)}for(i=0;i<6;++i)chk=polymodStep(chk);for(chk^=1,i=0;i<6;++i){result+=ALPHABET.charAt(chk>>5*(5-i)&31)}return result},toWordsUnsafe:function toWordsUnsafe(bytes){var res=convert(bytes,8,5,!0);if(Array.isArray(res))return res},toWords:function toWords(bytes){var res=convert(bytes,8,5,!0);if(Array.isArray(res))return res;throw new Error(res)},fromWordsUnsafe:function fromWordsUnsafe(words){var res=convert(words,5,8,!1);if(Array.isArray(res))return res},fromWords:function fromWords(words){var res=convert(words,5,8,!1);if(Array.isArray(res))return res;throw new Error(res)}}},8826:function(module){"use strict";!function(root){function checkInt(value){return parseInt(value)===value}function checkInts(arrayish){if(!checkInt(arrayish.length))return!1;for(var i=0;i<arrayish.length;i++)if(!checkInt(arrayish[i])||arrayish[i]<0||arrayish[i]>255)return!1;return!0}function coerceArray(arg,copy){if(arg.buffer&&ArrayBuffer.isView(arg)&&"Uint8Array"===arg.name)return copy&&(arg=arg.slice?arg.slice():Array.prototype.slice.call(arg)),arg;if(Array.isArray(arg)){if(!checkInts(arg))throw new Error("Array contains invalid value: "+arg);return new Uint8Array(arg)}if(checkInt(arg.length)&&checkInts(arg))return new Uint8Array(arg);throw new Error("unsupported array-like object")}function createArray(length){return new Uint8Array(length)}function copyArray(sourceArray,targetArray,targetStart,sourceStart,sourceEnd){null==sourceStart&&null==sourceEnd||(sourceArray=sourceArray.slice?sourceArray.slice(sourceStart,sourceEnd):Array.prototype.slice.call(sourceArray,sourceStart,sourceEnd)),targetArray.set(sourceArray,targetStart)}var Hex,convertUtf8={toBytes:function toBytes(text){var result=[],i=0;for(text=encodeURI(text);i<text.length;){var c=text.charCodeAt(i++);37===c?(result.push(parseInt(text.substr(i,2),16)),i+=2):result.push(c)}return coerceArray(result)},fromBytes:function fromBytes(bytes){for(var result=[],i=0;i<bytes.length;){var c=bytes[i];c<128?(result.push(String.fromCharCode(c)),i++):c>191&&c<224?(result.push(String.fromCharCode((31&c)<<6|63&bytes[i+1])),i+=2):(result.push(String.fromCharCode((15&c)<<12|(63&bytes[i+1])<<6|63&bytes[i+2])),i+=3)}return result.join("")}},convertHex=(Hex="0123456789abcdef",{toBytes:function toBytes(text){for(var result=[],i=0;i<text.length;i+=2)result.push(parseInt(text.substr(i,2),16));return result},fromBytes:function fromBytes(bytes){for(var result=[],i=0;i<bytes.length;i++){var v=bytes[i];result.push(Hex[(240&v)>>4]+Hex[15&v])}return result.join("")}}),numberOfRounds={16:10,24:12,32:14},rcon=[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],S=[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],Si=[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],T1=[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],T2=[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],T3=[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],T4=[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],T5=[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],T6=[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],T7=[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],T8=[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],U1=[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],U2=[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],U3=[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],U4=[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 convertToInt32(bytes){for(var result=[],i=0;i<bytes.length;i+=4)result.push(bytes[i]<<24|bytes[i+1]<<16|bytes[i+2]<<8|bytes[i+3]);return result}var AES=function(key){if(!(this instanceof AES))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:coerceArray(key,!0)}),this._prepare()};AES.prototype._prepare=function(){var rounds=numberOfRounds[this.key.length];if(null==rounds)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var i=0;i<=rounds;i++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var index,roundKeyCount=4*(rounds+1),KC=this.key.length/4,tk=convertToInt32(this.key);for(i=0;i<KC;i++)index=i>>2,this._Ke[index][i%4]=tk[i],this._Kd[rounds-index][i%4]=tk[i];for(var tt,rconpointer=0,t=KC;t<roundKeyCount;){if(tt=tk[KC-1],tk[0]^=S[tt>>16&255]<<24^S[tt>>8&255]<<16^S[255&tt]<<8^S[tt>>24&255]^rcon[rconpointer]<<24,rconpointer+=1,8!=KC)for(i=1;i<KC;i++)tk[i]^=tk[i-1];else{for(i=1;i<KC/2;i++)tk[i]^=tk[i-1];tt=tk[KC/2-1],tk[KC/2]^=S[255&tt]^S[tt>>8&255]<<8^S[tt>>16&255]<<16^S[tt>>24&255]<<24;for(i=KC/2+1;i<KC;i++)tk[i]^=tk[i-1]}for(i=0;i<KC&&t<roundKeyCount;)r=t>>2,c=t%4,this._Ke[r][c]=tk[i],this._Kd[rounds-r][c]=tk[i++],t++}for(var r=1;r<rounds;r++)for(var c=0;c<4;c++)tt=this._Kd[r][c],this._Kd[r][c]=U1[tt>>24&255]^U2[tt>>16&255]^U3[tt>>8&255]^U4[255&tt]},AES.prototype.encrypt=function(plaintext){if(16!=plaintext.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var rounds=this._Ke.length-1,a=[0,0,0,0],t=convertToInt32(plaintext),i=0;i<4;i++)t[i]^=this._Ke[0][i];for(var r=1;r<rounds;r++){for(i=0;i<4;i++)a[i]=T1[t[i]>>24&255]^T2[t[(i+1)%4]>>16&255]^T3[t[(i+2)%4]>>8&255]^T4[255&t[(i+3)%4]]^this._Ke[r][i];t=a.slice()}var tt,result=createArray(16);for(i=0;i<4;i++)tt=this._Ke[rounds][i],result[4*i]=255&(S[t[i]>>24&255]^tt>>24),result[4*i+1]=255&(S[t[(i+1)%4]>>16&255]^tt>>16),result[4*i+2]=255&(S[t[(i+2)%4]>>8&255]^tt>>8),result[4*i+3]=255&(S[255&t[(i+3)%4]]^tt);return result},AES.prototype.decrypt=function(ciphertext){if(16!=ciphertext.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var rounds=this._Kd.length-1,a=[0,0,0,0],t=convertToInt32(ciphertext),i=0;i<4;i++)t[i]^=this._Kd[0][i];for(var r=1;r<rounds;r++){for(i=0;i<4;i++)a[i]=T5[t[i]>>24&255]^T6[t[(i+3)%4]>>16&255]^T7[t[(i+2)%4]>>8&255]^T8[255&t[(i+1)%4]]^this._Kd[r][i];t=a.slice()}var tt,result=createArray(16);for(i=0;i<4;i++)tt=this._Kd[rounds][i],result[4*i]=255&(Si[t[i]>>24&255]^tt>>24),result[4*i+1]=255&(Si[t[(i+3)%4]>>16&255]^tt>>16),result[4*i+2]=255&(Si[t[(i+2)%4]>>8&255]^tt>>8),result[4*i+3]=255&(Si[255&t[(i+1)%4]]^tt);return result};var ModeOfOperationECB=function(key){if(!(this instanceof ModeOfOperationECB))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new AES(key)};ModeOfOperationECB.prototype.encrypt=function(plaintext){if((plaintext=coerceArray(plaintext)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var ciphertext=createArray(plaintext.length),block=createArray(16),i=0;i<plaintext.length;i+=16)copyArray(plaintext,block,0,i,i+16),copyArray(block=this._aes.encrypt(block),ciphertext,i);return ciphertext},ModeOfOperationECB.prototype.decrypt=function(ciphertext){if((ciphertext=coerceArray(ciphertext)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var plaintext=createArray(ciphertext.length),block=createArray(16),i=0;i<ciphertext.length;i+=16)copyArray(ciphertext,block,0,i,i+16),copyArray(block=this._aes.decrypt(block),plaintext,i);return plaintext};var ModeOfOperationCBC=function(key,iv){if(!(this instanceof ModeOfOperationCBC))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",iv){if(16!=iv.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else iv=createArray(16);this._lastCipherblock=coerceArray(iv,!0),this._aes=new AES(key)};ModeOfOperationCBC.prototype.encrypt=function(plaintext){if((plaintext=coerceArray(plaintext)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var ciphertext=createArray(plaintext.length),block=createArray(16),i=0;i<plaintext.length;i+=16){copyArray(plaintext,block,0,i,i+16);for(var j=0;j<16;j++)block[j]^=this._lastCipherblock[j];this._lastCipherblock=this._aes.encrypt(block),copyArray(this._lastCipherblock,ciphertext,i)}return ciphertext},ModeOfOperationCBC.prototype.decrypt=function(ciphertext){if((ciphertext=coerceArray(ciphertext)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var plaintext=createArray(ciphertext.length),block=createArray(16),i=0;i<ciphertext.length;i+=16){copyArray(ciphertext,block,0,i,i+16),block=this._aes.decrypt(block);for(var j=0;j<16;j++)plaintext[i+j]=block[j]^this._lastCipherblock[j];copyArray(ciphertext,this._lastCipherblock,0,i,i+16)}return plaintext};var ModeOfOperationCFB=function(key,iv,segmentSize){if(!(this instanceof ModeOfOperationCFB))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",iv){if(16!=iv.length)throw new Error("invalid initialation vector size (must be 16 size)")}else iv=createArray(16);segmentSize||(segmentSize=1),this.segmentSize=segmentSize,this._shiftRegister=coerceArray(iv,!0),this._aes=new AES(key)};ModeOfOperationCFB.prototype.encrypt=function(plaintext){if(plaintext.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var xorSegment,encrypted=coerceArray(plaintext,!0),i=0;i<encrypted.length;i+=this.segmentSize){xorSegment=this._aes.encrypt(this._shiftRegister);for(var j=0;j<this.segmentSize;j++)encrypted[i+j]^=xorSegment[j];copyArray(this._shiftRegister,this._shiftRegister,0,this.segmentSize),copyArray(encrypted,this._shiftRegister,16-this.segmentSize,i,i+this.segmentSize)}return encrypted},ModeOfOperationCFB.prototype.decrypt=function(ciphertext){if(ciphertext.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var xorSegment,plaintext=coerceArray(ciphertext,!0),i=0;i<plaintext.length;i+=this.segmentSize){xorSegment=this._aes.encrypt(this._shiftRegister);for(var j=0;j<this.segmentSize;j++)plaintext[i+j]^=xorSegment[j];copyArray(this._shiftRegister,this._shiftRegister,0,this.segmentSize),copyArray(ciphertext,this._shiftRegister,16-this.segmentSize,i,i+this.segmentSize)}return plaintext};var ModeOfOperationOFB=function(key,iv){if(!(this instanceof ModeOfOperationOFB))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",iv){if(16!=iv.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else iv=createArray(16);this._lastPrecipher=coerceArray(iv,!0),this._lastPrecipherIndex=16,this._aes=new AES(key)};ModeOfOperationOFB.prototype.encrypt=function(plaintext){for(var encrypted=coerceArray(plaintext,!0),i=0;i<encrypted.length;i++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),encrypted[i]^=this._lastPrecipher[this._lastPrecipherIndex++];return encrypted},ModeOfOperationOFB.prototype.decrypt=ModeOfOperationOFB.prototype.encrypt;var Counter=function(initialValue){if(!(this instanceof Counter))throw Error("Counter must be instanitated with `new`");0===initialValue||initialValue||(initialValue=1),"number"==typeof initialValue?(this._counter=createArray(16),this.setValue(initialValue)):this.setBytes(initialValue)};Counter.prototype.setValue=function(value){if("number"!=typeof value||parseInt(value)!=value)throw new Error("invalid counter value (must be an integer)");for(var index=15;index>=0;--index)this._counter[index]=value%256,value>>=8},Counter.prototype.setBytes=function(bytes){if(16!=(bytes=coerceArray(bytes,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=bytes},Counter.prototype.increment=function(){for(var i=15;i>=0;i--){if(255!==this._counter[i]){this._counter[i]++;break}this._counter[i]=0}};var ModeOfOperationCTR=function(key,counter){if(!(this instanceof ModeOfOperationCTR))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",counter instanceof Counter||(counter=new Counter(counter)),this._counter=counter,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new AES(key)};ModeOfOperationCTR.prototype.encrypt=function(plaintext){for(var encrypted=coerceArray(plaintext,!0),i=0;i<encrypted.length;i++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),encrypted[i]^=this._remainingCounter[this._remainingCounterIndex++];return encrypted},ModeOfOperationCTR.prototype.decrypt=ModeOfOperationCTR.prototype.encrypt;var aesjs={AES,Counter,ModeOfOperation:{ecb:ModeOfOperationECB,cbc:ModeOfOperationCBC,cfb:ModeOfOperationCFB,ofb:ModeOfOperationOFB,ctr:ModeOfOperationCTR},utils:{hex:convertHex,utf8:convertUtf8},padding:{pkcs7:{pad:function pkcs7pad(data){var padder=16-(data=coerceArray(data,!0)).length%16,result=createArray(data.length+padder);copyArray(data,result);for(var i=data.length;i<result.length;i++)result[i]=padder;return result},strip:function pkcs7strip(data){if((data=coerceArray(data,!0)).length<16)throw new Error("PKCS#7 invalid length");var padder=data[data.length-1];if(padder>16)throw new Error("PKCS#7 padding byte out of range");for(var length=data.length-padder,i=0;i<padder;i++)if(data[length+i]!==padder)throw new Error("PKCS#7 invalid padding byte");var result=createArray(length);return copyArray(data,result,0,0,length),result}}},_arrayTest:{coerceArray,createArray,copyArray}};module.exports=aesjs}()},9809:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";const asn1=exports;asn1.bignum=__webpack_require__(4590),asn1.define=__webpack_require__(2500).define,asn1.base=__webpack_require__(1979),asn1.constants=__webpack_require__(6826),asn1.decoders=__webpack_require__(8307),asn1.encoders=__webpack_require__(6579)},2500:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";const encoders=__webpack_require__(6579),decoders=__webpack_require__(8307),inherits=__webpack_require__(5717);function Entity(name,body){this.name=name,this.body=body,this.decoders={},this.encoders={}}exports.define=function define(name,body){return new Entity(name,body)},Entity.prototype._createNamed=function createNamed(Base){const name=this.name;function Generated(entity){this._initNamed(entity,name)}return inherits(Generated,Base),Generated.prototype._initNamed=function _initNamed(entity,name){Base.call(this,entity,name)},new Generated(this)},Entity.prototype._getDecoder=function _getDecoder(enc){return enc=enc||"der",this.decoders.hasOwnProperty(enc)||(this.decoders[enc]=this._createNamed(decoders[enc])),this.decoders[enc]},Entity.prototype.decode=function decode(data,enc,options){return this._getDecoder(enc).decode(data,options)},Entity.prototype._getEncoder=function _getEncoder(enc){return enc=enc||"der",this.encoders.hasOwnProperty(enc)||(this.encoders[enc]=this._createNamed(encoders[enc])),this.encoders[enc]},Entity.prototype.encode=function encode(data,enc,reporter){return this._getEncoder(enc).encode(data,reporter)}},6625:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";const inherits=__webpack_require__(5717),Reporter=__webpack_require__(8465).b,Buffer=__webpack_require__(2399).Buffer;function DecoderBuffer(base,options){Reporter.call(this,options),Buffer.isBuffer(base)?(this.base=base,this.offset=0,this.length=base.length):this.error("Input not Buffer")}function EncoderBuffer(value,reporter){if(Array.isArray(value))this.length=0,this.value=value.map((function(item){return EncoderBuffer.isEncoderBuffer(item)||(item=new EncoderBuffer(item,reporter)),this.length+=item.length,item}),this);else if("number"==typeof value){if(!(0<=value&&value<=255))return reporter.error("non-byte EncoderBuffer value");this.value=value,this.length=1}else if("string"==typeof value)this.value=value,this.length=Buffer.byteLength(value);else{if(!Buffer.isBuffer(value))return reporter.error("Unsupported type: "+typeof value);this.value=value,this.length=value.length}}inherits(DecoderBuffer,Reporter),exports.C=DecoderBuffer,DecoderBuffer.isDecoderBuffer=function isDecoderBuffer(data){if(data instanceof DecoderBuffer)return!0;return"object"==typeof data&&Buffer.isBuffer(data.base)&&"DecoderBuffer"===data.constructor.name&&"number"==typeof data.offset&&"number"==typeof data.length&&"function"==typeof data.save&&"function"==typeof data.restore&&"function"==typeof data.isEmpty&&"function"==typeof data.readUInt8&&"function"==typeof data.skip&&"function"==typeof data.raw},DecoderBuffer.prototype.save=function save(){return{offset:this.offset,reporter:Reporter.prototype.save.call(this)}},DecoderBuffer.prototype.restore=function restore(save){const res=new DecoderBuffer(this.base);return res.offset=save.offset,res.length=this.offset,this.offset=save.offset,Reporter.prototype.restore.call(this,save.reporter),res},DecoderBuffer.prototype.isEmpty=function isEmpty(){return this.offset===this.length},DecoderBuffer.prototype.readUInt8=function readUInt8(fail){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(fail||"DecoderBuffer overrun")},DecoderBuffer.prototype.skip=function skip(bytes,fail){if(!(this.offset+bytes<=this.length))return this.error(fail||"DecoderBuffer overrun");const res=new DecoderBuffer(this.base);return res._reporterState=this._reporterState,res.offset=this.offset,res.length=this.offset+bytes,this.offset+=bytes,res},DecoderBuffer.prototype.raw=function raw(save){return this.base.slice(save?save.offset:this.offset,this.length)},exports.R=EncoderBuffer,EncoderBuffer.isEncoderBuffer=function isEncoderBuffer(data){if(data instanceof EncoderBuffer)return!0;return"object"==typeof data&&"EncoderBuffer"===data.constructor.name&&"number"==typeof data.length&&"function"==typeof data.join},EncoderBuffer.prototype.join=function join(out,offset){return out||(out=Buffer.alloc(this.length)),offset||(offset=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(item){item.join(out,offset),offset+=item.length})):("number"==typeof this.value?out[offset]=this.value:"string"==typeof this.value?out.write(this.value,offset):Buffer.isBuffer(this.value)&&this.value.copy(out,offset),offset+=this.length)),out}},1979:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";const base=exports;base.Reporter=__webpack_require__(8465).b,base.DecoderBuffer=__webpack_require__(6625).C,base.EncoderBuffer=__webpack_require__(6625).R,base.Node=__webpack_require__(1949)},1949:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";const Reporter=__webpack_require__(8465).b,EncoderBuffer=__webpack_require__(6625).R,DecoderBuffer=__webpack_require__(6625).C,assert=__webpack_require__(9746),tags=["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"],methods=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(tags);function Node(enc,parent,name){const state={};this._baseState=state,state.name=name,state.enc=enc,state.parent=parent||null,state.children=null,state.tag=null,state.args=null,state.reverseArgs=null,state.choice=null,state.optional=!1,state.any=!1,state.obj=!1,state.use=null,state.useDecoder=null,state.key=null,state.default=null,state.explicit=null,state.implicit=null,state.contains=null,state.parent||(state.children=[],this._wrap())}module.exports=Node;const stateProps=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function clone(){const state=this._baseState,cstate={};stateProps.forEach((function(prop){cstate[prop]=state[prop]}));const res=new this.constructor(cstate.parent);return res._baseState=cstate,res},Node.prototype._wrap=function wrap(){const state=this._baseState;methods.forEach((function(method){this[method]=function _wrappedMethod(){const clone=new this.constructor(this);return state.children.push(clone),clone[method].apply(clone,arguments)}}),this)},Node.prototype._init=function init(body){const state=this._baseState;assert(null===state.parent),body.call(this),state.children=state.children.filter((function(child){return child._baseState.parent===this}),this),assert.equal(state.children.length,1,"Root node can have only one child")},Node.prototype._useArgs=function useArgs(args){const state=this._baseState,children=args.filter((function(arg){return arg instanceof this.constructor}),this);args=args.filter((function(arg){return!(arg instanceof this.constructor)}),this),0!==children.length&&(assert(null===state.children),state.children=children,children.forEach((function(child){child._baseState.parent=this}),this)),0!==args.length&&(assert(null===state.args),state.args=args,state.reverseArgs=args.map((function(arg){if("object"!=typeof arg||arg.constructor!==Object)return arg;const res={};return Object.keys(arg).forEach((function(key){key==(0|key)&&(key|=0);const value=arg[key];res[value]=key})),res})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(method){Node.prototype[method]=function _overrided(){const state=this._baseState;throw new Error(method+" not implemented for encoding: "+state.enc)}})),tags.forEach((function(tag){Node.prototype[tag]=function _tagMethod(){const state=this._baseState,args=Array.prototype.slice.call(arguments);return assert(null===state.tag),state.tag=tag,this._useArgs(args),this}})),Node.prototype.use=function use(item){assert(item);const state=this._baseState;return assert(null===state.use),state.use=item,this},Node.prototype.optional=function optional(){return this._baseState.optional=!0,this},Node.prototype.def=function def(val){const state=this._baseState;return assert(null===state.default),state.default=val,state.optional=!0,this},Node.prototype.explicit=function explicit(num){const state=this._baseState;return assert(null===state.explicit&&null===state.implicit),state.explicit=num,this},Node.prototype.implicit=function implicit(num){const state=this._baseState;return assert(null===state.explicit&&null===state.implicit),state.implicit=num,this},Node.prototype.obj=function obj(){const state=this._baseState,args=Array.prototype.slice.call(arguments);return state.obj=!0,0!==args.length&&this._useArgs(args),this},Node.prototype.key=function key(newKey){const state=this._baseState;return assert(null===state.key),state.key=newKey,this},Node.prototype.any=function any(){return this._baseState.any=!0,this},Node.prototype.choice=function choice(obj){const state=this._baseState;return assert(null===state.choice),state.choice=obj,this._useArgs(Object.keys(obj).map((function(key){return obj[key]}))),this},Node.prototype.contains=function contains(item){const state=this._baseState;return assert(null===state.use),state.contains=item,this},Node.prototype._decode=function decode(input,options){const state=this._baseState;if(null===state.parent)return input.wrapResult(state.children[0]._decode(input,options));let prevObj,result=state.default,present=!0,prevKey=null;if(null!==state.key&&(prevKey=input.enterKey(state.key)),state.optional){let tag=null;if(null!==state.explicit?tag=state.explicit:null!==state.implicit?tag=state.implicit:null!==state.tag&&(tag=state.tag),null!==tag||state.any){if(present=this._peekTag(input,tag,state.any),input.isError(present))return present}else{const save=input.save();try{null===state.choice?this._decodeGeneric(state.tag,input,options):this._decodeChoice(input,options),present=!0}catch(e){present=!1}input.restore(save)}}if(state.obj&&present&&(prevObj=input.enterObject()),present){if(null!==state.explicit){const explicit=this._decodeTag(input,state.explicit);if(input.isError(explicit))return explicit;input=explicit}const start=input.offset;if(null===state.use&&null===state.choice){let save;state.any&&(save=input.save());const body=this._decodeTag(input,null!==state.implicit?state.implicit:state.tag,state.any);if(input.isError(body))return body;state.any?result=input.raw(save):input=body}if(options&&options.track&&null!==state.tag&&options.track(input.path(),start,input.length,"tagged"),options&&options.track&&null!==state.tag&&options.track(input.path(),input.offset,input.length,"content"),state.any||(result=null===state.choice?this._decodeGeneric(state.tag,input,options):this._decodeChoice(input,options)),input.isError(result))return result;if(state.any||null!==state.choice||null===state.children||state.children.forEach((function decodeChildren(child){child._decode(input,options)})),state.contains&&("octstr"===state.tag||"bitstr"===state.tag)){const data=new DecoderBuffer(result);result=this._getUse(state.contains,input._reporterState.obj)._decode(data,options)}}return state.obj&&present&&(result=input.leaveObject(prevObj)),null===state.key||null===result&&!0!==present?null!==prevKey&&input.exitKey(prevKey):input.leaveKey(prevKey,state.key,result),result},Node.prototype._decodeGeneric=function decodeGeneric(tag,input,options){const state=this._baseState;return"seq"===tag||"set"===tag?null:"seqof"===tag||"setof"===tag?this._decodeList(input,tag,state.args[0],options):/str$/.test(tag)?this._decodeStr(input,tag,options):"objid"===tag&&state.args?this._decodeObjid(input,state.args[0],state.args[1],options):"objid"===tag?this._decodeObjid(input,null,null,options):"gentime"===tag||"utctime"===tag?this._decodeTime(input,tag,options):"null_"===tag?this._decodeNull(input,options):"bool"===tag?this._decodeBool(input,options):"objDesc"===tag?this._decodeStr(input,tag,options):"int"===tag||"enum"===tag?this._decodeInt(input,state.args&&state.args[0],options):null!==state.use?this._getUse(state.use,input._reporterState.obj)._decode(input,options):input.error("unknown tag: "+tag)},Node.prototype._getUse=function _getUse(entity,obj){const state=this._baseState;return state.useDecoder=this._use(entity,obj),assert(null===state.useDecoder._baseState.parent),state.useDecoder=state.useDecoder._baseState.children[0],state.implicit!==state.useDecoder._baseState.implicit&&(state.useDecoder=state.useDecoder.clone(),state.useDecoder._baseState.implicit=state.implicit),state.useDecoder},Node.prototype._decodeChoice=function decodeChoice(input,options){const state=this._baseState;let result=null,match=!1;return Object.keys(state.choice).some((function(key){const save=input.save(),node=state.choice[key];try{const value=node._decode(input,options);if(input.isError(value))return!1;result={type:key,value},match=!0}catch(e){return input.restore(save),!1}return!0}),this),match?result:input.error("Choice not matched")},Node.prototype._createEncoderBuffer=function createEncoderBuffer(data){return new EncoderBuffer(data,this.reporter)},Node.prototype._encode=function encode(data,reporter,parent){const state=this._baseState;if(null!==state.default&&state.default===data)return;const result=this._encodeValue(data,reporter,parent);return void 0===result||this._skipDefault(result,reporter,parent)?void 0:result},Node.prototype._encodeValue=function encode(data,reporter,parent){const state=this._baseState;if(null===state.parent)return state.children[0]._encode(data,reporter||new Reporter);let result=null;if(this.reporter=reporter,state.optional&&void 0===data){if(null===state.default)return;data=state.default}let content=null,primitive=!1;if(state.any)result=this._createEncoderBuffer(data);else if(state.choice)result=this._encodeChoice(data,reporter);else if(state.contains)content=this._getUse(state.contains,parent)._encode(data,reporter),primitive=!0;else if(state.children)content=state.children.map((function(child){if("null_"===child._baseState.tag)return child._encode(null,reporter,data);if(null===child._baseState.key)return reporter.error("Child should have a key");const prevKey=reporter.enterKey(child._baseState.key);if("object"!=typeof data)return reporter.error("Child expected, but input is not object");const res=child._encode(data[child._baseState.key],reporter,data);return reporter.leaveKey(prevKey),res}),this).filter((function(child){return child})),content=this._createEncoderBuffer(content);else if("seqof"===state.tag||"setof"===state.tag){if(!state.args||1!==state.args.length)return reporter.error("Too many args for : "+state.tag);if(!Array.isArray(data))return reporter.error("seqof/setof, but data is not Array");const child=this.clone();child._baseState.implicit=null,content=this._createEncoderBuffer(data.map((function(item){const state=this._baseState;return this._getUse(state.args[0],data)._encode(item,reporter)}),child))}else null!==state.use?result=this._getUse(state.use,parent)._encode(data,reporter):(content=this._encodePrimitive(state.tag,data),primitive=!0);if(!state.any&&null===state.choice){const tag=null!==state.implicit?state.implicit:state.tag,cls=null===state.implicit?"universal":"context";null===tag?null===state.use&&reporter.error("Tag could be omitted only for .use()"):null===state.use&&(result=this._encodeComposite(tag,primitive,cls,content))}return null!==state.explicit&&(result=this._encodeComposite(state.explicit,!1,"context",result)),result},Node.prototype._encodeChoice=function encodeChoice(data,reporter){const state=this._baseState,node=state.choice[data.type];return node||assert(!1,data.type+" not found in "+JSON.stringify(Object.keys(state.choice))),node._encode(data.value,reporter)},Node.prototype._encodePrimitive=function encodePrimitive(tag,data){const state=this._baseState;if(/str$/.test(tag))return this._encodeStr(data,tag);if("objid"===tag&&state.args)return this._encodeObjid(data,state.reverseArgs[0],state.args[1]);if("objid"===tag)return this._encodeObjid(data,null,null);if("gentime"===tag||"utctime"===tag)return this._encodeTime(data,tag);if("null_"===tag)return this._encodeNull();if("int"===tag||"enum"===tag)return this._encodeInt(data,state.args&&state.reverseArgs[0]);if("bool"===tag)return this._encodeBool(data);if("objDesc"===tag)return this._encodeStr(data,tag);throw new Error("Unsupported tag: "+tag)},Node.prototype._isNumstr=function isNumstr(str){return/^[0-9 ]*$/.test(str)},Node.prototype._isPrintstr=function isPrintstr(str){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(str)}},8465:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";const inherits=__webpack_require__(5717);function Reporter(options){this._reporterState={obj:null,path:[],options:options||{},errors:[]}}function ReporterError(path,msg){this.path=path,this.rethrow(msg)}exports.b=Reporter,Reporter.prototype.isError=function isError(obj){return obj instanceof ReporterError},Reporter.prototype.save=function save(){const state=this._reporterState;return{obj:state.obj,pathLen:state.path.length}},Reporter.prototype.restore=function restore(data){const state=this._reporterState;state.obj=data.obj,state.path=state.path.slice(0,data.pathLen)},Reporter.prototype.enterKey=function enterKey(key){return this._reporterState.path.push(key)},Reporter.prototype.exitKey=function exitKey(index){const state=this._reporterState;state.path=state.path.slice(0,index-1)},Reporter.prototype.leaveKey=function leaveKey(index,key,value){const state=this._reporterState;this.exitKey(index),null!==state.obj&&(state.obj[key]=value)},Reporter.prototype.path=function path(){return this._reporterState.path.join("/")},Reporter.prototype.enterObject=function enterObject(){const state=this._reporterState,prev=state.obj;return state.obj={},prev},Reporter.prototype.leaveObject=function leaveObject(prev){const state=this._reporterState,now=state.obj;return state.obj=prev,now},Reporter.prototype.error=function error(msg){let err;const state=this._reporterState,inherited=msg instanceof ReporterError;if(err=inherited?msg:new ReporterError(state.path.map((function(elem){return"["+JSON.stringify(elem)+"]"})).join(""),msg.message||msg,msg.stack),!state.options.partial)throw err;return inherited||state.errors.push(err),err},Reporter.prototype.wrapResult=function wrapResult(result){const state=this._reporterState;return state.options.partial?{result:this.isError(result)?null:result,errors:state.errors}:result},inherits(ReporterError,Error),ReporterError.prototype.rethrow=function rethrow(msg){if(this.message=msg+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,ReporterError),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},160:(__unused_webpack_module,exports)=>{"use strict";function reverse(map){const res={};return Object.keys(map).forEach((function(key){(0|key)==key&&(key|=0);const value=map[key];res[value]=key})),res}exports.tagClass={0:"universal",1:"application",2:"context",3:"private"},exports.tagClassByName=reverse(exports.tagClass),exports.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"},exports.tagByName=reverse(exports.tag)},6826:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";const constants=exports;constants._reverse=function reverse(map){const res={};return Object.keys(map).forEach((function(key){(0|key)==key&&(key|=0);const value=map[key];res[value]=key})),res},constants.der=__webpack_require__(160)},1671:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";const inherits=__webpack_require__(5717),bignum=__webpack_require__(4590),DecoderBuffer=__webpack_require__(6625).C,Node=__webpack_require__(1949),der=__webpack_require__(160);function DERDecoder(entity){this.enc="der",this.name=entity.name,this.entity=entity,this.tree=new DERNode,this.tree._init(entity.body)}function DERNode(parent){Node.call(this,"der",parent)}function derDecodeTag(buf,fail){let tag=buf.readUInt8(fail);if(buf.isError(tag))return tag;const cls=der.tagClass[tag>>6],primitive=0==(32&tag);if(31==(31&tag)){let oct=tag;for(tag=0;128==(128&oct);){if(oct=buf.readUInt8(fail),buf.isError(oct))return oct;tag<<=7,tag|=127&oct}}else tag&=31;return{cls,primitive,tag,tagStr:der.tag[tag]}}function derDecodeLen(buf,primitive,fail){let len=buf.readUInt8(fail);if(buf.isError(len))return len;if(!primitive&&128===len)return null;if(0==(128&len))return len;const num=127&len;if(num>4)return buf.error("length octect is too long");len=0;for(let i=0;i<num;i++){len<<=8;const j=buf.readUInt8(fail);if(buf.isError(j))return j;len|=j}return len}module.exports=DERDecoder,DERDecoder.prototype.decode=function decode(data,options){return DecoderBuffer.isDecoderBuffer(data)||(data=new DecoderBuffer(data,options)),this.tree._decode(data,options)},inherits(DERNode,Node),DERNode.prototype._peekTag=function peekTag(buffer,tag,any){if(buffer.isEmpty())return!1;const state=buffer.save(),decodedTag=derDecodeTag(buffer,'Failed to peek tag: "'+tag+'"');return buffer.isError(decodedTag)?decodedTag:(buffer.restore(state),decodedTag.tag===tag||decodedTag.tagStr===tag||decodedTag.tagStr+"of"===tag||any)},DERNode.prototype._decodeTag=function decodeTag(buffer,tag,any){const decodedTag=derDecodeTag(buffer,'Failed to decode tag of "'+tag+'"');if(buffer.isError(decodedTag))return decodedTag;let len=derDecodeLen(buffer,decodedTag.primitive,'Failed to get length of "'+tag+'"');if(buffer.isError(len))return len;if(!any&&decodedTag.tag!==tag&&decodedTag.tagStr!==tag&&decodedTag.tagStr+"of"!==tag)return buffer.error('Failed to match tag: "'+tag+'"');if(decodedTag.primitive||null!==len)return buffer.skip(len,'Failed to match body of: "'+tag+'"');const state=buffer.save(),res=this._skipUntilEnd(buffer,'Failed to skip indefinite length body: "'+this.tag+'"');return buffer.isError(res)?res:(len=buffer.offset-state.offset,buffer.restore(state),buffer.skip(len,'Failed to match body of: "'+tag+'"'))},DERNode.prototype._skipUntilEnd=function skipUntilEnd(buffer,fail){for(;;){const tag=derDecodeTag(buffer,fail);if(buffer.isError(tag))return tag;const len=derDecodeLen(buffer,tag.primitive,fail);if(buffer.isError(len))return len;let res;if(res=tag.primitive||null!==len?buffer.skip(len):this._skipUntilEnd(buffer,fail),buffer.isError(res))return res;if("end"===tag.tagStr)break}},DERNode.prototype._decodeList=function decodeList(buffer,tag,decoder,options){const result=[];for(;!buffer.isEmpty();){const possibleEnd=this._peekTag(buffer,"end");if(buffer.isError(possibleEnd))return possibleEnd;const res=decoder.decode(buffer,"der",options);if(buffer.isError(res)&&possibleEnd)break;result.push(res)}return result},DERNode.prototype._decodeStr=function decodeStr(buffer,tag){if("bitstr"===tag){const unused=buffer.readUInt8();return buffer.isError(unused)?unused:{unused,data:buffer.raw()}}if("bmpstr"===tag){const raw=buffer.raw();if(raw.length%2==1)return buffer.error("Decoding of string type: bmpstr length mismatch");let str="";for(let i=0;i<raw.length/2;i++)str+=String.fromCharCode(raw.readUInt16BE(2*i));return str}if("numstr"===tag){const numstr=buffer.raw().toString("ascii");return this._isNumstr(numstr)?numstr:buffer.error("Decoding of string type: numstr unsupported characters")}if("octstr"===tag)return buffer.raw();if("objDesc"===tag)return buffer.raw();if("printstr"===tag){const printstr=buffer.raw().toString("ascii");return this._isPrintstr(printstr)?printstr:buffer.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(tag)?buffer.raw().toString():buffer.error("Decoding of string type: "+tag+" unsupported")},DERNode.prototype._decodeObjid=function decodeObjid(buffer,values,relative){let result;const identifiers=[];let ident=0,subident=0;for(;!buffer.isEmpty();)subident=buffer.readUInt8(),ident<<=7,ident|=127&subident,0==(128&subident)&&(identifiers.push(ident),ident=0);128&subident&&identifiers.push(ident);const first=identifiers[0]/40|0,second=identifiers[0]%40;if(result=relative?identifiers:[first,second].concat(identifiers.slice(1)),values){let tmp=values[result.join(" ")];void 0===tmp&&(tmp=values[result.join(".")]),void 0!==tmp&&(result=tmp)}return result},DERNode.prototype._decodeTime=function decodeTime(buffer,tag){const str=buffer.raw().toString();let year,mon,day,hour,min,sec;if("gentime"===tag)year=0|str.slice(0,4),mon=0|str.slice(4,6),day=0|str.slice(6,8),hour=0|str.slice(8,10),min=0|str.slice(10,12),sec=0|str.slice(12,14);else{if("utctime"!==tag)return buffer.error("Decoding "+tag+" time is not supported yet");year=0|str.slice(0,2),mon=0|str.slice(2,4),day=0|str.slice(4,6),hour=0|str.slice(6,8),min=0|str.slice(8,10),sec=0|str.slice(10,12),year=year<70?2e3+year:1900+year}return Date.UTC(year,mon-1,day,hour,min,sec,0)},DERNode.prototype._decodeNull=function decodeNull(){return null},DERNode.prototype._decodeBool=function decodeBool(buffer){const res=buffer.readUInt8();return buffer.isError(res)?res:0!==res},DERNode.prototype._decodeInt=function decodeInt(buffer,values){const raw=buffer.raw();let res=new bignum(raw);return values&&(res=values[res.toString(10)]||res),res},DERNode.prototype._use=function use(entity,obj){return"function"==typeof entity&&(entity=entity(obj)),entity._getDecoder("der").tree}},8307:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";const decoders=exports;decoders.der=__webpack_require__(1671),decoders.pem=__webpack_require__(9631)},9631:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";const inherits=__webpack_require__(5717),Buffer=__webpack_require__(2399).Buffer,DERDecoder=__webpack_require__(1671);function PEMDecoder(entity){DERDecoder.call(this,entity),this.enc="pem"}inherits(PEMDecoder,DERDecoder),module.exports=PEMDecoder,PEMDecoder.prototype.decode=function decode(data,options){const lines=data.toString().split(/[\r\n]+/g),label=options.label.toUpperCase(),re=/^-----(BEGIN|END) ([^-]+)-----$/;let start=-1,end=-1;for(let i=0;i<lines.length;i++){const match=lines[i].match(re);if(null!==match&&match[2]===label){if(-1!==start){if("END"!==match[1])break;end=i;break}if("BEGIN"!==match[1])break;start=i}}if(-1===start||-1===end)throw new Error("PEM section not found for: "+label);const base64=lines.slice(start+1,end).join("");base64.replace(/[^a-z0-9+/=]+/gi,"");const input=Buffer.from(base64,"base64");return DERDecoder.prototype.decode.call(this,input,options)}},6984:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";const inherits=__webpack_require__(5717),Buffer=__webpack_require__(2399).Buffer,Node=__webpack_require__(1949),der=__webpack_require__(160);function DEREncoder(entity){this.enc="der",this.name=entity.name,this.entity=entity,this.tree=new DERNode,this.tree._init(entity.body)}function DERNode(parent){Node.call(this,"der",parent)}function two(num){return num<10?"0"+num:num}module.exports=DEREncoder,DEREncoder.prototype.encode=function encode(data,reporter){return this.tree._encode(data,reporter).join()},inherits(DERNode,Node),DERNode.prototype._encodeComposite=function encodeComposite(tag,primitive,cls,content){const encodedTag=function encodeTag(tag,primitive,cls,reporter){let res;"seqof"===tag?tag="seq":"setof"===tag&&(tag="set");if(der.tagByName.hasOwnProperty(tag))res=der.tagByName[tag];else{if("number"!=typeof tag||(0|tag)!==tag)return reporter.error("Unknown tag: "+tag);res=tag}if(res>=31)return reporter.error("Multi-octet tag encoding unsupported");primitive||(res|=32);return res|=der.tagClassByName[cls||"universal"]<<6,res}(tag,primitive,cls,this.reporter);if(content.length<128){const header=Buffer.alloc(2);return header[0]=encodedTag,header[1]=content.length,this._createEncoderBuffer([header,content])}let lenOctets=1;for(let i=content.length;i>=256;i>>=8)lenOctets++;const header=Buffer.alloc(2+lenOctets);header[0]=encodedTag,header[1]=128|lenOctets;for(let i=1+lenOctets,j=content.length;j>0;i--,j>>=8)header[i]=255&j;return this._createEncoderBuffer([header,content])},DERNode.prototype._encodeStr=function encodeStr(str,tag){if("bitstr"===tag)return this._createEncoderBuffer([0|str.unused,str.data]);if("bmpstr"===tag){const buf=Buffer.alloc(2*str.length);for(let i=0;i<str.length;i++)buf.writeUInt16BE(str.charCodeAt(i),2*i);return this._createEncoderBuffer(buf)}return"numstr"===tag?this._isNumstr(str)?this._createEncoderBuffer(str):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===tag?this._isPrintstr(str)?this._createEncoderBuffer(str):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(tag)||"objDesc"===tag?this._createEncoderBuffer(str):this.reporter.error("Encoding of string type: "+tag+" unsupported")},DERNode.prototype._encodeObjid=function encodeObjid(id,values,relative){if("string"==typeof id){if(!values)return this.reporter.error("string objid given, but no values map found");if(!values.hasOwnProperty(id))return this.reporter.error("objid not found in values map");id=values[id].split(/[\s.]+/g);for(let i=0;i<id.length;i++)id[i]|=0}else if(Array.isArray(id)){id=id.slice();for(let i=0;i<id.length;i++)id[i]|=0}if(!Array.isArray(id))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(id));if(!relative){if(id[1]>=40)return this.reporter.error("Second objid identifier OOB");id.splice(0,2,40*id[0]+id[1])}let size=0;for(let i=0;i<id.length;i++){let ident=id[i];for(size++;ident>=128;ident>>=7)size++}const objid=Buffer.alloc(size);let offset=objid.length-1;for(let i=id.length-1;i>=0;i--){let ident=id[i];for(objid[offset--]=127&ident;(ident>>=7)>0;)objid[offset--]=128|127&ident}return this._createEncoderBuffer(objid)},DERNode.prototype._encodeTime=function encodeTime(time,tag){let str;const date=new Date(time);return"gentime"===tag?str=[two(date.getUTCFullYear()),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join(""):"utctime"===tag?str=[two(date.getUTCFullYear()%100),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+tag+" time is not supported yet"),this._encodeStr(str,"octstr")},DERNode.prototype._encodeNull=function encodeNull(){return this._createEncoderBuffer("")},DERNode.prototype._encodeInt=function encodeInt(num,values){if("string"==typeof num){if(!values)return this.reporter.error("String int or enum given, but no values map");if(!values.hasOwnProperty(num))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(num));num=values[num]}if("number"!=typeof num&&!Buffer.isBuffer(num)){const numArray=num.toArray();!num.sign&&128&numArray[0]&&numArray.unshift(0),num=Buffer.from(numArray)}if(Buffer.isBuffer(num)){let size=num.length;0===num.length&&size++;const out=Buffer.alloc(size);return num.copy(out),0===num.length&&(out[0]=0),this._createEncoderBuffer(out)}if(num<128)return this._createEncoderBuffer(num);if(num<256)return this._createEncoderBuffer([0,num]);let size=1;for(let i=num;i>=256;i>>=8)size++;const out=new Array(size);for(let i=out.length-1;i>=0;i--)out[i]=255&num,num>>=8;return 128&out[0]&&out.unshift(0),this._createEncoderBuffer(Buffer.from(out))},DERNode.prototype._encodeBool=function encodeBool(value){return this._createEncoderBuffer(value?255:0)},DERNode.prototype._use=function use(entity,obj){return"function"==typeof entity&&(entity=entity(obj)),entity._getEncoder("der").tree},DERNode.prototype._skipDefault=function skipDefault(dataBuffer,reporter,parent){const state=this._baseState;let i;if(null===state.default)return!1;const data=dataBuffer.join();if(void 0===state.defaultBuffer&&(state.defaultBuffer=this._encodeValue(state.default,reporter,parent).join()),data.length!==state.defaultBuffer.length)return!1;for(i=0;i<data.length;i++)if(data[i]!==state.defaultBuffer[i])return!1;return!0}},6579:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";const encoders=exports;encoders.der=__webpack_require__(6984),encoders.pem=__webpack_require__(2883)},2883:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";const inherits=__webpack_require__(5717),DEREncoder=__webpack_require__(6984);function PEMEncoder(entity){DEREncoder.call(this,entity),this.enc="pem"}inherits(PEMEncoder,DEREncoder),module.exports=PEMEncoder,PEMEncoder.prototype.encode=function encode(data,options){const p=DEREncoder.prototype.encode.call(this,data).toString("base64"),out=["-----BEGIN "+options.label+"-----"];for(let i=0;i<p.length;i+=64)out.push(p.slice(i,i+64));return out.push("-----END "+options.label+"-----"),out.join("\n")}},4590:function(module,__unused_webpack_exports,__webpack_require__){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}var Buffer;"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;try{Buffer="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:__webpack_require__(950).Buffer}catch(e){}function parseHex4Bits(string,index){var c=string.charCodeAt(index);return c>=65&&c<=70?c-55:c>=97&&c<=102?c-87:c-48&15}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);return index-1>=lowerBound&&(r|=parseHex4Bits(string,index-1)<<4),r}function parseBase(str,start,end,mul){for(var r=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul,r+=c>=49?c-49+10:c>=17?c-17+10:c}return r}BN.isBN=function isBN(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function max(left,right){return left.cmp(right)>0?left:right},BN.min=function min(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function init(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&(start++,this.negative=1),start<number.length&&(16===base?this._parseHex(number,start,endian):(this._parseBase(number,base,start),"le"===endian&&this._initArray(this.toArray(),base,endian)))},BN.prototype._initNumber=function _initNumber(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function _initArray(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this.strip()},BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var w,off=0,j=0;if("be"===endian)for(i=number.length-1;i>=start;i-=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;else for(i=(number.length-start)%2==0?start+1:start;i<number.length;i+=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;this.strip()},BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}this.strip()},BN.prototype.copy=function copy(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype.clone=function clone(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function _expand(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype.strip=function strip(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var zeros=["","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"],groupSizes=[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],groupBases=[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 smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){for(var ncarry=carry>>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out.strip()}BN.prototype.toString=function toString(base,padding){var out;if(padding=0|padding||1,16===(base=base||10)||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);out=0!==(carry=w>>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function toJSON(){return this.toString(16)},BN.prototype.toBuffer=function toBuffer(endian,length){return assert(void 0!==Buffer),this.toArrayLike(Buffer,endian,length)},BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)},BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0"),this.strip();var b,i,littleEndian="le"===endian,res=new ArrayType(reqLength),q=this.clone();if(littleEndian){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[i]=b;for(;i<reqLength;i++)res[i]=0}else{for(i=0;i<reqLength-byteLength;i++)res[i]=0;for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[reqLength-i-1]=b}return res},Math.clz32?BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function _countBits(w){var t=w,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},BN.prototype._zeroBits=function _zeroBits(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function toTwos(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function fromTwos(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function isNeg(){return 0!==this.negative},BN.prototype.neg=function neg(){return this.clone().ineg()},BN.prototype.ineg=function ineg(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function iuor(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this.strip()},BN.prototype.ior=function ior(num){return assert(0==(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function or(num){return this.length>num.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function uor(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function iuand(num){var b;b=this.length>num.length?num:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this.strip()},BN.prototype.iand=function iand(num){return assert(0==(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function and(num){return this.length>num.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function uand(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function iuxor(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this.strip()},BN.prototype.ixor=function ixor(num){return assert(0==(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function xor(num){return this.length>num.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function uxor(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function inotn(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this.strip()},BN.prototype.notn=function notn(width){return this.clone().inotn(width)},BN.prototype.setn=function setn(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<<wbit:this.words[off]&~(1<<wbit),this.strip()},BN.prototype.iadd=function iadd(num){var r,a,b;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function add(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function isub(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)carry=(r=(0|a.words[i])-(0|b.words[i])+carry)>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)carry=(r=(0|a.words[i])+carry)>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this.strip()},BN.prototype.sub=function sub(num){return this.clone().isub(num)};var comb10MulTo=function comb10MulTo(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function jumboMulTo(self,num,out){return(new FFTM).mulp(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function mulTo(num,out){var res,len=this.length+num.length;return res=10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j,r=(0|self.words[i])*(0|num.words[j]),lo=67108863&r;rword=67108863&(lo=lo+rword|0),hncarry+=(ncarry=(ncarry=ncarry+(r/67108864|0)|0)+(lo>>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out.strip()}(this,num,out):jumboMulTo(this,num,out),res},FFTM.prototype.makeRBT=function makeRBT(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function revBin(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function transform(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function guessLen13b(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function conjugate(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function normalize13b(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function convert13b(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0==(-8192&carry))},FFTM.prototype.stub=function stub(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function mulp(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out.strip()},BN.prototype.mul=function mul(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function mulf(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function imuln(num){assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.muln=function muln(num){return this.clone().imuln(num)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(num){var w=function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=(num.words[off]&1<<wbit)>>>wbit}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function iushln(bits){assert("number"==typeof bits&&bits>=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this.strip()},BN.prototype.ishln=function ishln(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function iushrn(bits,hint,extended){var h;assert("number"==typeof bits&&bits>=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;i>=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function ishrn(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function testn(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<<r;return!(this.length<=s)&&!!(this.words[s]&q)},BN.prototype.imaskn=function imaskn(bits){assert("number"==typeof bits&&bits>=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this.strip()},BN.prototype.maskn=function maskn(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function iaddn(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function _iaddn(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},BN.prototype.addn=function addn(num){return this.clone().iaddn(num)},BN.prototype.subn=function subn(num){return this.clone().isubn(num)},BN.prototype.iabs=function iabs(){return this.negative=0,this},BN.prototype.abs=function abs(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function _ishlnsubmul(num,mul,shift){var i,w,len=num.length+shift;this._expand(len);var carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;carry=((w-=67108863&right)>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)carry=(w=(0|this.words[i+shift])+carry)>>26,this.words[i+shift]=67108863&w;if(0===carry)return this.strip();for(assert(-1===carry),carry=0,i=0;i<this.length;i++)carry=(w=-(0|this.words[i])+carry)>>26,this.words[i]=67108863&w;return this.negative=1,this.strip()},BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q.strip(),a.strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function divmod(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div,mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function div(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function mod(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function umod(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modn=function modn(num){assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return acc},BN.prototype.idivn=function idivn(num){assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this.strip()},BN.prototype.divn=function divn(num){return this.clone().idivn(num)},BN.prototype.egcd=function egcd(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function _invmp(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(num){return this.words[0]&num},BN.prototype.bincn=function bincn(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];carry=(w+=carry)>>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this.strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function cmp(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function ucmp(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(res=1);break}}return res},BN.prototype.gtn=function gtn(num){return 1===this.cmpn(num)},BN.prototype.gt=function gt(num){return 1===this.cmp(num)},BN.prototype.gten=function gten(num){return this.cmpn(num)>=0},BN.prototype.gte=function gte(num){return this.cmp(num)>=0},BN.prototype.ltn=function ltn(num){return-1===this.cmpn(num)},BN.prototype.lt=function lt(num){return-1===this.cmp(num)},BN.prototype.lten=function lten(num){return this.cmpn(num)<=0},BN.prototype.lte=function lte(num){return this.cmp(num)<=0},BN.prototype.eqn=function eqn(num){return 0===this.cmpn(num)},BN.prototype.eq=function eq(num){return 0===this.cmp(num)},BN.red=function red(num){return new Red(num)},BN.prototype.toRed=function toRed(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(ctx){return this.red=ctx,this},BN.prototype.forceRed=function forceRed(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function redAdd(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function redIAdd(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function redSub(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function redISub(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function redShl(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function redMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function redIMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function ireduce(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(input,output){for(var outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(4194303&next)<<4|prev>>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function imulK(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function imulK(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function _verify1(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function imod(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},Red.prototype.neg=function neg(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function shl(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function imul(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function mul(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())},Red.prototype.sqr=function sqr(a){return this.mul(a,a)},Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function invm(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function pow(a,num){if(num.isZero())return new BN(1).toRed(this);if(0===num.cmpn(1))return a.clone();var wnd=new Array(16);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;i>=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();return res.red=null,res},BN.mont=function mont(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function invm(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(module=__webpack_require__.nmd(module),this)},9282:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(obj){return typeof obj}:function _typeof(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}var isDeepEqual,isDeepStrictEqual,_require$codes=__webpack_require__(2136).codes,ERR_AMBIGUOUS_ARGUMENT=_require$codes.ERR_AMBIGUOUS_ARGUMENT,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_INVALID_ARG_VALUE=_require$codes.ERR_INVALID_ARG_VALUE,ERR_INVALID_RETURN_VALUE=_require$codes.ERR_INVALID_RETURN_VALUE,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,AssertionError=__webpack_require__(5961),inspect=__webpack_require__(9539).inspect,_require$types=__webpack_require__(9539).types,isPromise=_require$types.isPromise,isRegExp=_require$types.isRegExp,objectAssign=Object.assign?Object.assign:__webpack_require__(8091).assign,objectIs=Object.is?Object.is:__webpack_require__(609);new Map;function lazyLoadComparison(){var comparison=__webpack_require__(9158);isDeepEqual=comparison.isDeepEqual,isDeepStrictEqual=comparison.isDeepStrictEqual}var warned=!1,assert=module.exports=ok,NO_EXCEPTION_SENTINEL={};function innerFail(obj){if(obj.message instanceof Error)throw obj.message;throw new AssertionError(obj)}function innerOk(fn,argLen,value,message){if(!value){var generatedMessage=!1;if(0===argLen)generatedMessage=!0,message="No value argument passed to `assert.ok()`";else if(message instanceof Error)throw message;var err=new AssertionError({actual:value,expected:!0,message,operator:"==",stackStartFn:fn});throw err.generatedMessage=generatedMessage,err}}function ok(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];innerOk.apply(void 0,[ok,args.length].concat(args))}assert.fail=function fail(actual,expected,message,operator,stackStartFn){var internalMessage,argsLen=arguments.length;if(0===argsLen)internalMessage="Failed";else if(1===argsLen)message=actual,actual=void 0;else{if(!1===warned){warned=!0;var warn=process.emitWarning?process.emitWarning:console.warn.bind(console);warn("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===argsLen&&(operator="!=")}if(message instanceof Error)throw message;var errArgs={actual,expected,operator:void 0===operator?"fail":operator,stackStartFn:stackStartFn||fail};void 0!==message&&(errArgs.message=message);var err=new AssertionError(errArgs);throw internalMessage&&(err.message=internalMessage,err.generatedMessage=!0),err},assert.AssertionError=AssertionError,assert.ok=ok,assert.equal=function equal(actual,expected,message){if(arguments.length<2)throw new ERR_MISSING_ARGS("actual","expected");actual!=expected&&innerFail({actual,expected,message,operator:"==",stackStartFn:equal})},assert.notEqual=function notEqual(actual,expected,message){if(arguments.length<2)throw new ERR_MISSING_ARGS("actual","expected");actual==expected&&innerFail({actual,expected,message,operator:"!=",stackStartFn:notEqual})},assert.deepEqual=function deepEqual(actual,expected,message){if(arguments.length<2)throw new ERR_MISSING_ARGS("actual","expected");void 0===isDeepEqual&&lazyLoadComparison(),isDeepEqual(actual,expected)||innerFail({actual,expected,message,operator:"deepEqual",stackStartFn:deepEqual})},assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(arguments.length<2)throw new ERR_MISSING_ARGS("actual","expected");void 0===isDeepEqual&&lazyLoadComparison(),isDeepEqual(actual,expected)&&innerFail({actual,expected,message,operator:"notDeepEqual",stackStartFn:notDeepEqual})},assert.deepStrictEqual=function deepStrictEqual(actual,expected,message){if(arguments.length<2)throw new ERR_MISSING_ARGS("actual","expected");void 0===isDeepEqual&&lazyLoadComparison(),isDeepStrictEqual(actual,expected)||innerFail({actual,expected,message,operator:"deepStrictEqual",stackStartFn:deepStrictEqual})},assert.notDeepStrictEqual=function notDeepStrictEqual(actual,expected,message){if(arguments.length<2)throw new ERR_MISSING_ARGS("actual","expected");void 0===isDeepEqual&&lazyLoadComparison();isDeepStrictEqual(actual,expected)&&innerFail({actual,expected,message,operator:"notDeepStrictEqual",stackStartFn:notDeepStrictEqual})},assert.strictEqual=function strictEqual(actual,expected,message){if(arguments.length<2)throw new ERR_MISSING_ARGS("actual","expected");objectIs(actual,expected)||innerFail({actual,expected,message,operator:"strictEqual",stackStartFn:strictEqual})},assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(arguments.length<2)throw new ERR_MISSING_ARGS("actual","expected");objectIs(actual,expected)&&innerFail({actual,expected,message,operator:"notStrictEqual",stackStartFn:notStrictEqual})};var Comparison=function Comparison(obj,keys,actual){var _this=this;!function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Comparison),keys.forEach((function(key){key in obj&&(void 0!==actual&&"string"==typeof actual[key]&&isRegExp(obj[key])&&obj[key].test(actual[key])?_this[key]=actual[key]:_this[key]=obj[key])}))};function compareExceptionKey(actual,expected,key,message,keys,fn){if(!(key in actual)||!isDeepStrictEqual(actual[key],expected[key])){if(!message){var a=new Comparison(actual,keys),b=new Comparison(expected,keys,actual),err=new AssertionError({actual:a,expected:b,operator:"deepStrictEqual",stackStartFn:fn});throw err.actual=actual,err.expected=expected,err.operator=fn.name,err}innerFail({actual,expected,message,operator:fn.name,stackStartFn:fn})}}function expectedException(actual,expected,msg,fn){if("function"!=typeof expected){if(isRegExp(expected))return expected.test(actual);if(2===arguments.length)throw new ERR_INVALID_ARG_TYPE("expected",["Function","RegExp"],expected);if("object"!==_typeof(actual)||null===actual){var err=new AssertionError({actual,expected,message:msg,operator:"deepStrictEqual",stackStartFn:fn});throw err.operator=fn.name,err}var keys=Object.keys(expected);if(expected instanceof Error)keys.push("name","message");else if(0===keys.length)throw new ERR_INVALID_ARG_VALUE("error",expected,"may not be an empty object");return void 0===isDeepEqual&&lazyLoadComparison(),keys.forEach((function(key){"string"==typeof actual[key]&&isRegExp(expected[key])&&expected[key].test(actual[key])||compareExceptionKey(actual,expected,key,msg,keys,fn)})),!0}return void 0!==expected.prototype&&actual instanceof expected||!Error.isPrototypeOf(expected)&&!0===expected.call({},actual)}function getActual(fn){if("function"!=typeof fn)throw new ERR_INVALID_ARG_TYPE("fn","Function",fn);try{fn()}catch(e){return e}return NO_EXCEPTION_SENTINEL}function checkIsPromise(obj){return isPromise(obj)||null!==obj&&"object"===_typeof(obj)&&"function"==typeof obj.then&&"function"==typeof obj.catch}function waitForActual(promiseFn){return Promise.resolve().then((function(){var resultPromise;if("function"==typeof promiseFn){if(!checkIsPromise(resultPromise=promiseFn()))throw new ERR_INVALID_RETURN_VALUE("instance of Promise","promiseFn",resultPromise)}else{if(!checkIsPromise(promiseFn))throw new ERR_INVALID_ARG_TYPE("promiseFn",["Function","Promise"],promiseFn);resultPromise=promiseFn}return Promise.resolve().then((function(){return resultPromise})).then((function(){return NO_EXCEPTION_SENTINEL})).catch((function(e){return e}))}))}function expectsError(stackStartFn,actual,error,message){if("string"==typeof error){if(4===arguments.length)throw new ERR_INVALID_ARG_TYPE("error",["Object","Error","Function","RegExp"],error);if("object"===_typeof(actual)&&null!==actual){if(actual.message===error)throw new ERR_AMBIGUOUS_ARGUMENT("error/message",'The error message "'.concat(actual.message,'" is identical to the message.'))}else if(actual===error)throw new ERR_AMBIGUOUS_ARGUMENT("error/message",'The error "'.concat(actual,'" is identical to the message.'));message=error,error=void 0}else if(null!=error&&"object"!==_typeof(error)&&"function"!=typeof error)throw new ERR_INVALID_ARG_TYPE("error",["Object","Error","Function","RegExp"],error);if(actual===NO_EXCEPTION_SENTINEL){var details="";error&&error.name&&(details+=" (".concat(error.name,")")),details+=message?": ".concat(message):".";var fnType="rejects"===stackStartFn.name?"rejection":"exception";innerFail({actual:void 0,expected:error,operator:stackStartFn.name,message:"Missing expected ".concat(fnType).concat(details),stackStartFn})}if(error&&!expectedException(actual,error,message,stackStartFn))throw actual}function expectsNoError(stackStartFn,actual,error,message){if(actual!==NO_EXCEPTION_SENTINEL){if("string"==typeof error&&(message=error,error=void 0),!error||expectedException(actual,error)){var details=message?": ".concat(message):".",fnType="doesNotReject"===stackStartFn.name?"rejection":"exception";innerFail({actual,expected:error,operator:stackStartFn.name,message:"Got unwanted ".concat(fnType).concat(details,"\n")+'Actual message: "'.concat(actual&&actual.message,'"'),stackStartFn})}throw actual}}function strict(){for(var _len6=arguments.length,args=new Array(_len6),_key6=0;_key6<_len6;_key6++)args[_key6]=arguments[_key6];innerOk.apply(void 0,[strict,args.length].concat(args))}assert.throws=function throws(promiseFn){for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];expectsError.apply(void 0,[throws,getActual(promiseFn)].concat(args))},assert.rejects=function rejects(promiseFn){for(var _len3=arguments.length,args=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++)args[_key3-1]=arguments[_key3];return waitForActual(promiseFn).then((function(result){return expectsError.apply(void 0,[rejects,result].concat(args))}))},assert.doesNotThrow=function doesNotThrow(fn){for(var _len4=arguments.length,args=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++)args[_key4-1]=arguments[_key4];expectsNoError.apply(void 0,[doesNotThrow,getActual(fn)].concat(args))},assert.doesNotReject=function doesNotReject(fn){for(var _len5=arguments.length,args=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++)args[_key5-1]=arguments[_key5];return waitForActual(fn).then((function(result){return expectsNoError.apply(void 0,[doesNotReject,result].concat(args))}))},assert.ifError=function ifError(err){if(null!=err){var message="ifError got unwanted exception: ";"object"===_typeof(err)&&"string"==typeof err.message?0===err.message.length&&err.constructor?message+=err.constructor.name:message+=err.message:message+=inspect(err);var newErr=new AssertionError({actual:err,expected:null,operator:"ifError",message,stackStartFn:ifError}),origStack=err.stack;if("string"==typeof origStack){var tmp2=origStack.split("\n");tmp2.shift();for(var tmp1=newErr.stack.split("\n"),i=0;i<tmp2.length;i++){var pos=tmp1.indexOf(tmp2[i]);if(-1!==pos){tmp1=tmp1.slice(0,pos);break}}newErr.stack="".concat(tmp1.join("\n"),"\n").concat(tmp2.join("\n"))}throw newErr}},assert.strict=objectAssign(strict,assert,{equal:assert.strictEqual,deepEqual:assert.deepStrictEqual,notEqual:assert.notStrictEqual,notDeepEqual:assert.notDeepStrictEqual}),assert.strict.strict=assert.strict},5961:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _possibleConstructorReturn(self,call){return!call||"object"!==_typeof(call)&&"function"!=typeof call?_assertThisInitialized(self):call}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _wrapNativeSuper(Class){var _cache="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function _wrapNativeSuper(Class){if(null===Class||!function _isNativeFunction(fn){return-1!==Function.toString.call(fn).indexOf("[native code]")}(Class))return Class;if("function"!=typeof Class)throw new TypeError("Super expression must either be null or a function");if(void 0!==_cache){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,Class)},_wrapNativeSuper(Class)}function isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _construct(Parent,args,Class){return _construct=isNativeReflectConstruct()?Reflect.construct:function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var instance=new(Function.bind.apply(Parent,a));return Class&&_setPrototypeOf(instance,Class.prototype),instance},_construct.apply(null,arguments)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(obj){return typeof obj}:function _typeof(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}var inspect=__webpack_require__(9539).inspect,ERR_INVALID_ARG_TYPE=__webpack_require__(2136).codes.ERR_INVALID_ARG_TYPE;function endsWith(str,search,this_len){return(void 0===this_len||this_len>str.length)&&(this_len=str.length),str.substring(this_len-search.length,this_len)===search}var blue="",green="",red="",white="",kReadableOperator={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function copyError(source){var keys=Object.keys(source),target=Object.create(Object.getPrototypeOf(source));return keys.forEach((function(key){target[key]=source[key]})),Object.defineProperty(target,"message",{value:source.message}),target}function inspectValue(val){return inspect(val,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function createErrDiff(actual,expected,operator){var other="",res="",lastPos=0,end="",skipped=!1,actualInspected=inspectValue(actual),actualLines=actualInspected.split("\n"),expectedLines=inspectValue(expected).split("\n"),i=0,indicator="";if("strictEqual"===operator&&"object"===_typeof(actual)&&"object"===_typeof(expected)&&null!==actual&&null!==expected&&(operator="strictEqualObject"),1===actualLines.length&&1===expectedLines.length&&actualLines[0]!==expectedLines[0]){var inputLength=actualLines[0].length+expectedLines[0].length;if(inputLength<=10){if(!("object"===_typeof(actual)&&null!==actual||"object"===_typeof(expected)&&null!==expected||0===actual&&0===expected))return"".concat(kReadableOperator[operator],"\n\n")+"".concat(actualLines[0]," !== ").concat(expectedLines[0],"\n")}else if("strictEqualObject"!==operator){if(inputLength<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;actualLines[0][i]===expectedLines[0][i];)i++;i>2&&(indicator="\n  ".concat(function repeat(str,count){if(count=Math.floor(count),0==str.length||0==count)return"";var maxCount=str.length*count;for(count=Math.floor(Math.log(count)/Math.log(2));count;)str+=str,count--;return str+str.substring(0,maxCount-str.length)}(" ",i),"^"),i=0)}}}for(var a=actualLines[actualLines.length-1],b=expectedLines[expectedLines.length-1];a===b&&(i++<2?end="\n  ".concat(a).concat(end):other=a,actualLines.pop(),expectedLines.pop(),0!==actualLines.length&&0!==expectedLines.length);)a=actualLines[actualLines.length-1],b=expectedLines[expectedLines.length-1];var maxLines=Math.max(actualLines.length,expectedLines.length);if(0===maxLines){var _actualLines=actualInspected.split("\n");if(_actualLines.length>30)for(_actualLines[26]="".concat(blue,"...").concat(white);_actualLines.length>27;)_actualLines.pop();return"".concat(kReadableOperator.notIdentical,"\n\n").concat(_actualLines.join("\n"),"\n")}i>3&&(end="\n".concat(blue,"...").concat(white).concat(end),skipped=!0),""!==other&&(end="\n  ".concat(other).concat(end),other="");var printedLines=0,msg=kReadableOperator[operator]+"\n".concat(green,"+ actual").concat(white," ").concat(red,"- expected").concat(white),skippedMsg=" ".concat(blue,"...").concat(white," Lines skipped");for(i=0;i<maxLines;i++){var cur=i-lastPos;if(actualLines.length<i+1)cur>1&&i>2&&(cur>4?(res+="\n".concat(blue,"...").concat(white),skipped=!0):cur>3&&(res+="\n  ".concat(expectedLines[i-2]),printedLines++),res+="\n  ".concat(expectedLines[i-1]),printedLines++),lastPos=i,other+="\n".concat(red,"-").concat(white," ").concat(expectedLines[i]),printedLines++;else if(expectedLines.length<i+1)cur>1&&i>2&&(cur>4?(res+="\n".concat(blue,"...").concat(white),skipped=!0):cur>3&&(res+="\n  ".concat(actualLines[i-2]),printedLines++),res+="\n  ".concat(actualLines[i-1]),printedLines++),lastPos=i,res+="\n".concat(green,"+").concat(white," ").concat(actualLines[i]),printedLines++;else{var expectedLine=expectedLines[i],actualLine=actualLines[i],divergingLines=actualLine!==expectedLine&&(!endsWith(actualLine,",")||actualLine.slice(0,-1)!==expectedLine);divergingLines&&endsWith(expectedLine,",")&&expectedLine.slice(0,-1)===actualLine&&(divergingLines=!1,actualLine+=","),divergingLines?(cur>1&&i>2&&(cur>4?(res+="\n".concat(blue,"...").concat(white),skipped=!0):cur>3&&(res+="\n  ".concat(actualLines[i-2]),printedLines++),res+="\n  ".concat(actualLines[i-1]),printedLines++),lastPos=i,res+="\n".concat(green,"+").concat(white," ").concat(actualLine),other+="\n".concat(red,"-").concat(white," ").concat(expectedLine),printedLines+=2):(res+=other,other="",1!==cur&&0!==i||(res+="\n  ".concat(actualLine),printedLines++))}if(printedLines>20&&i<maxLines-2)return"".concat(msg).concat(skippedMsg,"\n").concat(res,"\n").concat(blue,"...").concat(white).concat(other,"\n")+"".concat(blue,"...").concat(white)}return"".concat(msg).concat(skipped?skippedMsg:"","\n").concat(res).concat(other).concat(end).concat(indicator)}var AssertionError=function(_Error){function AssertionError(options){var _this;if(function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AssertionError),"object"!==_typeof(options)||null===options)throw new ERR_INVALID_ARG_TYPE("options","Object",options);var message=options.message,operator=options.operator,stackStartFn=options.stackStartFn,actual=options.actual,expected=options.expected,limit=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=message)_this=_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,String(message)));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(blue="",green="",white="",red=""):(blue="",green="",white="",red="")),"object"===_typeof(actual)&&null!==actual&&"object"===_typeof(expected)&&null!==expected&&"stack"in actual&&actual instanceof Error&&"stack"in expected&&expected instanceof Error&&(actual=copyError(actual),expected=copyError(expected)),"deepStrictEqual"===operator||"strictEqual"===operator)_this=_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,createErrDiff(actual,expected,operator)));else if("notDeepStrictEqual"===operator||"notStrictEqual"===operator){var base=kReadableOperator[operator],res=inspectValue(actual).split("\n");if("notStrictEqual"===operator&&"object"===_typeof(actual)&&null!==actual&&(base=kReadableOperator.notStrictEqualObject),res.length>30)for(res[26]="".concat(blue,"...").concat(white);res.length>27;)res.pop();_this=1===res.length?_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,"".concat(base," ").concat(res[0]))):_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,"".concat(base,"\n\n").concat(res.join("\n"),"\n")))}else{var _res=inspectValue(actual),other="",knownOperators=kReadableOperator[operator];"notDeepEqual"===operator||"notEqual"===operator?(_res="".concat(kReadableOperator[operator],"\n\n").concat(_res)).length>1024&&(_res="".concat(_res.slice(0,1021),"...")):(other="".concat(inspectValue(expected)),_res.length>512&&(_res="".concat(_res.slice(0,509),"...")),other.length>512&&(other="".concat(other.slice(0,509),"...")),"deepEqual"===operator||"equal"===operator?_res="".concat(knownOperators,"\n\n").concat(_res,"\n\nshould equal\n\n"):other=" ".concat(operator," ").concat(other)),_this=_possibleConstructorReturn(this,_getPrototypeOf(AssertionError).call(this,"".concat(_res).concat(other)))}return Error.stackTraceLimit=limit,_this.generatedMessage=!message,Object.defineProperty(_assertThisInitialized(_this),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),_this.code="ERR_ASSERTION",_this.actual=actual,_this.expected=expected,_this.operator=operator,Error.captureStackTrace&&Error.captureStackTrace(_assertThisInitialized(_this),stackStartFn),_this.stack,_this.name="AssertionError",_possibleConstructorReturn(_this)}return function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_setPrototypeOf(subClass,superClass)}(AssertionError,_Error),function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}(AssertionError,[{key:"toString",value:function toString(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:inspect.custom,value:function value(recurseTimes,ctx){return inspect(this,function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter((function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable})))),ownKeys.forEach((function(key){_defineProperty(target,key,source[key])}))}return target}({},ctx,{customInspect:!1,depth:0}))}}]),AssertionError}(_wrapNativeSuper(Error));module.exports=AssertionError},2136:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(obj){return typeof obj}:function _typeof(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _possibleConstructorReturn(self,call){return!call||"object"!==_typeof(call)&&"function"!=typeof call?function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self):call}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}var assert,util,codes={};function createErrorType(code,message,Base){Base||(Base=Error);var NodeError=function(_Base){function NodeError(arg1,arg2,arg3){var _this;return function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeError),_this=_possibleConstructorReturn(this,_getPrototypeOf(NodeError).call(this,function getMessage(arg1,arg2,arg3){return"string"==typeof message?message:message(arg1,arg2,arg3)}(arg1,arg2,arg3))),_this.code=code,_this}return function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeError,_Base),NodeError}(Base);codes[code]=NodeError}function oneOf(expected,thing){if(Array.isArray(expected)){var len=expected.length;return expected=expected.map((function(i){return String(i)})),len>2?"one of ".concat(thing," ").concat(expected.slice(0,len-1).join(", "),", or ")+expected[len-1]:2===len?"one of ".concat(thing," ").concat(expected[0]," or ").concat(expected[1]):"of ".concat(thing," ").concat(expected[0])}return"of ".concat(thing," ").concat(String(expected))}createErrorType("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),createErrorType("ERR_INVALID_ARG_TYPE",(function(name,expected,actual){var determiner,msg;if(void 0===assert&&(assert=__webpack_require__(9282)),assert("string"==typeof name,"'name' must be a string"),"string"==typeof expected&&function startsWith(str,search,pos){return str.substr(!pos||pos<0?0:+pos,search.length)===search}(expected,"not ")?(determiner="must not be",expected=expected.replace(/^not /,"")):determiner="must be",function endsWith(str,search,this_len){return(void 0===this_len||this_len>str.length)&&(this_len=str.length),str.substring(this_len-search.length,this_len)===search}(name," argument"))msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,"type"));else{var type=function includes(str,search,start){return"number"!=typeof start&&(start=0),!(start+search.length>str.length)&&-1!==str.indexOf(search,start)}(name,".")?"property":"argument";msg='The "'.concat(name,'" ').concat(type," ").concat(determiner," ").concat(oneOf(expected,"type"))}return msg+=". Received type ".concat(_typeof(actual))}),TypeError),createErrorType("ERR_INVALID_ARG_VALUE",(function(name,value){var reason=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===util&&(util=__webpack_require__(9539));var inspected=util.inspect(value);return inspected.length>128&&(inspected="".concat(inspected.slice(0,128),"...")),"The argument '".concat(name,"' ").concat(reason,". Received ").concat(inspected)}),TypeError,RangeError),createErrorType("ERR_INVALID_RETURN_VALUE",(function(input,name,value){var type;return type=value&&value.constructor&&value.constructor.name?"instance of ".concat(value.constructor.name):"type ".concat(_typeof(value)),"Expected ".concat(input,' to be returned from the "').concat(name,'"')+" function but got ".concat(type,".")}),TypeError),createErrorType("ERR_MISSING_ARGS",(function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];void 0===assert&&(assert=__webpack_require__(9282)),assert(args.length>0,"At least one arg needs to be specified");var msg="The ",len=args.length;switch(args=args.map((function(a){return'"'.concat(a,'"')})),len){case 1:msg+="".concat(args[0]," argument");break;case 2:msg+="".concat(args[0]," and ").concat(args[1]," arguments");break;default:msg+=args.slice(0,len-1).join(", "),msg+=", and ".concat(args[len-1]," arguments")}return"".concat(msg," must be specified")}),TypeError),module.exports.codes=codes},9158:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(obj){return typeof obj}:function _typeof(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}var regexFlagsSupported=void 0!==/a/g.flags,arrayFromSet=function arrayFromSet(set){var array=[];return set.forEach((function(value){return array.push(value)})),array},arrayFromMap=function arrayFromMap(map){var array=[];return map.forEach((function(value,key){return array.push([key,value])})),array},objectIs=Object.is?Object.is:__webpack_require__(609),objectGetOwnPropertySymbols=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},numberIsNaN=Number.isNaN?Number.isNaN:__webpack_require__(360);function uncurryThis(f){return f.call.bind(f)}var hasOwnProperty=uncurryThis(Object.prototype.hasOwnProperty),propertyIsEnumerable=uncurryThis(Object.prototype.propertyIsEnumerable),objectToString=uncurryThis(Object.prototype.toString),_require$types=__webpack_require__(9539).types,isAnyArrayBuffer=_require$types.isAnyArrayBuffer,isArrayBufferView=_require$types.isArrayBufferView,isDate=_require$types.isDate,isMap=_require$types.isMap,isRegExp=_require$types.isRegExp,isSet=_require$types.isSet,isNativeError=_require$types.isNativeError,isBoxedPrimitive=_require$types.isBoxedPrimitive,isNumberObject=_require$types.isNumberObject,isStringObject=_require$types.isStringObject,isBooleanObject=_require$types.isBooleanObject,isBigIntObject=_require$types.isBigIntObject,isSymbolObject=_require$types.isSymbolObject,isFloat32Array=_require$types.isFloat32Array,isFloat64Array=_require$types.isFloat64Array;function isNonIndex(key){if(0===key.length||key.length>10)return!0;for(var i=0;i<key.length;i++){var code=key.charCodeAt(i);if(code<48||code>57)return!0}return 10===key.length&&key>=Math.pow(2,32)}function getOwnNonIndexProperties(value){return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)))}function compare(a,b){if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0}function innerDeepEqual(val1,val2,strict,memos){if(val1===val2)return 0!==val1||(!strict||objectIs(val1,val2));if(strict){if("object"!==_typeof(val1))return"number"==typeof val1&&numberIsNaN(val1)&&numberIsNaN(val2);if("object"!==_typeof(val2)||null===val1||null===val2)return!1;if(Object.getPrototypeOf(val1)!==Object.getPrototypeOf(val2))return!1}else{if(null===val1||"object"!==_typeof(val1))return(null===val2||"object"!==_typeof(val2))&&val1==val2;if(null===val2||"object"!==_typeof(val2))return!1}var val1Tag=objectToString(val1);if(val1Tag!==objectToString(val2))return!1;if(Array.isArray(val1)){if(val1.length!==val2.length)return!1;var keys1=getOwnNonIndexProperties(val1),keys2=getOwnNonIndexProperties(val2);return keys1.length===keys2.length&&keyCheck(val1,val2,strict,memos,1,keys1)}if("[object Object]"===val1Tag&&(!isMap(val1)&&isMap(val2)||!isSet(val1)&&isSet(val2)))return!1;if(isDate(val1)){if(!isDate(val2)||Date.prototype.getTime.call(val1)!==Date.prototype.getTime.call(val2))return!1}else if(isRegExp(val1)){if(!isRegExp(val2)||!function areSimilarRegExps(a,b){return regexFlagsSupported?a.source===b.source&&a.flags===b.flags:RegExp.prototype.toString.call(a)===RegExp.prototype.toString.call(b)}(val1,val2))return!1}else if(isNativeError(val1)||val1 instanceof Error){if(val1.message!==val2.message||val1.name!==val2.name)return!1}else{if(isArrayBufferView(val1)){if(strict||!isFloat32Array(val1)&&!isFloat64Array(val1)){if(!function areSimilarTypedArrays(a,b){return a.byteLength===b.byteLength&&0===compare(new Uint8Array(a.buffer,a.byteOffset,a.byteLength),new Uint8Array(b.buffer,b.byteOffset,b.byteLength))}(val1,val2))return!1}else if(!function areSimilarFloatArrays(a,b){if(a.byteLength!==b.byteLength)return!1;for(var offset=0;offset<a.byteLength;offset++)if(a[offset]!==b[offset])return!1;return!0}(val1,val2))return!1;var _keys=getOwnNonIndexProperties(val1),_keys2=getOwnNonIndexProperties(val2);return _keys.length===_keys2.length&&keyCheck(val1,val2,strict,memos,0,_keys)}if(isSet(val1))return!(!isSet(val2)||val1.size!==val2.size)&&keyCheck(val1,val2,strict,memos,2);if(isMap(val1))return!(!isMap(val2)||val1.size!==val2.size)&&keyCheck(val1,val2,strict,memos,3);if(isAnyArrayBuffer(val1)){if(!function areEqualArrayBuffers(buf1,buf2){return buf1.byteLength===buf2.byteLength&&0===compare(new Uint8Array(buf1),new Uint8Array(buf2))}(val1,val2))return!1}else if(isBoxedPrimitive(val1)&&!function isEqualBoxedPrimitive(val1,val2){return isNumberObject(val1)?isNumberObject(val2)&&objectIs(Number.prototype.valueOf.call(val1),Number.prototype.valueOf.call(val2)):isStringObject(val1)?isStringObject(val2)&&String.prototype.valueOf.call(val1)===String.prototype.valueOf.call(val2):isBooleanObject(val1)?isBooleanObject(val2)&&Boolean.prototype.valueOf.call(val1)===Boolean.prototype.valueOf.call(val2):isBigIntObject(val1)?isBigIntObject(val2)&&BigInt.prototype.valueOf.call(val1)===BigInt.prototype.valueOf.call(val2):isSymbolObject(val2)&&Symbol.prototype.valueOf.call(val1)===Symbol.prototype.valueOf.call(val2)}(val1,val2))return!1}return keyCheck(val1,val2,strict,memos,0)}function getEnumerables(val,keys){return keys.filter((function(k){return propertyIsEnumerable(val,k)}))}function keyCheck(val1,val2,strict,memos,iterationType,aKeys){if(5===arguments.length){aKeys=Object.keys(val1);var bKeys=Object.keys(val2);if(aKeys.length!==bKeys.length)return!1}for(var i=0;i<aKeys.length;i++)if(!hasOwnProperty(val2,aKeys[i]))return!1;if(strict&&5===arguments.length){var symbolKeysA=objectGetOwnPropertySymbols(val1);if(0!==symbolKeysA.length){var count=0;for(i=0;i<symbolKeysA.length;i++){var key=symbolKeysA[i];if(propertyIsEnumerable(val1,key)){if(!propertyIsEnumerable(val2,key))return!1;aKeys.push(key),count++}else if(propertyIsEnumerable(val2,key))return!1}var symbolKeysB=objectGetOwnPropertySymbols(val2);if(symbolKeysA.length!==symbolKeysB.length&&getEnumerables(val2,symbolKeysB).length!==count)return!1}else{var _symbolKeysB=objectGetOwnPropertySymbols(val2);if(0!==_symbolKeysB.length&&0!==getEnumerables(val2,_symbolKeysB).length)return!1}}if(0===aKeys.length&&(0===iterationType||1===iterationType&&0===val1.length||0===val1.size))return!0;if(void 0===memos)memos={val1:new Map,val2:new Map,position:0};else{var val2MemoA=memos.val1.get(val1);if(void 0!==val2MemoA){var val2MemoB=memos.val2.get(val2);if(void 0!==val2MemoB)return val2MemoA===val2MemoB}memos.position++}memos.val1.set(val1,memos.position),memos.val2.set(val2,memos.position);var areEq=objEquiv(val1,val2,strict,aKeys,memos,iterationType);return memos.val1.delete(val1),memos.val2.delete(val2),areEq}function setHasEqualElement(set,val1,strict,memo){for(var setValues=arrayFromSet(set),i=0;i<setValues.length;i++){var val2=setValues[i];if(innerDeepEqual(val1,val2,strict,memo))return set.delete(val2),!0}return!1}function findLooseMatchingPrimitives(prim){switch(_typeof(prim)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":prim=+prim;case"number":if(numberIsNaN(prim))return!1}return!0}function setMightHaveLoosePrim(a,b,prim){var altValue=findLooseMatchingPrimitives(prim);return null!=altValue?altValue:b.has(altValue)&&!a.has(altValue)}function mapMightHaveLoosePrim(a,b,prim,item,memo){var altValue=findLooseMatchingPrimitives(prim);if(null!=altValue)return altValue;var curB=b.get(altValue);return!(void 0===curB&&!b.has(altValue)||!innerDeepEqual(item,curB,!1,memo))&&(!a.has(altValue)&&innerDeepEqual(item,curB,!1,memo))}function mapHasEqualEntry(set,map,key1,item1,strict,memo){for(var setValues=arrayFromSet(set),i=0;i<setValues.length;i++){var key2=setValues[i];if(innerDeepEqual(key1,key2,strict,memo)&&innerDeepEqual(item1,map.get(key2),strict,memo))return set.delete(key2),!0}return!1}function objEquiv(a,b,strict,keys,memos,iterationType){var i=0;if(2===iterationType){if(!function setEquiv(a,b,strict,memo){for(var set=null,aValues=arrayFromSet(a),i=0;i<aValues.length;i++){var val=aValues[i];if("object"===_typeof(val)&&null!==val)null===set&&(set=new Set),set.add(val);else if(!b.has(val)){if(strict)return!1;if(!setMightHaveLoosePrim(a,b,val))return!1;null===set&&(set=new Set),set.add(val)}}if(null!==set){for(var bValues=arrayFromSet(b),_i=0;_i<bValues.length;_i++){var _val=bValues[_i];if("object"===_typeof(_val)&&null!==_val){if(!setHasEqualElement(set,_val,strict,memo))return!1}else if(!strict&&!a.has(_val)&&!setHasEqualElement(set,_val,strict,memo))return!1}return 0===set.size}return!0}(a,b,strict,memos))return!1}else if(3===iterationType){if(!function mapEquiv(a,b,strict,memo){for(var set=null,aEntries=arrayFromMap(a),i=0;i<aEntries.length;i++){var _aEntries$i=_slicedToArray(aEntries[i],2),key=_aEntries$i[0],item1=_aEntries$i[1];if("object"===_typeof(key)&&null!==key)null===set&&(set=new Set),set.add(key);else{var item2=b.get(key);if(void 0===item2&&!b.has(key)||!innerDeepEqual(item1,item2,strict,memo)){if(strict)return!1;if(!mapMightHaveLoosePrim(a,b,key,item1,memo))return!1;null===set&&(set=new Set),set.add(key)}}}if(null!==set){for(var bEntries=arrayFromMap(b),_i2=0;_i2<bEntries.length;_i2++){var _bEntries$_i=_slicedToArray(bEntries[_i2],2),item=(key=_bEntries$_i[0],_bEntries$_i[1]);if("object"===_typeof(key)&&null!==key){if(!mapHasEqualEntry(set,a,key,item,strict,memo))return!1}else if(!(strict||a.has(key)&&innerDeepEqual(a.get(key),item,!1,memo)||mapHasEqualEntry(set,a,key,item,!1,memo)))return!1}return 0===set.size}return!0}(a,b,strict,memos))return!1}else if(1===iterationType)for(;i<a.length;i++){if(!hasOwnProperty(a,i)){if(hasOwnProperty(b,i))return!1;for(var keysA=Object.keys(a);i<keysA.length;i++){var key=keysA[i];if(!hasOwnProperty(b,key)||!innerDeepEqual(a[key],b[key],strict,memos))return!1}return keysA.length===Object.keys(b).length}if(!hasOwnProperty(b,i)||!innerDeepEqual(a[i],b[i],strict,memos))return!1}for(i=0;i<keys.length;i++){var _key=keys[i];if(!innerDeepEqual(a[_key],b[_key],strict,memos))return!1}return!0}module.exports={isDeepEqual:function isDeepEqual(val1,val2){return innerDeepEqual(val1,val2,false)},isDeepStrictEqual:function isDeepStrictEqual(val1,val2){return innerDeepEqual(val1,val2,true)}}},9669:(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__(1609)},5448:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867),settle=__webpack_require__(6026),cookies=__webpack_require__(4372),buildURL=__webpack_require__(5327),buildFullPath=__webpack_require__(4097),parseHeaders=__webpack_require__(4109),isURLSameOrigin=__webpack_require__(7985),transitionalDefaults=__webpack_require__(7874),AxiosError=__webpack_require__(2648),CanceledError=__webpack_require__(644),parseProtocol=__webpack_require__(205);module.exports=function xhrAdapter(config){return new Promise((function dispatchXhrRequest(resolve,reject){var onCanceled,requestData=config.data,requestHeaders=config.headers,responseType=config.responseType;function done(){config.cancelToken&&config.cancelToken.unsubscribe(onCanceled),config.signal&&config.signal.removeEventListener("abort",onCanceled)}utils.isFormData(requestData)&&utils.isStandardBrowserEnv()&&delete requestHeaders["Content-Type"];var request=new XMLHttpRequest;if(config.auth){var username=config.auth.username||"",password=config.auth.password?unescape(encodeURIComponent(config.auth.password)):"";requestHeaders.Authorization="Basic "+btoa(username+":"+password)}var fullPath=buildFullPath(config.baseURL,config.url);function onloadend(){if(request){var responseHeaders="getAllResponseHeaders"in request?parseHeaders(request.getAllResponseHeaders()):null,response={data:responseType&&"text"!==responseType&&"json"!==responseType?request.response:request.responseText,status:request.status,statusText:request.statusText,headers:responseHeaders,config,request};settle((function _resolve(value){resolve(value),done()}),(function _reject(err){reject(err),done()}),response),request=null}}if(request.open(config.method.toUpperCase(),buildURL(fullPath,config.params,config.paramsSerializer),!0),request.timeout=config.timeout,"onloadend"in request?request.onloadend=onloadend:request.onreadystatechange=function handleLoad(){request&&4===request.readyState&&(0!==request.status||request.responseURL&&0===request.responseURL.indexOf("file:"))&&setTimeout(onloadend)},request.onabort=function handleAbort(){request&&(reject(new AxiosError("Request aborted",AxiosError.ECONNABORTED,config,request)),request=null)},request.onerror=function handleError(){reject(new AxiosError("Network Error",AxiosError.ERR_NETWORK,config,request,request)),request=null},request.ontimeout=function handleTimeout(){var timeoutErrorMessage=config.timeout?"timeout of "+config.timeout+"ms exceeded":"timeout exceeded",transitional=config.transitional||transitionalDefaults;config.timeoutErrorMessage&&(timeoutErrorMessage=config.timeoutErrorMessage),reject(new AxiosError(timeoutErrorMessage,transitional.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,config,request)),request=null},utils.isStandardBrowserEnv()){var xsrfValue=(config.withCredentials||isURLSameOrigin(fullPath))&&config.xsrfCookieName?cookies.read(config.xsrfCookieName):void 0;xsrfValue&&(requestHeaders[config.xsrfHeaderName]=xsrfValue)}"setRequestHeader"in request&&utils.forEach(requestHeaders,(function setRequestHeader(val,key){void 0===requestData&&"content-type"===key.toLowerCase()?delete requestHeaders[key]:request.setRequestHeader(key,val)})),utils.isUndefined(config.withCredentials)||(request.withCredentials=!!config.withCredentials),responseType&&"json"!==responseType&&(request.responseType=config.responseType),"function"==typeof config.onDownloadProgress&&request.addEventListener("progress",config.onDownloadProgress),"function"==typeof config.onUploadProgress&&request.upload&&request.upload.addEventListener("progress",config.onUploadProgress),(config.cancelToken||config.signal)&&(onCanceled=function(cancel){request&&(reject(!cancel||cancel&&cancel.type?new CanceledError:cancel),request.abort(),request=null)},config.cancelToken&&config.cancelToken.subscribe(onCanceled),config.signal&&(config.signal.aborted?onCanceled():config.signal.addEventListener("abort",onCanceled))),requestData||(requestData=null);var protocol=parseProtocol(fullPath);protocol&&-1===["http","https","file"].indexOf(protocol)?reject(new AxiosError("Unsupported protocol "+protocol+":",AxiosError.ERR_BAD_REQUEST,config)):request.send(requestData)}))}},1609:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867),bind=__webpack_require__(1849),Axios=__webpack_require__(321),mergeConfig=__webpack_require__(7185);var axios=function createInstance(defaultConfig){var context=new Axios(defaultConfig),instance=bind(Axios.prototype.request,context);return utils.extend(instance,Axios.prototype,context),utils.extend(instance,context),instance.create=function create(instanceConfig){return createInstance(mergeConfig(defaultConfig,instanceConfig))},instance}(__webpack_require__(5546));axios.Axios=Axios,axios.CanceledError=__webpack_require__(644),axios.CancelToken=__webpack_require__(4972),axios.isCancel=__webpack_require__(6502),axios.VERSION=__webpack_require__(7288).version,axios.toFormData=__webpack_require__(7675),axios.AxiosError=__webpack_require__(2648),axios.Cancel=axios.CanceledError,axios.all=function all(promises){return Promise.all(promises)},axios.spread=__webpack_require__(8713),axios.isAxiosError=__webpack_require__(6268),module.exports=axios,module.exports.default=axios},4972:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var CanceledError=__webpack_require__(644);function CancelToken(executor){if("function"!=typeof executor)throw new TypeError("executor must be a function.");var resolvePromise;this.promise=new Promise((function promiseExecutor(resolve){resolvePromise=resolve}));var token=this;this.promise.then((function(cancel){if(token._listeners){var i,l=token._listeners.length;for(i=0;i<l;i++)token._listeners[i](cancel);token._listeners=null}})),this.promise.then=function(onfulfilled){var _resolve,promise=new Promise((function(resolve){token.subscribe(resolve),_resolve=resolve})).then(onfulfilled);return promise.cancel=function reject(){token.unsubscribe(_resolve)},promise},executor((function cancel(message){token.reason||(token.reason=new CanceledError(message),resolvePromise(token.reason))}))}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason)throw this.reason},CancelToken.prototype.subscribe=function subscribe(listener){this.reason?listener(this.reason):this._listeners?this._listeners.push(listener):this._listeners=[listener]},CancelToken.prototype.unsubscribe=function unsubscribe(listener){if(this._listeners){var index=this._listeners.indexOf(listener);-1!==index&&this._listeners.splice(index,1)}},CancelToken.source=function source(){var cancel;return{token:new CancelToken((function executor(c){cancel=c})),cancel}},module.exports=CancelToken},644:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var AxiosError=__webpack_require__(2648);function CanceledError(message){AxiosError.call(this,null==message?"canceled":message,AxiosError.ERR_CANCELED),this.name="CanceledError"}__webpack_require__(4867).inherits(CanceledError,AxiosError,{__CANCEL__:!0}),module.exports=CanceledError},6502:module=>{"use strict";module.exports=function isCancel(value){return!(!value||!value.__CANCEL__)}},321:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867),buildURL=__webpack_require__(5327),InterceptorManager=__webpack_require__(782),dispatchRequest=__webpack_require__(3572),mergeConfig=__webpack_require__(7185),buildFullPath=__webpack_require__(4097),validator=__webpack_require__(4875),validators=validator.validators;function Axios(instanceConfig){this.defaults=instanceConfig,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios.prototype.request=function request(configOrUrl,config){"string"==typeof configOrUrl?(config=config||{}).url=configOrUrl:config=configOrUrl||{},(config=mergeConfig(this.defaults,config)).method?config.method=config.method.toLowerCase():this.defaults.method?config.method=this.defaults.method.toLowerCase():config.method="get";var transitional=config.transitional;void 0!==transitional&&validator.assertOptions(transitional,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1);var requestInterceptorChain=[],synchronousRequestInterceptors=!0;this.interceptors.request.forEach((function unshiftRequestInterceptors(interceptor){"function"==typeof interceptor.runWhen&&!1===interceptor.runWhen(config)||(synchronousRequestInterceptors=synchronousRequestInterceptors&&interceptor.synchronous,requestInterceptorChain.unshift(interceptor.fulfilled,interceptor.rejected))}));var promise,responseInterceptorChain=[];if(this.interceptors.response.forEach((function pushResponseInterceptors(interceptor){responseInterceptorChain.push(interceptor.fulfilled,interceptor.rejected)})),!synchronousRequestInterceptors){var chain=[dispatchRequest,void 0];for(Array.prototype.unshift.apply(chain,requestInterceptorChain),chain=chain.concat(responseInterceptorChain),promise=Promise.resolve(config);chain.length;)promise=promise.then(chain.shift(),chain.shift());return promise}for(var newConfig=config;requestInterceptorChain.length;){var onFulfilled=requestInterceptorChain.shift(),onRejected=requestInterceptorChain.shift();try{newConfig=onFulfilled(newConfig)}catch(error){onRejected(error);break}}try{promise=dispatchRequest(newConfig)}catch(error){return Promise.reject(error)}for(;responseInterceptorChain.length;)promise=promise.then(responseInterceptorChain.shift(),responseInterceptorChain.shift());return promise},Axios.prototype.getUri=function getUri(config){config=mergeConfig(this.defaults,config);var fullPath=buildFullPath(config.baseURL,config.url);return buildURL(fullPath,config.params,config.paramsSerializer)},utils.forEach(["delete","get","head","options"],(function forEachMethodNoData(method){Axios.prototype[method]=function(url,config){return this.request(mergeConfig(config||{},{method,url,data:(config||{}).data}))}})),utils.forEach(["post","put","patch"],(function forEachMethodWithData(method){function generateHTTPMethod(isForm){return function httpMethod(url,data,config){return this.request(mergeConfig(config||{},{method,headers:isForm?{"Content-Type":"multipart/form-data"}:{},url,data}))}}Axios.prototype[method]=generateHTTPMethod(),Axios.prototype[method+"Form"]=generateHTTPMethod(!0)})),module.exports=Axios},2648:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867);function AxiosError(message,code,config,request,response){Error.call(this),this.message=message,this.name="AxiosError",code&&(this.code=code),config&&(this.config=config),request&&(this.request=request),response&&(this.response=response)}utils.inherits(AxiosError,Error,{toJSON:function toJSON(){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 prototype=AxiosError.prototype,descriptors={};["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(code){descriptors[code]={value:code}})),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype,"isAxiosError",{value:!0}),AxiosError.from=function(error,code,config,request,response,customProps){var axiosError=Object.create(prototype);return utils.toFlatObject(error,axiosError,(function filter(obj){return obj!==Error.prototype})),AxiosError.call(axiosError,error.message,code,config,request,response),axiosError.name=error.name,customProps&&Object.assign(axiosError,customProps),axiosError},module.exports=AxiosError},782:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867);function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function use(fulfilled,rejected,options){return this.handlers.push({fulfilled,rejected,synchronous:!!options&&options.synchronous,runWhen:options?options.runWhen:null}),this.handlers.length-1},InterceptorManager.prototype.eject=function eject(id){this.handlers[id]&&(this.handlers[id]=null)},InterceptorManager.prototype.forEach=function forEach(fn){utils.forEach(this.handlers,(function forEachHandler(h){null!==h&&fn(h)}))},module.exports=InterceptorManager},4097:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var isAbsoluteURL=__webpack_require__(1793),combineURLs=__webpack_require__(7303);module.exports=function buildFullPath(baseURL,requestedURL){return baseURL&&!isAbsoluteURL(requestedURL)?combineURLs(baseURL,requestedURL):requestedURL}},3572:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867),transformData=__webpack_require__(8527),isCancel=__webpack_require__(6502),defaults=__webpack_require__(5546),CanceledError=__webpack_require__(644);function throwIfCancellationRequested(config){if(config.cancelToken&&config.cancelToken.throwIfRequested(),config.signal&&config.signal.aborted)throw new CanceledError}module.exports=function dispatchRequest(config){return throwIfCancellationRequested(config),config.headers=config.headers||{},config.data=transformData.call(config,config.data,config.headers,config.transformRequest),config.headers=utils.merge(config.headers.common||{},config.headers[config.method]||{},config.headers),utils.forEach(["delete","get","head","post","put","patch","common"],(function cleanHeaderConfig(method){delete config.headers[method]})),(config.adapter||defaults.adapter)(config).then((function onAdapterResolution(response){return throwIfCancellationRequested(config),response.data=transformData.call(config,response.data,response.headers,config.transformResponse),response}),(function onAdapterRejection(reason){return isCancel(reason)||(throwIfCancellationRequested(config),reason&&reason.response&&(reason.response.data=transformData.call(config,reason.response.data,reason.response.headers,config.transformResponse))),Promise.reject(reason)}))}},7185:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867);module.exports=function mergeConfig(config1,config2){config2=config2||{};var config={};function getMergedValue(target,source){return utils.isPlainObject(target)&&utils.isPlainObject(source)?utils.merge(target,source):utils.isPlainObject(source)?utils.merge({},source):utils.isArray(source)?source.slice():source}function mergeDeepProperties(prop){return utils.isUndefined(config2[prop])?utils.isUndefined(config1[prop])?void 0:getMergedValue(void 0,config1[prop]):getMergedValue(config1[prop],config2[prop])}function valueFromConfig2(prop){if(!utils.isUndefined(config2[prop]))return getMergedValue(void 0,config2[prop])}function defaultToConfig2(prop){return utils.isUndefined(config2[prop])?utils.isUndefined(config1[prop])?void 0:getMergedValue(void 0,config1[prop]):getMergedValue(void 0,config2[prop])}function mergeDirectKeys(prop){return prop in config2?getMergedValue(config1[prop],config2[prop]):prop in config1?getMergedValue(void 0,config1[prop]):void 0}var mergeMap={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys};return utils.forEach(Object.keys(config1).concat(Object.keys(config2)),(function computeConfigValue(prop){var merge=mergeMap[prop]||mergeDeepProperties,configValue=merge(prop);utils.isUndefined(configValue)&&merge!==mergeDirectKeys||(config[prop]=configValue)})),config}},6026:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var AxiosError=__webpack_require__(2648);module.exports=function settle(resolve,reject,response){var validateStatus=response.config.validateStatus;response.status&&validateStatus&&!validateStatus(response.status)?reject(new AxiosError("Request failed with status code "+response.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status/100)-4],response.config,response.request,response)):resolve(response)}},8527:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867),defaults=__webpack_require__(5546);module.exports=function transformData(data,headers,fns){var context=this||defaults;return utils.forEach(fns,(function transform(fn){data=fn.call(context,data,headers)})),data}},5546:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867),normalizeHeaderName=__webpack_require__(6016),AxiosError=__webpack_require__(2648),transitionalDefaults=__webpack_require__(7874),toFormData=__webpack_require__(7675),DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(headers,value){!utils.isUndefined(headers)&&utils.isUndefined(headers["Content-Type"])&&(headers["Content-Type"]=value)}var defaults={transitional:transitionalDefaults,adapter:function getDefaultAdapter(){var adapter;return("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(adapter=__webpack_require__(5448)),adapter}(),transformRequest:[function transformRequest(data,headers){if(normalizeHeaderName(headers,"Accept"),normalizeHeaderName(headers,"Content-Type"),utils.isFormData(data)||utils.isArrayBuffer(data)||utils.isBuffer(data)||utils.isStream(data)||utils.isFile(data)||utils.isBlob(data))return data;if(utils.isArrayBufferView(data))return data.buffer;if(utils.isURLSearchParams(data))return setContentTypeIfUnset(headers,"application/x-www-form-urlencoded;charset=utf-8"),data.toString();var isFileList,isObjectPayload=utils.isObject(data),contentType=headers&&headers["Content-Type"];if((isFileList=utils.isFileList(data))||isObjectPayload&&"multipart/form-data"===contentType){var _FormData=this.env&&this.env.FormData;return toFormData(isFileList?{"files[]":data}:data,_FormData&&new _FormData)}return isObjectPayload||"application/json"===contentType?(setContentTypeIfUnset(headers,"application/json"),function stringifySafely(rawValue,parser,encoder){if(utils.isString(rawValue))try{return(parser||JSON.parse)(rawValue),utils.trim(rawValue)}catch(e){if("SyntaxError"!==e.name)throw e}return(encoder||JSON.stringify)(rawValue)}(data)):data}],transformResponse:[function transformResponse(data){var transitional=this.transitional||defaults.transitional,silentJSONParsing=transitional&&transitional.silentJSONParsing,forcedJSONParsing=transitional&&transitional.forcedJSONParsing,strictJSONParsing=!silentJSONParsing&&"json"===this.responseType;if(strictJSONParsing||forcedJSONParsing&&utils.isString(data)&&data.length)try{return JSON.parse(data)}catch(e){if(strictJSONParsing){if("SyntaxError"===e.name)throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return data}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:__webpack_require__(1623)},validateStatus:function validateStatus(status){return status>=200&&status<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils.forEach(["delete","get","head"],(function forEachMethodNoData(method){defaults.headers[method]={}})),utils.forEach(["post","put","patch"],(function forEachMethodWithData(method){defaults.headers[method]=utils.merge(DEFAULT_CONTENT_TYPE)})),module.exports=defaults},7874:module=>{"use strict";module.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:module=>{module.exports={version:"0.27.2"}},1849:module=>{"use strict";module.exports=function bind(fn,thisArg){return function wrap(){for(var args=new Array(arguments.length),i=0;i<args.length;i++)args[i]=arguments[i];return fn.apply(thisArg,args)}}},5327:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867);function encode(val){return encodeURIComponent(val).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}module.exports=function buildURL(url,params,paramsSerializer){if(!params)return url;var serializedParams;if(paramsSerializer)serializedParams=paramsSerializer(params);else if(utils.isURLSearchParams(params))serializedParams=params.toString();else{var parts=[];utils.forEach(params,(function serialize(val,key){null!=val&&(utils.isArray(val)?key+="[]":val=[val],utils.forEach(val,(function parseValue(v){utils.isDate(v)?v=v.toISOString():utils.isObject(v)&&(v=JSON.stringify(v)),parts.push(encode(key)+"="+encode(v))})))})),serializedParams=parts.join("&")}if(serializedParams){var hashmarkIndex=url.indexOf("#");-1!==hashmarkIndex&&(url=url.slice(0,hashmarkIndex)),url+=(-1===url.indexOf("?")?"?":"&")+serializedParams}return url}},7303:module=>{"use strict";module.exports=function combineURLs(baseURL,relativeURL){return relativeURL?baseURL.replace(/\/+$/,"")+"/"+relativeURL.replace(/^\/+/,""):baseURL}},4372:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867);module.exports=utils.isStandardBrowserEnv()?function standardBrowserEnv(){return{write:function write(name,value,expires,path,domain,secure){var cookie=[];cookie.push(name+"="+encodeURIComponent(value)),utils.isNumber(expires)&&cookie.push("expires="+new Date(expires).toGMTString()),utils.isString(path)&&cookie.push("path="+path),utils.isString(domain)&&cookie.push("domain="+domain),!0===secure&&cookie.push("secure"),document.cookie=cookie.join("; ")},read:function read(name){var match=document.cookie.match(new RegExp("(^|;\\s*)("+name+")=([^;]*)"));return match?decodeURIComponent(match[3]):null},remove:function remove(name){this.write(name,"",Date.now()-864e5)}}}():{write:function write(){},read:function read(){return null},remove:function remove(){}}},1793:module=>{"use strict";module.exports=function isAbsoluteURL(url){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(url)}},6268:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867);module.exports=function isAxiosError(payload){return utils.isObject(payload)&&!0===payload.isAxiosError}},7985:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867);module.exports=utils.isStandardBrowserEnv()?function standardBrowserEnv(){var originURL,msie=/(msie|trident)/i.test(navigator.userAgent),urlParsingNode=document.createElement("a");function resolveURL(url){var href=url;return msie&&(urlParsingNode.setAttribute("href",href),href=urlParsingNode.href),urlParsingNode.setAttribute("href",href),{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,""):"",host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,""):"",hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,""):"",hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:"/"===urlParsingNode.pathname.charAt(0)?urlParsingNode.pathname:"/"+urlParsingNode.pathname}}return originURL=resolveURL(window.location.href),function isURLSameOrigin(requestURL){var parsed=utils.isString(requestURL)?resolveURL(requestURL):requestURL;return parsed.protocol===originURL.protocol&&parsed.host===originURL.host}}():function isURLSameOrigin(){return!0}},6016:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867);module.exports=function normalizeHeaderName(headers,normalizedName){utils.forEach(headers,(function processHeader(value,name){name!==normalizedName&&name.toUpperCase()===normalizedName.toUpperCase()&&(headers[normalizedName]=value,delete headers[name])}))}},1623:module=>{module.exports=null},4109:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867),ignoreDuplicateOf=["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"];module.exports=function parseHeaders(headers){var key,val,i,parsed={};return headers?(utils.forEach(headers.split("\n"),(function parser(line){if(i=line.indexOf(":"),key=utils.trim(line.substr(0,i)).toLowerCase(),val=utils.trim(line.substr(i+1)),key){if(parsed[key]&&ignoreDuplicateOf.indexOf(key)>=0)return;parsed[key]="set-cookie"===key?(parsed[key]?parsed[key]:[]).concat([val]):parsed[key]?parsed[key]+", "+val:val}})),parsed):parsed}},205:module=>{"use strict";module.exports=function parseProtocol(url){var match=/^([-+\w]{1,25})(:?\/\/|:)/.exec(url);return match&&match[1]||""}},8713:module=>{"use strict";module.exports=function spread(callback){return function wrap(arr){return callback.apply(null,arr)}}},7675:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(4867);module.exports=function toFormData(obj,formData){formData=formData||new FormData;var stack=[];function convertValue(value){return null===value?"":utils.isDate(value)?value.toISOString():utils.isArrayBuffer(value)||utils.isTypedArray(value)?"function"==typeof Blob?new Blob([value]):Buffer.from(value):value}return function build(data,parentKey){if(utils.isPlainObject(data)||utils.isArray(data)){if(-1!==stack.indexOf(data))throw Error("Circular reference detected in "+parentKey);stack.push(data),utils.forEach(data,(function each(value,key){if(!utils.isUndefined(value)){var arr,fullKey=parentKey?parentKey+"."+key:key;if(value&&!parentKey&&"object"==typeof value)if(utils.endsWith(key,"{}"))value=JSON.stringify(value);else if(utils.endsWith(key,"[]")&&(arr=utils.toArray(value)))return void arr.forEach((function(el){!utils.isUndefined(el)&&formData.append(fullKey,convertValue(el))}));build(value,fullKey)}})),stack.pop()}else formData.append(parentKey,convertValue(data))}(obj),formData}},4875:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var VERSION=__webpack_require__(7288).version,AxiosError=__webpack_require__(2648),validators={};["object","boolean","number","function","string","symbol"].forEach((function(type,i){validators[type]=function validator(thing){return typeof thing===type||"a"+(i<1?"n ":" ")+type}}));var deprecatedWarnings={};validators.transitional=function transitional(validator,version,message){function formatMessage(opt,desc){return"[Axios v"+VERSION+"] Transitional option '"+opt+"'"+desc+(message?". "+message:"")}return function(value,opt,opts){if(!1===validator)throw new AxiosError(formatMessage(opt," has been removed"+(version?" in "+version:"")),AxiosError.ERR_DEPRECATED);return version&&!deprecatedWarnings[opt]&&(deprecatedWarnings[opt]=!0,console.warn(formatMessage(opt," has been deprecated since v"+version+" and will be removed in the near future"))),!validator||validator(value,opt,opts)}},module.exports={assertOptions:function assertOptions(options,schema,allowUnknown){if("object"!=typeof options)throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);for(var keys=Object.keys(options),i=keys.length;i-- >0;){var opt=keys[i],validator=schema[opt];if(validator){var value=options[opt],result=void 0===value||validator(value,opt,options);if(!0!==result)throw new AxiosError("option "+opt+" must be "+result,AxiosError.ERR_BAD_OPTION_VALUE)}else if(!0!==allowUnknown)throw new AxiosError("Unknown option "+opt,AxiosError.ERR_BAD_OPTION)}},validators}},4867:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var cache,bind=__webpack_require__(1849),toString=Object.prototype.toString,kindOf=(cache=Object.create(null),function(thing){var str=toString.call(thing);return cache[str]||(cache[str]=str.slice(8,-1).toLowerCase())});function kindOfTest(type){return type=type.toLowerCase(),function isKindOf(thing){return kindOf(thing)===type}}function isArray(val){return Array.isArray(val)}function isUndefined(val){return void 0===val}var isArrayBuffer=kindOfTest("ArrayBuffer");function isObject(val){return null!==val&&"object"==typeof val}function isPlainObject(val){if("object"!==kindOf(val))return!1;var prototype=Object.getPrototypeOf(val);return null===prototype||prototype===Object.prototype}var isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList");function isFunction(val){return"[object Function]"===toString.call(val)}var isURLSearchParams=kindOfTest("URLSearchParams");function forEach(obj,fn){if(null!=obj)if("object"!=typeof obj&&(obj=[obj]),isArray(obj))for(var i=0,l=obj.length;i<l;i++)fn.call(null,obj[i],i,obj);else for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&fn.call(null,obj[key],key,obj)}var TypedArray,isTypedArray=(TypedArray="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(thing){return TypedArray&&thing instanceof TypedArray});module.exports={isArray,isArrayBuffer,isBuffer:function isBuffer(val){return null!==val&&!isUndefined(val)&&null!==val.constructor&&!isUndefined(val.constructor)&&"function"==typeof val.constructor.isBuffer&&val.constructor.isBuffer(val)},isFormData:function isFormData(thing){return thing&&("function"==typeof FormData&&thing instanceof FormData||"[object FormData]"===toString.call(thing)||isFunction(thing.toString)&&"[object FormData]"===thing.toString())},isArrayBufferView:function isArrayBufferView(val){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(val):val&&val.buffer&&isArrayBuffer(val.buffer)},isString:function isString(val){return"string"==typeof val},isNumber:function isNumber(val){return"number"==typeof val},isObject,isPlainObject,isUndefined,isDate,isFile,isBlob,isFunction,isStream:function isStream(val){return isObject(val)&&isFunction(val.pipe)},isURLSearchParams,isStandardBrowserEnv:function isStandardBrowserEnv(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach,merge:function merge(){var result={};function assignValue(val,key){isPlainObject(result[key])&&isPlainObject(val)?result[key]=merge(result[key],val):isPlainObject(val)?result[key]=merge({},val):isArray(val)?result[key]=val.slice():result[key]=val}for(var i=0,l=arguments.length;i<l;i++)forEach(arguments[i],assignValue);return result},extend:function extend(a,b,thisArg){return forEach(b,(function assignValue(val,key){a[key]=thisArg&&"function"==typeof val?bind(val,thisArg):val})),a},trim:function trim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")},stripBOM:function stripBOM(content){return 65279===content.charCodeAt(0)&&(content=content.slice(1)),content},inherits:function inherits(constructor,superConstructor,props,descriptors){constructor.prototype=Object.create(superConstructor.prototype,descriptors),constructor.prototype.constructor=constructor,props&&Object.assign(constructor.prototype,props)},toFlatObject:function toFlatObject(sourceObj,destObj,filter){var props,i,prop,merged={};destObj=destObj||{};do{for(i=(props=Object.getOwnPropertyNames(sourceObj)).length;i-- >0;)merged[prop=props[i]]||(destObj[prop]=sourceObj[prop],merged[prop]=!0);sourceObj=Object.getPrototypeOf(sourceObj)}while(sourceObj&&(!filter||filter(sourceObj,destObj))&&sourceObj!==Object.prototype);return destObj},kindOf,kindOfTest,endsWith:function endsWith(str,searchString,position){str=String(str),(void 0===position||position>str.length)&&(position=str.length),position-=searchString.length;var lastIndex=str.indexOf(searchString,position);return-1!==lastIndex&&lastIndex===position},toArray:function toArray(thing){if(!thing)return null;var i=thing.length;if(isUndefined(i))return null;for(var arr=new Array(i);i-- >0;)arr[i]=thing[i];return arr},isTypedArray,isFileList}},8162:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _Buffer=__webpack_require__(9509).Buffer;module.exports=function base(ALPHABET){if(ALPHABET.length>=255)throw new TypeError("Alphabet too long");for(var BASE_MAP=new Uint8Array(256),j=0;j<BASE_MAP.length;j++)BASE_MAP[j]=255;for(var i=0;i<ALPHABET.length;i++){var x=ALPHABET.charAt(i),xc=x.charCodeAt(0);if(255!==BASE_MAP[xc])throw new TypeError(x+" is ambiguous");BASE_MAP[xc]=i}var BASE=ALPHABET.length,LEADER=ALPHABET.charAt(0),FACTOR=Math.log(BASE)/Math.log(256),iFACTOR=Math.log(256)/Math.log(BASE);function decodeUnsafe(source){if("string"!=typeof source)throw new TypeError("Expected String");if(0===source.length)return _Buffer.alloc(0);for(var psz=0,zeroes=0,length=0;source[psz]===LEADER;)zeroes++,psz++;for(var size=(source.length-psz)*FACTOR+1>>>0,b256=new Uint8Array(size);source[psz];){var carry=BASE_MAP[source.charCodeAt(psz)];if(255===carry)return;for(var i=0,it3=size-1;(0!==carry||i<length)&&-1!==it3;it3--,i++)carry+=BASE*b256[it3]>>>0,b256[it3]=carry%256>>>0,carry=carry/256>>>0;if(0!==carry)throw new Error("Non-zero carry");length=i,psz++}for(var it4=size-length;it4!==size&&0===b256[it4];)it4++;var vch=_Buffer.allocUnsafe(zeroes+(size-it4));vch.fill(0,0,zeroes);for(var j=zeroes;it4!==size;)vch[j++]=b256[it4++];return vch}return{encode:function encode(source){if((Array.isArray(source)||source instanceof Uint8Array)&&(source=_Buffer.from(source)),!_Buffer.isBuffer(source))throw new TypeError("Expected Buffer");if(0===source.length)return"";for(var zeroes=0,length=0,pbegin=0,pend=source.length;pbegin!==pend&&0===source[pbegin];)pbegin++,zeroes++;for(var size=(pend-pbegin)*iFACTOR+1>>>0,b58=new Uint8Array(size);pbegin!==pend;){for(var carry=source[pbegin],i=0,it1=size-1;(0!==carry||i<length)&&-1!==it1;it1--,i++)carry+=256*b58[it1]>>>0,b58[it1]=carry%BASE>>>0,carry=carry/BASE>>>0;if(0!==carry)throw new Error("Non-zero carry");length=i,pbegin++}for(var it2=size-length;it2!==size&&0===b58[it2];)it2++;for(var str=LEADER.repeat(zeroes);it2<size;++it2)str+=ALPHABET.charAt(b58[it2]);return str},decodeUnsafe,decode:function decode(string){var buffer=decodeUnsafe(string);if(buffer)return buffer;throw new Error("Non-base"+BASE+" character")}}}},9742:(__unused_webpack_module,exports)=>{"use strict";exports.byteLength=function byteLength(b64){var lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1];return 3*(validLen+placeHoldersLen)/4-placeHoldersLen},exports.toByteArray=function toByteArray(b64){var tmp,i,lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1],arr=new Arr(function _byteLength(b64,validLen,placeHoldersLen){return 3*(validLen+placeHoldersLen)/4-placeHoldersLen}(0,validLen,placeHoldersLen)),curByte=0,len=placeHoldersLen>0?validLen-4:validLen;for(i=0;i<len;i+=4)tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)],arr[curByte++]=tmp>>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp;2===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[curByte++]=255&tmp);1===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp);return arr},exports.fromByteArray=function fromByteArray(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,parts=[],i=0,len2=len-extraBytes;i<len2;i+=16383)parts.push(encodeChunk(uint8,i,i+16383>len2?len2:i+16383));1===extraBytes?(tmp=uint8[len-1],parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"="));return parts.join("")};for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;function getLens(b64){var len=b64.length;if(len%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");return-1===validLen&&(validLen=len),[validLen,validLen===len?0:4-validLen%4]}function encodeChunk(uint8,start,end){for(var tmp,num,output=[],i=start;i<end;i+=3)tmp=(uint8[i]<<16&16711680)+(uint8[i+1]<<8&65280)+(255&uint8[i+2]),output.push(lookup[(num=tmp)>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]);return output.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},7715:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bech32m=exports.bech32=void 0;const ALPHABET="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ALPHABET_MAP={};for(let z=0;z<ALPHABET.length;z++){const x=ALPHABET.charAt(z);ALPHABET_MAP[x]=z}function polymodStep(pre){const b=pre>>25;return(33554431&pre)<<5^996825010&-(b>>0&1)^642813549&-(b>>1&1)^513874426&-(b>>2&1)^1027748829&-(b>>3&1)^705979059&-(b>>4&1)}function prefixChk(prefix){let chk=1;for(let i=0;i<prefix.length;++i){const c=prefix.charCodeAt(i);if(c<33||c>126)return"Invalid prefix ("+prefix+")";chk=polymodStep(chk)^c>>5}chk=polymodStep(chk);for(let i=0;i<prefix.length;++i){const v=prefix.charCodeAt(i);chk=polymodStep(chk)^31&v}return chk}function convert(data,inBits,outBits,pad){let value=0,bits=0;const maxV=(1<<outBits)-1,result=[];for(let i=0;i<data.length;++i)for(value=value<<inBits|data[i],bits+=inBits;bits>=outBits;)bits-=outBits,result.push(value>>bits&maxV);if(pad)bits>0&&result.push(value<<outBits-bits&maxV);else{if(bits>=inBits)return"Excess padding";if(value<<outBits-bits&maxV)return"Non-zero padding"}return result}function toWords(bytes){return convert(bytes,8,5,!0)}function fromWordsUnsafe(words){const res=convert(words,5,8,!1);if(Array.isArray(res))return res}function fromWords(words){const res=convert(words,5,8,!1);if(Array.isArray(res))return res;throw new Error(res)}function getLibraryFromEncoding(encoding){let ENCODING_CONST;function __decode(str,LIMIT){if(LIMIT=LIMIT||90,str.length<8)return str+" too short";if(str.length>LIMIT)return"Exceeds length limit";const lowered=str.toLowerCase(),uppered=str.toUpperCase();if(str!==lowered&&str!==uppered)return"Mixed-case string "+str;const split=(str=lowered).lastIndexOf("1");if(-1===split)return"No separator character for "+str;if(0===split)return"Missing prefix for "+str;const prefix=str.slice(0,split),wordChars=str.slice(split+1);if(wordChars.length<6)return"Data too short";let chk=prefixChk(prefix);if("string"==typeof chk)return chk;const words=[];for(let i=0;i<wordChars.length;++i){const c=wordChars.charAt(i),v=ALPHABET_MAP[c];if(void 0===v)return"Unknown character "+c;chk=polymodStep(chk)^v,i+6>=wordChars.length||words.push(v)}return chk!==ENCODING_CONST?"Invalid checksum for "+str:{prefix,words}}return ENCODING_CONST="bech32"===encoding?1:734539939,{decodeUnsafe:function decodeUnsafe(str,LIMIT){const res=__decode(str,LIMIT);if("object"==typeof res)return res},decode:function decode(str,LIMIT){const res=__decode(str,LIMIT);if("object"==typeof res)return res;throw new Error(res)},encode:function encode(prefix,words,LIMIT){if(LIMIT=LIMIT||90,prefix.length+7+words.length>LIMIT)throw new TypeError("Exceeds length limit");let chk=prefixChk(prefix=prefix.toLowerCase());if("string"==typeof chk)throw new Error(chk);let result=prefix+"1";for(let i=0;i<words.length;++i){const x=words[i];if(x>>5!=0)throw new Error("Non 5-bit word");chk=polymodStep(chk)^x,result+=ALPHABET.charAt(x)}for(let i=0;i<6;++i)chk=polymodStep(chk);chk^=ENCODING_CONST;for(let i=0;i<6;++i){result+=ALPHABET.charAt(chk>>5*(5-i)&31)}return result},toWords,fromWordsUnsafe,fromWords}}exports.bech32=getLibraryFromEncoding("bech32"),exports.bech32m=getLibraryFromEncoding("bech32m")},2314:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const wordlists={};let _default;exports.wordlists=wordlists,exports._default=_default;try{exports._default=_default=__webpack_require__(32),wordlists.czech=_default}catch(err){}try{exports._default=_default=__webpack_require__(6996),wordlists.chinese_simplified=_default}catch(err){}try{exports._default=_default=__webpack_require__(4262),wordlists.chinese_traditional=_default}catch(err){}try{exports._default=_default=__webpack_require__(8013),wordlists.korean=_default}catch(err){}try{exports._default=_default=__webpack_require__(1848),wordlists.french=_default}catch(err){}try{exports._default=_default=__webpack_require__(2841),wordlists.italian=_default}catch(err){}try{exports._default=_default=__webpack_require__(659),wordlists.spanish=_default}catch(err){}try{exports._default=_default=__webpack_require__(4472),wordlists.japanese=_default,wordlists.JA=_default}catch(err){}try{exports._default=_default=__webpack_require__(1945),wordlists.portuguese=_default}catch(err){}try{exports._default=_default=__webpack_require__(4573),wordlists.english=_default,wordlists.EN=_default}catch(err){}},2153:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const createHash=__webpack_require__(3482),pbkdf2_1=__webpack_require__(5632),randomBytes=__webpack_require__(1798),_wordlists_1=__webpack_require__(2314);let DEFAULT_WORDLIST=_wordlists_1._default;const WORDLIST_REQUIRED="A wordlist is required but a default could not be found.\nPlease pass a 2048 word array explicitly.";function normalize(str){return(str||"").normalize("NFKD")}function lpad(str,padString,length){for(;str.length<length;)str=padString+str;return str}function binaryToByte(bin){return parseInt(bin,2)}function bytesToBinary(bytes){return bytes.map((x=>lpad(x.toString(2),"0",8))).join("")}function deriveChecksumBits(entropyBuffer){const CS=8*entropyBuffer.length/32,hash=createHash("sha256").update(entropyBuffer).digest();return bytesToBinary(Array.from(hash)).slice(0,CS)}function salt(password){return"mnemonic"+(password||"")}function mnemonicToEntropy(mnemonic,wordlist){if(!(wordlist=wordlist||DEFAULT_WORDLIST))throw new Error(WORDLIST_REQUIRED);const words=normalize(mnemonic).split(" ");if(words.length%3!=0)throw new Error("Invalid mnemonic");const bits=words.map((word=>{const index=wordlist.indexOf(word);if(-1===index)throw new Error("Invalid mnemonic");return lpad(index.toString(2),"0",11)})).join(""),dividerIndex=32*Math.floor(bits.length/33),entropyBits=bits.slice(0,dividerIndex),checksumBits=bits.slice(dividerIndex),entropyBytes=entropyBits.match(/(.{1,8})/g).map(binaryToByte);if(entropyBytes.length<16)throw new Error("Invalid entropy");if(entropyBytes.length>32)throw new Error("Invalid entropy");if(entropyBytes.length%4!=0)throw new Error("Invalid entropy");const entropy=Buffer.from(entropyBytes);if(deriveChecksumBits(entropy)!==checksumBits)throw new Error("Invalid mnemonic checksum");return entropy.toString("hex")}function entropyToMnemonic(entropy,wordlist){if(Buffer.isBuffer(entropy)||(entropy=Buffer.from(entropy,"hex")),!(wordlist=wordlist||DEFAULT_WORDLIST))throw new Error(WORDLIST_REQUIRED);if(entropy.length<16)throw new TypeError("Invalid entropy");if(entropy.length>32)throw new TypeError("Invalid entropy");if(entropy.length%4!=0)throw new TypeError("Invalid entropy");const words=(bytesToBinary(Array.from(entropy))+deriveChecksumBits(entropy)).match(/(.{1,11})/g).map((binary=>{const index=binaryToByte(binary);return wordlist[index]}));return"あいこくしん"===wordlist[0]?words.join(" "):words.join(" ")}exports.mnemonicToSeedSync=function mnemonicToSeedSync(mnemonic,password){const mnemonicBuffer=Buffer.from(normalize(mnemonic),"utf8"),saltBuffer=Buffer.from(salt(normalize(password)),"utf8");return pbkdf2_1.pbkdf2Sync(mnemonicBuffer,saltBuffer,2048,64,"sha512")},exports.mnemonicToSeed=function mnemonicToSeed(mnemonic,password){return Promise.resolve().then((()=>function pbkdf2Promise(password,saltMixin,iterations,keylen,digest){return Promise.resolve().then((()=>new Promise(((resolve,reject)=>{pbkdf2_1.pbkdf2(password,saltMixin,iterations,keylen,digest,((err,derivedKey)=>err?reject(err):resolve(derivedKey)))}))))}(Buffer.from(normalize(mnemonic),"utf8"),Buffer.from(salt(normalize(password)),"utf8"),2048,64,"sha512")))},exports.mnemonicToEntropy=mnemonicToEntropy,exports.entropyToMnemonic=entropyToMnemonic,exports.generateMnemonic=function generateMnemonic(strength,rng,wordlist){if((strength=strength||128)%32!=0)throw new TypeError("Invalid entropy");return entropyToMnemonic((rng=rng||randomBytes)(strength/8),wordlist)},exports.validateMnemonic=function validateMnemonic(mnemonic,wordlist){try{mnemonicToEntropy(mnemonic,wordlist)}catch(e){return!1}return!0},exports.setDefaultWordlist=function setDefaultWordlist(language){const result=_wordlists_1.wordlists[language];if(!result)throw new Error('Could not find wordlist for language "'+language+'"');DEFAULT_WORDLIST=result},exports.getDefaultWordlist=function getDefaultWordlist(){if(!DEFAULT_WORDLIST)throw new Error("No Default Wordlist set");return Object.keys(_wordlists_1.wordlists).filter((lang=>"JA"!==lang&&"EN"!==lang&&_wordlists_1.wordlists[lang].every(((word,index)=>word===DEFAULT_WORDLIST[index]))))[0]};var _wordlists_2=__webpack_require__(2314);exports.wordlists=_wordlists_2.wordlists},3550:function(module,__unused_webpack_exports,__webpack_require__){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}var Buffer;"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;try{Buffer="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:__webpack_require__(6601).Buffer}catch(e){}function parseHex4Bits(string,index){var c=string.charCodeAt(index);return c>=48&&c<=57?c-48:c>=65&&c<=70?c-55:c>=97&&c<=102?c-87:void assert(!1,"Invalid character in "+string)}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);return index-1>=lowerBound&&(r|=parseHex4Bits(string,index-1)<<4),r}function parseBase(str,start,end,mul){for(var r=0,b=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul,b=c>=49?c-49+10:c>=17?c-17+10:c,assert(c>=0&&b<mul,"Invalid character"),r+=b}return r}function move(dest,src){dest.words=src.words,dest.length=src.length,dest.negative=src.negative,dest.red=src.red}if(BN.isBN=function isBN(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function max(left,right){return left.cmp(right)>0?left:right},BN.min=function min(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function init(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&(start++,this.negative=1),start<number.length&&(16===base?this._parseHex(number,start,endian):(this._parseBase(number,base,start),"le"===endian&&this._initArray(this.toArray(),base,endian)))},BN.prototype._initNumber=function _initNumber(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function _initArray(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this._strip()},BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var w,off=0,j=0;if("be"===endian)for(i=number.length-1;i>=start;i-=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;else for(i=(number.length-start)%2==0?start+1:start;i<number.length;i+=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;this._strip()},BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}this._strip()},BN.prototype.copy=function copy(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype._move=function _move(dest){move(dest,this)},BN.prototype.clone=function clone(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function _expand(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype._strip=function strip(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{BN.prototype[Symbol.for("nodejs.util.inspect.custom")]=inspect}catch(e){BN.prototype.inspect=inspect}else BN.prototype.inspect=inspect;function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var zeros=["","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"],groupSizes=[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],groupBases=[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];BN.prototype.toString=function toString(base,padding){var out;if(padding=0|padding||1,16===(base=base||10)||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);carry=w>>>24-off&16777215,(off+=2)>=26&&(off-=26,i--),out=0!==carry||i!==this.length-1?zeros[6-word.length]+word+out:word+out}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modrn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function toJSON(){return this.toString(16,2)},Buffer&&(BN.prototype.toBuffer=function toBuffer(endian,length){return this.toArrayLike(Buffer,endian,length)}),BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)};function smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){for(var ncarry=carry>>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out._strip()}BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){this._strip();var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0");var res=function allocate(ArrayType,size){return ArrayType.allocUnsafe?ArrayType.allocUnsafe(size):new ArrayType(size)}(ArrayType,reqLength);return this["_toArrayLike"+("le"===endian?"LE":"BE")](res,byteLength),res},BN.prototype._toArrayLikeLE=function _toArrayLikeLE(res,byteLength){for(var position=0,carry=0,i=0,shift=0;i<this.length;i++){var word=this.words[i]<<shift|carry;res[position++]=255&word,position<res.length&&(res[position++]=word>>8&255),position<res.length&&(res[position++]=word>>16&255),6===shift?(position<res.length&&(res[position++]=word>>24&255),carry=0,shift=0):(carry=word>>>24,shift+=2)}if(position<res.length)for(res[position++]=carry;position<res.length;)res[position++]=0},BN.prototype._toArrayLikeBE=function _toArrayLikeBE(res,byteLength){for(var position=res.length-1,carry=0,i=0,shift=0;i<this.length;i++){var word=this.words[i]<<shift|carry;res[position--]=255&word,position>=0&&(res[position--]=word>>8&255),position>=0&&(res[position--]=word>>16&255),6===shift?(position>=0&&(res[position--]=word>>24&255),carry=0,shift=0):(carry=word>>>24,shift+=2)}if(position>=0)for(res[position--]=carry;position>=0;)res[position--]=0},Math.clz32?BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function _countBits(w){var t=w,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},BN.prototype._zeroBits=function _zeroBits(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function toTwos(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function fromTwos(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function isNeg(){return 0!==this.negative},BN.prototype.neg=function neg(){return this.clone().ineg()},BN.prototype.ineg=function ineg(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function iuor(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this._strip()},BN.prototype.ior=function ior(num){return assert(0==(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function or(num){return this.length>num.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function uor(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function iuand(num){var b;b=this.length>num.length?num:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this._strip()},BN.prototype.iand=function iand(num){return assert(0==(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function and(num){return this.length>num.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function uand(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function iuxor(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this._strip()},BN.prototype.ixor=function ixor(num){return assert(0==(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function xor(num){return this.length>num.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function uxor(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function inotn(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this._strip()},BN.prototype.notn=function notn(width){return this.clone().inotn(width)},BN.prototype.setn=function setn(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<<wbit:this.words[off]&~(1<<wbit),this._strip()},BN.prototype.iadd=function iadd(num){var r,a,b;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function add(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function isub(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)carry=(r=(0|a.words[i])-(0|b.words[i])+carry)>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)carry=(r=(0|a.words[i])+carry)>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this._strip()},BN.prototype.sub=function sub(num){return this.clone().isub(num)};var comb10MulTo=function comb10MulTo(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j,r=(0|self.words[i])*(0|num.words[j]),lo=67108863&r;rword=67108863&(lo=lo+rword|0),hncarry+=(ncarry=(ncarry=ncarry+(r/67108864|0)|0)+(lo>>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out._strip()}function jumboMulTo(self,num,out){return bigMulTo(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function mulTo(num,out){var len=this.length+num.length;return 10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?bigMulTo(this,num,out):jumboMulTo(this,num,out)},FFTM.prototype.makeRBT=function makeRBT(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function revBin(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function transform(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function guessLen13b(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function conjugate(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function normalize13b(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function convert13b(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0==(-8192&carry))},FFTM.prototype.stub=function stub(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function mulp(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out._strip()},BN.prototype.mul=function mul(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function mulf(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function imuln(num){var isNegNum=num<0;isNegNum&&(num=-num),assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),isNegNum?this.ineg():this},BN.prototype.muln=function muln(num){return this.clone().imuln(num)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(num){var w=function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=num.words[off]>>>wbit&1}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function iushln(bits){assert("number"==typeof bits&&bits>=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this._strip()},BN.prototype.ishln=function ishln(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function iushrn(bits,hint,extended){var h;assert("number"==typeof bits&&bits>=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;i>=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},BN.prototype.ishrn=function ishrn(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function testn(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<<r;return!(this.length<=s)&&!!(this.words[s]&q)},BN.prototype.imaskn=function imaskn(bits){assert("number"==typeof bits&&bits>=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this._strip()},BN.prototype.maskn=function maskn(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function iaddn(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<=num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function _iaddn(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this._strip()},BN.prototype.addn=function addn(num){return this.clone().iaddn(num)},BN.prototype.subn=function subn(num){return this.clone().isubn(num)},BN.prototype.iabs=function iabs(){return this.negative=0,this},BN.prototype.abs=function abs(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function _ishlnsubmul(num,mul,shift){var i,w,len=num.length+shift;this._expand(len);var carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;carry=((w-=67108863&right)>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)carry=(w=(0|this.words[i+shift])+carry)>>26,this.words[i+shift]=67108863&w;if(0===carry)return this._strip();for(assert(-1===carry),carry=0,i=0;i<this.length;i++)carry=(w=-(0|this.words[i])+carry)>>26,this.words[i]=67108863&w;return this.negative=1,this._strip()},BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q._strip(),a._strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function divmod(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div,mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modrn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modrn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function div(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function mod(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function umod(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modrn=function modrn(num){var isNegNum=num<0;isNegNum&&(num=-num),assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return isNegNum?-acc:acc},BN.prototype.modn=function modn(num){return this.modrn(num)},BN.prototype.idivn=function idivn(num){var isNegNum=num<0;isNegNum&&(num=-num),assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this._strip(),isNegNum?this.ineg():this},BN.prototype.divn=function divn(num){return this.clone().idivn(num)},BN.prototype.egcd=function egcd(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function _invmp(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(num){return this.words[0]&num},BN.prototype.bincn=function bincn(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];carry=(w+=carry)>>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this._strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function cmp(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function ucmp(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(res=1);break}}return res},BN.prototype.gtn=function gtn(num){return 1===this.cmpn(num)},BN.prototype.gt=function gt(num){return 1===this.cmp(num)},BN.prototype.gten=function gten(num){return this.cmpn(num)>=0},BN.prototype.gte=function gte(num){return this.cmp(num)>=0},BN.prototype.ltn=function ltn(num){return-1===this.cmpn(num)},BN.prototype.lt=function lt(num){return-1===this.cmp(num)},BN.prototype.lten=function lten(num){return this.cmpn(num)<=0},BN.prototype.lte=function lte(num){return this.cmp(num)<=0},BN.prototype.eqn=function eqn(num){return 0===this.cmpn(num)},BN.prototype.eq=function eq(num){return 0===this.cmp(num)},BN.red=function red(num){return new Red(num)},BN.prototype.toRed=function toRed(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(ctx){return this.red=ctx,this},BN.prototype.forceRed=function forceRed(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function redAdd(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function redIAdd(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function redSub(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function redISub(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function redShl(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function redMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function redIMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function ireduce(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(input,output){for(var outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(4194303&next)<<4|prev>>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function imulK(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function imulK(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function _verify1(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function imod(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(move(a,a.umod(this.m)._forceRed(this)),a)},Red.prototype.neg=function neg(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function shl(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function imul(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function mul(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())},Red.prototype.sqr=function sqr(a){return this.mul(a,a)},Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function invm(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function pow(a,num){if(num.isZero())return new BN(1).toRed(this);if(0===num.cmpn(1))return a.clone();var wnd=new Array(16);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;i>=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();return res.red=null,res},BN.mont=function mont(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function invm(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(module=__webpack_require__.nmd(module),this)},9931:(module,__unused_webpack_exports,__webpack_require__)=>{var r;function Rand(rand){this.rand=rand}if(module.exports=function rand(len){return r||(r=new Rand(null)),r.generate(len)},module.exports.Rand=Rand,Rand.prototype.generate=function generate(len){return this._rand(len)},Rand.prototype._rand=function _rand(n){if(this.rand.getBytes)return this.rand.getBytes(n);for(var res=new Uint8Array(n),i=0;i<res.length;i++)res[i]=this.rand.getByte();return res},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?Rand.prototype._rand=function _rand(n){var arr=new Uint8Array(n);return self.crypto.getRandomValues(arr),arr}:self.msCrypto&&self.msCrypto.getRandomValues?Rand.prototype._rand=function _rand(n){var arr=new Uint8Array(n);return self.msCrypto.getRandomValues(arr),arr}:"object"==typeof window&&(Rand.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var crypto=__webpack_require__(9214);if("function"!=typeof crypto.randomBytes)throw new Error("Not supported");Rand.prototype._rand=function _rand(n){return crypto.randomBytes(n)}}catch(e){}},4497:(module,__unused_webpack_exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer;function asUInt32Array(buf){Buffer.isBuffer(buf)||(buf=Buffer.from(buf));for(var len=buf.length/4|0,out=new Array(len),i=0;i<len;i++)out[i]=buf.readUInt32BE(4*i);return out}function scrubVec(v){for(;0<v.length;v++)v[0]=0}function cryptBlock(M,keySchedule,SUB_MIX,SBOX,nRounds){for(var t0,t1,t2,t3,SUB_MIX0=SUB_MIX[0],SUB_MIX1=SUB_MIX[1],SUB_MIX2=SUB_MIX[2],SUB_MIX3=SUB_MIX[3],s0=M[0]^keySchedule[0],s1=M[1]^keySchedule[1],s2=M[2]^keySchedule[2],s3=M[3]^keySchedule[3],ksRow=4,round=1;round<nRounds;round++)t0=SUB_MIX0[s0>>>24]^SUB_MIX1[s1>>>16&255]^SUB_MIX2[s2>>>8&255]^SUB_MIX3[255&s3]^keySchedule[ksRow++],t1=SUB_MIX0[s1>>>24]^SUB_MIX1[s2>>>16&255]^SUB_MIX2[s3>>>8&255]^SUB_MIX3[255&s0]^keySchedule[ksRow++],t2=SUB_MIX0[s2>>>24]^SUB_MIX1[s3>>>16&255]^SUB_MIX2[s0>>>8&255]^SUB_MIX3[255&s1]^keySchedule[ksRow++],t3=SUB_MIX0[s3>>>24]^SUB_MIX1[s0>>>16&255]^SUB_MIX2[s1>>>8&255]^SUB_MIX3[255&s2]^keySchedule[ksRow++],s0=t0,s1=t1,s2=t2,s3=t3;return t0=(SBOX[s0>>>24]<<24|SBOX[s1>>>16&255]<<16|SBOX[s2>>>8&255]<<8|SBOX[255&s3])^keySchedule[ksRow++],t1=(SBOX[s1>>>24]<<24|SBOX[s2>>>16&255]<<16|SBOX[s3>>>8&255]<<8|SBOX[255&s0])^keySchedule[ksRow++],t2=(SBOX[s2>>>24]<<24|SBOX[s3>>>16&255]<<16|SBOX[s0>>>8&255]<<8|SBOX[255&s1])^keySchedule[ksRow++],t3=(SBOX[s3>>>24]<<24|SBOX[s0>>>16&255]<<16|SBOX[s1>>>8&255]<<8|SBOX[255&s2])^keySchedule[ksRow++],[t0>>>=0,t1>>>=0,t2>>>=0,t3>>>=0]}var RCON=[0,1,2,4,8,16,32,64,128,27,54],G=function(){for(var d=new Array(256),j=0;j<256;j++)d[j]=j<128?j<<1:j<<1^283;for(var SBOX=[],INV_SBOX=[],SUB_MIX=[[],[],[],[]],INV_SUB_MIX=[[],[],[],[]],x=0,xi=0,i=0;i<256;++i){var sx=xi^xi<<1^xi<<2^xi<<3^xi<<4;sx=sx>>>8^255&sx^99,SBOX[x]=sx,INV_SBOX[sx]=x;var x2=d[x],x4=d[x2],x8=d[x4],t=257*d[sx]^16843008*sx;SUB_MIX[0][x]=t<<24|t>>>8,SUB_MIX[1][x]=t<<16|t>>>16,SUB_MIX[2][x]=t<<8|t>>>24,SUB_MIX[3][x]=t,t=16843009*x8^65537*x4^257*x2^16843008*x,INV_SUB_MIX[0][sx]=t<<24|t>>>8,INV_SUB_MIX[1][sx]=t<<16|t>>>16,INV_SUB_MIX[2][sx]=t<<8|t>>>24,INV_SUB_MIX[3][sx]=t,0===x?x=xi=1:(x=x2^d[d[d[x8^x2]]],xi^=d[d[xi]])}return{SBOX,INV_SBOX,SUB_MIX,INV_SUB_MIX}}();function AES(key){this._key=asUInt32Array(key),this._reset()}AES.blockSize=16,AES.keySize=32,AES.prototype.blockSize=AES.blockSize,AES.prototype.keySize=AES.keySize,AES.prototype._reset=function(){for(var keyWords=this._key,keySize=keyWords.length,nRounds=keySize+6,ksRows=4*(nRounds+1),keySchedule=[],k=0;k<keySize;k++)keySchedule[k]=keyWords[k];for(k=keySize;k<ksRows;k++){var t=keySchedule[k-1];k%keySize==0?(t=t<<8|t>>>24,t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[255&t],t^=RCON[k/keySize|0]<<24):keySize>6&&k%keySize==4&&(t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[255&t]),keySchedule[k]=keySchedule[k-keySize]^t}for(var invKeySchedule=[],ik=0;ik<ksRows;ik++){var ksR=ksRows-ik,tt=keySchedule[ksR-(ik%4?0:4)];invKeySchedule[ik]=ik<4||ksR<=4?tt:G.INV_SUB_MIX[0][G.SBOX[tt>>>24]]^G.INV_SUB_MIX[1][G.SBOX[tt>>>16&255]]^G.INV_SUB_MIX[2][G.SBOX[tt>>>8&255]]^G.INV_SUB_MIX[3][G.SBOX[255&tt]]}this._nRounds=nRounds,this._keySchedule=keySchedule,this._invKeySchedule=invKeySchedule},AES.prototype.encryptBlockRaw=function(M){return cryptBlock(M=asUInt32Array(M),this._keySchedule,G.SUB_MIX,G.SBOX,this._nRounds)},AES.prototype.encryptBlock=function(M){var out=this.encryptBlockRaw(M),buf=Buffer.allocUnsafe(16);return buf.writeUInt32BE(out[0],0),buf.writeUInt32BE(out[1],4),buf.writeUInt32BE(out[2],8),buf.writeUInt32BE(out[3],12),buf},AES.prototype.decryptBlock=function(M){var m1=(M=asUInt32Array(M))[1];M[1]=M[3],M[3]=m1;var out=cryptBlock(M,this._invKeySchedule,G.INV_SUB_MIX,G.INV_SBOX,this._nRounds),buf=Buffer.allocUnsafe(16);return buf.writeUInt32BE(out[0],0),buf.writeUInt32BE(out[3],4),buf.writeUInt32BE(out[2],8),buf.writeUInt32BE(out[1],12),buf},AES.prototype.scrub=function(){scrubVec(this._keySchedule),scrubVec(this._invKeySchedule),scrubVec(this._key)},module.exports.AES=AES},2422:(module,__unused_webpack_exports,__webpack_require__)=>{var aes=__webpack_require__(4497),Buffer=__webpack_require__(9509).Buffer,Transform=__webpack_require__(1027),inherits=__webpack_require__(5717),GHASH=__webpack_require__(3288),xor=__webpack_require__(7295),incr32=__webpack_require__(685);function StreamCipher(mode,key,iv,decrypt){Transform.call(this);var h=Buffer.alloc(4,0);this._cipher=new aes.AES(key);var ck=this._cipher.encryptBlock(h);this._ghash=new GHASH(ck),iv=function calcIv(self,iv,ck){if(12===iv.length)return self._finID=Buffer.concat([iv,Buffer.from([0,0,0,1])]),Buffer.concat([iv,Buffer.from([0,0,0,2])]);var ghash=new GHASH(ck),len=iv.length,toPad=len%16;ghash.update(iv),toPad&&(toPad=16-toPad,ghash.update(Buffer.alloc(toPad,0))),ghash.update(Buffer.alloc(8,0));var ivBits=8*len,tail=Buffer.alloc(8);tail.writeUIntBE(ivBits,0,8),ghash.update(tail),self._finID=ghash.state;var out=Buffer.from(self._finID);return incr32(out),out}(this,iv,ck),this._prev=Buffer.from(iv),this._cache=Buffer.allocUnsafe(0),this._secCache=Buffer.allocUnsafe(0),this._decrypt=decrypt,this._alen=0,this._len=0,this._mode=mode,this._authTag=null,this._called=!1}inherits(StreamCipher,Transform),StreamCipher.prototype._update=function(chunk){if(!this._called&&this._alen){var rump=16-this._alen%16;rump<16&&(rump=Buffer.alloc(rump,0),this._ghash.update(rump))}this._called=!0;var out=this._mode.encrypt(this,chunk);return this._decrypt?this._ghash.update(chunk):this._ghash.update(out),this._len+=chunk.length,out},StreamCipher.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var tag=xor(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function xorTest(a,b){var out=0;a.length!==b.length&&out++;for(var len=Math.min(a.length,b.length),i=0;i<len;++i)out+=a[i]^b[i];return out}(tag,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=tag,this._cipher.scrub()},StreamCipher.prototype.getAuthTag=function getAuthTag(){if(this._decrypt||!Buffer.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},StreamCipher.prototype.setAuthTag=function setAuthTag(tag){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=tag},StreamCipher.prototype.setAAD=function setAAD(buf){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(buf),this._alen+=buf.length},module.exports=StreamCipher},4696:(__unused_webpack_module,exports,__webpack_require__)=>{var ciphers=__webpack_require__(1494),deciphers=__webpack_require__(6193),modes=__webpack_require__(4946);exports.createCipher=exports.Cipher=ciphers.createCipher,exports.createCipheriv=exports.Cipheriv=ciphers.createCipheriv,exports.createDecipher=exports.Decipher=deciphers.createDecipher,exports.createDecipheriv=exports.Decipheriv=deciphers.createDecipheriv,exports.listCiphers=exports.getCiphers=function getCiphers(){return Object.keys(modes)}},6193:(__unused_webpack_module,exports,__webpack_require__)=>{var AuthCipher=__webpack_require__(2422),Buffer=__webpack_require__(9509).Buffer,MODES=__webpack_require__(45),StreamCipher=__webpack_require__(5969),Transform=__webpack_require__(1027),aes=__webpack_require__(4497),ebtk=__webpack_require__(3048);function Decipher(mode,key,iv){Transform.call(this),this._cache=new Splitter,this._last=void 0,this._cipher=new aes.AES(key),this._prev=Buffer.from(iv),this._mode=mode,this._autopadding=!0}function Splitter(){this.cache=Buffer.allocUnsafe(0)}function createDecipheriv(suite,password,iv){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");if("string"==typeof iv&&(iv=Buffer.from(iv)),"GCM"!==config.mode&&iv.length!==config.iv)throw new TypeError("invalid iv length "+iv.length);if("string"==typeof password&&(password=Buffer.from(password)),password.length!==config.key/8)throw new TypeError("invalid key length "+password.length);return"stream"===config.type?new StreamCipher(config.module,password,iv,!0):"auth"===config.type?new AuthCipher(config.module,password,iv,!0):new Decipher(config.module,password,iv)}__webpack_require__(5717)(Decipher,Transform),Decipher.prototype._update=function(data){var chunk,thing;this._cache.add(data);for(var out=[];chunk=this._cache.get(this._autopadding);)thing=this._mode.decrypt(this,chunk),out.push(thing);return Buffer.concat(out)},Decipher.prototype._final=function(){var chunk=this._cache.flush();if(this._autopadding)return function unpad(last){var padded=last[15];if(padded<1||padded>16)throw new Error("unable to decrypt data");var i=-1;for(;++i<padded;)if(last[i+(16-padded)]!==padded)throw new Error("unable to decrypt data");if(16===padded)return;return last.slice(0,16-padded)}(this._mode.decrypt(this,chunk));if(chunk)throw new Error("data not multiple of block length")},Decipher.prototype.setAutoPadding=function(setTo){return this._autopadding=!!setTo,this},Splitter.prototype.add=function(data){this.cache=Buffer.concat([this.cache,data])},Splitter.prototype.get=function(autoPadding){var out;if(autoPadding){if(this.cache.length>16)return out=this.cache.slice(0,16),this.cache=this.cache.slice(16),out}else if(this.cache.length>=16)return out=this.cache.slice(0,16),this.cache=this.cache.slice(16),out;return null},Splitter.prototype.flush=function(){if(this.cache.length)return this.cache},exports.createDecipher=function createDecipher(suite,password){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");var keys=ebtk(password,!1,config.key,config.iv);return createDecipheriv(suite,keys.key,keys.iv)},exports.createDecipheriv=createDecipheriv},1494:(__unused_webpack_module,exports,__webpack_require__)=>{var MODES=__webpack_require__(45),AuthCipher=__webpack_require__(2422),Buffer=__webpack_require__(9509).Buffer,StreamCipher=__webpack_require__(5969),Transform=__webpack_require__(1027),aes=__webpack_require__(4497),ebtk=__webpack_require__(3048);function Cipher(mode,key,iv){Transform.call(this),this._cache=new Splitter,this._cipher=new aes.AES(key),this._prev=Buffer.from(iv),this._mode=mode,this._autopadding=!0}__webpack_require__(5717)(Cipher,Transform),Cipher.prototype._update=function(data){var chunk,thing;this._cache.add(data);for(var out=[];chunk=this._cache.get();)thing=this._mode.encrypt(this,chunk),out.push(thing);return Buffer.concat(out)};var PADDING=Buffer.alloc(16,16);function Splitter(){this.cache=Buffer.allocUnsafe(0)}function createCipheriv(suite,password,iv){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");if("string"==typeof password&&(password=Buffer.from(password)),password.length!==config.key/8)throw new TypeError("invalid key length "+password.length);if("string"==typeof iv&&(iv=Buffer.from(iv)),"GCM"!==config.mode&&iv.length!==config.iv)throw new TypeError("invalid iv length "+iv.length);return"stream"===config.type?new StreamCipher(config.module,password,iv):"auth"===config.type?new AuthCipher(config.module,password,iv):new Cipher(config.module,password,iv)}Cipher.prototype._final=function(){var chunk=this._cache.flush();if(this._autopadding)return chunk=this._mode.encrypt(this,chunk),this._cipher.scrub(),chunk;if(!chunk.equals(PADDING))throw this._cipher.scrub(),new Error("data not multiple of block length")},Cipher.prototype.setAutoPadding=function(setTo){return this._autopadding=!!setTo,this},Splitter.prototype.add=function(data){this.cache=Buffer.concat([this.cache,data])},Splitter.prototype.get=function(){if(this.cache.length>15){var out=this.cache.slice(0,16);return this.cache=this.cache.slice(16),out}return null},Splitter.prototype.flush=function(){for(var len=16-this.cache.length,padBuff=Buffer.allocUnsafe(len),i=-1;++i<len;)padBuff.writeUInt8(len,i);return Buffer.concat([this.cache,padBuff])},exports.createCipheriv=createCipheriv,exports.createCipher=function createCipher(suite,password){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");var keys=ebtk(password,!1,config.key,config.iv);return createCipheriv(suite,keys.key,keys.iv)}},3288:(module,__unused_webpack_exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer,ZEROES=Buffer.alloc(16,0);function fromArray(out){var buf=Buffer.allocUnsafe(16);return buf.writeUInt32BE(out[0]>>>0,0),buf.writeUInt32BE(out[1]>>>0,4),buf.writeUInt32BE(out[2]>>>0,8),buf.writeUInt32BE(out[3]>>>0,12),buf}function GHASH(key){this.h=key,this.state=Buffer.alloc(16,0),this.cache=Buffer.allocUnsafe(0)}GHASH.prototype.ghash=function(block){for(var i=-1;++i<block.length;)this.state[i]^=block[i];this._multiply()},GHASH.prototype._multiply=function(){for(var j,lsbVi,Vi=function toArray(buf){return[buf.readUInt32BE(0),buf.readUInt32BE(4),buf.readUInt32BE(8),buf.readUInt32BE(12)]}(this.h),Zi=[0,0,0,0],i=-1;++i<128;){for(0!=(this.state[~~(i/8)]&1<<7-i%8)&&(Zi[0]^=Vi[0],Zi[1]^=Vi[1],Zi[2]^=Vi[2],Zi[3]^=Vi[3]),lsbVi=0!=(1&Vi[3]),j=3;j>0;j--)Vi[j]=Vi[j]>>>1|(1&Vi[j-1])<<31;Vi[0]=Vi[0]>>>1,lsbVi&&(Vi[0]=Vi[0]^225<<24)}this.state=fromArray(Zi)},GHASH.prototype.update=function(buf){var chunk;for(this.cache=Buffer.concat([this.cache,buf]);this.cache.length>=16;)chunk=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(chunk)},GHASH.prototype.final=function(abl,bl){return this.cache.length&&this.ghash(Buffer.concat([this.cache,ZEROES],16)),this.ghash(fromArray([0,abl,0,bl])),this.state},module.exports=GHASH},685:module=>{module.exports=function incr32(iv){for(var item,len=iv.length;len--;){if(255!==(item=iv.readUInt8(len))){item++,iv.writeUInt8(item,len);break}iv.writeUInt8(0,len)}}},5292:(__unused_webpack_module,exports,__webpack_require__)=>{var xor=__webpack_require__(7295);exports.encrypt=function(self,block){var data=xor(block,self._prev);return self._prev=self._cipher.encryptBlock(data),self._prev},exports.decrypt=function(self,block){var pad=self._prev;self._prev=block;var out=self._cipher.decryptBlock(block);return xor(out,pad)}},6311:(__unused_webpack_module,exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer,xor=__webpack_require__(7295);function encryptStart(self,data,decrypt){var len=data.length,out=xor(data,self._cache);return self._cache=self._cache.slice(len),self._prev=Buffer.concat([self._prev,decrypt?data:out]),out}exports.encrypt=function(self,data,decrypt){for(var len,out=Buffer.allocUnsafe(0);data.length;){if(0===self._cache.length&&(self._cache=self._cipher.encryptBlock(self._prev),self._prev=Buffer.allocUnsafe(0)),!(self._cache.length<=data.length)){out=Buffer.concat([out,encryptStart(self,data,decrypt)]);break}len=self._cache.length,out=Buffer.concat([out,encryptStart(self,data.slice(0,len),decrypt)]),data=data.slice(len)}return out}},1510:(__unused_webpack_module,exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer;function encryptByte(self,byteParam,decrypt){for(var bit,value,i=-1,out=0;++i<8;)bit=byteParam&1<<7-i?128:0,out+=(128&(value=self._cipher.encryptBlock(self._prev)[0]^bit))>>i%8,self._prev=shiftIn(self._prev,decrypt?bit:value);return out}function shiftIn(buffer,value){var len=buffer.length,i=-1,out=Buffer.allocUnsafe(buffer.length);for(buffer=Buffer.concat([buffer,Buffer.from([value])]);++i<len;)out[i]=buffer[i]<<1|buffer[i+1]>>7;return out}exports.encrypt=function(self,chunk,decrypt){for(var len=chunk.length,out=Buffer.allocUnsafe(len),i=-1;++i<len;)out[i]=encryptByte(self,chunk[i],decrypt);return out}},1964:(__unused_webpack_module,exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer;function encryptByte(self,byteParam,decrypt){var out=self._cipher.encryptBlock(self._prev)[0]^byteParam;return self._prev=Buffer.concat([self._prev.slice(1),Buffer.from([decrypt?byteParam:out])]),out}exports.encrypt=function(self,chunk,decrypt){for(var len=chunk.length,out=Buffer.allocUnsafe(len),i=-1;++i<len;)out[i]=encryptByte(self,chunk[i],decrypt);return out}},6009:(__unused_webpack_module,exports,__webpack_require__)=>{var xor=__webpack_require__(7295),Buffer=__webpack_require__(9509).Buffer,incr32=__webpack_require__(685);function getBlock(self){var out=self._cipher.encryptBlockRaw(self._prev);return incr32(self._prev),out}exports.encrypt=function(self,chunk){var chunkNum=Math.ceil(chunk.length/16),start=self._cache.length;self._cache=Buffer.concat([self._cache,Buffer.allocUnsafe(16*chunkNum)]);for(var i=0;i<chunkNum;i++){var out=getBlock(self),offset=start+16*i;self._cache.writeUInt32BE(out[0],offset+0),self._cache.writeUInt32BE(out[1],offset+4),self._cache.writeUInt32BE(out[2],offset+8),self._cache.writeUInt32BE(out[3],offset+12)}var pad=self._cache.slice(0,chunk.length);return self._cache=self._cache.slice(chunk.length),xor(chunk,pad)}},1084:(__unused_webpack_module,exports)=>{exports.encrypt=function(self,block){return self._cipher.encryptBlock(block)},exports.decrypt=function(self,block){return self._cipher.decryptBlock(block)}},45:(module,__unused_webpack_exports,__webpack_require__)=>{var modeModules={ECB:__webpack_require__(1084),CBC:__webpack_require__(5292),CFB:__webpack_require__(6311),CFB8:__webpack_require__(1964),CFB1:__webpack_require__(1510),OFB:__webpack_require__(8861),CTR:__webpack_require__(6009),GCM:__webpack_require__(6009)},modes=__webpack_require__(4946);for(var key in modes)modes[key].module=modeModules[modes[key].mode];module.exports=modes},8861:(__unused_webpack_module,exports,__webpack_require__)=>{var xor=__webpack_require__(7295);function getBlock(self){return self._prev=self._cipher.encryptBlock(self._prev),self._prev}exports.encrypt=function(self,chunk){for(;self._cache.length<chunk.length;)self._cache=Buffer.concat([self._cache,getBlock(self)]);var pad=self._cache.slice(0,chunk.length);return self._cache=self._cache.slice(chunk.length),xor(chunk,pad)}},5969:(module,__unused_webpack_exports,__webpack_require__)=>{var aes=__webpack_require__(4497),Buffer=__webpack_require__(9509).Buffer,Transform=__webpack_require__(1027);function StreamCipher(mode,key,iv,decrypt){Transform.call(this),this._cipher=new aes.AES(key),this._prev=Buffer.from(iv),this._cache=Buffer.allocUnsafe(0),this._secCache=Buffer.allocUnsafe(0),this._decrypt=decrypt,this._mode=mode}__webpack_require__(5717)(StreamCipher,Transform),StreamCipher.prototype._update=function(chunk){return this._mode.encrypt(this,chunk,this._decrypt)},StreamCipher.prototype._final=function(){this._cipher.scrub()},module.exports=StreamCipher},3614:(__unused_webpack_module,exports,__webpack_require__)=>{var DES=__webpack_require__(7667),aes=__webpack_require__(4696),aesModes=__webpack_require__(45),desModes=__webpack_require__(9715),ebtk=__webpack_require__(3048);function createCipheriv(suite,key,iv){if(suite=suite.toLowerCase(),aesModes[suite])return aes.createCipheriv(suite,key,iv);if(desModes[suite])return new DES({key,iv,mode:suite});throw new TypeError("invalid suite type")}function createDecipheriv(suite,key,iv){if(suite=suite.toLowerCase(),aesModes[suite])return aes.createDecipheriv(suite,key,iv);if(desModes[suite])return new DES({key,iv,mode:suite,decrypt:!0});throw new TypeError("invalid suite type")}exports.createCipher=exports.Cipher=function createCipher(suite,password){var keyLen,ivLen;if(suite=suite.toLowerCase(),aesModes[suite])keyLen=aesModes[suite].key,ivLen=aesModes[suite].iv;else{if(!desModes[suite])throw new TypeError("invalid suite type");keyLen=8*desModes[suite].key,ivLen=desModes[suite].iv}var keys=ebtk(password,!1,keyLen,ivLen);return createCipheriv(suite,keys.key,keys.iv)},exports.createCipheriv=exports.Cipheriv=createCipheriv,exports.createDecipher=exports.Decipher=function createDecipher(suite,password){var keyLen,ivLen;if(suite=suite.toLowerCase(),aesModes[suite])keyLen=aesModes[suite].key,ivLen=aesModes[suite].iv;else{if(!desModes[suite])throw new TypeError("invalid suite type");keyLen=8*desModes[suite].key,ivLen=desModes[suite].iv}var keys=ebtk(password,!1,keyLen,ivLen);return createDecipheriv(suite,keys.key,keys.iv)},exports.createDecipheriv=exports.Decipheriv=createDecipheriv,exports.listCiphers=exports.getCiphers=function getCiphers(){return Object.keys(desModes).concat(aes.getCiphers())}},7667:(module,__unused_webpack_exports,__webpack_require__)=>{var CipherBase=__webpack_require__(1027),des=__webpack_require__(5251),inherits=__webpack_require__(5717),Buffer=__webpack_require__(9509).Buffer,modes={"des-ede3-cbc":des.CBC.instantiate(des.EDE),"des-ede3":des.EDE,"des-ede-cbc":des.CBC.instantiate(des.EDE),"des-ede":des.EDE,"des-cbc":des.CBC.instantiate(des.DES),"des-ecb":des.DES};function DES(opts){CipherBase.call(this);var type,modeName=opts.mode.toLowerCase(),mode=modes[modeName];type=opts.decrypt?"decrypt":"encrypt";var key=opts.key;Buffer.isBuffer(key)||(key=Buffer.from(key)),"des-ede"!==modeName&&"des-ede-cbc"!==modeName||(key=Buffer.concat([key,key.slice(0,8)]));var iv=opts.iv;Buffer.isBuffer(iv)||(iv=Buffer.from(iv)),this._des=mode.create({key,iv,type})}modes.des=modes["des-cbc"],modes.des3=modes["des-ede3-cbc"],module.exports=DES,inherits(DES,CipherBase),DES.prototype._update=function(data){return Buffer.from(this._des.update(data))},DES.prototype._final=function(){return Buffer.from(this._des.final())}},9715:(__unused_webpack_module,exports)=>{exports["des-ecb"]={key:8,iv:0},exports["des-cbc"]=exports.des={key:8,iv:8},exports["des-ede3-cbc"]=exports.des3={key:24,iv:8},exports["des-ede3"]={key:24,iv:0},exports["des-ede-cbc"]={key:16,iv:8},exports["des-ede"]={key:16,iv:0}},3663:(module,__unused_webpack_exports,__webpack_require__)=>{var BN=__webpack_require__(3982),randomBytes=__webpack_require__(1798);function getr(priv){var r,len=priv.modulus.byteLength();do{r=new BN(randomBytes(len))}while(r.cmp(priv.modulus)>=0||!r.umod(priv.prime1)||!r.umod(priv.prime2));return r}function crt(msg,priv){var blinds=function blind(priv){var r=getr(priv);return{blinder:r.toRed(BN.mont(priv.modulus)).redPow(new BN(priv.publicExponent)).fromRed(),unblinder:r.invm(priv.modulus)}}(priv),len=priv.modulus.byteLength(),blinded=new BN(msg).mul(blinds.blinder).umod(priv.modulus),c1=blinded.toRed(BN.mont(priv.prime1)),c2=blinded.toRed(BN.mont(priv.prime2)),qinv=priv.coefficient,p=priv.prime1,q=priv.prime2,m1=c1.redPow(priv.exponent1).fromRed(),m2=c2.redPow(priv.exponent2).fromRed(),h=m1.isub(m2).imul(qinv).umod(p).imul(q);return m2.iadd(h).imul(blinds.unblinder).umod(priv.modulus).toArrayLike(Buffer,"be",len)}crt.getr=getr,module.exports=crt},3982:function(module,__unused_webpack_exports,__webpack_require__){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}var Buffer;"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;try{Buffer="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:__webpack_require__(1922).Buffer}catch(e){}function parseHex4Bits(string,index){var c=string.charCodeAt(index);return c>=48&&c<=57?c-48:c>=65&&c<=70?c-55:c>=97&&c<=102?c-87:void assert(!1,"Invalid character in "+string)}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);return index-1>=lowerBound&&(r|=parseHex4Bits(string,index-1)<<4),r}function parseBase(str,start,end,mul){for(var r=0,b=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul,b=c>=49?c-49+10:c>=17?c-17+10:c,assert(c>=0&&b<mul,"Invalid character"),r+=b}return r}function move(dest,src){dest.words=src.words,dest.length=src.length,dest.negative=src.negative,dest.red=src.red}if(BN.isBN=function isBN(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function max(left,right){return left.cmp(right)>0?left:right},BN.min=function min(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function init(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&(start++,this.negative=1),start<number.length&&(16===base?this._parseHex(number,start,endian):(this._parseBase(number,base,start),"le"===endian&&this._initArray(this.toArray(),base,endian)))},BN.prototype._initNumber=function _initNumber(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function _initArray(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this._strip()},BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var w,off=0,j=0;if("be"===endian)for(i=number.length-1;i>=start;i-=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;else for(i=(number.length-start)%2==0?start+1:start;i<number.length;i+=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;this._strip()},BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}this._strip()},BN.prototype.copy=function copy(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype._move=function _move(dest){move(dest,this)},BN.prototype.clone=function clone(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function _expand(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype._strip=function strip(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{BN.prototype[Symbol.for("nodejs.util.inspect.custom")]=inspect}catch(e){BN.prototype.inspect=inspect}else BN.prototype.inspect=inspect;function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var zeros=["","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"],groupSizes=[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],groupBases=[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];BN.prototype.toString=function toString(base,padding){var out;if(padding=0|padding||1,16===(base=base||10)||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);out=0!==(carry=w>>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modrn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function toJSON(){return this.toString(16,2)},Buffer&&(BN.prototype.toBuffer=function toBuffer(endian,length){return this.toArrayLike(Buffer,endian,length)}),BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)};function smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){for(var ncarry=carry>>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out._strip()}BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){this._strip();var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0");var res=function allocate(ArrayType,size){return ArrayType.allocUnsafe?ArrayType.allocUnsafe(size):new ArrayType(size)}(ArrayType,reqLength);return this["_toArrayLike"+("le"===endian?"LE":"BE")](res,byteLength),res},BN.prototype._toArrayLikeLE=function _toArrayLikeLE(res,byteLength){for(var position=0,carry=0,i=0,shift=0;i<this.length;i++){var word=this.words[i]<<shift|carry;res[position++]=255&word,position<res.length&&(res[position++]=word>>8&255),position<res.length&&(res[position++]=word>>16&255),6===shift?(position<res.length&&(res[position++]=word>>24&255),carry=0,shift=0):(carry=word>>>24,shift+=2)}if(position<res.length)for(res[position++]=carry;position<res.length;)res[position++]=0},BN.prototype._toArrayLikeBE=function _toArrayLikeBE(res,byteLength){for(var position=res.length-1,carry=0,i=0,shift=0;i<this.length;i++){var word=this.words[i]<<shift|carry;res[position--]=255&word,position>=0&&(res[position--]=word>>8&255),position>=0&&(res[position--]=word>>16&255),6===shift?(position>=0&&(res[position--]=word>>24&255),carry=0,shift=0):(carry=word>>>24,shift+=2)}if(position>=0)for(res[position--]=carry;position>=0;)res[position--]=0},Math.clz32?BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function _countBits(w){var t=w,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},BN.prototype._zeroBits=function _zeroBits(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function toTwos(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function fromTwos(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function isNeg(){return 0!==this.negative},BN.prototype.neg=function neg(){return this.clone().ineg()},BN.prototype.ineg=function ineg(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function iuor(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this._strip()},BN.prototype.ior=function ior(num){return assert(0==(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function or(num){return this.length>num.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function uor(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function iuand(num){var b;b=this.length>num.length?num:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this._strip()},BN.prototype.iand=function iand(num){return assert(0==(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function and(num){return this.length>num.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function uand(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function iuxor(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this._strip()},BN.prototype.ixor=function ixor(num){return assert(0==(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function xor(num){return this.length>num.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function uxor(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function inotn(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this._strip()},BN.prototype.notn=function notn(width){return this.clone().inotn(width)},BN.prototype.setn=function setn(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<<wbit:this.words[off]&~(1<<wbit),this._strip()},BN.prototype.iadd=function iadd(num){var r,a,b;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function add(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function isub(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)carry=(r=(0|a.words[i])-(0|b.words[i])+carry)>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)carry=(r=(0|a.words[i])+carry)>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this._strip()},BN.prototype.sub=function sub(num){return this.clone().isub(num)};var comb10MulTo=function comb10MulTo(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j,r=(0|self.words[i])*(0|num.words[j]),lo=67108863&r;rword=67108863&(lo=lo+rword|0),hncarry+=(ncarry=(ncarry=ncarry+(r/67108864|0)|0)+(lo>>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out._strip()}function jumboMulTo(self,num,out){return bigMulTo(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function mulTo(num,out){var len=this.length+num.length;return 10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?bigMulTo(this,num,out):jumboMulTo(this,num,out)},FFTM.prototype.makeRBT=function makeRBT(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function revBin(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function transform(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function guessLen13b(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function conjugate(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function normalize13b(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function convert13b(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0==(-8192&carry))},FFTM.prototype.stub=function stub(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function mulp(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out._strip()},BN.prototype.mul=function mul(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function mulf(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function imuln(num){var isNegNum=num<0;isNegNum&&(num=-num),assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),isNegNum?this.ineg():this},BN.prototype.muln=function muln(num){return this.clone().imuln(num)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(num){var w=function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=num.words[off]>>>wbit&1}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function iushln(bits){assert("number"==typeof bits&&bits>=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this._strip()},BN.prototype.ishln=function ishln(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function iushrn(bits,hint,extended){var h;assert("number"==typeof bits&&bits>=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;i>=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},BN.prototype.ishrn=function ishrn(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function testn(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<<r;return!(this.length<=s)&&!!(this.words[s]&q)},BN.prototype.imaskn=function imaskn(bits){assert("number"==typeof bits&&bits>=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this._strip()},BN.prototype.maskn=function maskn(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function iaddn(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<=num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function _iaddn(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this._strip()},BN.prototype.addn=function addn(num){return this.clone().iaddn(num)},BN.prototype.subn=function subn(num){return this.clone().isubn(num)},BN.prototype.iabs=function iabs(){return this.negative=0,this},BN.prototype.abs=function abs(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function _ishlnsubmul(num,mul,shift){var i,w,len=num.length+shift;this._expand(len);var carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;carry=((w-=67108863&right)>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)carry=(w=(0|this.words[i+shift])+carry)>>26,this.words[i+shift]=67108863&w;if(0===carry)return this._strip();for(assert(-1===carry),carry=0,i=0;i<this.length;i++)carry=(w=-(0|this.words[i])+carry)>>26,this.words[i]=67108863&w;return this.negative=1,this._strip()},BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q._strip(),a._strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function divmod(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div,mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modrn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modrn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function div(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function mod(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function umod(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modrn=function modrn(num){var isNegNum=num<0;isNegNum&&(num=-num),assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return isNegNum?-acc:acc},BN.prototype.modn=function modn(num){return this.modrn(num)},BN.prototype.idivn=function idivn(num){var isNegNum=num<0;isNegNum&&(num=-num),assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this._strip(),isNegNum?this.ineg():this},BN.prototype.divn=function divn(num){return this.clone().idivn(num)},BN.prototype.egcd=function egcd(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function _invmp(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(num){return this.words[0]&num},BN.prototype.bincn=function bincn(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];carry=(w+=carry)>>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this._strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function cmp(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function ucmp(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(res=1);break}}return res},BN.prototype.gtn=function gtn(num){return 1===this.cmpn(num)},BN.prototype.gt=function gt(num){return 1===this.cmp(num)},BN.prototype.gten=function gten(num){return this.cmpn(num)>=0},BN.prototype.gte=function gte(num){return this.cmp(num)>=0},BN.prototype.ltn=function ltn(num){return-1===this.cmpn(num)},BN.prototype.lt=function lt(num){return-1===this.cmp(num)},BN.prototype.lten=function lten(num){return this.cmpn(num)<=0},BN.prototype.lte=function lte(num){return this.cmp(num)<=0},BN.prototype.eqn=function eqn(num){return 0===this.cmpn(num)},BN.prototype.eq=function eq(num){return 0===this.cmp(num)},BN.red=function red(num){return new Red(num)},BN.prototype.toRed=function toRed(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(ctx){return this.red=ctx,this},BN.prototype.forceRed=function forceRed(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function redAdd(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function redIAdd(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function redSub(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function redISub(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function redShl(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function redMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function redIMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function ireduce(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(input,output){for(var outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(4194303&next)<<4|prev>>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function imulK(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function imulK(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function _verify1(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function imod(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(move(a,a.umod(this.m)._forceRed(this)),a)},Red.prototype.neg=function neg(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function shl(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function imul(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function mul(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())},Red.prototype.sqr=function sqr(a){return this.mul(a,a)},Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function invm(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function pow(a,num){if(num.isZero())return new BN(1).toRed(this);if(0===num.cmpn(1))return a.clone();var wnd=new Array(16);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;i>=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();return res.red=null,res},BN.mont=function mont(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function invm(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(module=__webpack_require__.nmd(module),this)},6042:(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__(5207)},4743:(module,__unused_webpack_exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer,createHash=__webpack_require__(3482),stream=__webpack_require__(8473),inherits=__webpack_require__(5717),sign=__webpack_require__(2957),verify=__webpack_require__(7753),algorithms=__webpack_require__(5207);function Sign(algorithm){stream.Writable.call(this);var data=algorithms[algorithm];if(!data)throw new Error("Unknown message digest");this._hashType=data.hash,this._hash=createHash(data.hash),this._tag=data.id,this._signType=data.sign}function Verify(algorithm){stream.Writable.call(this);var data=algorithms[algorithm];if(!data)throw new Error("Unknown message digest");this._hash=createHash(data.hash),this._tag=data.id,this._signType=data.sign}function createSign(algorithm){return new Sign(algorithm)}function createVerify(algorithm){return new Verify(algorithm)}Object.keys(algorithms).forEach((function(key){algorithms[key].id=Buffer.from(algorithms[key].id,"hex"),algorithms[key.toLowerCase()]=algorithms[key]})),inherits(Sign,stream.Writable),Sign.prototype._write=function _write(data,_,done){this._hash.update(data),done()},Sign.prototype.update=function update(data,enc){return"string"==typeof data&&(data=Buffer.from(data,enc)),this._hash.update(data),this},Sign.prototype.sign=function signMethod(key,enc){this.end();var hash=this._hash.digest(),sig=sign(hash,key,this._hashType,this._signType,this._tag);return enc?sig.toString(enc):sig},inherits(Verify,stream.Writable),Verify.prototype._write=function _write(data,_,done){this._hash.update(data),done()},Verify.prototype.update=function update(data,enc){return"string"==typeof data&&(data=Buffer.from(data,enc)),this._hash.update(data),this},Verify.prototype.verify=function verifyMethod(key,sig,enc){"string"==typeof sig&&(sig=Buffer.from(sig,enc)),this.end();var hash=this._hash.digest();return verify(sig,hash,key,this._signType,this._tag)},module.exports={Sign:createSign,Verify:createVerify,createSign,createVerify}},2957:(module,__unused_webpack_exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer,createHmac=__webpack_require__(8355),crt=__webpack_require__(3663),EC=__webpack_require__(6266).ec,BN=__webpack_require__(8815),parseKeys=__webpack_require__(980),curves=__webpack_require__(1308);function getKey(x,q,hash,algo){if((x=Buffer.from(x.toArray())).length<q.byteLength()){var zeros=Buffer.alloc(q.byteLength()-x.length);x=Buffer.concat([zeros,x])}var hlen=hash.length,hbits=function bits2octets(bits,q){bits=(bits=bits2int(bits,q)).mod(q);var out=Buffer.from(bits.toArray());if(out.length<q.byteLength()){var zeros=Buffer.alloc(q.byteLength()-out.length);out=Buffer.concat([zeros,out])}return out}(hash,q),v=Buffer.alloc(hlen);v.fill(1);var k=Buffer.alloc(hlen);return k=createHmac(algo,k).update(v).update(Buffer.from([0])).update(x).update(hbits).digest(),v=createHmac(algo,k).update(v).digest(),{k:k=createHmac(algo,k).update(v).update(Buffer.from([1])).update(x).update(hbits).digest(),v:v=createHmac(algo,k).update(v).digest()}}function bits2int(obits,q){var bits=new BN(obits),shift=(obits.length<<3)-q.bitLength();return shift>0&&bits.ishrn(shift),bits}function makeKey(q,kv,algo){var t,k;do{for(t=Buffer.alloc(0);8*t.length<q.bitLength();)kv.v=createHmac(algo,kv.k).update(kv.v).digest(),t=Buffer.concat([t,kv.v]);k=bits2int(t,q),kv.k=createHmac(algo,kv.k).update(kv.v).update(Buffer.from([0])).digest(),kv.v=createHmac(algo,kv.k).update(kv.v).digest()}while(-1!==k.cmp(q));return k}function makeR(g,k,p,q){return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q)}module.exports=function sign(hash,key,hashType,signType,tag){var priv=parseKeys(key);if(priv.curve){if("ecdsa"!==signType&&"ecdsa/rsa"!==signType)throw new Error("wrong private key type");return function ecSign(hash,priv){var curveId=curves[priv.curve.join(".")];if(!curveId)throw new Error("unknown curve "+priv.curve.join("."));var out=new EC(curveId).keyFromPrivate(priv.privateKey).sign(hash);return Buffer.from(out.toDER())}(hash,priv)}if("dsa"===priv.type){if("dsa"!==signType)throw new Error("wrong private key type");return function dsaSign(hash,priv,algo){var k,x=priv.params.priv_key,p=priv.params.p,q=priv.params.q,g=priv.params.g,r=new BN(0),H=bits2int(hash,q).mod(q),s=!1,kv=getKey(x,q,hash,algo);for(;!1===s;)r=makeR(g,k=makeKey(q,kv,algo),p,q),0===(s=k.invm(q).imul(H.add(x.mul(r))).mod(q)).cmpn(0)&&(s=!1,r=new BN(0));return function toDER(r,s){r=r.toArray(),s=s.toArray(),128&r[0]&&(r=[0].concat(r));128&s[0]&&(s=[0].concat(s));var res=[48,r.length+s.length+4,2,r.length];return res=res.concat(r,[2,s.length],s),Buffer.from(res)}(r,s)}(hash,priv,hashType)}if("rsa"!==signType&&"ecdsa/rsa"!==signType)throw new Error("wrong private key type");hash=Buffer.concat([tag,hash]);for(var len=priv.modulus.byteLength(),pad=[0,1];hash.length+pad.length+1<len;)pad.push(255);pad.push(0);for(var i=-1;++i<hash.length;)pad.push(hash[i]);return crt(pad,priv)},module.exports.getKey=getKey,module.exports.makeKey=makeKey},7753:(module,__unused_webpack_exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer,BN=__webpack_require__(8815),EC=__webpack_require__(6266).ec,parseKeys=__webpack_require__(980),curves=__webpack_require__(1308);function checkValue(b,q){if(b.cmpn(0)<=0)throw new Error("invalid sig");if(b.cmp(q)>=q)throw new Error("invalid sig")}module.exports=function verify(sig,hash,key,signType,tag){var pub=parseKeys(key);if("ec"===pub.type){if("ecdsa"!==signType&&"ecdsa/rsa"!==signType)throw new Error("wrong public key type");return function ecVerify(sig,hash,pub){var curveId=curves[pub.data.algorithm.curve.join(".")];if(!curveId)throw new Error("unknown curve "+pub.data.algorithm.curve.join("."));var curve=new EC(curveId),pubkey=pub.data.subjectPrivateKey.data;return curve.verify(hash,sig,pubkey)}(sig,hash,pub)}if("dsa"===pub.type){if("dsa"!==signType)throw new Error("wrong public key type");return function dsaVerify(sig,hash,pub){var p=pub.data.p,q=pub.data.q,g=pub.data.g,y=pub.data.pub_key,unpacked=parseKeys.signature.decode(sig,"der"),s=unpacked.s,r=unpacked.r;checkValue(s,q),checkValue(r,q);var montp=BN.mont(p),w=s.invm(q);return 0===g.toRed(montp).redPow(new BN(hash).mul(w).mod(q)).fromRed().mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed()).mod(p).mod(q).cmp(r)}(sig,hash,pub)}if("rsa"!==signType&&"ecdsa/rsa"!==signType)throw new Error("wrong public key type");hash=Buffer.concat([tag,hash]);for(var len=pub.modulus.byteLength(),pad=[1],padNum=0;hash.length+pad.length+2<len;)pad.push(255),padNum++;pad.push(0);for(var i=-1;++i<hash.length;)pad.push(hash[i]);pad=Buffer.from(pad);var red=BN.mont(pub.modulus);sig=(sig=new BN(sig).toRed(red)).redPow(new BN(pub.publicExponent)),sig=Buffer.from(sig.fromRed().toArray());var out=padNum<8?1:0;for(len=Math.min(sig.length,pad.length),sig.length!==pad.length&&(out=1),i=-1;++i<len;)out|=sig[i]^pad[i];return 0===out}},8815:function(module,__unused_webpack_exports,__webpack_require__){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}var Buffer;"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;try{Buffer="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:__webpack_require__(2363).Buffer}catch(e){}function parseHex4Bits(string,index){var c=string.charCodeAt(index);return c>=48&&c<=57?c-48:c>=65&&c<=70?c-55:c>=97&&c<=102?c-87:void assert(!1,"Invalid character in "+string)}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);return index-1>=lowerBound&&(r|=parseHex4Bits(string,index-1)<<4),r}function parseBase(str,start,end,mul){for(var r=0,b=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul,b=c>=49?c-49+10:c>=17?c-17+10:c,assert(c>=0&&b<mul,"Invalid character"),r+=b}return r}function move(dest,src){dest.words=src.words,dest.length=src.length,dest.negative=src.negative,dest.red=src.red}if(BN.isBN=function isBN(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function max(left,right){return left.cmp(right)>0?left:right},BN.min=function min(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function init(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&(start++,this.negative=1),start<number.length&&(16===base?this._parseHex(number,start,endian):(this._parseBase(number,base,start),"le"===endian&&this._initArray(this.toArray(),base,endian)))},BN.prototype._initNumber=function _initNumber(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function _initArray(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this._strip()},BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var w,off=0,j=0;if("be"===endian)for(i=number.length-1;i>=start;i-=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;else for(i=(number.length-start)%2==0?start+1:start;i<number.length;i+=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;this._strip()},BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}this._strip()},BN.prototype.copy=function copy(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype._move=function _move(dest){move(dest,this)},BN.prototype.clone=function clone(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function _expand(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype._strip=function strip(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{BN.prototype[Symbol.for("nodejs.util.inspect.custom")]=inspect}catch(e){BN.prototype.inspect=inspect}else BN.prototype.inspect=inspect;function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var zeros=["","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"],groupSizes=[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],groupBases=[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];BN.prototype.toString=function toString(base,padding){var out;if(padding=0|padding||1,16===(base=base||10)||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);out=0!==(carry=w>>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modrn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function toJSON(){return this.toString(16,2)},Buffer&&(BN.prototype.toBuffer=function toBuffer(endian,length){return this.toArrayLike(Buffer,endian,length)}),BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)};function smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){for(var ncarry=carry>>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out._strip()}BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){this._strip();var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0");var res=function allocate(ArrayType,size){return ArrayType.allocUnsafe?ArrayType.allocUnsafe(size):new ArrayType(size)}(ArrayType,reqLength);return this["_toArrayLike"+("le"===endian?"LE":"BE")](res,byteLength),res},BN.prototype._toArrayLikeLE=function _toArrayLikeLE(res,byteLength){for(var position=0,carry=0,i=0,shift=0;i<this.length;i++){var word=this.words[i]<<shift|carry;res[position++]=255&word,position<res.length&&(res[position++]=word>>8&255),position<res.length&&(res[position++]=word>>16&255),6===shift?(position<res.length&&(res[position++]=word>>24&255),carry=0,shift=0):(carry=word>>>24,shift+=2)}if(position<res.length)for(res[position++]=carry;position<res.length;)res[position++]=0},BN.prototype._toArrayLikeBE=function _toArrayLikeBE(res,byteLength){for(var position=res.length-1,carry=0,i=0,shift=0;i<this.length;i++){var word=this.words[i]<<shift|carry;res[position--]=255&word,position>=0&&(res[position--]=word>>8&255),position>=0&&(res[position--]=word>>16&255),6===shift?(position>=0&&(res[position--]=word>>24&255),carry=0,shift=0):(carry=word>>>24,shift+=2)}if(position>=0)for(res[position--]=carry;position>=0;)res[position--]=0},Math.clz32?BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function _countBits(w){var t=w,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},BN.prototype._zeroBits=function _zeroBits(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function toTwos(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function fromTwos(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function isNeg(){return 0!==this.negative},BN.prototype.neg=function neg(){return this.clone().ineg()},BN.prototype.ineg=function ineg(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function iuor(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this._strip()},BN.prototype.ior=function ior(num){return assert(0==(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function or(num){return this.length>num.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function uor(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function iuand(num){var b;b=this.length>num.length?num:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this._strip()},BN.prototype.iand=function iand(num){return assert(0==(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function and(num){return this.length>num.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function uand(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function iuxor(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this._strip()},BN.prototype.ixor=function ixor(num){return assert(0==(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function xor(num){return this.length>num.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function uxor(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function inotn(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this._strip()},BN.prototype.notn=function notn(width){return this.clone().inotn(width)},BN.prototype.setn=function setn(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<<wbit:this.words[off]&~(1<<wbit),this._strip()},BN.prototype.iadd=function iadd(num){var r,a,b;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function add(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function isub(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)carry=(r=(0|a.words[i])-(0|b.words[i])+carry)>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)carry=(r=(0|a.words[i])+carry)>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this._strip()},BN.prototype.sub=function sub(num){return this.clone().isub(num)};var comb10MulTo=function comb10MulTo(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j,r=(0|self.words[i])*(0|num.words[j]),lo=67108863&r;rword=67108863&(lo=lo+rword|0),hncarry+=(ncarry=(ncarry=ncarry+(r/67108864|0)|0)+(lo>>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out._strip()}function jumboMulTo(self,num,out){return bigMulTo(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function mulTo(num,out){var len=this.length+num.length;return 10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?bigMulTo(this,num,out):jumboMulTo(this,num,out)},FFTM.prototype.makeRBT=function makeRBT(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function revBin(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function transform(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function guessLen13b(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function conjugate(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function normalize13b(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function convert13b(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0==(-8192&carry))},FFTM.prototype.stub=function stub(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function mulp(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out._strip()},BN.prototype.mul=function mul(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function mulf(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function imuln(num){var isNegNum=num<0;isNegNum&&(num=-num),assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),isNegNum?this.ineg():this},BN.prototype.muln=function muln(num){return this.clone().imuln(num)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(num){var w=function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=num.words[off]>>>wbit&1}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function iushln(bits){assert("number"==typeof bits&&bits>=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this._strip()},BN.prototype.ishln=function ishln(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function iushrn(bits,hint,extended){var h;assert("number"==typeof bits&&bits>=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;i>=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},BN.prototype.ishrn=function ishrn(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function testn(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<<r;return!(this.length<=s)&&!!(this.words[s]&q)},BN.prototype.imaskn=function imaskn(bits){assert("number"==typeof bits&&bits>=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this._strip()},BN.prototype.maskn=function maskn(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function iaddn(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<=num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function _iaddn(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this._strip()},BN.prototype.addn=function addn(num){return this.clone().iaddn(num)},BN.prototype.subn=function subn(num){return this.clone().isubn(num)},BN.prototype.iabs=function iabs(){return this.negative=0,this},BN.prototype.abs=function abs(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function _ishlnsubmul(num,mul,shift){var i,w,len=num.length+shift;this._expand(len);var carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;carry=((w-=67108863&right)>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)carry=(w=(0|this.words[i+shift])+carry)>>26,this.words[i+shift]=67108863&w;if(0===carry)return this._strip();for(assert(-1===carry),carry=0,i=0;i<this.length;i++)carry=(w=-(0|this.words[i])+carry)>>26,this.words[i]=67108863&w;return this.negative=1,this._strip()},BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q._strip(),a._strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function divmod(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div,mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modrn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modrn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function div(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function mod(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function umod(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modrn=function modrn(num){var isNegNum=num<0;isNegNum&&(num=-num),assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return isNegNum?-acc:acc},BN.prototype.modn=function modn(num){return this.modrn(num)},BN.prototype.idivn=function idivn(num){var isNegNum=num<0;isNegNum&&(num=-num),assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this._strip(),isNegNum?this.ineg():this},BN.prototype.divn=function divn(num){return this.clone().idivn(num)},BN.prototype.egcd=function egcd(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function _invmp(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(num){return this.words[0]&num},BN.prototype.bincn=function bincn(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];carry=(w+=carry)>>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this._strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function cmp(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function ucmp(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(res=1);break}}return res},BN.prototype.gtn=function gtn(num){return 1===this.cmpn(num)},BN.prototype.gt=function gt(num){return 1===this.cmp(num)},BN.prototype.gten=function gten(num){return this.cmpn(num)>=0},BN.prototype.gte=function gte(num){return this.cmp(num)>=0},BN.prototype.ltn=function ltn(num){return-1===this.cmpn(num)},BN.prototype.lt=function lt(num){return-1===this.cmp(num)},BN.prototype.lten=function lten(num){return this.cmpn(num)<=0},BN.prototype.lte=function lte(num){return this.cmp(num)<=0},BN.prototype.eqn=function eqn(num){return 0===this.cmpn(num)},BN.prototype.eq=function eq(num){return 0===this.cmp(num)},BN.red=function red(num){return new Red(num)},BN.prototype.toRed=function toRed(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(ctx){return this.red=ctx,this},BN.prototype.forceRed=function forceRed(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function redAdd(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function redIAdd(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function redSub(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function redISub(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function redShl(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function redMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function redIMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function ireduce(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(input,output){for(var outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(4194303&next)<<4|prev>>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function imulK(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function imulK(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function _verify1(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function imod(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(move(a,a.umod(this.m)._forceRed(this)),a)},Red.prototype.neg=function neg(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function shl(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function imul(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function mul(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())},Red.prototype.sqr=function sqr(a){return this.mul(a,a)},Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function invm(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function pow(a,num){if(num.isZero())return new BN(1).toRed(this);if(0===num.cmpn(1))return a.clone();var wnd=new Array(16);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;i>=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();return res.red=null,res},BN.mont=function mont(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function invm(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(module=__webpack_require__.nmd(module),this)},7191:(module,__unused_webpack_exports,__webpack_require__)=>{var basex=__webpack_require__(8162);module.exports=basex("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},3310:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var base58=__webpack_require__(7191),Buffer=__webpack_require__(9509).Buffer;module.exports=function(checksumFn){function decodeRaw(buffer){var payload=buffer.slice(0,-4),checksum=buffer.slice(-4),newChecksum=checksumFn(payload);if(!(checksum[0]^newChecksum[0]|checksum[1]^newChecksum[1]|checksum[2]^newChecksum[2]|checksum[3]^newChecksum[3]))return payload}return{encode:function encode(payload){var checksum=checksumFn(payload);return base58.encode(Buffer.concat([payload,checksum],payload.length+4))},decode:function decode(string){var payload=decodeRaw(base58.decode(string));if(!payload)throw new Error("Invalid checksum");return payload},decodeUnsafe:function decodeUnsafe(string){var buffer=base58.decodeUnsafe(string);if(buffer)return decodeRaw(buffer)}}}},8334:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var createHash=__webpack_require__(3482),bs58checkBase=__webpack_require__(3310);module.exports=bs58checkBase((function sha256x2(buffer){var tmp=createHash("sha256").update(buffer).digest();return createHash("sha256").update(tmp).digest()}))},7295:module=>{module.exports=function xor(a,b){for(var length=Math.min(a.length,b.length),buffer=new Buffer(length),i=0;i<length;++i)buffer[i]=a[i]^b[i];return buffer}},8764:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";const base64=__webpack_require__(9742),ieee754=__webpack_require__(645),customInspectSymbol="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;exports.Buffer=Buffer,exports.SlowBuffer=function SlowBuffer(length){+length!=length&&(length=0);return Buffer.alloc(+length)},exports.INSPECT_MAX_BYTES=50;function createBuffer(length){if(length>2147483647)throw new RangeError('The value "'+length+'" is invalid for option "size"');const buf=new Uint8Array(length);return Object.setPrototypeOf(buf,Buffer.prototype),buf}function Buffer(arg,encodingOrOffset,length){if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}function from(value,encodingOrOffset,length){if("string"==typeof value)return function fromString(string,encoding){"string"==typeof encoding&&""!==encoding||(encoding="utf8");if(!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);const length=0|byteLength(string,encoding);let buf=createBuffer(length);const actual=buf.write(string,encoding);actual!==length&&(buf=buf.slice(0,actual));return buf}(value,encodingOrOffset);if(ArrayBuffer.isView(value))return function fromArrayView(arrayView){if(isInstance(arrayView,Uint8Array)){const copy=new Uint8Array(arrayView);return fromArrayBuffer(copy.buffer,copy.byteOffset,copy.byteLength)}return fromArrayLike(arrayView)}(value);if(null==value)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value);if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer))return fromArrayBuffer(value,encodingOrOffset,length);if("undefined"!=typeof SharedArrayBuffer&&(isInstance(value,SharedArrayBuffer)||value&&isInstance(value.buffer,SharedArrayBuffer)))return fromArrayBuffer(value,encodingOrOffset,length);if("number"==typeof value)throw new TypeError('The "value" argument must not be of type number. Received type number');const valueOf=value.valueOf&&value.valueOf();if(null!=valueOf&&valueOf!==value)return Buffer.from(valueOf,encodingOrOffset,length);const b=function fromObject(obj){if(Buffer.isBuffer(obj)){const len=0|checked(obj.length),buf=createBuffer(len);return 0===buf.length||obj.copy(buf,0,0,len),buf}if(void 0!==obj.length)return"number"!=typeof obj.length||numberIsNaN(obj.length)?createBuffer(0):fromArrayLike(obj);if("Buffer"===obj.type&&Array.isArray(obj.data))return fromArrayLike(obj.data)}(value);if(b)return b;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof value[Symbol.toPrimitive])return Buffer.from(value[Symbol.toPrimitive]("string"),encodingOrOffset,length);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value)}function assertSize(size){if("number"!=typeof size)throw new TypeError('"size" argument must be of type number');if(size<0)throw new RangeError('The value "'+size+'" is invalid for option "size"')}function allocUnsafe(size){return assertSize(size),createBuffer(size<0?0:0|checked(size))}function fromArrayLike(array){const length=array.length<0?0:0|checked(array.length),buf=createBuffer(length);for(let i=0;i<length;i+=1)buf[i]=255&array[i];return buf}function fromArrayBuffer(array,byteOffset,length){if(byteOffset<0||array.byteLength<byteOffset)throw new RangeError('"offset" is outside of buffer bounds');if(array.byteLength<byteOffset+(length||0))throw new RangeError('"length" is outside of buffer bounds');let buf;return buf=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length),Object.setPrototypeOf(buf,Buffer.prototype),buf}function checked(length){if(length>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if("string"!=typeof string)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof string);const len=string.length,mustMatch=arguments.length>2&&!0===arguments[2];if(!mustMatch&&0===len)return 0;let loweredCase=!1;for(;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){let loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if((end>>>=0)<=(start>>>=0))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){const i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),numberIsNaN(byteOffset=+byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){let i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){let foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,-1===foundIndex?0:i-foundIndex)){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else-1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){let found=!0;for(let j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return-1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;const remaining=buf.length-offset;length?(length=Number(length))>remaining&&(length=remaining):length=remaining;const strLen=string.length;let i;for(length>strLen/2&&(length=strLen/2),i=0;i<length;++i){const parsed=parseInt(string.substr(2*i,2),16);if(numberIsNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(function asciiToBytes(str){const byteArray=[];for(let i=0;i<str.length;++i)byteArray.push(255&str.charCodeAt(i));return byteArray}(string),buf,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(function utf16leToBytes(str,units){let c,hi,lo;const byteArray=[];for(let i=0;i<str.length&&!((units-=2)<0);++i)c=str.charCodeAt(i),hi=c>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);const res=[];let i=start;for(;i<end;){const firstByte=buf[i];let codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){let secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:secondByte=buf[i+1],128==(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte,tempCodePoint>127&&(codePoint=tempCodePoint));break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte,tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint));break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte,tempCodePoint>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint))}}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return function decodeCodePointsArray(codePoints){const len=codePoints.length;if(len<=4096)return String.fromCharCode.apply(String,codePoints);let res="",i=0;for(;i<len;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=4096));return res}(res)}exports.kMaxLength=2147483647,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{const arr=new Uint8Array(1),proto={foo:function(){return 42}};return Object.setPrototypeOf(proto,Uint8Array.prototype),Object.setPrototypeOf(arr,proto),42===arr.foo()}catch(e){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(size,fill,encoding){return function alloc(size,fill,encoding){return assertSize(size),size<=0?createBuffer(size):void 0!==fill?"string"==typeof encoding?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill):createBuffer(size)}(size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)},Buffer.isBuffer=function isBuffer(b){return null!=b&&!0===b._isBuffer&&b!==Buffer.prototype},Buffer.compare=function compare(a,b){if(isInstance(a,Uint8Array)&&(a=Buffer.from(a,a.offset,a.byteLength)),isInstance(b,Uint8Array)&&(b=Buffer.from(b,b.offset,b.byteLength)),!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===b)return 0;let x=a.length,y=b.length;for(let i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0},Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function concat(list,length){if(!Array.isArray(list))throw new TypeError('"list" argument must be an Array of Buffers');if(0===list.length)return Buffer.alloc(0);let i;if(void 0===length)for(length=0,i=0;i<list.length;++i)length+=list[i].length;const buffer=Buffer.allocUnsafe(length);let pos=0;for(i=0;i<list.length;++i){let buf=list[i];if(isInstance(buf,Uint8Array))pos+buf.length>buffer.length?(Buffer.isBuffer(buf)||(buf=Buffer.from(buf)),buf.copy(buffer,pos)):Uint8Array.prototype.set.call(buffer,buf,pos);else{if(!Buffer.isBuffer(buf))throw new TypeError('"list" argument must be an Array of Buffers');buf.copy(buffer,pos)}pos+=buf.length}return buffer},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){const len=this.length;if(len%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;i<len;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function swap32(){const len=this.length;if(len%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function swap64(){const len=this.length;if(len%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function toString(){const length=this.length;return 0===length?"":0===arguments.length?utf8Slice(this,0,length):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function inspect(){let str="";const max=exports.INSPECT_MAX_BYTES;return str=this.toString("hex",0,max).replace(/(.{2})/g,"$1 ").trim(),this.length>max&&(str+=" ... "),"<Buffer "+str+">"},customInspectSymbol&&(Buffer.prototype[customInspectSymbol]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer.from(target,target.offset,target.byteLength)),!Buffer.isBuffer(target))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof target);if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(this===target)return 0;let x=(thisEnd>>>=0)-(thisStart>>>=0),y=(end>>>=0)-(start>>>=0);const len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end);for(let i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0},Buffer.prototype.includes=function includes(val,byteOffset,encoding){return-1!==this.indexOf(val,byteOffset,encoding)},Buffer.prototype.indexOf=function indexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)},Buffer.prototype.write=function write(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else{if(!isFinite(offset))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");offset>>>=0,isFinite(length)?(length>>>=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}const remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");let loweredCase=!1;for(;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":case"latin1":case"binary":return asciiWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function asciiSlice(buf,start,end){let ret="";end=Math.min(buf.length,end);for(let i=start;i<end;++i)ret+=String.fromCharCode(127&buf[i]);return ret}function latin1Slice(buf,start,end){let ret="";end=Math.min(buf.length,end);for(let i=start;i<end;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){const len=buf.length;(!start||start<0)&&(start=0),(!end||end<0||end>len)&&(end=len);let out="";for(let i=start;i<end;++i)out+=hexSliceLookupTable[buf[i]];return out}function utf16leSlice(buf,start,end){const bytes=buf.slice(start,end);let res="";for(let i=0;i<bytes.length-1;i+=2)res+=String.fromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(offset%1!=0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}function wrtBigUInt64LE(buf,value,offset,min,max){checkIntBI(value,min,max,buf,offset,7);let lo=Number(value&BigInt(4294967295));buf[offset++]=lo,lo>>=8,buf[offset++]=lo,lo>>=8,buf[offset++]=lo,lo>>=8,buf[offset++]=lo;let hi=Number(value>>BigInt(32)&BigInt(4294967295));return buf[offset++]=hi,hi>>=8,buf[offset++]=hi,hi>>=8,buf[offset++]=hi,hi>>=8,buf[offset++]=hi,offset}function wrtBigUInt64BE(buf,value,offset,min,max){checkIntBI(value,min,max,buf,offset,7);let lo=Number(value&BigInt(4294967295));buf[offset+7]=lo,lo>>=8,buf[offset+6]=lo,lo>>=8,buf[offset+5]=lo,lo>>=8,buf[offset+4]=lo;let hi=Number(value>>BigInt(32)&BigInt(4294967295));return buf[offset+3]=hi,hi>>=8,buf[offset+2]=hi,hi>>=8,buf[offset+1]=hi,hi>>=8,buf[offset]=hi,offset+8}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,4),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,8),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}Buffer.prototype.slice=function slice(start,end){const len=this.length;(start=~~start)<0?(start+=len)<0&&(start=0):start>len&&(start=len),(end=void 0===end?len:~~end)<0?(end+=len)<0&&(end=0):end>len&&(end=len),end<start&&(end=start);const newBuf=this.subarray(start,end);return Object.setPrototypeOf(newBuf,Buffer.prototype),newBuf},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);let val=this[offset],mul=1,i=0;for(;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);let val=this[offset+--byteLength],mul=1;for(;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(offset){validateNumber(offset>>>=0,"offset");const first=this[offset],last=this[offset+7];void 0!==first&&void 0!==last||boundsError(offset,this.length-8);const lo=first+256*this[++offset]+65536*this[++offset]+this[++offset]*2**24,hi=this[++offset]+256*this[++offset]+65536*this[++offset]+last*2**24;return BigInt(lo)+(BigInt(hi)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(offset){validateNumber(offset>>>=0,"offset");const first=this[offset],last=this[offset+7];void 0!==first&&void 0!==last||boundsError(offset,this.length-8);const hi=first*2**24+65536*this[++offset]+256*this[++offset]+this[++offset],lo=this[++offset]*2**24+65536*this[++offset]+256*this[++offset]+last;return(BigInt(hi)<<BigInt(32))+BigInt(lo)})),Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);let val=this[offset],mul=1,i=0;for(;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);let i=byteLength,mul=1,val=this[offset+--i];for(;i>0&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function readInt8(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);const val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);const val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(offset){validateNumber(offset>>>=0,"offset");const first=this[offset],last=this[offset+7];void 0!==first&&void 0!==last||boundsError(offset,this.length-8);const val=this[offset+4]+256*this[offset+5]+65536*this[offset+6]+(last<<24);return(BigInt(val)<<BigInt(32))+BigInt(first+256*this[++offset]+65536*this[++offset]+this[++offset]*2**24)})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(offset){validateNumber(offset>>>=0,"offset");const first=this[offset],last=this[offset+7];void 0!==first&&void 0!==last||boundsError(offset,this.length-8);const val=(first<<24)+65536*this[++offset]+256*this[++offset]+this[++offset];return(BigInt(val)<<BigInt(32))+BigInt(this[++offset]*2**24+65536*this[++offset]+256*this[++offset]+last)})),Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,byteLength>>>=0,!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0)}let mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,byteLength>>>=0,!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0)}let i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=255&value,offset+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value,offset+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(value,offset=0){return wrtBigUInt64LE(this,value,offset,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(value,offset=0){return wrtBigUInt64BE(this,value,offset,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){const limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}let i=0,mul=1,sub=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){const limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}let i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,127,-128),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4},Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(value,offset=0){return wrtBigUInt64LE(this,value,offset,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(value,offset=0){return wrtBigUInt64BE(this,value,offset,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw new TypeError("argument should be a Buffer");if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end<start&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);const len=end-start;return this===target&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(targetStart,start,end):Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart),len},Buffer.prototype.fill=function fill(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);if(1===val.length){const code=val.charCodeAt(0);("utf8"===encoding&&code<128||"latin1"===encoding)&&(val=code)}}else"number"==typeof val?val&=255:"boolean"==typeof val&&(val=Number(val));if(start<0||this.length<start||this.length<end)throw new RangeError("Out of range index");if(end<=start)return this;let i;if(start>>>=0,end=void 0===end?this.length:end>>>0,val||(val=0),"number"==typeof val)for(i=start;i<end;++i)this[i]=val;else{const bytes=Buffer.isBuffer(val)?val:Buffer.from(val,encoding),len=bytes.length;if(0===len)throw new TypeError('The value "'+val+'" is invalid for argument "value"');for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};const errors={};function E(sym,getMessage,Base){errors[sym]=class NodeError extends Base{constructor(){super(),Object.defineProperty(this,"message",{value:getMessage.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${sym}]`,this.stack,delete this.name}get code(){return sym}set code(value){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value,writable:!0})}toString(){return`${this.name} [${sym}]: ${this.message}`}}}function addNumericalSeparator(val){let res="",i=val.length;const start="-"===val[0]?1:0;for(;i>=start+4;i-=3)res=`_${val.slice(i-3,i)}${res}`;return`${val.slice(0,i)}${res}`}function checkIntBI(value,min,max,buf,offset,byteLength){if(value>max||value<min){const n="bigint"==typeof min?"n":"";let range;throw range=byteLength>3?0===min||min===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(byteLength+1)}${n}`:`>= -(2${n} ** ${8*(byteLength+1)-1}${n}) and < 2 ** ${8*(byteLength+1)-1}${n}`:`>= ${min}${n} and <= ${max}${n}`,new errors.ERR_OUT_OF_RANGE("value",range,value)}!function checkBounds(buf,offset,byteLength){validateNumber(offset,"offset"),void 0!==buf[offset]&&void 0!==buf[offset+byteLength]||boundsError(offset,buf.length-(byteLength+1))}(buf,offset,byteLength)}function validateNumber(value,name){if("number"!=typeof value)throw new errors.ERR_INVALID_ARG_TYPE(name,"number",value)}function boundsError(value,length,type){if(Math.floor(value)!==value)throw validateNumber(value,type),new errors.ERR_OUT_OF_RANGE(type||"offset","an integer",value);if(length<0)throw new errors.ERR_BUFFER_OUT_OF_BOUNDS;throw new errors.ERR_OUT_OF_RANGE(type||"offset",`>= ${type?1:0} and <= ${length}`,value)}E("ERR_BUFFER_OUT_OF_BOUNDS",(function(name){return name?`${name} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),E("ERR_INVALID_ARG_TYPE",(function(name,actual){return`The "${name}" argument must be of type number. Received type ${typeof actual}`}),TypeError),E("ERR_OUT_OF_RANGE",(function(str,range,input){let msg=`The value of "${str}" is out of range.`,received=input;return Number.isInteger(input)&&Math.abs(input)>2**32?received=addNumericalSeparator(String(input)):"bigint"==typeof input&&(received=String(input),(input>BigInt(2)**BigInt(32)||input<-(BigInt(2)**BigInt(32)))&&(received=addNumericalSeparator(received)),received+="n"),msg+=` It must be ${range}. Received ${received}`,msg}),RangeError);const INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(string,units){let codePoint;units=units||1/0;const length=string.length;let leadSurrogate=null;const bytes=[];for(let i=0;i<length;++i){if(codePoint=string.charCodeAt(i),codePoint>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function base64ToBytes(str){return base64.toByteArray(function base64clean(str){if((str=(str=str.split("=")[0]).trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}(str))}function blitBuffer(src,dst,offset,length){let i;for(i=0;i<length&&!(i+offset>=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isInstance(obj,type){return obj instanceof type||null!=obj&&null!=obj.constructor&&null!=obj.constructor.name&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!=obj}const hexSliceLookupTable=function(){const table=new Array(256);for(let i=0;i<16;++i){const i16=16*i;for(let j=0;j<16;++j)table[i16+j]="0123456789abcdef"[i]+"0123456789abcdef"[j]}return table}();function defineBigIntMethod(fn){return"undefined"==typeof BigInt?BufferBigIntNotDefined:fn}function BufferBigIntNotDefined(){throw new Error("BigInt not supported")}},1924:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var GetIntrinsic=__webpack_require__(210),callBind=__webpack_require__(5559),$indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module.exports=function callBoundIntrinsic(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);return"function"==typeof intrinsic&&$indexOf(name,".prototype.")>-1?callBind(intrinsic):intrinsic}},5559:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var bind=__webpack_require__(8612),GetIntrinsic=__webpack_require__(210),$apply=GetIntrinsic("%Function.prototype.apply%"),$call=GetIntrinsic("%Function.prototype.call%"),$reflectApply=GetIntrinsic("%Reflect.apply%",!0)||bind.call($call,$apply),$gOPD=GetIntrinsic("%Object.getOwnPropertyDescriptor%",!0),$defineProperty=GetIntrinsic("%Object.defineProperty%",!0),$max=GetIntrinsic("%Math.max%");if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=null}module.exports=function callBind(originalFunction){var func=$reflectApply(bind,$call,arguments);if($gOPD&&$defineProperty){var desc=$gOPD(func,"length");desc.configurable&&$defineProperty(func,"length",{value:1+$max(0,originalFunction.length-(arguments.length-1))})}return func};var applyBind=function applyBind(){return $reflectApply(bind,$apply,arguments)};$defineProperty?$defineProperty(module.exports,"apply",{value:applyBind}):module.exports.apply=applyBind},1027:(module,__unused_webpack_exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer,Transform=__webpack_require__(2830).Transform,StringDecoder=__webpack_require__(2553).s;function CipherBase(hashMode){Transform.call(this),this.hashMode="string"==typeof hashMode,this.hashMode?this[hashMode]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}__webpack_require__(5717)(CipherBase,Transform),CipherBase.prototype.update=function(data,inputEnc,outputEnc){"string"==typeof data&&(data=Buffer.from(data,inputEnc));var outData=this._update(data);return this.hashMode?this:(outputEnc&&(outData=this._toString(outData,outputEnc)),outData)},CipherBase.prototype.setAutoPadding=function(){},CipherBase.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},CipherBase.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},CipherBase.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},CipherBase.prototype._transform=function(data,_,next){var err;try{this.hashMode?this._update(data):this.push(this._update(data))}catch(e){err=e}finally{next(err)}},CipherBase.prototype._flush=function(done){var err;try{this.push(this.__final())}catch(e){err=e}done(err)},CipherBase.prototype._finalOrDigest=function(outputEnc){var outData=this.__final()||Buffer.alloc(0);return outputEnc&&(outData=this._toString(outData,outputEnc,!0)),outData},CipherBase.prototype._toString=function(value,enc,fin){if(this._decoder||(this._decoder=new StringDecoder(enc),this._encoding=enc),this._encoding!==enc)throw new Error("can't switch encodings");var out=this._decoder.write(value);return fin&&(out+=this._decoder.end()),out},module.exports=CipherBase},6393:(module,__unused_webpack_exports,__webpack_require__)=>{var elliptic=__webpack_require__(6266),BN=__webpack_require__(6426);module.exports=function createECDH(curve){return new ECDH(curve)};var aliases={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 ECDH(curve){this.curveType=aliases[curve],this.curveType||(this.curveType={name:curve}),this.curve=new elliptic.ec(this.curveType.name),this.keys=void 0}function formatReturnValue(bn,enc,len){Array.isArray(bn)||(bn=bn.toArray());var buf=new Buffer(bn);if(len&&buf.length<len){var zeros=new Buffer(len-buf.length);zeros.fill(0),buf=Buffer.concat([zeros,buf])}return enc?buf.toString(enc):buf}aliases.p224=aliases.secp224r1,aliases.p256=aliases.secp256r1=aliases.prime256v1,aliases.p192=aliases.secp192r1=aliases.prime192v1,aliases.p384=aliases.secp384r1,aliases.p521=aliases.secp521r1,ECDH.prototype.generateKeys=function(enc,format){return this.keys=this.curve.genKeyPair(),this.getPublicKey(enc,format)},ECDH.prototype.computeSecret=function(other,inenc,enc){return inenc=inenc||"utf8",Buffer.isBuffer(other)||(other=new Buffer(other,inenc)),formatReturnValue(this.curve.keyFromPublic(other).getPublic().mul(this.keys.getPrivate()).getX(),enc,this.curveType.byteLength)},ECDH.prototype.getPublicKey=function(enc,format){var key=this.keys.getPublic("compressed"===format,!0);return"hybrid"===format&&(key[key.length-1]%2?key[0]=7:key[0]=6),formatReturnValue(key,enc)},ECDH.prototype.getPrivateKey=function(enc){return formatReturnValue(this.keys.getPrivate(),enc)},ECDH.prototype.setPublicKey=function(pub,enc){return enc=enc||"utf8",Buffer.isBuffer(pub)||(pub=new Buffer(pub,enc)),this.keys._importPublic(pub),this},ECDH.prototype.setPrivateKey=function(priv,enc){enc=enc||"utf8",Buffer.isBuffer(priv)||(priv=new Buffer(priv,enc));var _priv=new BN(priv);return _priv=_priv.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(_priv),this}},6426:function(module,__unused_webpack_exports,__webpack_require__){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}var Buffer;"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;try{Buffer="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:__webpack_require__(8623).Buffer}catch(e){}function parseHex4Bits(string,index){var c=string.charCodeAt(index);return c>=65&&c<=70?c-55:c>=97&&c<=102?c-87:c-48&15}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);return index-1>=lowerBound&&(r|=parseHex4Bits(string,index-1)<<4),r}function parseBase(str,start,end,mul){for(var r=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul,r+=c>=49?c-49+10:c>=17?c-17+10:c}return r}BN.isBN=function isBN(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function max(left,right){return left.cmp(right)>0?left:right},BN.min=function min(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function init(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&(start++,this.negative=1),start<number.length&&(16===base?this._parseHex(number,start,endian):(this._parseBase(number,base,start),"le"===endian&&this._initArray(this.toArray(),base,endian)))},BN.prototype._initNumber=function _initNumber(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function _initArray(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this.strip()},BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var w,off=0,j=0;if("be"===endian)for(i=number.length-1;i>=start;i-=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;else for(i=(number.length-start)%2==0?start+1:start;i<number.length;i+=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;this.strip()},BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}this.strip()},BN.prototype.copy=function copy(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype.clone=function clone(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function _expand(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype.strip=function strip(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var zeros=["","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"],groupSizes=[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],groupBases=[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 smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){for(var ncarry=carry>>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out.strip()}BN.prototype.toString=function toString(base,padding){var out;if(padding=0|padding||1,16===(base=base||10)||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);out=0!==(carry=w>>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function toJSON(){return this.toString(16)},BN.prototype.toBuffer=function toBuffer(endian,length){return assert(void 0!==Buffer),this.toArrayLike(Buffer,endian,length)},BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)},BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0"),this.strip();var b,i,littleEndian="le"===endian,res=new ArrayType(reqLength),q=this.clone();if(littleEndian){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[i]=b;for(;i<reqLength;i++)res[i]=0}else{for(i=0;i<reqLength-byteLength;i++)res[i]=0;for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[reqLength-i-1]=b}return res},Math.clz32?BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function _countBits(w){var t=w,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},BN.prototype._zeroBits=function _zeroBits(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function toTwos(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function fromTwos(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function isNeg(){return 0!==this.negative},BN.prototype.neg=function neg(){return this.clone().ineg()},BN.prototype.ineg=function ineg(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function iuor(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this.strip()},BN.prototype.ior=function ior(num){return assert(0==(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function or(num){return this.length>num.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function uor(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function iuand(num){var b;b=this.length>num.length?num:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this.strip()},BN.prototype.iand=function iand(num){return assert(0==(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function and(num){return this.length>num.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function uand(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function iuxor(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this.strip()},BN.prototype.ixor=function ixor(num){return assert(0==(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function xor(num){return this.length>num.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function uxor(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function inotn(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this.strip()},BN.prototype.notn=function notn(width){return this.clone().inotn(width)},BN.prototype.setn=function setn(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<<wbit:this.words[off]&~(1<<wbit),this.strip()},BN.prototype.iadd=function iadd(num){var r,a,b;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function add(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function isub(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)carry=(r=(0|a.words[i])-(0|b.words[i])+carry)>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)carry=(r=(0|a.words[i])+carry)>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this.strip()},BN.prototype.sub=function sub(num){return this.clone().isub(num)};var comb10MulTo=function comb10MulTo(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function jumboMulTo(self,num,out){return(new FFTM).mulp(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function mulTo(num,out){var res,len=this.length+num.length;return res=10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j,r=(0|self.words[i])*(0|num.words[j]),lo=67108863&r;rword=67108863&(lo=lo+rword|0),hncarry+=(ncarry=(ncarry=ncarry+(r/67108864|0)|0)+(lo>>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out.strip()}(this,num,out):jumboMulTo(this,num,out),res},FFTM.prototype.makeRBT=function makeRBT(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function revBin(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function transform(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function guessLen13b(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function conjugate(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function normalize13b(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function convert13b(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0==(-8192&carry))},FFTM.prototype.stub=function stub(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function mulp(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out.strip()},BN.prototype.mul=function mul(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function mulf(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function imuln(num){assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.muln=function muln(num){return this.clone().imuln(num)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(num){var w=function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=(num.words[off]&1<<wbit)>>>wbit}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function iushln(bits){assert("number"==typeof bits&&bits>=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this.strip()},BN.prototype.ishln=function ishln(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function iushrn(bits,hint,extended){var h;assert("number"==typeof bits&&bits>=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;i>=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function ishrn(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function testn(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<<r;return!(this.length<=s)&&!!(this.words[s]&q)},BN.prototype.imaskn=function imaskn(bits){assert("number"==typeof bits&&bits>=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this.strip()},BN.prototype.maskn=function maskn(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function iaddn(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function _iaddn(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},BN.prototype.addn=function addn(num){return this.clone().iaddn(num)},BN.prototype.subn=function subn(num){return this.clone().isubn(num)},BN.prototype.iabs=function iabs(){return this.negative=0,this},BN.prototype.abs=function abs(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function _ishlnsubmul(num,mul,shift){var i,w,len=num.length+shift;this._expand(len);var carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;carry=((w-=67108863&right)>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)carry=(w=(0|this.words[i+shift])+carry)>>26,this.words[i+shift]=67108863&w;if(0===carry)return this.strip();for(assert(-1===carry),carry=0,i=0;i<this.length;i++)carry=(w=-(0|this.words[i])+carry)>>26,this.words[i]=67108863&w;return this.negative=1,this.strip()},BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q.strip(),a.strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function divmod(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div,mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function div(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function mod(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function umod(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modn=function modn(num){assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return acc},BN.prototype.idivn=function idivn(num){assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this.strip()},BN.prototype.divn=function divn(num){return this.clone().idivn(num)},BN.prototype.egcd=function egcd(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function _invmp(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(num){return this.words[0]&num},BN.prototype.bincn=function bincn(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];carry=(w+=carry)>>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this.strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function cmp(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function ucmp(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(res=1);break}}return res},BN.prototype.gtn=function gtn(num){return 1===this.cmpn(num)},BN.prototype.gt=function gt(num){return 1===this.cmp(num)},BN.prototype.gten=function gten(num){return this.cmpn(num)>=0},BN.prototype.gte=function gte(num){return this.cmp(num)>=0},BN.prototype.ltn=function ltn(num){return-1===this.cmpn(num)},BN.prototype.lt=function lt(num){return-1===this.cmp(num)},BN.prototype.lten=function lten(num){return this.cmpn(num)<=0},BN.prototype.lte=function lte(num){return this.cmp(num)<=0},BN.prototype.eqn=function eqn(num){return 0===this.cmpn(num)},BN.prototype.eq=function eq(num){return 0===this.cmp(num)},BN.red=function red(num){return new Red(num)},BN.prototype.toRed=function toRed(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(ctx){return this.red=ctx,this},BN.prototype.forceRed=function forceRed(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function redAdd(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function redIAdd(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function redSub(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function redISub(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function redShl(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function redMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function redIMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function ireduce(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(input,output){for(var outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(4194303&next)<<4|prev>>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function imulK(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function imulK(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function _verify1(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function imod(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},Red.prototype.neg=function neg(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function shl(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function imul(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function mul(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())},Red.prototype.sqr=function sqr(a){return this.mul(a,a)},Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function invm(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function pow(a,num){if(num.isZero())return new BN(1).toRed(this);if(0===num.cmpn(1))return a.clone();var wnd=new Array(16);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;i>=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();return res.red=null,res},BN.mont=function mont(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function invm(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(module=__webpack_require__.nmd(module),this)},3482:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var inherits=__webpack_require__(5717),MD5=__webpack_require__(2318),RIPEMD160=__webpack_require__(9785),sha=__webpack_require__(9072),Base=__webpack_require__(1027);function Hash(hash){Base.call(this,"digest"),this._hash=hash}inherits(Hash,Base),Hash.prototype._update=function(data){this._hash.update(data)},Hash.prototype._final=function(){return this._hash.digest()},module.exports=function createHash(alg){return"md5"===(alg=alg.toLowerCase())?new MD5:"rmd160"===alg||"ripemd160"===alg?new RIPEMD160:new Hash(sha(alg))}},8028:(module,__unused_webpack_exports,__webpack_require__)=>{var MD5=__webpack_require__(2318);module.exports=function(buffer){return(new MD5).update(buffer).digest()}},8355:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var inherits=__webpack_require__(5717),Legacy=__webpack_require__(1031),Base=__webpack_require__(1027),Buffer=__webpack_require__(9509).Buffer,md5=__webpack_require__(8028),RIPEMD160=__webpack_require__(9785),sha=__webpack_require__(9072),ZEROS=Buffer.alloc(128);function Hmac(alg,key){Base.call(this,"digest"),"string"==typeof key&&(key=Buffer.from(key));var blocksize="sha512"===alg||"sha384"===alg?128:64;(this._alg=alg,this._key=key,key.length>blocksize)?key=("rmd160"===alg?new RIPEMD160:sha(alg)).update(key).digest():key.length<blocksize&&(key=Buffer.concat([key,ZEROS],blocksize));for(var ipad=this._ipad=Buffer.allocUnsafe(blocksize),opad=this._opad=Buffer.allocUnsafe(blocksize),i=0;i<blocksize;i++)ipad[i]=54^key[i],opad[i]=92^key[i];this._hash="rmd160"===alg?new RIPEMD160:sha(alg),this._hash.update(ipad)}inherits(Hmac,Base),Hmac.prototype._update=function(data){this._hash.update(data)},Hmac.prototype._final=function(){var h=this._hash.digest();return("rmd160"===this._alg?new RIPEMD160:sha(this._alg)).update(this._opad).update(h).digest()},module.exports=function createHmac(alg,key){return"rmd160"===(alg=alg.toLowerCase())||"ripemd160"===alg?new Hmac("rmd160",key):"md5"===alg?new Legacy(md5,key):new Hmac(alg,key)}},1031:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var inherits=__webpack_require__(5717),Buffer=__webpack_require__(9509).Buffer,Base=__webpack_require__(1027),ZEROS=Buffer.alloc(128);function Hmac(alg,key){Base.call(this,"digest"),"string"==typeof key&&(key=Buffer.from(key)),this._alg=alg,this._key=key,key.length>64?key=alg(key):key.length<64&&(key=Buffer.concat([key,ZEROS],64));for(var ipad=this._ipad=Buffer.allocUnsafe(64),opad=this._opad=Buffer.allocUnsafe(64),i=0;i<64;i++)ipad[i]=54^key[i],opad[i]=92^key[i];this._hash=[ipad]}inherits(Hmac,Base),Hmac.prototype._update=function(data){this._hash.push(data)},Hmac.prototype._final=function(){var h=this._alg(Buffer.concat(this._hash));return this._alg(Buffer.concat([this._opad,h]))},module.exports=Hmac},5835:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.randomBytes=exports.rng=exports.pseudoRandomBytes=exports.prng=__webpack_require__(1798),exports.createHash=exports.Hash=__webpack_require__(3482),exports.createHmac=exports.Hmac=__webpack_require__(8355);var algos=__webpack_require__(6042),algoKeys=Object.keys(algos),hashes=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(algoKeys);exports.getHashes=function(){return hashes};var p=__webpack_require__(5632);exports.pbkdf2=p.pbkdf2,exports.pbkdf2Sync=p.pbkdf2Sync;var aes=__webpack_require__(3614);exports.Cipher=aes.Cipher,exports.createCipher=aes.createCipher,exports.Cipheriv=aes.Cipheriv,exports.createCipheriv=aes.createCipheriv,exports.Decipher=aes.Decipher,exports.createDecipher=aes.createDecipher,exports.Decipheriv=aes.Decipheriv,exports.createDecipheriv=aes.createDecipheriv,exports.getCiphers=aes.getCiphers,exports.listCiphers=aes.listCiphers;var dh=__webpack_require__(2607);exports.DiffieHellmanGroup=dh.DiffieHellmanGroup,exports.createDiffieHellmanGroup=dh.createDiffieHellmanGroup,exports.getDiffieHellman=dh.getDiffieHellman,exports.createDiffieHellman=dh.createDiffieHellman,exports.DiffieHellman=dh.DiffieHellman;var sign=__webpack_require__(4743);exports.createSign=sign.createSign,exports.Sign=sign.Sign,exports.createVerify=sign.createVerify,exports.Verify=sign.Verify,exports.createECDH=__webpack_require__(6393);var publicEncrypt=__webpack_require__(7900);exports.publicEncrypt=publicEncrypt.publicEncrypt,exports.privateEncrypt=publicEncrypt.privateEncrypt,exports.publicDecrypt=publicEncrypt.publicDecrypt,exports.privateDecrypt=publicEncrypt.privateDecrypt;var rf=__webpack_require__(7963);exports.randomFill=rf.randomFill,exports.randomFillSync=rf.randomFillSync,exports.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},exports.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}},2667:(module,__unused_webpack_exports,__webpack_require__)=>{var DEFAULT=__webpack_require__(9950),parseStyle=__webpack_require__(6771);__webpack_require__(7381);function isNull(obj){return null==obj}function FilterCSS(options){(options=function shallowCopyObject(obj){var ret={};for(var i in obj)ret[i]=obj[i];return ret}(options||{})).whiteList=options.whiteList||DEFAULT.whiteList,options.onAttr=options.onAttr||DEFAULT.onAttr,options.onIgnoreAttr=options.onIgnoreAttr||DEFAULT.onIgnoreAttr,options.safeAttrValue=options.safeAttrValue||DEFAULT.safeAttrValue,this.options=options}FilterCSS.prototype.process=function(css){if(!(css=(css=css||"").toString()))return"";var options=this.options,whiteList=options.whiteList,onAttr=options.onAttr,onIgnoreAttr=options.onIgnoreAttr,safeAttrValue=options.safeAttrValue;return parseStyle(css,(function(sourcePosition,position,name,value,source){var check=whiteList[name],isWhite=!1;if(!0===check?isWhite=check:"function"==typeof check?isWhite=check(value):check instanceof RegExp&&(isWhite=check.test(value)),!0!==isWhite&&(isWhite=!1),value=safeAttrValue(name,value)){var ret,opts={position,sourcePosition,source,isWhite};return isWhite?isNull(ret=onAttr(name,value,opts))?name+":"+value:ret:isNull(ret=onIgnoreAttr(name,value,opts))?void 0:ret}}))},module.exports=FilterCSS},9950:(__unused_webpack_module,exports)=>{function getDefaultWhiteList(){var whiteList={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return whiteList}var REGEXP_URL_JAVASCRIPT=/javascript\s*\:/gim;exports.whiteList=getDefaultWhiteList(),exports.getDefaultWhiteList=getDefaultWhiteList,exports.onAttr=function onAttr(name,value,options){},exports.onIgnoreAttr=function onIgnoreAttr(name,value,options){},exports.safeAttrValue=function safeAttrValue(name,value){return REGEXP_URL_JAVASCRIPT.test(value)?"":value}},9970:(module,exports,__webpack_require__)=>{var DEFAULT=__webpack_require__(9950),FilterCSS=__webpack_require__(2667);for(var i in(exports=module.exports=function filterCSS(html,options){return new FilterCSS(options).process(html)}).FilterCSS=FilterCSS,DEFAULT)exports[i]=DEFAULT[i];"undefined"!=typeof window&&(window.filterCSS=module.exports)},6771:(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__(7381);module.exports=function parseStyle(css,onAttr){";"!==(css=_.trimRight(css))[css.length-1]&&(css+=";");var cssLength=css.length,isParenthesisOpen=!1,lastPos=0,i=0,retCSS="";function addNewAttr(){if(!isParenthesisOpen){var source=_.trim(css.slice(lastPos,i)),j=source.indexOf(":");if(-1!==j){var name=_.trim(source.slice(0,j)),value=_.trim(source.slice(j+1));if(name){var ret=onAttr(lastPos,retCSS.length,name,value,source);ret&&(retCSS+=ret+"; ")}}}lastPos=i+1}for(;i<cssLength;i++){var c=css[i];if("/"===c&&"*"===css[i+1]){var j=css.indexOf("*/",i+2);if(-1===j)break;lastPos=(i=j+1)+1,isParenthesisOpen=!1}else"("===c?isParenthesisOpen=!0:")"===c?isParenthesisOpen=!1:";"===c?isParenthesisOpen||addNewAttr():"\n"===c&&addNewAttr()}return _.trim(retCSS)}},7381:module=>{module.exports={indexOf:function(arr,item){var i,j;if(Array.prototype.indexOf)return arr.indexOf(item);for(i=0,j=arr.length;i<j;i++)if(arr[i]===item)return i;return-1},forEach:function(arr,fn,scope){var i,j;if(Array.prototype.forEach)return arr.forEach(fn,scope);for(i=0,j=arr.length;i<j;i++)fn.call(scope,arr[i],i,arr)},trim:function(str){return String.prototype.trim?str.trim():str.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(str){return String.prototype.trimRight?str.trimRight():str.replace(/(\s*$)/g,"")}}},4289:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var keys=__webpack_require__(2215),hasSymbols="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),toStr=Object.prototype.toString,concat=Array.prototype.concat,origDefineProperty=Object.defineProperty,hasPropertyDescriptors=__webpack_require__(1044)(),supportsDescriptors=origDefineProperty&&hasPropertyDescriptors,defineProperty=function(object,name,value,predicate){var fn;(!(name in object)||"function"==typeof(fn=predicate)&&"[object Function]"===toStr.call(fn)&&predicate())&&(supportsDescriptors?origDefineProperty(object,name,{configurable:!0,enumerable:!1,value,writable:!0}):object[name]=value)},defineProperties=function(object,map){var predicates=arguments.length>2?arguments[2]:{},props=keys(map);hasSymbols&&(props=concat.call(props,Object.getOwnPropertySymbols(map)));for(var i=0;i<props.length;i+=1)defineProperty(object,props[i],map[props[i]],predicates[props[i]])};defineProperties.supportsDescriptors=!!supportsDescriptors,module.exports=defineProperties},5251:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.utils=__webpack_require__(1278),exports.Cipher=__webpack_require__(5756),exports.DES=__webpack_require__(778),exports.CBC=__webpack_require__(9051),exports.EDE=__webpack_require__(651)},9051:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var assert=__webpack_require__(9746),inherits=__webpack_require__(5717),proto={};function CBCState(iv){assert.equal(iv.length,8,"Invalid IV length"),this.iv=new Array(8);for(var i=0;i<this.iv.length;i++)this.iv[i]=iv[i]}exports.instantiate=function instantiate(Base){function CBC(options){Base.call(this,options),this._cbcInit()}inherits(CBC,Base);for(var keys=Object.keys(proto),i=0;i<keys.length;i++){var key=keys[i];CBC.prototype[key]=proto[key]}return CBC.create=function create(options){return new CBC(options)},CBC},proto._cbcInit=function _cbcInit(){var state=new CBCState(this.options.iv);this._cbcState=state},proto._update=function _update(inp,inOff,out,outOff){var state=this._cbcState,superProto=this.constructor.super_.prototype,iv=state.iv;if("encrypt"===this.type){for(var i=0;i<this.blockSize;i++)iv[i]^=inp[inOff+i];superProto._update.call(this,iv,0,out,outOff);for(i=0;i<this.blockSize;i++)iv[i]=out[outOff+i]}else{superProto._update.call(this,inp,inOff,out,outOff);for(i=0;i<this.blockSize;i++)out[outOff+i]^=iv[i];for(i=0;i<this.blockSize;i++)iv[i]=inp[inOff+i]}}},5756:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var assert=__webpack_require__(9746);function Cipher(options){this.options=options,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}module.exports=Cipher,Cipher.prototype._init=function _init(){},Cipher.prototype.update=function update(data){return 0===data.length?[]:"decrypt"===this.type?this._updateDecrypt(data):this._updateEncrypt(data)},Cipher.prototype._buffer=function _buffer(data,off){for(var min=Math.min(this.buffer.length-this.bufferOff,data.length-off),i=0;i<min;i++)this.buffer[this.bufferOff+i]=data[off+i];return this.bufferOff+=min,min},Cipher.prototype._flushBuffer=function _flushBuffer(out,off){return this._update(this.buffer,0,out,off),this.bufferOff=0,this.blockSize},Cipher.prototype._updateEncrypt=function _updateEncrypt(data){var inputOff=0,outputOff=0,count=(this.bufferOff+data.length)/this.blockSize|0,out=new Array(count*this.blockSize);0!==this.bufferOff&&(inputOff+=this._buffer(data,inputOff),this.bufferOff===this.buffer.length&&(outputOff+=this._flushBuffer(out,outputOff)));for(var max=data.length-(data.length-inputOff)%this.blockSize;inputOff<max;inputOff+=this.blockSize)this._update(data,inputOff,out,outputOff),outputOff+=this.blockSize;for(;inputOff<data.length;inputOff++,this.bufferOff++)this.buffer[this.bufferOff]=data[inputOff];return out},Cipher.prototype._updateDecrypt=function _updateDecrypt(data){for(var inputOff=0,outputOff=0,count=Math.ceil((this.bufferOff+data.length)/this.blockSize)-1,out=new Array(count*this.blockSize);count>0;count--)inputOff+=this._buffer(data,inputOff),outputOff+=this._flushBuffer(out,outputOff);return inputOff+=this._buffer(data,inputOff),out},Cipher.prototype.final=function final(buffer){var first,last;return buffer&&(first=this.update(buffer)),last="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),first?first.concat(last):last},Cipher.prototype._pad=function _pad(buffer,off){if(0===off)return!1;for(;off<buffer.length;)buffer[off++]=0;return!0},Cipher.prototype._finalEncrypt=function _finalEncrypt(){if(!this._pad(this.buffer,this.bufferOff))return[];var out=new Array(this.blockSize);return this._update(this.buffer,0,out,0),out},Cipher.prototype._unpad=function _unpad(buffer){return buffer},Cipher.prototype._finalDecrypt=function _finalDecrypt(){assert.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var out=new Array(this.blockSize);return this._flushBuffer(out,0),this._unpad(out)}},778:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var assert=__webpack_require__(9746),inherits=__webpack_require__(5717),utils=__webpack_require__(1278),Cipher=__webpack_require__(5756);function DESState(){this.tmp=new Array(2),this.keys=null}function DES(options){Cipher.call(this,options);var state=new DESState;this._desState=state,this.deriveKeys(state,options.key)}inherits(DES,Cipher),module.exports=DES,DES.create=function create(options){return new DES(options)};var shiftTable=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];DES.prototype.deriveKeys=function deriveKeys(state,key){state.keys=new Array(32),assert.equal(key.length,this.blockSize,"Invalid key length");var kL=utils.readUInt32BE(key,0),kR=utils.readUInt32BE(key,4);utils.pc1(kL,kR,state.tmp,0),kL=state.tmp[0],kR=state.tmp[1];for(var i=0;i<state.keys.length;i+=2){var shift=shiftTable[i>>>1];kL=utils.r28shl(kL,shift),kR=utils.r28shl(kR,shift),utils.pc2(kL,kR,state.keys,i)}},DES.prototype._update=function _update(inp,inOff,out,outOff){var state=this._desState,l=utils.readUInt32BE(inp,inOff),r=utils.readUInt32BE(inp,inOff+4);utils.ip(l,r,state.tmp,0),l=state.tmp[0],r=state.tmp[1],"encrypt"===this.type?this._encrypt(state,l,r,state.tmp,0):this._decrypt(state,l,r,state.tmp,0),l=state.tmp[0],r=state.tmp[1],utils.writeUInt32BE(out,l,outOff),utils.writeUInt32BE(out,r,outOff+4)},DES.prototype._pad=function _pad(buffer,off){for(var value=buffer.length-off,i=off;i<buffer.length;i++)buffer[i]=value;return!0},DES.prototype._unpad=function _unpad(buffer){for(var pad=buffer[buffer.length-1],i=buffer.length-pad;i<buffer.length;i++)assert.equal(buffer[i],pad);return buffer.slice(0,buffer.length-pad)},DES.prototype._encrypt=function _encrypt(state,lStart,rStart,out,off){for(var l=lStart,r=rStart,i=0;i<state.keys.length;i+=2){var keyL=state.keys[i],keyR=state.keys[i+1];utils.expand(r,state.tmp,0),keyL^=state.tmp[0],keyR^=state.tmp[1];var s=utils.substitute(keyL,keyR),t=r;r=(l^utils.permute(s))>>>0,l=t}utils.rip(r,l,out,off)},DES.prototype._decrypt=function _decrypt(state,lStart,rStart,out,off){for(var l=rStart,r=lStart,i=state.keys.length-2;i>=0;i-=2){var keyL=state.keys[i],keyR=state.keys[i+1];utils.expand(l,state.tmp,0),keyL^=state.tmp[0],keyR^=state.tmp[1];var s=utils.substitute(keyL,keyR),t=l;l=(r^utils.permute(s))>>>0,r=t}utils.rip(l,r,out,off)}},651:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var assert=__webpack_require__(9746),inherits=__webpack_require__(5717),Cipher=__webpack_require__(5756),DES=__webpack_require__(778);function EDEState(type,key){assert.equal(key.length,24,"Invalid key length");var k1=key.slice(0,8),k2=key.slice(8,16),k3=key.slice(16,24);this.ciphers="encrypt"===type?[DES.create({type:"encrypt",key:k1}),DES.create({type:"decrypt",key:k2}),DES.create({type:"encrypt",key:k3})]:[DES.create({type:"decrypt",key:k3}),DES.create({type:"encrypt",key:k2}),DES.create({type:"decrypt",key:k1})]}function EDE(options){Cipher.call(this,options);var state=new EDEState(this.type,this.options.key);this._edeState=state}inherits(EDE,Cipher),module.exports=EDE,EDE.create=function create(options){return new EDE(options)},EDE.prototype._update=function _update(inp,inOff,out,outOff){var state=this._edeState;state.ciphers[0]._update(inp,inOff,out,outOff),state.ciphers[1]._update(out,outOff,out,outOff),state.ciphers[2]._update(out,outOff,out,outOff)},EDE.prototype._pad=DES.prototype._pad,EDE.prototype._unpad=DES.prototype._unpad},1278:(__unused_webpack_module,exports)=>{"use strict";exports.readUInt32BE=function readUInt32BE(bytes,off){return(bytes[0+off]<<24|bytes[1+off]<<16|bytes[2+off]<<8|bytes[3+off])>>>0},exports.writeUInt32BE=function writeUInt32BE(bytes,value,off){bytes[0+off]=value>>>24,bytes[1+off]=value>>>16&255,bytes[2+off]=value>>>8&255,bytes[3+off]=255&value},exports.ip=function ip(inL,inR,out,off){for(var outL=0,outR=0,i=6;i>=0;i-=2){for(var j=0;j<=24;j+=8)outL<<=1,outL|=inR>>>j+i&1;for(j=0;j<=24;j+=8)outL<<=1,outL|=inL>>>j+i&1}for(i=6;i>=0;i-=2){for(j=1;j<=25;j+=8)outR<<=1,outR|=inR>>>j+i&1;for(j=1;j<=25;j+=8)outR<<=1,outR|=inL>>>j+i&1}out[off+0]=outL>>>0,out[off+1]=outR>>>0},exports.rip=function rip(inL,inR,out,off){for(var outL=0,outR=0,i=0;i<4;i++)for(var j=24;j>=0;j-=8)outL<<=1,outL|=inR>>>j+i&1,outL<<=1,outL|=inL>>>j+i&1;for(i=4;i<8;i++)for(j=24;j>=0;j-=8)outR<<=1,outR|=inR>>>j+i&1,outR<<=1,outR|=inL>>>j+i&1;out[off+0]=outL>>>0,out[off+1]=outR>>>0},exports.pc1=function pc1(inL,inR,out,off){for(var outL=0,outR=0,i=7;i>=5;i--){for(var j=0;j<=24;j+=8)outL<<=1,outL|=inR>>j+i&1;for(j=0;j<=24;j+=8)outL<<=1,outL|=inL>>j+i&1}for(j=0;j<=24;j+=8)outL<<=1,outL|=inR>>j+i&1;for(i=1;i<=3;i++){for(j=0;j<=24;j+=8)outR<<=1,outR|=inR>>j+i&1;for(j=0;j<=24;j+=8)outR<<=1,outR|=inL>>j+i&1}for(j=0;j<=24;j+=8)outR<<=1,outR|=inL>>j+i&1;out[off+0]=outL>>>0,out[off+1]=outR>>>0},exports.r28shl=function r28shl(num,shift){return num<<shift&268435455|num>>>28-shift};var pc2table=[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];exports.pc2=function pc2(inL,inR,out,off){for(var outL=0,outR=0,len=pc2table.length>>>1,i=0;i<len;i++)outL<<=1,outL|=inL>>>pc2table[i]&1;for(i=len;i<pc2table.length;i++)outR<<=1,outR|=inR>>>pc2table[i]&1;out[off+0]=outL>>>0,out[off+1]=outR>>>0},exports.expand=function expand(r,out,off){var outL=0,outR=0;outL=(1&r)<<5|r>>>27;for(var i=23;i>=15;i-=4)outL<<=6,outL|=r>>>i&63;for(i=11;i>=3;i-=4)outR|=r>>>i&63,outR<<=6;outR|=(31&r)<<1|r>>>31,out[off+0]=outL>>>0,out[off+1]=outR>>>0};var sTable=[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];exports.substitute=function substitute(inL,inR){for(var out=0,i=0;i<4;i++){out<<=4,out|=sTable[64*i+(inL>>>18-6*i&63)]}for(i=0;i<4;i++){out<<=4,out|=sTable[256+64*i+(inR>>>18-6*i&63)]}return out>>>0};var permuteTable=[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];exports.permute=function permute(num){for(var out=0,i=0;i<permuteTable.length;i++)out<<=1,out|=num>>>permuteTable[i]&1;return out>>>0},exports.padSplit=function padSplit(num,size,group){for(var str=num.toString(2);str.length<size;)str="0"+str;for(var out=[],i=0;i<size;i+=group)out.push(str.slice(i,i+group));return out.join(" ")}},2607:(__unused_webpack_module,exports,__webpack_require__)=>{var generatePrime=__webpack_require__(3590),primes=__webpack_require__(9799),DH=__webpack_require__(7426);var ENCODINGS={binary:!0,hex:!0,base64:!0};exports.DiffieHellmanGroup=exports.createDiffieHellmanGroup=exports.getDiffieHellman=function getDiffieHellman(mod){var prime=new Buffer(primes[mod].prime,"hex"),gen=new Buffer(primes[mod].gen,"hex");return new DH(prime,gen)},exports.createDiffieHellman=exports.DiffieHellman=function createDiffieHellman(prime,enc,generator,genc){return Buffer.isBuffer(enc)||void 0===ENCODINGS[enc]?createDiffieHellman(prime,"binary",enc,generator):(enc=enc||"binary",genc=genc||"binary",generator=generator||new Buffer([2]),Buffer.isBuffer(generator)||(generator=new Buffer(generator,genc)),"number"==typeof prime?new DH(generatePrime(prime,generator),generator,!0):(Buffer.isBuffer(prime)||(prime=new Buffer(prime,enc)),new DH(prime,generator,!0)))}},7426:(module,__unused_webpack_exports,__webpack_require__)=>{var BN=__webpack_require__(3620),millerRabin=new(__webpack_require__(3047)),TWENTYFOUR=new BN(24),ELEVEN=new BN(11),TEN=new BN(10),THREE=new BN(3),SEVEN=new BN(7),primes=__webpack_require__(3590),randomBytes=__webpack_require__(1798);function setPublicKey(pub,enc){return enc=enc||"utf8",Buffer.isBuffer(pub)||(pub=new Buffer(pub,enc)),this._pub=new BN(pub),this}function setPrivateKey(priv,enc){return enc=enc||"utf8",Buffer.isBuffer(priv)||(priv=new Buffer(priv,enc)),this._priv=new BN(priv),this}module.exports=DH;var primeCache={};function DH(prime,generator,malleable){this.setGenerator(generator),this.__prime=new BN(prime),this._prime=BN.mont(this.__prime),this._primeLen=prime.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,malleable?(this.setPublicKey=setPublicKey,this.setPrivateKey=setPrivateKey):this._primeCode=8}function formatReturnValue(bn,enc){var buf=new Buffer(bn.toArray());return enc?buf.toString(enc):buf}Object.defineProperty(DH.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function checkPrime(prime,generator){var gen=generator.toString("hex"),hex=[gen,prime.toString(16)].join("_");if(hex in primeCache)return primeCache[hex];var rem,error=0;if(prime.isEven()||!primes.simpleSieve||!primes.fermatTest(prime)||!millerRabin.test(prime))return error+=1,error+="02"===gen||"05"===gen?8:4,primeCache[hex]=error,error;switch(millerRabin.test(prime.shrn(1))||(error+=2),gen){case"02":prime.mod(TWENTYFOUR).cmp(ELEVEN)&&(error+=8);break;case"05":(rem=prime.mod(TEN)).cmp(THREE)&&rem.cmp(SEVEN)&&(error+=8);break;default:error+=4}return primeCache[hex]=error,error}(this.__prime,this.__gen)),this._primeCode}}),DH.prototype.generateKeys=function(){return this._priv||(this._priv=new BN(randomBytes(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},DH.prototype.computeSecret=function(other){var secret=(other=(other=new BN(other)).toRed(this._prime)).redPow(this._priv).fromRed(),out=new Buffer(secret.toArray()),prime=this.getPrime();if(out.length<prime.length){var front=new Buffer(prime.length-out.length);front.fill(0),out=Buffer.concat([front,out])}return out},DH.prototype.getPublicKey=function getPublicKey(enc){return formatReturnValue(this._pub,enc)},DH.prototype.getPrivateKey=function getPrivateKey(enc){return formatReturnValue(this._priv,enc)},DH.prototype.getPrime=function(enc){return formatReturnValue(this.__prime,enc)},DH.prototype.getGenerator=function(enc){return formatReturnValue(this._gen,enc)},DH.prototype.setGenerator=function(gen,enc){return enc=enc||"utf8",Buffer.isBuffer(gen)||(gen=new Buffer(gen,enc)),this.__gen=gen,this._gen=new BN(gen),this}},3590:(module,__unused_webpack_exports,__webpack_require__)=>{var randomBytes=__webpack_require__(1798);module.exports=findPrime,findPrime.simpleSieve=simpleSieve,findPrime.fermatTest=fermatTest;var BN=__webpack_require__(3620),TWENTYFOUR=new BN(24),millerRabin=new(__webpack_require__(3047)),ONE=new BN(1),TWO=new BN(2),FIVE=new BN(5),TEN=(new BN(16),new BN(8),new BN(10)),THREE=new BN(3),ELEVEN=(new BN(7),new BN(11)),FOUR=new BN(4),primes=(new BN(12),null);function _getPrimes(){if(null!==primes)return primes;var res=[];res[0]=2;for(var i=1,k=3;k<1048576;k+=2){for(var sqrt=Math.ceil(Math.sqrt(k)),j=0;j<i&&res[j]<=sqrt&&k%res[j]!=0;j++);i!==j&&res[j]<=sqrt||(res[i++]=k)}return primes=res,res}function simpleSieve(p){for(var primes=_getPrimes(),i=0;i<primes.length;i++)if(0===p.modn(primes[i]))return 0===p.cmpn(primes[i]);return!0}function fermatTest(p){var red=BN.mont(p);return 0===TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1)}function findPrime(bits,gen){if(bits<16)return new BN(2===gen||5===gen?[140,123]:[140,39]);var num,n2;for(gen=new BN(gen);;){for(num=new BN(randomBytes(Math.ceil(bits/8)));num.bitLength()>bits;)num.ishrn(1);if(num.isEven()&&num.iadd(ONE),num.testn(1)||num.iadd(TWO),gen.cmp(TWO)){if(!gen.cmp(FIVE))for(;num.mod(TEN).cmp(THREE);)num.iadd(FOUR)}else for(;num.mod(TWENTYFOUR).cmp(ELEVEN);)num.iadd(FOUR);if(simpleSieve(n2=num.shrn(1))&&simpleSieve(num)&&fermatTest(n2)&&fermatTest(num)&&millerRabin.test(n2)&&millerRabin.test(num))return num}}},3620:function(module,__unused_webpack_exports,__webpack_require__){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}var Buffer;"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;try{Buffer="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:__webpack_require__(7748).Buffer}catch(e){}function parseHex4Bits(string,index){var c=string.charCodeAt(index);return c>=65&&c<=70?c-55:c>=97&&c<=102?c-87:c-48&15}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);return index-1>=lowerBound&&(r|=parseHex4Bits(string,index-1)<<4),r}function parseBase(str,start,end,mul){for(var r=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul,r+=c>=49?c-49+10:c>=17?c-17+10:c}return r}BN.isBN=function isBN(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function max(left,right){return left.cmp(right)>0?left:right},BN.min=function min(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function init(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&(start++,this.negative=1),start<number.length&&(16===base?this._parseHex(number,start,endian):(this._parseBase(number,base,start),"le"===endian&&this._initArray(this.toArray(),base,endian)))},BN.prototype._initNumber=function _initNumber(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function _initArray(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this.strip()},BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var w,off=0,j=0;if("be"===endian)for(i=number.length-1;i>=start;i-=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;else for(i=(number.length-start)%2==0?start+1:start;i<number.length;i+=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;this.strip()},BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}this.strip()},BN.prototype.copy=function copy(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype.clone=function clone(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function _expand(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype.strip=function strip(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var zeros=["","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"],groupSizes=[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],groupBases=[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 smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){for(var ncarry=carry>>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out.strip()}BN.prototype.toString=function toString(base,padding){var out;if(padding=0|padding||1,16===(base=base||10)||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);out=0!==(carry=w>>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function toJSON(){return this.toString(16)},BN.prototype.toBuffer=function toBuffer(endian,length){return assert(void 0!==Buffer),this.toArrayLike(Buffer,endian,length)},BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)},BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0"),this.strip();var b,i,littleEndian="le"===endian,res=new ArrayType(reqLength),q=this.clone();if(littleEndian){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[i]=b;for(;i<reqLength;i++)res[i]=0}else{for(i=0;i<reqLength-byteLength;i++)res[i]=0;for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[reqLength-i-1]=b}return res},Math.clz32?BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function _countBits(w){var t=w,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},BN.prototype._zeroBits=function _zeroBits(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function toTwos(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function fromTwos(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function isNeg(){return 0!==this.negative},BN.prototype.neg=function neg(){return this.clone().ineg()},BN.prototype.ineg=function ineg(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function iuor(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this.strip()},BN.prototype.ior=function ior(num){return assert(0==(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function or(num){return this.length>num.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function uor(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function iuand(num){var b;b=this.length>num.length?num:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this.strip()},BN.prototype.iand=function iand(num){return assert(0==(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function and(num){return this.length>num.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function uand(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function iuxor(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this.strip()},BN.prototype.ixor=function ixor(num){return assert(0==(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function xor(num){return this.length>num.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function uxor(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function inotn(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this.strip()},BN.prototype.notn=function notn(width){return this.clone().inotn(width)},BN.prototype.setn=function setn(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<<wbit:this.words[off]&~(1<<wbit),this.strip()},BN.prototype.iadd=function iadd(num){var r,a,b;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function add(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function isub(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)carry=(r=(0|a.words[i])-(0|b.words[i])+carry)>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)carry=(r=(0|a.words[i])+carry)>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this.strip()},BN.prototype.sub=function sub(num){return this.clone().isub(num)};var comb10MulTo=function comb10MulTo(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function jumboMulTo(self,num,out){return(new FFTM).mulp(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function mulTo(num,out){var res,len=this.length+num.length;return res=10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j,r=(0|self.words[i])*(0|num.words[j]),lo=67108863&r;rword=67108863&(lo=lo+rword|0),hncarry+=(ncarry=(ncarry=ncarry+(r/67108864|0)|0)+(lo>>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out.strip()}(this,num,out):jumboMulTo(this,num,out),res},FFTM.prototype.makeRBT=function makeRBT(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function revBin(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function transform(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function guessLen13b(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function conjugate(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function normalize13b(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function convert13b(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0==(-8192&carry))},FFTM.prototype.stub=function stub(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function mulp(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out.strip()},BN.prototype.mul=function mul(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function mulf(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function imuln(num){assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.muln=function muln(num){return this.clone().imuln(num)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(num){var w=function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=(num.words[off]&1<<wbit)>>>wbit}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function iushln(bits){assert("number"==typeof bits&&bits>=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this.strip()},BN.prototype.ishln=function ishln(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function iushrn(bits,hint,extended){var h;assert("number"==typeof bits&&bits>=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;i>=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function ishrn(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function testn(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<<r;return!(this.length<=s)&&!!(this.words[s]&q)},BN.prototype.imaskn=function imaskn(bits){assert("number"==typeof bits&&bits>=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this.strip()},BN.prototype.maskn=function maskn(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function iaddn(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function _iaddn(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},BN.prototype.addn=function addn(num){return this.clone().iaddn(num)},BN.prototype.subn=function subn(num){return this.clone().isubn(num)},BN.prototype.iabs=function iabs(){return this.negative=0,this},BN.prototype.abs=function abs(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function _ishlnsubmul(num,mul,shift){var i,w,len=num.length+shift;this._expand(len);var carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;carry=((w-=67108863&right)>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)carry=(w=(0|this.words[i+shift])+carry)>>26,this.words[i+shift]=67108863&w;if(0===carry)return this.strip();for(assert(-1===carry),carry=0,i=0;i<this.length;i++)carry=(w=-(0|this.words[i])+carry)>>26,this.words[i]=67108863&w;return this.negative=1,this.strip()},BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q.strip(),a.strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function divmod(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div,mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function div(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function mod(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function umod(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modn=function modn(num){assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return acc},BN.prototype.idivn=function idivn(num){assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this.strip()},BN.prototype.divn=function divn(num){return this.clone().idivn(num)},BN.prototype.egcd=function egcd(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function _invmp(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(num){return this.words[0]&num},BN.prototype.bincn=function bincn(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];carry=(w+=carry)>>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this.strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function cmp(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function ucmp(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(res=1);break}}return res},BN.prototype.gtn=function gtn(num){return 1===this.cmpn(num)},BN.prototype.gt=function gt(num){return 1===this.cmp(num)},BN.prototype.gten=function gten(num){return this.cmpn(num)>=0},BN.prototype.gte=function gte(num){return this.cmp(num)>=0},BN.prototype.ltn=function ltn(num){return-1===this.cmpn(num)},BN.prototype.lt=function lt(num){return-1===this.cmp(num)},BN.prototype.lten=function lten(num){return this.cmpn(num)<=0},BN.prototype.lte=function lte(num){return this.cmp(num)<=0},BN.prototype.eqn=function eqn(num){return 0===this.cmpn(num)},BN.prototype.eq=function eq(num){return 0===this.cmp(num)},BN.red=function red(num){return new Red(num)},BN.prototype.toRed=function toRed(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(ctx){return this.red=ctx,this},BN.prototype.forceRed=function forceRed(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function redAdd(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function redIAdd(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function redSub(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function redISub(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function redShl(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function redMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function redIMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function ireduce(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(input,output){for(var outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(4194303&next)<<4|prev>>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function imulK(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function imulK(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function _verify1(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function imod(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},Red.prototype.neg=function neg(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function shl(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function imul(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function mul(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())},Red.prototype.sqr=function sqr(a){return this.mul(a,a)},Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function invm(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function pow(a,num){if(num.isZero())return new BN(1).toRed(this);if(0===num.cmpn(1))return a.clone();var wnd=new Array(16);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;i>=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();return res.red=null,res},BN.mont=function mont(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function invm(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(module=__webpack_require__.nmd(module),this)},6266:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var elliptic=exports;elliptic.version=__webpack_require__(8597).i8,elliptic.utils=__webpack_require__(953),elliptic.rand=__webpack_require__(9931),elliptic.curve=__webpack_require__(8254),elliptic.curves=__webpack_require__(5427),elliptic.ec=__webpack_require__(7954),elliptic.eddsa=__webpack_require__(5980)},4918:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var BN=__webpack_require__(3785),utils=__webpack_require__(953),getNAF=utils.getNAF,getJSF=utils.getJSF,assert=utils.assert;function BaseCurve(type,conf){this.type=type,this.p=new BN(conf.p,16),this.red=conf.prime?BN.red(conf.prime):BN.mont(this.p),this.zero=new BN(0).toRed(this.red),this.one=new BN(1).toRed(this.red),this.two=new BN(2).toRed(this.red),this.n=conf.n&&new BN(conf.n,16),this.g=conf.g&&this.pointFromJSON(conf.g,conf.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 adjustCount=this.n&&this.p.div(this.n);!adjustCount||adjustCount.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function BasePoint(curve,type){this.curve=curve,this.type=type,this.precomputed=null}module.exports=BaseCurve,BaseCurve.prototype.point=function point(){throw new Error("Not implemented")},BaseCurve.prototype.validate=function validate(){throw new Error("Not implemented")},BaseCurve.prototype._fixedNafMul=function _fixedNafMul(p,k){assert(p.precomputed);var doubles=p._getDoubles(),naf=getNAF(k,1,this._bitLength),I=(1<<doubles.step+1)-(doubles.step%2==0?2:1);I/=3;var j,nafW,repr=[];for(j=0;j<naf.length;j+=doubles.step){nafW=0;for(var l=j+doubles.step-1;l>=j;l--)nafW=(nafW<<1)+naf[l];repr.push(nafW)}for(var a=this.jpoint(null,null,null),b=this.jpoint(null,null,null),i=I;i>0;i--){for(j=0;j<repr.length;j++)(nafW=repr[j])===i?b=b.mixedAdd(doubles.points[j]):nafW===-i&&(b=b.mixedAdd(doubles.points[j].neg()));a=a.add(b)}return a.toP()},BaseCurve.prototype._wnafMul=function _wnafMul(p,k){var w=4,nafPoints=p._getNAFPoints(w);w=nafPoints.wnd;for(var wnd=nafPoints.points,naf=getNAF(k,w,this._bitLength),acc=this.jpoint(null,null,null),i=naf.length-1;i>=0;i--){for(var l=0;i>=0&&0===naf[i];i--)l++;if(i>=0&&l++,acc=acc.dblp(l),i<0)break;var z=naf[i];assert(0!==z),acc="affine"===p.type?z>0?acc.mixedAdd(wnd[z-1>>1]):acc.mixedAdd(wnd[-z-1>>1].neg()):z>0?acc.add(wnd[z-1>>1]):acc.add(wnd[-z-1>>1].neg())}return"affine"===p.type?acc.toP():acc},BaseCurve.prototype._wnafMulAdd=function _wnafMulAdd(defW,points,coeffs,len,jacobianResult){var i,j,p,wndWidth=this._wnafT1,wnd=this._wnafT2,naf=this._wnafT3,max=0;for(i=0;i<len;i++){var nafPoints=(p=points[i])._getNAFPoints(defW);wndWidth[i]=nafPoints.wnd,wnd[i]=nafPoints.points}for(i=len-1;i>=1;i-=2){var a=i-1,b=i;if(1===wndWidth[a]&&1===wndWidth[b]){var comb=[points[a],null,null,points[b]];0===points[a].y.cmp(points[b].y)?(comb[1]=points[a].add(points[b]),comb[2]=points[a].toJ().mixedAdd(points[b].neg())):0===points[a].y.cmp(points[b].y.redNeg())?(comb[1]=points[a].toJ().mixedAdd(points[b]),comb[2]=points[a].add(points[b].neg())):(comb[1]=points[a].toJ().mixedAdd(points[b]),comb[2]=points[a].toJ().mixedAdd(points[b].neg()));var index=[-3,-1,-5,-7,0,7,5,1,3],jsf=getJSF(coeffs[a],coeffs[b]);for(max=Math.max(jsf[0].length,max),naf[a]=new Array(max),naf[b]=new Array(max),j=0;j<max;j++){var ja=0|jsf[0][j],jb=0|jsf[1][j];naf[a][j]=index[3*(ja+1)+(jb+1)],naf[b][j]=0,wnd[a]=comb}}else naf[a]=getNAF(coeffs[a],wndWidth[a],this._bitLength),naf[b]=getNAF(coeffs[b],wndWidth[b],this._bitLength),max=Math.max(naf[a].length,max),max=Math.max(naf[b].length,max)}var acc=this.jpoint(null,null,null),tmp=this._wnafT4;for(i=max;i>=0;i--){for(var k=0;i>=0;){var zero=!0;for(j=0;j<len;j++)tmp[j]=0|naf[j][i],0!==tmp[j]&&(zero=!1);if(!zero)break;k++,i--}if(i>=0&&k++,acc=acc.dblp(k),i<0)break;for(j=0;j<len;j++){var z=tmp[j];0!==z&&(z>0?p=wnd[j][z-1>>1]:z<0&&(p=wnd[j][-z-1>>1].neg()),acc="affine"===p.type?acc.mixedAdd(p):acc.add(p))}}for(i=0;i<len;i++)wnd[i]=null;return jacobianResult?acc:acc.toP()},BaseCurve.BasePoint=BasePoint,BasePoint.prototype.eq=function eq(){throw new Error("Not implemented")},BasePoint.prototype.validate=function validate(){return this.curve.validate(this)},BaseCurve.prototype.decodePoint=function decodePoint(bytes,enc){bytes=utils.toArray(bytes,enc);var len=this.p.byteLength();if((4===bytes[0]||6===bytes[0]||7===bytes[0])&&bytes.length-1==2*len)return 6===bytes[0]?assert(bytes[bytes.length-1]%2==0):7===bytes[0]&&assert(bytes[bytes.length-1]%2==1),this.point(bytes.slice(1,1+len),bytes.slice(1+len,1+2*len));if((2===bytes[0]||3===bytes[0])&&bytes.length-1===len)return this.pointFromX(bytes.slice(1,1+len),3===bytes[0]);throw new Error("Unknown point format")},BasePoint.prototype.encodeCompressed=function encodeCompressed(enc){return this.encode(enc,!0)},BasePoint.prototype._encode=function _encode(compact){var len=this.curve.p.byteLength(),x=this.getX().toArray("be",len);return compact?[this.getY().isEven()?2:3].concat(x):[4].concat(x,this.getY().toArray("be",len))},BasePoint.prototype.encode=function encode(enc,compact){return utils.encode(this._encode(compact),enc)},BasePoint.prototype.precompute=function precompute(power){if(this.precomputed)return this;var precomputed={doubles:null,naf:null,beta:null};return precomputed.naf=this._getNAFPoints(8),precomputed.doubles=this._getDoubles(4,power),precomputed.beta=this._getBeta(),this.precomputed=precomputed,this},BasePoint.prototype._hasDoubles=function _hasDoubles(k){if(!this.precomputed)return!1;var doubles=this.precomputed.doubles;return!!doubles&&doubles.points.length>=Math.ceil((k.bitLength()+1)/doubles.step)},BasePoint.prototype._getDoubles=function _getDoubles(step,power){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var doubles=[this],acc=this,i=0;i<power;i+=step){for(var j=0;j<step;j++)acc=acc.dbl();doubles.push(acc)}return{step,points:doubles}},BasePoint.prototype._getNAFPoints=function _getNAFPoints(wnd){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var res=[this],max=(1<<wnd)-1,dbl=1===max?null:this.dbl(),i=1;i<max;i++)res[i]=res[i-1].add(dbl);return{wnd,points:res}},BasePoint.prototype._getBeta=function _getBeta(){return null},BasePoint.prototype.dblp=function dblp(k){for(var r=this,i=0;i<k;i++)r=r.dbl();return r}},1138:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(953),BN=__webpack_require__(3785),inherits=__webpack_require__(5717),Base=__webpack_require__(4918),assert=utils.assert;function EdwardsCurve(conf){this.twisted=1!=(0|conf.a),this.mOneA=this.twisted&&-1==(0|conf.a),this.extended=this.mOneA,Base.call(this,"edwards",conf),this.a=new BN(conf.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new BN(conf.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new BN(conf.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),assert(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|conf.c)}function Point(curve,x,y,z,t){Base.BasePoint.call(this,curve,"projective"),null===x&&null===y&&null===z?(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 BN(x,16),this.y=new BN(y,16),this.z=z?new BN(z,16):this.curve.one,this.t=t&&new BN(t,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()))))}inherits(EdwardsCurve,Base),module.exports=EdwardsCurve,EdwardsCurve.prototype._mulA=function _mulA(num){return this.mOneA?num.redNeg():this.a.redMul(num)},EdwardsCurve.prototype._mulC=function _mulC(num){return this.oneC?num:this.c.redMul(num)},EdwardsCurve.prototype.jpoint=function jpoint(x,y,z,t){return this.point(x,y,z,t)},EdwardsCurve.prototype.pointFromX=function pointFromX(x,odd){(x=new BN(x,16)).red||(x=x.toRed(this.red));var x2=x.redSqr(),rhs=this.c2.redSub(this.a.redMul(x2)),lhs=this.one.redSub(this.c2.redMul(this.d).redMul(x2)),y2=rhs.redMul(lhs.redInvm()),y=y2.redSqrt();if(0!==y.redSqr().redSub(y2).cmp(this.zero))throw new Error("invalid point");var isOdd=y.fromRed().isOdd();return(odd&&!isOdd||!odd&&isOdd)&&(y=y.redNeg()),this.point(x,y)},EdwardsCurve.prototype.pointFromY=function pointFromY(y,odd){(y=new BN(y,16)).red||(y=y.toRed(this.red));var y2=y.redSqr(),lhs=y2.redSub(this.c2),rhs=y2.redMul(this.d).redMul(this.c2).redSub(this.a),x2=lhs.redMul(rhs.redInvm());if(0===x2.cmp(this.zero)){if(odd)throw new Error("invalid point");return this.point(this.zero,y)}var x=x2.redSqrt();if(0!==x.redSqr().redSub(x2).cmp(this.zero))throw new Error("invalid point");return x.fromRed().isOdd()!==odd&&(x=x.redNeg()),this.point(x,y)},EdwardsCurve.prototype.validate=function validate(point){if(point.isInfinity())return!0;point.normalize();var x2=point.x.redSqr(),y2=point.y.redSqr(),lhs=x2.redMul(this.a).redAdd(y2),rhs=this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));return 0===lhs.cmp(rhs)},inherits(Point,Base.BasePoint),EdwardsCurve.prototype.pointFromJSON=function pointFromJSON(obj){return Point.fromJSON(this,obj)},EdwardsCurve.prototype.point=function point(x,y,z,t){return new Point(this,x,y,z,t)},Point.fromJSON=function fromJSON(curve,obj){return new Point(curve,obj[0],obj[1],obj[2])},Point.prototype.inspect=function inspect(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},Point.prototype.isInfinity=function isInfinity(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},Point.prototype._extDbl=function _extDbl(){var a=this.x.redSqr(),b=this.y.redSqr(),c=this.z.redSqr();c=c.redIAdd(c);var d=this.curve._mulA(a),e=this.x.redAdd(this.y).redSqr().redISub(a).redISub(b),g=d.redAdd(b),f=g.redSub(c),h=d.redSub(b),nx=e.redMul(f),ny=g.redMul(h),nt=e.redMul(h),nz=f.redMul(g);return this.curve.point(nx,ny,nz,nt)},Point.prototype._projDbl=function _projDbl(){var nx,ny,nz,e,h,j,b=this.x.redAdd(this.y).redSqr(),c=this.x.redSqr(),d=this.y.redSqr();if(this.curve.twisted){var f=(e=this.curve._mulA(c)).redAdd(d);this.zOne?(nx=b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)),ny=f.redMul(e.redSub(d)),nz=f.redSqr().redSub(f).redSub(f)):(h=this.z.redSqr(),j=f.redSub(h).redISub(h),nx=b.redSub(c).redISub(d).redMul(j),ny=f.redMul(e.redSub(d)),nz=f.redMul(j))}else e=c.redAdd(d),h=this.curve._mulC(this.z).redSqr(),j=e.redSub(h).redSub(h),nx=this.curve._mulC(b.redISub(e)).redMul(j),ny=this.curve._mulC(e).redMul(c.redISub(d)),nz=e.redMul(j);return this.curve.point(nx,ny,nz)},Point.prototype.dbl=function dbl(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},Point.prototype._extAdd=function _extAdd(p){var a=this.y.redSub(this.x).redMul(p.y.redSub(p.x)),b=this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)),c=this.t.redMul(this.curve.dd).redMul(p.t),d=this.z.redMul(p.z.redAdd(p.z)),e=b.redSub(a),f=d.redSub(c),g=d.redAdd(c),h=b.redAdd(a),nx=e.redMul(f),ny=g.redMul(h),nt=e.redMul(h),nz=f.redMul(g);return this.curve.point(nx,ny,nz,nt)},Point.prototype._projAdd=function _projAdd(p){var ny,nz,a=this.z.redMul(p.z),b=a.redSqr(),c=this.x.redMul(p.x),d=this.y.redMul(p.y),e=this.curve.d.redMul(c).redMul(d),f=b.redSub(e),g=b.redAdd(e),tmp=this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d),nx=a.redMul(f).redMul(tmp);return this.curve.twisted?(ny=a.redMul(g).redMul(d.redSub(this.curve._mulA(c))),nz=f.redMul(g)):(ny=a.redMul(g).redMul(d.redSub(c)),nz=this.curve._mulC(f).redMul(g)),this.curve.point(nx,ny,nz)},Point.prototype.add=function add(p){return this.isInfinity()?p:p.isInfinity()?this:this.curve.extended?this._extAdd(p):this._projAdd(p)},Point.prototype.mul=function mul(k){return this._hasDoubles(k)?this.curve._fixedNafMul(this,k):this.curve._wnafMul(this,k)},Point.prototype.mulAdd=function mulAdd(k1,p,k2){return this.curve._wnafMulAdd(1,[this,p],[k1,k2],2,!1)},Point.prototype.jmulAdd=function jmulAdd(k1,p,k2){return this.curve._wnafMulAdd(1,[this,p],[k1,k2],2,!0)},Point.prototype.normalize=function normalize(){if(this.zOne)return this;var zi=this.z.redInvm();return this.x=this.x.redMul(zi),this.y=this.y.redMul(zi),this.t&&(this.t=this.t.redMul(zi)),this.z=this.curve.one,this.zOne=!0,this},Point.prototype.neg=function neg(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},Point.prototype.getX=function getX(){return this.normalize(),this.x.fromRed()},Point.prototype.getY=function getY(){return this.normalize(),this.y.fromRed()},Point.prototype.eq=function eq(other){return this===other||0===this.getX().cmp(other.getX())&&0===this.getY().cmp(other.getY())},Point.prototype.eqXToP=function eqXToP(x){var rx=x.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(rx))return!0;for(var xc=x.clone(),t=this.curve.redN.redMul(this.z);;){if(xc.iadd(this.curve.n),xc.cmp(this.curve.p)>=0)return!1;if(rx.redIAdd(t),0===this.x.cmp(rx))return!0}},Point.prototype.toP=Point.prototype.normalize,Point.prototype.mixedAdd=Point.prototype.add},8254:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var curve=exports;curve.base=__webpack_require__(4918),curve.short=__webpack_require__(6673),curve.mont=__webpack_require__(2881),curve.edwards=__webpack_require__(1138)},2881:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var BN=__webpack_require__(3785),inherits=__webpack_require__(5717),Base=__webpack_require__(4918),utils=__webpack_require__(953);function MontCurve(conf){Base.call(this,"mont",conf),this.a=new BN(conf.a,16).toRed(this.red),this.b=new BN(conf.b,16).toRed(this.red),this.i4=new BN(4).toRed(this.red).redInvm(),this.two=new BN(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function Point(curve,x,z){Base.BasePoint.call(this,curve,"projective"),null===x&&null===z?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new BN(x,16),this.z=new BN(z,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}inherits(MontCurve,Base),module.exports=MontCurve,MontCurve.prototype.validate=function validate(point){var x=point.normalize().x,x2=x.redSqr(),rhs=x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);return 0===rhs.redSqrt().redSqr().cmp(rhs)},inherits(Point,Base.BasePoint),MontCurve.prototype.decodePoint=function decodePoint(bytes,enc){return this.point(utils.toArray(bytes,enc),1)},MontCurve.prototype.point=function point(x,z){return new Point(this,x,z)},MontCurve.prototype.pointFromJSON=function pointFromJSON(obj){return Point.fromJSON(this,obj)},Point.prototype.precompute=function precompute(){},Point.prototype._encode=function _encode(){return this.getX().toArray("be",this.curve.p.byteLength())},Point.fromJSON=function fromJSON(curve,obj){return new Point(curve,obj[0],obj[1]||curve.one)},Point.prototype.inspect=function inspect(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},Point.prototype.isInfinity=function isInfinity(){return 0===this.z.cmpn(0)},Point.prototype.dbl=function dbl(){var aa=this.x.redAdd(this.z).redSqr(),bb=this.x.redSub(this.z).redSqr(),c=aa.redSub(bb),nx=aa.redMul(bb),nz=c.redMul(bb.redAdd(this.curve.a24.redMul(c)));return this.curve.point(nx,nz)},Point.prototype.add=function add(){throw new Error("Not supported on Montgomery curve")},Point.prototype.diffAdd=function diffAdd(p,diff){var a=this.x.redAdd(this.z),b=this.x.redSub(this.z),c=p.x.redAdd(p.z),da=p.x.redSub(p.z).redMul(a),cb=c.redMul(b),nx=diff.z.redMul(da.redAdd(cb).redSqr()),nz=diff.x.redMul(da.redISub(cb).redSqr());return this.curve.point(nx,nz)},Point.prototype.mul=function mul(k){for(var t=k.clone(),a=this,b=this.curve.point(null,null),bits=[];0!==t.cmpn(0);t.iushrn(1))bits.push(t.andln(1));for(var i=bits.length-1;i>=0;i--)0===bits[i]?(a=a.diffAdd(b,this),b=b.dbl()):(b=a.diffAdd(b,this),a=a.dbl());return b},Point.prototype.mulAdd=function mulAdd(){throw new Error("Not supported on Montgomery curve")},Point.prototype.jumlAdd=function jumlAdd(){throw new Error("Not supported on Montgomery curve")},Point.prototype.eq=function eq(other){return 0===this.getX().cmp(other.getX())},Point.prototype.normalize=function normalize(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Point.prototype.getX=function getX(){return this.normalize(),this.x.fromRed()}},6673:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(953),BN=__webpack_require__(3785),inherits=__webpack_require__(5717),Base=__webpack_require__(4918),assert=utils.assert;function ShortCurve(conf){Base.call(this,"short",conf),this.a=new BN(conf.a,16).toRed(this.red),this.b=new BN(conf.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(conf),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function Point(curve,x,y,isRed){Base.BasePoint.call(this,curve,"affine"),null===x&&null===y?(this.x=null,this.y=null,this.inf=!0):(this.x=new BN(x,16),this.y=new BN(y,16),isRed&&(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 JPoint(curve,x,y,z){Base.BasePoint.call(this,curve,"jacobian"),null===x&&null===y&&null===z?(this.x=this.curve.one,this.y=this.curve.one,this.z=new BN(0)):(this.x=new BN(x,16),this.y=new BN(y,16),this.z=new BN(z,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}inherits(ShortCurve,Base),module.exports=ShortCurve,ShortCurve.prototype._getEndomorphism=function _getEndomorphism(conf){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var beta,lambda;if(conf.beta)beta=new BN(conf.beta,16).toRed(this.red);else{var betas=this._getEndoRoots(this.p);beta=(beta=betas[0].cmp(betas[1])<0?betas[0]:betas[1]).toRed(this.red)}if(conf.lambda)lambda=new BN(conf.lambda,16);else{var lambdas=this._getEndoRoots(this.n);0===this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta))?lambda=lambdas[0]:(lambda=lambdas[1],assert(0===this.g.mul(lambda).x.cmp(this.g.x.redMul(beta))))}return{beta,lambda,basis:conf.basis?conf.basis.map((function(vec){return{a:new BN(vec.a,16),b:new BN(vec.b,16)}})):this._getEndoBasis(lambda)}}},ShortCurve.prototype._getEndoRoots=function _getEndoRoots(num){var red=num===this.p?this.red:BN.mont(num),tinv=new BN(2).toRed(red).redInvm(),ntinv=tinv.redNeg(),s=new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);return[ntinv.redAdd(s).fromRed(),ntinv.redSub(s).fromRed()]},ShortCurve.prototype._getEndoBasis=function _getEndoBasis(lambda){for(var a0,b0,a1,b1,a2,b2,prevR,r,x,aprxSqrt=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=lambda,v=this.n.clone(),x1=new BN(1),y1=new BN(0),x2=new BN(0),y2=new BN(1),i=0;0!==u.cmpn(0);){var q=v.div(u);r=v.sub(q.mul(u)),x=x2.sub(q.mul(x1));var y=y2.sub(q.mul(y1));if(!a1&&r.cmp(aprxSqrt)<0)a0=prevR.neg(),b0=x1,a1=r.neg(),b1=x;else if(a1&&2==++i)break;prevR=r,v=u,u=r,x2=x1,x1=x,y2=y1,y1=y}a2=r.neg(),b2=x;var len1=a1.sqr().add(b1.sqr());return a2.sqr().add(b2.sqr()).cmp(len1)>=0&&(a2=a0,b2=b0),a1.negative&&(a1=a1.neg(),b1=b1.neg()),a2.negative&&(a2=a2.neg(),b2=b2.neg()),[{a:a1,b:b1},{a:a2,b:b2}]},ShortCurve.prototype._endoSplit=function _endoSplit(k){var basis=this.endo.basis,v1=basis[0],v2=basis[1],c1=v2.b.mul(k).divRound(this.n),c2=v1.b.neg().mul(k).divRound(this.n),p1=c1.mul(v1.a),p2=c2.mul(v2.a),q1=c1.mul(v1.b),q2=c2.mul(v2.b);return{k1:k.sub(p1).sub(p2),k2:q1.add(q2).neg()}},ShortCurve.prototype.pointFromX=function pointFromX(x,odd){(x=new BN(x,16)).red||(x=x.toRed(this.red));var y2=x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b),y=y2.redSqrt();if(0!==y.redSqr().redSub(y2).cmp(this.zero))throw new Error("invalid point");var isOdd=y.fromRed().isOdd();return(odd&&!isOdd||!odd&&isOdd)&&(y=y.redNeg()),this.point(x,y)},ShortCurve.prototype.validate=function validate(point){if(point.inf)return!0;var x=point.x,y=point.y,ax=this.a.redMul(x),rhs=x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);return 0===y.redSqr().redISub(rhs).cmpn(0)},ShortCurve.prototype._endoWnafMulAdd=function _endoWnafMulAdd(points,coeffs,jacobianResult){for(var npoints=this._endoWnafT1,ncoeffs=this._endoWnafT2,i=0;i<points.length;i++){var split=this._endoSplit(coeffs[i]),p=points[i],beta=p._getBeta();split.k1.negative&&(split.k1.ineg(),p=p.neg(!0)),split.k2.negative&&(split.k2.ineg(),beta=beta.neg(!0)),npoints[2*i]=p,npoints[2*i+1]=beta,ncoeffs[2*i]=split.k1,ncoeffs[2*i+1]=split.k2}for(var res=this._wnafMulAdd(1,npoints,ncoeffs,2*i,jacobianResult),j=0;j<2*i;j++)npoints[j]=null,ncoeffs[j]=null;return res},inherits(Point,Base.BasePoint),ShortCurve.prototype.point=function point(x,y,isRed){return new Point(this,x,y,isRed)},ShortCurve.prototype.pointFromJSON=function pointFromJSON(obj,red){return Point.fromJSON(this,obj,red)},Point.prototype._getBeta=function _getBeta(){if(this.curve.endo){var pre=this.precomputed;if(pre&&pre.beta)return pre.beta;var beta=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(pre){var curve=this.curve,endoMul=function(p){return curve.point(p.x.redMul(curve.endo.beta),p.y)};pre.beta=beta,beta.precomputed={beta:null,naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(endoMul)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(endoMul)}}}return beta}},Point.prototype.toJSON=function toJSON(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Point.fromJSON=function fromJSON(curve,obj,red){"string"==typeof obj&&(obj=JSON.parse(obj));var res=curve.point(obj[0],obj[1],red);if(!obj[2])return res;function obj2point(obj){return curve.point(obj[0],obj[1],red)}var pre=obj[2];return res.precomputed={beta:null,doubles:pre.doubles&&{step:pre.doubles.step,points:[res].concat(pre.doubles.points.map(obj2point))},naf:pre.naf&&{wnd:pre.naf.wnd,points:[res].concat(pre.naf.points.map(obj2point))}},res},Point.prototype.inspect=function inspect(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Point.prototype.isInfinity=function isInfinity(){return this.inf},Point.prototype.add=function add(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(0===this.x.cmp(p.x))return this.curve.point(null,null);var c=this.y.redSub(p.y);0!==c.cmpn(0)&&(c=c.redMul(this.x.redSub(p.x).redInvm()));var nx=c.redSqr().redISub(this.x).redISub(p.x),ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)},Point.prototype.dbl=function dbl(){if(this.inf)return this;var ys1=this.y.redAdd(this.y);if(0===ys1.cmpn(0))return this.curve.point(null,null);var a=this.curve.a,x2=this.x.redSqr(),dyinv=ys1.redInvm(),c=x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv),nx=c.redSqr().redISub(this.x.redAdd(this.x)),ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)},Point.prototype.getX=function getX(){return this.x.fromRed()},Point.prototype.getY=function getY(){return this.y.fromRed()},Point.prototype.mul=function mul(k){return k=new BN(k,16),this.isInfinity()?this:this._hasDoubles(k)?this.curve._fixedNafMul(this,k):this.curve.endo?this.curve._endoWnafMulAdd([this],[k]):this.curve._wnafMul(this,k)},Point.prototype.mulAdd=function mulAdd(k1,p2,k2){var points=[this,p2],coeffs=[k1,k2];return this.curve.endo?this.curve._endoWnafMulAdd(points,coeffs):this.curve._wnafMulAdd(1,points,coeffs,2)},Point.prototype.jmulAdd=function jmulAdd(k1,p2,k2){var points=[this,p2],coeffs=[k1,k2];return this.curve.endo?this.curve._endoWnafMulAdd(points,coeffs,!0):this.curve._wnafMulAdd(1,points,coeffs,2,!0)},Point.prototype.eq=function eq(p){return this===p||this.inf===p.inf&&(this.inf||0===this.x.cmp(p.x)&&0===this.y.cmp(p.y))},Point.prototype.neg=function neg(_precompute){if(this.inf)return this;var res=this.curve.point(this.x,this.y.redNeg());if(_precompute&&this.precomputed){var pre=this.precomputed,negate=function(p){return p.neg()};res.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(negate)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(negate)}}}return res},Point.prototype.toJ=function toJ(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},inherits(JPoint,Base.BasePoint),ShortCurve.prototype.jpoint=function jpoint(x,y,z){return new JPoint(this,x,y,z)},JPoint.prototype.toP=function toP(){if(this.isInfinity())return this.curve.point(null,null);var zinv=this.z.redInvm(),zinv2=zinv.redSqr(),ax=this.x.redMul(zinv2),ay=this.y.redMul(zinv2).redMul(zinv);return this.curve.point(ax,ay)},JPoint.prototype.neg=function neg(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},JPoint.prototype.add=function add(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var pz2=p.z.redSqr(),z2=this.z.redSqr(),u1=this.x.redMul(pz2),u2=p.x.redMul(z2),s1=this.y.redMul(pz2.redMul(p.z)),s2=p.y.redMul(z2.redMul(this.z)),h=u1.redSub(u2),r=s1.redSub(s2);if(0===h.cmpn(0))return 0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=h.redSqr(),h3=h2.redMul(h),v=u1.redMul(h2),nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v),ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)),nz=this.z.redMul(p.z).redMul(h);return this.curve.jpoint(nx,ny,nz)},JPoint.prototype.mixedAdd=function mixedAdd(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var z2=this.z.redSqr(),u1=this.x,u2=p.x.redMul(z2),s1=this.y,s2=p.y.redMul(z2).redMul(this.z),h=u1.redSub(u2),r=s1.redSub(s2);if(0===h.cmpn(0))return 0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=h.redSqr(),h3=h2.redMul(h),v=u1.redMul(h2),nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v),ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)),nz=this.z.redMul(h);return this.curve.jpoint(nx,ny,nz)},JPoint.prototype.dblp=function dblp(pow){if(0===pow)return this;if(this.isInfinity())return this;if(!pow)return this.dbl();var i;if(this.curve.zeroA||this.curve.threeA){var r=this;for(i=0;i<pow;i++)r=r.dbl();return r}var a=this.curve.a,tinv=this.curve.tinv,jx=this.x,jy=this.y,jz=this.z,jz4=jz.redSqr().redSqr(),jyd=jy.redAdd(jy);for(i=0;i<pow;i++){var jx2=jx.redSqr(),jyd2=jyd.redSqr(),jyd4=jyd2.redSqr(),c=jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)),t1=jx.redMul(jyd2),nx=c.redSqr().redISub(t1.redAdd(t1)),t2=t1.redISub(nx),dny=c.redMul(t2);dny=dny.redIAdd(dny).redISub(jyd4);var nz=jyd.redMul(jz);i+1<pow&&(jz4=jz4.redMul(jyd4)),jx=nx,jz=nz,jyd=dny}return this.curve.jpoint(jx,jyd.redMul(tinv),jz)},JPoint.prototype.dbl=function dbl(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},JPoint.prototype._zeroDbl=function _zeroDbl(){var nx,ny,nz;if(this.zOne){var xx=this.x.redSqr(),yy=this.y.redSqr(),yyyy=yy.redSqr(),s=this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);s=s.redIAdd(s);var m=xx.redAdd(xx).redIAdd(xx),t=m.redSqr().redISub(s).redISub(s),yyyy8=yyyy.redIAdd(yyyy);yyyy8=(yyyy8=yyyy8.redIAdd(yyyy8)).redIAdd(yyyy8),nx=t,ny=m.redMul(s.redISub(t)).redISub(yyyy8),nz=this.y.redAdd(this.y)}else{var a=this.x.redSqr(),b=this.y.redSqr(),c=b.redSqr(),d=this.x.redAdd(b).redSqr().redISub(a).redISub(c);d=d.redIAdd(d);var e=a.redAdd(a).redIAdd(a),f=e.redSqr(),c8=c.redIAdd(c);c8=(c8=c8.redIAdd(c8)).redIAdd(c8),nx=f.redISub(d).redISub(d),ny=e.redMul(d.redISub(nx)).redISub(c8),nz=(nz=this.y.redMul(this.z)).redIAdd(nz)}return this.curve.jpoint(nx,ny,nz)},JPoint.prototype._threeDbl=function _threeDbl(){var nx,ny,nz;if(this.zOne){var xx=this.x.redSqr(),yy=this.y.redSqr(),yyyy=yy.redSqr(),s=this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);s=s.redIAdd(s);var m=xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a),t=m.redSqr().redISub(s).redISub(s);nx=t;var yyyy8=yyyy.redIAdd(yyyy);yyyy8=(yyyy8=yyyy8.redIAdd(yyyy8)).redIAdd(yyyy8),ny=m.redMul(s.redISub(t)).redISub(yyyy8),nz=this.y.redAdd(this.y)}else{var delta=this.z.redSqr(),gamma=this.y.redSqr(),beta=this.x.redMul(gamma),alpha=this.x.redSub(delta).redMul(this.x.redAdd(delta));alpha=alpha.redAdd(alpha).redIAdd(alpha);var beta4=beta.redIAdd(beta),beta8=(beta4=beta4.redIAdd(beta4)).redAdd(beta4);nx=alpha.redSqr().redISub(beta8),nz=this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);var ggamma8=gamma.redSqr();ggamma8=(ggamma8=(ggamma8=ggamma8.redIAdd(ggamma8)).redIAdd(ggamma8)).redIAdd(ggamma8),ny=alpha.redMul(beta4.redISub(nx)).redISub(ggamma8)}return this.curve.jpoint(nx,ny,nz)},JPoint.prototype._dbl=function _dbl(){var a=this.curve.a,jx=this.x,jy=this.y,jz=this.z,jz4=jz.redSqr().redSqr(),jx2=jx.redSqr(),jy2=jy.redSqr(),c=jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)),jxd4=jx.redAdd(jx),t1=(jxd4=jxd4.redIAdd(jxd4)).redMul(jy2),nx=c.redSqr().redISub(t1.redAdd(t1)),t2=t1.redISub(nx),jyd8=jy2.redSqr();jyd8=(jyd8=(jyd8=jyd8.redIAdd(jyd8)).redIAdd(jyd8)).redIAdd(jyd8);var ny=c.redMul(t2).redISub(jyd8),nz=jy.redAdd(jy).redMul(jz);return this.curve.jpoint(nx,ny,nz)},JPoint.prototype.trpl=function trpl(){if(!this.curve.zeroA)return this.dbl().add(this);var xx=this.x.redSqr(),yy=this.y.redSqr(),zz=this.z.redSqr(),yyyy=yy.redSqr(),m=xx.redAdd(xx).redIAdd(xx),mm=m.redSqr(),e=this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy),ee=(e=(e=(e=e.redIAdd(e)).redAdd(e).redIAdd(e)).redISub(mm)).redSqr(),t=yyyy.redIAdd(yyyy);t=(t=(t=t.redIAdd(t)).redIAdd(t)).redIAdd(t);var u=m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t),yyu4=yy.redMul(u);yyu4=(yyu4=yyu4.redIAdd(yyu4)).redIAdd(yyu4);var nx=this.x.redMul(ee).redISub(yyu4);nx=(nx=nx.redIAdd(nx)).redIAdd(nx);var ny=this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));ny=(ny=(ny=ny.redIAdd(ny)).redIAdd(ny)).redIAdd(ny);var nz=this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);return this.curve.jpoint(nx,ny,nz)},JPoint.prototype.mul=function mul(k,kbase){return k=new BN(k,kbase),this.curve._wnafMul(this,k)},JPoint.prototype.eq=function eq(p){if("affine"===p.type)return this.eq(p.toJ());if(this===p)return!0;var z2=this.z.redSqr(),pz2=p.z.redSqr();if(0!==this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0))return!1;var z3=z2.redMul(this.z),pz3=pz2.redMul(p.z);return 0===this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0)},JPoint.prototype.eqXToP=function eqXToP(x){var zs=this.z.redSqr(),rx=x.toRed(this.curve.red).redMul(zs);if(0===this.x.cmp(rx))return!0;for(var xc=x.clone(),t=this.curve.redN.redMul(zs);;){if(xc.iadd(this.curve.n),xc.cmp(this.curve.p)>=0)return!1;if(rx.redIAdd(t),0===this.x.cmp(rx))return!0}},JPoint.prototype.inspect=function inspect(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},JPoint.prototype.isInfinity=function isInfinity(){return 0===this.z.cmpn(0)}},5427:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var pre,curves=exports,hash=__webpack_require__(3715),curve=__webpack_require__(8254),assert=__webpack_require__(953).assert;function PresetCurve(options){"short"===options.type?this.curve=new curve.short(options):"edwards"===options.type?this.curve=new curve.edwards(options):this.curve=new curve.mont(options),this.g=this.curve.g,this.n=this.curve.n,this.hash=options.hash,assert(this.g.validate(),"Invalid curve"),assert(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function defineCurve(name,options){Object.defineProperty(curves,name,{configurable:!0,enumerable:!0,get:function(){var curve=new PresetCurve(options);return Object.defineProperty(curves,name,{configurable:!0,enumerable:!0,value:curve}),curve}})}curves.PresetCurve=PresetCurve,defineCurve("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:hash.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),defineCurve("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:hash.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),defineCurve("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:hash.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),defineCurve("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:hash.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"]}),defineCurve("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:hash.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"]}),defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash.sha256,gRed:!1,g:["9"]}),defineCurve("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:hash.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{pre=__webpack_require__(1037)}catch(e){pre=void 0}defineCurve("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:hash.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]})},7954:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var BN=__webpack_require__(3785),HmacDRBG=__webpack_require__(2156),utils=__webpack_require__(953),curves=__webpack_require__(5427),rand=__webpack_require__(9931),assert=utils.assert,KeyPair=__webpack_require__(1251),Signature=__webpack_require__(1814);function EC(options){if(!(this instanceof EC))return new EC(options);"string"==typeof options&&(assert(Object.prototype.hasOwnProperty.call(curves,options),"Unknown curve "+options),options=curves[options]),options instanceof curves.PresetCurve&&(options={curve:options}),this.curve=options.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=options.curve.g,this.g.precompute(options.curve.n.bitLength()+1),this.hash=options.hash||options.curve.hash}module.exports=EC,EC.prototype.keyPair=function keyPair(options){return new KeyPair(this,options)},EC.prototype.keyFromPrivate=function keyFromPrivate(priv,enc){return KeyPair.fromPrivate(this,priv,enc)},EC.prototype.keyFromPublic=function keyFromPublic(pub,enc){return KeyPair.fromPublic(this,pub,enc)},EC.prototype.genKeyPair=function genKeyPair(options){options||(options={});for(var drbg=new HmacDRBG({hash:this.hash,pers:options.pers,persEnc:options.persEnc||"utf8",entropy:options.entropy||rand(this.hash.hmacStrength),entropyEnc:options.entropy&&options.entropyEnc||"utf8",nonce:this.n.toArray()}),bytes=this.n.byteLength(),ns2=this.n.sub(new BN(2));;){var priv=new BN(drbg.generate(bytes));if(!(priv.cmp(ns2)>0))return priv.iaddn(1),this.keyFromPrivate(priv)}},EC.prototype._truncateToN=function _truncateToN(msg,truncOnly){var delta=8*msg.byteLength()-this.n.bitLength();return delta>0&&(msg=msg.ushrn(delta)),!truncOnly&&msg.cmp(this.n)>=0?msg.sub(this.n):msg},EC.prototype.sign=function sign(msg,key,enc,options){"object"==typeof enc&&(options=enc,enc=null),options||(options={}),key=this.keyFromPrivate(key,enc),msg=this._truncateToN(new BN(msg,16));for(var bytes=this.n.byteLength(),bkey=key.getPrivate().toArray("be",bytes),nonce=msg.toArray("be",bytes),drbg=new HmacDRBG({hash:this.hash,entropy:bkey,nonce,pers:options.pers,persEnc:options.persEnc||"utf8"}),ns1=this.n.sub(new BN(1)),iter=0;;iter++){var k=options.k?options.k(iter):new BN(drbg.generate(this.n.byteLength()));if(!((k=this._truncateToN(k,!0)).cmpn(1)<=0||k.cmp(ns1)>=0)){var kp=this.g.mul(k);if(!kp.isInfinity()){var kpX=kp.getX(),r=kpX.umod(this.n);if(0!==r.cmpn(0)){var s=k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));if(0!==(s=s.umod(this.n)).cmpn(0)){var recoveryParam=(kp.getY().isOdd()?1:0)|(0!==kpX.cmp(r)?2:0);return options.canonical&&s.cmp(this.nh)>0&&(s=this.n.sub(s),recoveryParam^=1),new Signature({r,s,recoveryParam})}}}}}},EC.prototype.verify=function verify(msg,signature,key,enc){msg=this._truncateToN(new BN(msg,16)),key=this.keyFromPublic(key,enc);var r=(signature=new Signature(signature,"hex")).r,s=signature.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var p,sinv=s.invm(this.n),u1=sinv.mul(msg).umod(this.n),u2=sinv.mul(r).umod(this.n);return this.curve._maxwellTrick?!(p=this.g.jmulAdd(u1,key.getPublic(),u2)).isInfinity()&&p.eqXToP(r):!(p=this.g.mulAdd(u1,key.getPublic(),u2)).isInfinity()&&0===p.getX().umod(this.n).cmp(r)},EC.prototype.recoverPubKey=function(msg,signature,j,enc){assert((3&j)===j,"The recovery param is more than two bits"),signature=new Signature(signature,enc);var n=this.n,e=new BN(msg),r=signature.r,s=signature.s,isYOdd=1&j,isSecondKey=j>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&isSecondKey)throw new Error("Unable to find sencond key candinate");r=isSecondKey?this.curve.pointFromX(r.add(this.curve.n),isYOdd):this.curve.pointFromX(r,isYOdd);var rInv=signature.r.invm(n),s1=n.sub(e).mul(rInv).umod(n),s2=s.mul(rInv).umod(n);return this.g.mulAdd(s1,r,s2)},EC.prototype.getKeyRecoveryParam=function(e,signature,Q,enc){if(null!==(signature=new Signature(signature,enc)).recoveryParam)return signature.recoveryParam;for(var i=0;i<4;i++){var Qprime;try{Qprime=this.recoverPubKey(e,signature,i)}catch(e){continue}if(Qprime.eq(Q))return i}throw new Error("Unable to find valid recovery factor")}},1251:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var BN=__webpack_require__(3785),assert=__webpack_require__(953).assert;function KeyPair(ec,options){this.ec=ec,this.priv=null,this.pub=null,options.priv&&this._importPrivate(options.priv,options.privEnc),options.pub&&this._importPublic(options.pub,options.pubEnc)}module.exports=KeyPair,KeyPair.fromPublic=function fromPublic(ec,pub,enc){return pub instanceof KeyPair?pub:new KeyPair(ec,{pub,pubEnc:enc})},KeyPair.fromPrivate=function fromPrivate(ec,priv,enc){return priv instanceof KeyPair?priv:new KeyPair(ec,{priv,privEnc:enc})},KeyPair.prototype.validate=function validate(){var pub=this.getPublic();return pub.isInfinity()?{result:!1,reason:"Invalid public key"}:pub.validate()?pub.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"}},KeyPair.prototype.getPublic=function getPublic(compact,enc){return"string"==typeof compact&&(enc=compact,compact=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),enc?this.pub.encode(enc,compact):this.pub},KeyPair.prototype.getPrivate=function getPrivate(enc){return"hex"===enc?this.priv.toString(16,2):this.priv},KeyPair.prototype._importPrivate=function _importPrivate(key,enc){this.priv=new BN(key,enc||16),this.priv=this.priv.umod(this.ec.curve.n)},KeyPair.prototype._importPublic=function _importPublic(key,enc){if(key.x||key.y)return"mont"===this.ec.curve.type?assert(key.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||assert(key.x&&key.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(key.x,key.y));this.pub=this.ec.curve.decodePoint(key,enc)},KeyPair.prototype.derive=function derive(pub){return pub.validate()||assert(pub.validate(),"public point not validated"),pub.mul(this.priv).getX()},KeyPair.prototype.sign=function sign(msg,enc,options){return this.ec.sign(msg,this,enc,options)},KeyPair.prototype.verify=function verify(msg,signature){return this.ec.verify(msg,signature,this)},KeyPair.prototype.inspect=function inspect(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},1814:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var BN=__webpack_require__(3785),utils=__webpack_require__(953),assert=utils.assert;function Signature(options,enc){if(options instanceof Signature)return options;this._importDER(options,enc)||(assert(options.r&&options.s,"Signature without r or s"),this.r=new BN(options.r,16),this.s=new BN(options.s,16),void 0===options.recoveryParam?this.recoveryParam=null:this.recoveryParam=options.recoveryParam)}function Position(){this.place=0}function getLength(buf,p){var initial=buf[p.place++];if(!(128&initial))return initial;var octetLen=15&initial;if(0===octetLen||octetLen>4)return!1;for(var val=0,i=0,off=p.place;i<octetLen;i++,off++)val<<=8,val|=buf[off],val>>>=0;return!(val<=127)&&(p.place=off,val)}function rmPadding(buf){for(var i=0,len=buf.length-1;!buf[i]&&!(128&buf[i+1])&&i<len;)i++;return 0===i?buf:buf.slice(i)}function constructLength(arr,len){if(len<128)arr.push(len);else{var octets=1+(Math.log(len)/Math.LN2>>>3);for(arr.push(128|octets);--octets;)arr.push(len>>>(octets<<3)&255);arr.push(len)}}module.exports=Signature,Signature.prototype._importDER=function _importDER(data,enc){data=utils.toArray(data,enc);var p=new Position;if(48!==data[p.place++])return!1;var len=getLength(data,p);if(!1===len)return!1;if(len+p.place!==data.length)return!1;if(2!==data[p.place++])return!1;var rlen=getLength(data,p);if(!1===rlen)return!1;var r=data.slice(p.place,rlen+p.place);if(p.place+=rlen,2!==data[p.place++])return!1;var slen=getLength(data,p);if(!1===slen)return!1;if(data.length!==slen+p.place)return!1;var s=data.slice(p.place,slen+p.place);if(0===r[0]){if(!(128&r[1]))return!1;r=r.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new BN(r),this.s=new BN(s),this.recoveryParam=null,!0},Signature.prototype.toDER=function toDER(enc){var r=this.r.toArray(),s=this.s.toArray();for(128&r[0]&&(r=[0].concat(r)),128&s[0]&&(s=[0].concat(s)),r=rmPadding(r),s=rmPadding(s);!(s[0]||128&s[1]);)s=s.slice(1);var arr=[2];constructLength(arr,r.length),(arr=arr.concat(r)).push(2),constructLength(arr,s.length);var backHalf=arr.concat(s),res=[48];return constructLength(res,backHalf.length),res=res.concat(backHalf),utils.encode(res,enc)}},5980:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var hash=__webpack_require__(3715),curves=__webpack_require__(5427),utils=__webpack_require__(953),assert=utils.assert,parseBytes=utils.parseBytes,KeyPair=__webpack_require__(9087),Signature=__webpack_require__(3622);function EDDSA(curve){if(assert("ed25519"===curve,"only tested with ed25519 so far"),!(this instanceof EDDSA))return new EDDSA(curve);curve=curves[curve].curve,this.curve=curve,this.g=curve.g,this.g.precompute(curve.n.bitLength()+1),this.pointClass=curve.point().constructor,this.encodingLength=Math.ceil(curve.n.bitLength()/8),this.hash=hash.sha512}module.exports=EDDSA,EDDSA.prototype.sign=function sign(message,secret){message=parseBytes(message);var key=this.keyFromSecret(secret),r=this.hashInt(key.messagePrefix(),message),R=this.g.mul(r),Rencoded=this.encodePoint(R),s_=this.hashInt(Rencoded,key.pubBytes(),message).mul(key.priv()),S=r.add(s_).umod(this.curve.n);return this.makeSignature({R,S,Rencoded})},EDDSA.prototype.verify=function verify(message,sig,pub){message=parseBytes(message),sig=this.makeSignature(sig);var key=this.keyFromPublic(pub),h=this.hashInt(sig.Rencoded(),key.pubBytes(),message),SG=this.g.mul(sig.S());return sig.R().add(key.pub().mul(h)).eq(SG)},EDDSA.prototype.hashInt=function hashInt(){for(var hash=this.hash(),i=0;i<arguments.length;i++)hash.update(arguments[i]);return utils.intFromLE(hash.digest()).umod(this.curve.n)},EDDSA.prototype.keyFromPublic=function keyFromPublic(pub){return KeyPair.fromPublic(this,pub)},EDDSA.prototype.keyFromSecret=function keyFromSecret(secret){return KeyPair.fromSecret(this,secret)},EDDSA.prototype.makeSignature=function makeSignature(sig){return sig instanceof Signature?sig:new Signature(this,sig)},EDDSA.prototype.encodePoint=function encodePoint(point){var enc=point.getY().toArray("le",this.encodingLength);return enc[this.encodingLength-1]|=point.getX().isOdd()?128:0,enc},EDDSA.prototype.decodePoint=function decodePoint(bytes){var lastIx=(bytes=utils.parseBytes(bytes)).length-1,normed=bytes.slice(0,lastIx).concat(-129&bytes[lastIx]),xIsOdd=0!=(128&bytes[lastIx]),y=utils.intFromLE(normed);return this.curve.pointFromY(y,xIsOdd)},EDDSA.prototype.encodeInt=function encodeInt(num){return num.toArray("le",this.encodingLength)},EDDSA.prototype.decodeInt=function decodeInt(bytes){return utils.intFromLE(bytes)},EDDSA.prototype.isPoint=function isPoint(val){return val instanceof this.pointClass}},9087:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(953),assert=utils.assert,parseBytes=utils.parseBytes,cachedProperty=utils.cachedProperty;function KeyPair(eddsa,params){this.eddsa=eddsa,this._secret=parseBytes(params.secret),eddsa.isPoint(params.pub)?this._pub=params.pub:this._pubBytes=parseBytes(params.pub)}KeyPair.fromPublic=function fromPublic(eddsa,pub){return pub instanceof KeyPair?pub:new KeyPair(eddsa,{pub})},KeyPair.fromSecret=function fromSecret(eddsa,secret){return secret instanceof KeyPair?secret:new KeyPair(eddsa,{secret})},KeyPair.prototype.secret=function secret(){return this._secret},cachedProperty(KeyPair,"pubBytes",(function pubBytes(){return this.eddsa.encodePoint(this.pub())})),cachedProperty(KeyPair,"pub",(function pub(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),cachedProperty(KeyPair,"privBytes",(function privBytes(){var eddsa=this.eddsa,hash=this.hash(),lastIx=eddsa.encodingLength-1,a=hash.slice(0,eddsa.encodingLength);return a[0]&=248,a[lastIx]&=127,a[lastIx]|=64,a})),cachedProperty(KeyPair,"priv",(function priv(){return this.eddsa.decodeInt(this.privBytes())})),cachedProperty(KeyPair,"hash",(function hash(){return this.eddsa.hash().update(this.secret()).digest()})),cachedProperty(KeyPair,"messagePrefix",(function messagePrefix(){return this.hash().slice(this.eddsa.encodingLength)})),KeyPair.prototype.sign=function sign(message){return assert(this._secret,"KeyPair can only verify"),this.eddsa.sign(message,this)},KeyPair.prototype.verify=function verify(message,sig){return this.eddsa.verify(message,sig,this)},KeyPair.prototype.getSecret=function getSecret(enc){return assert(this._secret,"KeyPair is public only"),utils.encode(this.secret(),enc)},KeyPair.prototype.getPublic=function getPublic(enc){return utils.encode(this.pubBytes(),enc)},module.exports=KeyPair},3622:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var BN=__webpack_require__(3785),utils=__webpack_require__(953),assert=utils.assert,cachedProperty=utils.cachedProperty,parseBytes=utils.parseBytes;function Signature(eddsa,sig){this.eddsa=eddsa,"object"!=typeof sig&&(sig=parseBytes(sig)),Array.isArray(sig)&&(sig={R:sig.slice(0,eddsa.encodingLength),S:sig.slice(eddsa.encodingLength)}),assert(sig.R&&sig.S,"Signature without R or S"),eddsa.isPoint(sig.R)&&(this._R=sig.R),sig.S instanceof BN&&(this._S=sig.S),this._Rencoded=Array.isArray(sig.R)?sig.R:sig.Rencoded,this._Sencoded=Array.isArray(sig.S)?sig.S:sig.Sencoded}cachedProperty(Signature,"S",(function S(){return this.eddsa.decodeInt(this.Sencoded())})),cachedProperty(Signature,"R",(function R(){return this.eddsa.decodePoint(this.Rencoded())})),cachedProperty(Signature,"Rencoded",(function Rencoded(){return this.eddsa.encodePoint(this.R())})),cachedProperty(Signature,"Sencoded",(function Sencoded(){return this.eddsa.encodeInt(this.S())})),Signature.prototype.toBytes=function toBytes(){return this.Rencoded().concat(this.Sencoded())},Signature.prototype.toHex=function toHex(){return utils.encode(this.toBytes(),"hex").toUpperCase()},module.exports=Signature},1037:module=>{module.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"]]}}},953:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var utils=exports,BN=__webpack_require__(3785),minAssert=__webpack_require__(9746),minUtils=__webpack_require__(4504);utils.assert=minAssert,utils.toArray=minUtils.toArray,utils.zero2=minUtils.zero2,utils.toHex=minUtils.toHex,utils.encode=minUtils.encode,utils.getNAF=function getNAF(num,w,bits){var naf=new Array(Math.max(num.bitLength(),bits)+1);naf.fill(0);for(var ws=1<<w+1,k=num.clone(),i=0;i<naf.length;i++){var z,mod=k.andln(ws-1);k.isOdd()?(z=mod>(ws>>1)-1?(ws>>1)-mod:mod,k.isubn(z)):z=0,naf[i]=z,k.iushrn(1)}return naf},utils.getJSF=function getJSF(k1,k2){var jsf=[[],[]];k1=k1.clone(),k2=k2.clone();for(var m8,d1=0,d2=0;k1.cmpn(-d1)>0||k2.cmpn(-d2)>0;){var u1,u2,m14=k1.andln(3)+d1&3,m24=k2.andln(3)+d2&3;3===m14&&(m14=-1),3===m24&&(m24=-1),u1=0==(1&m14)?0:3!==(m8=k1.andln(7)+d1&7)&&5!==m8||2!==m24?m14:-m14,jsf[0].push(u1),u2=0==(1&m24)?0:3!==(m8=k2.andln(7)+d2&7)&&5!==m8||2!==m14?m24:-m24,jsf[1].push(u2),2*d1===u1+1&&(d1=1-d1),2*d2===u2+1&&(d2=1-d2),k1.iushrn(1),k2.iushrn(1)}return jsf},utils.cachedProperty=function cachedProperty(obj,name,computer){var key="_"+name;obj.prototype[name]=function cachedProperty(){return void 0!==this[key]?this[key]:this[key]=computer.call(this)}},utils.parseBytes=function parseBytes(bytes){return"string"==typeof bytes?utils.toArray(bytes,"hex"):bytes},utils.intFromLE=function intFromLE(bytes){return new BN(bytes,"hex","le")}},3785:function(module,__unused_webpack_exports,__webpack_require__){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}var Buffer;"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;try{Buffer="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:__webpack_require__(5568).Buffer}catch(e){}function parseHex4Bits(string,index){var c=string.charCodeAt(index);return c>=65&&c<=70?c-55:c>=97&&c<=102?c-87:c-48&15}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);return index-1>=lowerBound&&(r|=parseHex4Bits(string,index-1)<<4),r}function parseBase(str,start,end,mul){for(var r=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul,r+=c>=49?c-49+10:c>=17?c-17+10:c}return r}BN.isBN=function isBN(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function max(left,right){return left.cmp(right)>0?left:right},BN.min=function min(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function init(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&(start++,this.negative=1),start<number.length&&(16===base?this._parseHex(number,start,endian):(this._parseBase(number,base,start),"le"===endian&&this._initArray(this.toArray(),base,endian)))},BN.prototype._initNumber=function _initNumber(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function _initArray(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this.strip()},BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var w,off=0,j=0;if("be"===endian)for(i=number.length-1;i>=start;i-=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;else for(i=(number.length-start)%2==0?start+1:start;i<number.length;i+=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;this.strip()},BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}this.strip()},BN.prototype.copy=function copy(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype.clone=function clone(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function _expand(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype.strip=function strip(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var zeros=["","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"],groupSizes=[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],groupBases=[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 smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){for(var ncarry=carry>>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out.strip()}BN.prototype.toString=function toString(base,padding){var out;if(padding=0|padding||1,16===(base=base||10)||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);out=0!==(carry=w>>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function toJSON(){return this.toString(16)},BN.prototype.toBuffer=function toBuffer(endian,length){return assert(void 0!==Buffer),this.toArrayLike(Buffer,endian,length)},BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)},BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0"),this.strip();var b,i,littleEndian="le"===endian,res=new ArrayType(reqLength),q=this.clone();if(littleEndian){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[i]=b;for(;i<reqLength;i++)res[i]=0}else{for(i=0;i<reqLength-byteLength;i++)res[i]=0;for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[reqLength-i-1]=b}return res},Math.clz32?BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function _countBits(w){var t=w,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},BN.prototype._zeroBits=function _zeroBits(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function toTwos(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function fromTwos(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function isNeg(){return 0!==this.negative},BN.prototype.neg=function neg(){return this.clone().ineg()},BN.prototype.ineg=function ineg(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function iuor(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this.strip()},BN.prototype.ior=function ior(num){return assert(0==(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function or(num){return this.length>num.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function uor(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function iuand(num){var b;b=this.length>num.length?num:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this.strip()},BN.prototype.iand=function iand(num){return assert(0==(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function and(num){return this.length>num.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function uand(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function iuxor(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this.strip()},BN.prototype.ixor=function ixor(num){return assert(0==(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function xor(num){return this.length>num.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function uxor(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function inotn(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this.strip()},BN.prototype.notn=function notn(width){return this.clone().inotn(width)},BN.prototype.setn=function setn(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<<wbit:this.words[off]&~(1<<wbit),this.strip()},BN.prototype.iadd=function iadd(num){var r,a,b;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function add(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function isub(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)carry=(r=(0|a.words[i])-(0|b.words[i])+carry)>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)carry=(r=(0|a.words[i])+carry)>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this.strip()},BN.prototype.sub=function sub(num){return this.clone().isub(num)};var comb10MulTo=function comb10MulTo(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function jumboMulTo(self,num,out){return(new FFTM).mulp(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function mulTo(num,out){var res,len=this.length+num.length;return res=10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j,r=(0|self.words[i])*(0|num.words[j]),lo=67108863&r;rword=67108863&(lo=lo+rword|0),hncarry+=(ncarry=(ncarry=ncarry+(r/67108864|0)|0)+(lo>>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out.strip()}(this,num,out):jumboMulTo(this,num,out),res},FFTM.prototype.makeRBT=function makeRBT(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function revBin(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function transform(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function guessLen13b(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function conjugate(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function normalize13b(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function convert13b(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0==(-8192&carry))},FFTM.prototype.stub=function stub(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function mulp(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out.strip()},BN.prototype.mul=function mul(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function mulf(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function imuln(num){assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.muln=function muln(num){return this.clone().imuln(num)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(num){var w=function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=(num.words[off]&1<<wbit)>>>wbit}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function iushln(bits){assert("number"==typeof bits&&bits>=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this.strip()},BN.prototype.ishln=function ishln(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function iushrn(bits,hint,extended){var h;assert("number"==typeof bits&&bits>=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;i>=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function ishrn(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function testn(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<<r;return!(this.length<=s)&&!!(this.words[s]&q)},BN.prototype.imaskn=function imaskn(bits){assert("number"==typeof bits&&bits>=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this.strip()},BN.prototype.maskn=function maskn(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function iaddn(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function _iaddn(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},BN.prototype.addn=function addn(num){return this.clone().iaddn(num)},BN.prototype.subn=function subn(num){return this.clone().isubn(num)},BN.prototype.iabs=function iabs(){return this.negative=0,this},BN.prototype.abs=function abs(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function _ishlnsubmul(num,mul,shift){var i,w,len=num.length+shift;this._expand(len);var carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;carry=((w-=67108863&right)>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)carry=(w=(0|this.words[i+shift])+carry)>>26,this.words[i+shift]=67108863&w;if(0===carry)return this.strip();for(assert(-1===carry),carry=0,i=0;i<this.length;i++)carry=(w=-(0|this.words[i])+carry)>>26,this.words[i]=67108863&w;return this.negative=1,this.strip()},BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q.strip(),a.strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function divmod(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div,mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function div(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function mod(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function umod(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modn=function modn(num){assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return acc},BN.prototype.idivn=function idivn(num){assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this.strip()},BN.prototype.divn=function divn(num){return this.clone().idivn(num)},BN.prototype.egcd=function egcd(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function _invmp(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(num){return this.words[0]&num},BN.prototype.bincn=function bincn(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];carry=(w+=carry)>>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this.strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function cmp(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function ucmp(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(res=1);break}}return res},BN.prototype.gtn=function gtn(num){return 1===this.cmpn(num)},BN.prototype.gt=function gt(num){return 1===this.cmp(num)},BN.prototype.gten=function gten(num){return this.cmpn(num)>=0},BN.prototype.gte=function gte(num){return this.cmp(num)>=0},BN.prototype.ltn=function ltn(num){return-1===this.cmpn(num)},BN.prototype.lt=function lt(num){return-1===this.cmp(num)},BN.prototype.lten=function lten(num){return this.cmpn(num)<=0},BN.prototype.lte=function lte(num){return this.cmp(num)<=0},BN.prototype.eqn=function eqn(num){return 0===this.cmpn(num)},BN.prototype.eq=function eq(num){return 0===this.cmp(num)},BN.red=function red(num){return new Red(num)},BN.prototype.toRed=function toRed(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(ctx){return this.red=ctx,this},BN.prototype.forceRed=function forceRed(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function redAdd(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function redIAdd(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function redSub(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function redISub(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function redShl(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function redMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function redIMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function ireduce(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(input,output){for(var outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(4194303&next)<<4|prev>>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function imulK(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function imulK(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function _verify1(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function imod(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},Red.prototype.neg=function neg(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function shl(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function imul(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function mul(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())},Red.prototype.sqr=function sqr(a){return this.mul(a,a)},Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function invm(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function pow(a,num){if(num.isZero())return new BN(1).toRed(this);if(0===num.cmpn(1))return a.clone();var wnd=new Array(16);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;i>=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();return res.red=null,res},BN.mont=function mont(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function invm(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(module=__webpack_require__.nmd(module),this)},8091:module=>{"use strict";function assign(target,firstSource){if(null==target)throw new TypeError("Cannot convert first argument to object");for(var to=Object(target),i=1;i<arguments.length;i++){var nextSource=arguments[i];if(null!=nextSource)for(var keysArray=Object.keys(Object(nextSource)),nextIndex=0,len=keysArray.length;nextIndex<len;nextIndex++){var nextKey=keysArray[nextIndex],desc=Object.getOwnPropertyDescriptor(nextSource,nextKey);void 0!==desc&&desc.enumerable&&(to[nextKey]=nextSource[nextKey])}}return to}module.exports={assign,polyfill:function polyfill(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:assign})}}},6444:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{BaseContract:()=>BaseContract,BigNumber:()=>BigNumber,Contract:()=>Contract,ContractFactory:()=>ContractFactory,FixedNumber:()=>FixedNumber,Signer:()=>Signer,VoidSigner:()=>VoidSigner,Wallet:()=>Wallet,Wordlist:()=>Wordlist,constants:()=>constants_lib_esm_namespaceObject,errors:()=>ErrorCode,ethers:()=>ethers_namespaceObject,getDefaultProvider:()=>getDefaultProvider,logger:()=>ethers_logger,providers:()=>providers_lib_esm_namespaceObject,utils:()=>lib_esm_utils_namespaceObject,version:()=>ethers_lib_esm_version_version,wordlists:()=>wordlists});var rlp_lib_esm_namespaceObject={};__webpack_require__.r(rlp_lib_esm_namespaceObject),__webpack_require__.d(rlp_lib_esm_namespaceObject,{decode:()=>decode,encode:()=>encode});var constants_lib_esm_namespaceObject={};__webpack_require__.r(constants_lib_esm_namespaceObject),__webpack_require__.d(constants_lib_esm_namespaceObject,{AddressZero:()=>AddressZero,EtherSymbol:()=>EtherSymbol,HashZero:()=>HashZero,MaxInt256:()=>MaxInt256,MaxUint256:()=>MaxUint256,MinInt256:()=>MinInt256,NegativeOne:()=>NegativeOne,One:()=>One,Two:()=>Two,WeiPerEther:()=>WeiPerEther,Zero:()=>Zero});var providers_lib_esm_namespaceObject={};__webpack_require__.r(providers_lib_esm_namespaceObject),__webpack_require__.d(providers_lib_esm_namespaceObject,{AlchemyProvider:()=>AlchemyProvider,AlchemyWebSocketProvider:()=>AlchemyWebSocketProvider,AnkrProvider:()=>AnkrProvider,BaseProvider:()=>BaseProvider,CloudflareProvider:()=>CloudflareProvider,EtherscanProvider:()=>EtherscanProvider,FallbackProvider:()=>FallbackProvider,Formatter:()=>Formatter,InfuraProvider:()=>InfuraProvider,InfuraWebSocketProvider:()=>InfuraWebSocketProvider,IpcProvider:()=>IpcProvider,JsonRpcBatchProvider:()=>JsonRpcBatchProvider,JsonRpcProvider:()=>JsonRpcProvider,JsonRpcSigner:()=>JsonRpcSigner,NodesmithProvider:()=>NodesmithProvider,PocketProvider:()=>PocketProvider,Provider:()=>Provider,Resolver:()=>Resolver,StaticJsonRpcProvider:()=>StaticJsonRpcProvider,UrlJsonRpcProvider:()=>UrlJsonRpcProvider,Web3Provider:()=>Web3Provider,WebSocketProvider:()=>WebSocketProvider,getDefaultProvider:()=>getDefaultProvider,getNetwork:()=>getNetwork,isCommunityResourcable:()=>isCommunityResourcable,isCommunityResource:()=>isCommunityResource,showThrottleMessage:()=>showThrottleMessage});var base64_lib_esm_namespaceObject={};__webpack_require__.r(base64_lib_esm_namespaceObject),__webpack_require__.d(base64_lib_esm_namespaceObject,{decode:()=>base64_decode,encode:()=>base64_encode});var lib_esm_utils_namespaceObject={};__webpack_require__.r(lib_esm_utils_namespaceObject),__webpack_require__.d(lib_esm_utils_namespaceObject,{AbiCoder:()=>AbiCoder,ConstructorFragment:()=>ConstructorFragment,ErrorFragment:()=>ErrorFragment,EventFragment:()=>EventFragment,FormatTypes:()=>FormatTypes,Fragment:()=>Fragment,FunctionFragment:()=>FunctionFragment,HDNode:()=>HDNode,Indexed:()=>Indexed,Interface:()=>Interface,LogDescription:()=>LogDescription,Logger:()=>Logger,ParamType:()=>ParamType,RLP:()=>rlp_lib_esm_namespaceObject,SigningKey:()=>SigningKey,SupportedAlgorithm:()=>SupportedAlgorithm,TransactionDescription:()=>TransactionDescription,TransactionTypes:()=>TransactionTypes,UnicodeNormalizationForm:()=>UnicodeNormalizationForm,Utf8ErrorFuncs:()=>Utf8ErrorFuncs,Utf8ErrorReason:()=>Utf8ErrorReason,_TypedDataEncoder:()=>TypedDataEncoder,_fetchData:()=>_fetchData,_toEscapedUtf8String:()=>_toEscapedUtf8String,accessListify:()=>accessListify,arrayify:()=>arrayify,base58:()=>Base58,base64:()=>base64_lib_esm_namespaceObject,checkProperties:()=>checkProperties,checkResultErrors:()=>checkResultErrors,commify:()=>commify,computeAddress:()=>computeAddress,computeHmac:()=>computeHmac,computePublicKey:()=>computePublicKey,concat:()=>concat,deepCopy:()=>deepCopy,defaultAbiCoder:()=>defaultAbiCoder,defaultPath:()=>defaultPath,defineReadOnly:()=>defineReadOnly,dnsEncode:()=>dnsEncode,entropyToMnemonic:()=>entropyToMnemonic,fetchJson:()=>fetchJson,formatBytes32String:()=>formatBytes32String,formatEther:()=>formatEther,formatUnits:()=>formatUnits,getAccountPath:()=>getAccountPath,getAddress:()=>getAddress,getContractAddress:()=>getContractAddress,getCreate2Address:()=>getCreate2Address,getIcapAddress:()=>getIcapAddress,getJsonWalletAddress:()=>getJsonWalletAddress,getStatic:()=>getStatic,hashMessage:()=>hashMessage,hexConcat:()=>hexConcat,hexDataLength:()=>hexDataLength,hexDataSlice:()=>hexDataSlice,hexStripZeros:()=>hexStripZeros,hexValue:()=>hexValue,hexZeroPad:()=>hexZeroPad,hexlify:()=>hexlify,id:()=>id,isAddress:()=>isAddress,isBytes:()=>isBytes,isBytesLike:()=>isBytesLike,isHexString:()=>lib_esm_isHexString,isValidMnemonic:()=>isValidMnemonic,isValidName:()=>isValidName,joinSignature:()=>joinSignature,keccak256:()=>keccak256,mnemonicToEntropy:()=>mnemonicToEntropy,mnemonicToSeed:()=>mnemonicToSeed,namehash:()=>namehash,nameprep:()=>nameprep,parseBytes32String:()=>parseBytes32String,parseEther:()=>parseEther,parseTransaction:()=>parse,parseUnits:()=>parseUnits,poll:()=>poll,randomBytes:()=>randomBytes,recoverAddress:()=>recoverAddress,recoverPublicKey:()=>recoverPublicKey,resolveProperties:()=>resolveProperties,ripemd160:()=>ripemd160,serializeTransaction:()=>serialize,sha256:()=>sha256,sha512:()=>sha512,shallowCopy:()=>shallowCopy,shuffled:()=>shuffled,solidityKeccak256:()=>lib_esm_keccak256,solidityPack:()=>lib_esm_pack,soliditySha256:()=>lib_esm_sha256,splitSignature:()=>splitSignature,stripZeros:()=>stripZeros,toUtf8Bytes:()=>toUtf8Bytes,toUtf8CodePoints:()=>toUtf8CodePoints,toUtf8String:()=>toUtf8String,verifyMessage:()=>verifyMessage,verifyTypedData:()=>verifyTypedData,zeroPad:()=>zeroPad});var ethers_namespaceObject={};__webpack_require__.r(ethers_namespaceObject),__webpack_require__.d(ethers_namespaceObject,{BaseContract:()=>BaseContract,BigNumber:()=>BigNumber,Contract:()=>Contract,ContractFactory:()=>ContractFactory,FixedNumber:()=>FixedNumber,Signer:()=>Signer,VoidSigner:()=>VoidSigner,Wallet:()=>Wallet,Wordlist:()=>Wordlist,constants:()=>constants_lib_esm_namespaceObject,errors:()=>ErrorCode,getDefaultProvider:()=>getDefaultProvider,logger:()=>ethers_logger,providers:()=>providers_lib_esm_namespaceObject,utils:()=>lib_esm_utils_namespaceObject,version:()=>ethers_lib_esm_version_version,wordlists:()=>wordlists});let _permanentCensorErrors=!1,_censorErrors=!1;const LogLevels={debug:1,default:2,info:2,warning:3,error:4,off:5};let _logLevel=LogLevels.default,_globalLogger=null;const _normalizeError=function _checkNormalize(){try{const missing=[];if(["NFD","NFC","NFKD","NFKC"].forEach((form=>{try{if("test"!=="test".normalize(form))throw new Error("bad normalize")}catch(error){missing.push(form)}})),missing.length)throw new Error("missing "+missing.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(error){return error.message}return null}();var LogLevel,ErrorCode;!function(LogLevel){LogLevel.DEBUG="DEBUG",LogLevel.INFO="INFO",LogLevel.WARNING="WARNING",LogLevel.ERROR="ERROR",LogLevel.OFF="OFF"}(LogLevel||(LogLevel={})),function(ErrorCode){ErrorCode.UNKNOWN_ERROR="UNKNOWN_ERROR",ErrorCode.NOT_IMPLEMENTED="NOT_IMPLEMENTED",ErrorCode.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",ErrorCode.NETWORK_ERROR="NETWORK_ERROR",ErrorCode.SERVER_ERROR="SERVER_ERROR",ErrorCode.TIMEOUT="TIMEOUT",ErrorCode.BUFFER_OVERRUN="BUFFER_OVERRUN",ErrorCode.NUMERIC_FAULT="NUMERIC_FAULT",ErrorCode.MISSING_NEW="MISSING_NEW",ErrorCode.INVALID_ARGUMENT="INVALID_ARGUMENT",ErrorCode.MISSING_ARGUMENT="MISSING_ARGUMENT",ErrorCode.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",ErrorCode.CALL_EXCEPTION="CALL_EXCEPTION",ErrorCode.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",ErrorCode.NONCE_EXPIRED="NONCE_EXPIRED",ErrorCode.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",ErrorCode.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",ErrorCode.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(ErrorCode||(ErrorCode={}));const HEX="0123456789abcdef";class Logger{constructor(version){Object.defineProperty(this,"version",{enumerable:!0,value:version,writable:!1})}_log(logLevel,args){const level=logLevel.toLowerCase();null==LogLevels[level]&&this.throwArgumentError("invalid log level name","logLevel",logLevel),_logLevel>LogLevels[level]||console.log.apply(console,args)}debug(...args){this._log(Logger.levels.DEBUG,args)}info(...args){this._log(Logger.levels.INFO,args)}warn(...args){this._log(Logger.levels.WARNING,args)}makeError(message,code,params){if(_censorErrors)return this.makeError("censored error",code,{});code||(code=Logger.errors.UNKNOWN_ERROR),params||(params={});const messageDetails=[];Object.keys(params).forEach((key=>{const value=params[key];try{if(value instanceof Uint8Array){let hex="";for(let i=0;i<value.length;i++)hex+=HEX[value[i]>>4],hex+=HEX[15&value[i]];messageDetails.push(key+"=Uint8Array(0x"+hex+")")}else messageDetails.push(key+"="+JSON.stringify(value))}catch(error){messageDetails.push(key+"="+JSON.stringify(params[key].toString()))}})),messageDetails.push(`code=${code}`),messageDetails.push(`version=${this.version}`);const reason=message;let url="";switch(code){case ErrorCode.NUMERIC_FAULT:{url="NUMERIC_FAULT";const fault=message;switch(fault){case"overflow":case"underflow":case"division-by-zero":url+="-"+fault;break;case"negative-power":case"negative-width":url+="-unsupported";break;case"unbound-bitwise-result":url+="-unbound-result"}break}case ErrorCode.CALL_EXCEPTION:case ErrorCode.INSUFFICIENT_FUNDS:case ErrorCode.MISSING_NEW:case ErrorCode.NONCE_EXPIRED:case ErrorCode.REPLACEMENT_UNDERPRICED:case ErrorCode.TRANSACTION_REPLACED:case ErrorCode.UNPREDICTABLE_GAS_LIMIT:url=code}url&&(message+=" [ See: https://links.ethers.org/v5-errors-"+url+" ]"),messageDetails.length&&(message+=" ("+messageDetails.join(", ")+")");const error=new Error(message);return error.reason=reason,error.code=code,Object.keys(params).forEach((function(key){error[key]=params[key]})),error}throwError(message,code,params){throw this.makeError(message,code,params)}throwArgumentError(message,name,value){return this.throwError(message,Logger.errors.INVALID_ARGUMENT,{argument:name,value})}assert(condition,message,code,params){condition||this.throwError(message,code,params)}assertArgument(condition,message,name,value){condition||this.throwArgumentError(message,name,value)}checkNormalize(message){null==message&&(message="platform missing String.prototype.normalize"),_normalizeError&&this.throwError("platform missing String.prototype.normalize",Logger.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:_normalizeError})}checkSafeUint53(value,message){"number"==typeof value&&(null==message&&(message="value not safe"),(value<0||value>=9007199254740991)&&this.throwError(message,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value}),value%1&&this.throwError(message,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value}))}checkArgumentCount(count,expectedCount,message){message=message?": "+message:"",count<expectedCount&&this.throwError("missing argument"+message,Logger.errors.MISSING_ARGUMENT,{count,expectedCount}),count>expectedCount&&this.throwError("too many arguments"+message,Logger.errors.UNEXPECTED_ARGUMENT,{count,expectedCount})}checkNew(target,kind){target!==Object&&null!=target||this.throwError("missing new",Logger.errors.MISSING_NEW,{name:kind.name})}checkAbstract(target,kind){target===kind?this.throwError("cannot instantiate abstract class "+JSON.stringify(kind.name)+" directly; use a sub-class",Logger.errors.UNSUPPORTED_OPERATION,{name:target.name,operation:"new"}):target!==Object&&null!=target||this.throwError("missing new",Logger.errors.MISSING_NEW,{name:kind.name})}static globalLogger(){return _globalLogger||(_globalLogger=new Logger("logger/5.6.0")),_globalLogger}static setCensorship(censorship,permanent){if(!censorship&&permanent&&this.globalLogger().throwError("cannot permanently disable censorship",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),_permanentCensorErrors){if(!censorship)return;this.globalLogger().throwError("error censorship permanent",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}_censorErrors=!!censorship,_permanentCensorErrors=!!permanent}static setLogLevel(logLevel){const level=LogLevels[logLevel.toLowerCase()];null!=level?_logLevel=level:Logger.globalLogger().warn("invalid log level - "+logLevel)}static from(version){return new Logger(version)}}Logger.errors=ErrorCode,Logger.levels=LogLevel;const logger=new Logger("bytes/5.6.1");function isHexable(value){return!!value.toHexString}function addSlice(array){return array.slice||(array.slice=function(){const args=Array.prototype.slice.call(arguments);return addSlice(new Uint8Array(Array.prototype.slice.apply(array,args)))}),array}function isBytesLike(value){return lib_esm_isHexString(value)&&!(value.length%2)||isBytes(value)}function isInteger(value){return"number"==typeof value&&value==value&&value%1==0}function isBytes(value){if(null==value)return!1;if(value.constructor===Uint8Array)return!0;if("string"==typeof value)return!1;if(!isInteger(value.length)||value.length<0)return!1;for(let i=0;i<value.length;i++){const v=value[i];if(!isInteger(v)||v<0||v>=256)return!1}return!0}function arrayify(value,options){if(options||(options={}),"number"==typeof value){logger.checkSafeUint53(value,"invalid arrayify value");const result=[];for(;value;)result.unshift(255&value),value=parseInt(String(value/256));return 0===result.length&&result.push(0),addSlice(new Uint8Array(result))}if(options.allowMissingPrefix&&"string"==typeof value&&"0x"!==value.substring(0,2)&&(value="0x"+value),isHexable(value)&&(value=value.toHexString()),lib_esm_isHexString(value)){let hex=value.substring(2);hex.length%2&&("left"===options.hexPad?hex="0"+hex:"right"===options.hexPad?hex+="0":logger.throwArgumentError("hex data is odd-length","value",value));const result=[];for(let i=0;i<hex.length;i+=2)result.push(parseInt(hex.substring(i,i+2),16));return addSlice(new Uint8Array(result))}return isBytes(value)?addSlice(new Uint8Array(value)):logger.throwArgumentError("invalid arrayify value","value",value)}function concat(items){const objects=items.map((item=>arrayify(item))),length=objects.reduce(((accum,item)=>accum+item.length),0),result=new Uint8Array(length);return objects.reduce(((offset,object)=>(result.set(object,offset),offset+object.length)),0),addSlice(result)}function stripZeros(value){let result=arrayify(value);if(0===result.length)return result;let start=0;for(;start<result.length&&0===result[start];)start++;return start&&(result=result.slice(start)),result}function zeroPad(value,length){(value=arrayify(value)).length>length&&logger.throwArgumentError("value out of range","value",arguments[0]);const result=new Uint8Array(length);return result.set(value,length-value.length),addSlice(result)}function lib_esm_isHexString(value,length){return!("string"!=typeof value||!value.match(/^0x[0-9A-Fa-f]*$/))&&(!length||value.length===2+2*length)}function hexlify(value,options){if(options||(options={}),"number"==typeof value){logger.checkSafeUint53(value,"invalid hexlify value");let hex="";for(;value;)hex="0123456789abcdef"[15&value]+hex,value=Math.floor(value/16);return hex.length?(hex.length%2&&(hex="0"+hex),"0x"+hex):"0x00"}if("bigint"==typeof value)return(value=value.toString(16)).length%2?"0x0"+value:"0x"+value;if(options.allowMissingPrefix&&"string"==typeof value&&"0x"!==value.substring(0,2)&&(value="0x"+value),isHexable(value))return value.toHexString();if(lib_esm_isHexString(value))return value.length%2&&("left"===options.hexPad?value="0x0"+value.substring(2):"right"===options.hexPad?value+="0":logger.throwArgumentError("hex data is odd-length","value",value)),value.toLowerCase();if(isBytes(value)){let result="0x";for(let i=0;i<value.length;i++){let v=value[i];result+="0123456789abcdef"[(240&v)>>4]+"0123456789abcdef"[15&v]}return result}return logger.throwArgumentError("invalid hexlify value","value",value)}function hexDataLength(data){if("string"!=typeof data)data=hexlify(data);else if(!lib_esm_isHexString(data)||data.length%2)return null;return(data.length-2)/2}function hexDataSlice(data,offset,endOffset){return"string"!=typeof data?data=hexlify(data):(!lib_esm_isHexString(data)||data.length%2)&&logger.throwArgumentError("invalid hexData","value",data),offset=2+2*offset,null!=endOffset?"0x"+data.substring(offset,2+2*endOffset):"0x"+data.substring(offset)}function hexConcat(items){let result="0x";return items.forEach((item=>{result+=hexlify(item).substring(2)})),result}function hexValue(value){const trimmed=hexStripZeros(hexlify(value,{hexPad:"left"}));return"0x"===trimmed?"0x0":trimmed}function hexStripZeros(value){"string"!=typeof value&&(value=hexlify(value)),lib_esm_isHexString(value)||logger.throwArgumentError("invalid hex string","value",value),value=value.substring(2);let offset=0;for(;offset<value.length&&"0"===value[offset];)offset++;return"0x"+value.substring(offset)}function hexZeroPad(value,length){for("string"!=typeof value?value=hexlify(value):lib_esm_isHexString(value)||logger.throwArgumentError("invalid hex string","value",value),value.length>2*length+2&&logger.throwArgumentError("value out of range","value",arguments[1]);value.length<2*length+2;)value="0x0"+value.substring(2);return value}function splitSignature(signature){const result={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(isBytesLike(signature)){let bytes=arrayify(signature);64===bytes.length?(result.v=27+(bytes[32]>>7),bytes[32]&=127,result.r=hexlify(bytes.slice(0,32)),result.s=hexlify(bytes.slice(32,64))):65===bytes.length?(result.r=hexlify(bytes.slice(0,32)),result.s=hexlify(bytes.slice(32,64)),result.v=bytes[64]):logger.throwArgumentError("invalid signature string","signature",signature),result.v<27&&(0===result.v||1===result.v?result.v+=27:logger.throwArgumentError("signature invalid v byte","signature",signature)),result.recoveryParam=1-result.v%2,result.recoveryParam&&(bytes[32]|=128),result._vs=hexlify(bytes.slice(32,64))}else{if(result.r=signature.r,result.s=signature.s,result.v=signature.v,result.recoveryParam=signature.recoveryParam,result._vs=signature._vs,null!=result._vs){const vs=zeroPad(arrayify(result._vs),32);result._vs=hexlify(vs);const recoveryParam=vs[0]>=128?1:0;null==result.recoveryParam?result.recoveryParam=recoveryParam:result.recoveryParam!==recoveryParam&&logger.throwArgumentError("signature recoveryParam mismatch _vs","signature",signature),vs[0]&=127;const s=hexlify(vs);null==result.s?result.s=s:result.s!==s&&logger.throwArgumentError("signature v mismatch _vs","signature",signature)}if(null==result.recoveryParam)null==result.v?logger.throwArgumentError("signature missing v and recoveryParam","signature",signature):0===result.v||1===result.v?result.recoveryParam=result.v:result.recoveryParam=1-result.v%2;else if(null==result.v)result.v=27+result.recoveryParam;else{const recId=0===result.v||1===result.v?result.v:1-result.v%2;result.recoveryParam!==recId&&logger.throwArgumentError("signature recoveryParam mismatch v","signature",signature)}null!=result.r&&lib_esm_isHexString(result.r)?result.r=hexZeroPad(result.r,32):logger.throwArgumentError("signature missing or invalid r","signature",signature),null!=result.s&&lib_esm_isHexString(result.s)?result.s=hexZeroPad(result.s,32):logger.throwArgumentError("signature missing or invalid s","signature",signature);const vs=arrayify(result.s);vs[0]>=128&&logger.throwArgumentError("signature s out of range","signature",signature),result.recoveryParam&&(vs[0]|=128);const _vs=hexlify(vs);result._vs&&(lib_esm_isHexString(result._vs)||logger.throwArgumentError("signature invalid _vs","signature",signature),result._vs=hexZeroPad(result._vs,32)),null==result._vs?result._vs=_vs:result._vs!==_vs&&logger.throwArgumentError("signature _vs mismatch v and s","signature",signature)}return result.yParityAndS=result._vs,result.compact=result.r+result.yParityAndS.substring(2),result}function joinSignature(signature){return hexlify(concat([(signature=splitSignature(signature)).r,signature.s,signature.recoveryParam?"0x1c":"0x1b"]))}var bn=__webpack_require__(3550),bn_default=__webpack_require__.n(bn);var BN=bn_default().BN;const bignumber_logger=new Logger("bignumber/5.6.2"),_constructorGuard={};let _warnedToStringRadix=!1;class BigNumber{constructor(constructorGuard,hex){constructorGuard!==_constructorGuard&&bignumber_logger.throwError("cannot call constructor directly; use BigNumber.from",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=hex,this._isBigNumber=!0,Object.freeze(this)}fromTwos(value){return toBigNumber(toBN(this).fromTwos(value))}toTwos(value){return toBigNumber(toBN(this).toTwos(value))}abs(){return"-"===this._hex[0]?BigNumber.from(this._hex.substring(1)):this}add(other){return toBigNumber(toBN(this).add(toBN(other)))}sub(other){return toBigNumber(toBN(this).sub(toBN(other)))}div(other){return BigNumber.from(other).isZero()&&throwFault("division-by-zero","div"),toBigNumber(toBN(this).div(toBN(other)))}mul(other){return toBigNumber(toBN(this).mul(toBN(other)))}mod(other){const value=toBN(other);return value.isNeg()&&throwFault("division-by-zero","mod"),toBigNumber(toBN(this).umod(value))}pow(other){const value=toBN(other);return value.isNeg()&&throwFault("negative-power","pow"),toBigNumber(toBN(this).pow(value))}and(other){const value=toBN(other);return(this.isNegative()||value.isNeg())&&throwFault("unbound-bitwise-result","and"),toBigNumber(toBN(this).and(value))}or(other){const value=toBN(other);return(this.isNegative()||value.isNeg())&&throwFault("unbound-bitwise-result","or"),toBigNumber(toBN(this).or(value))}xor(other){const value=toBN(other);return(this.isNegative()||value.isNeg())&&throwFault("unbound-bitwise-result","xor"),toBigNumber(toBN(this).xor(value))}mask(value){return(this.isNegative()||value<0)&&throwFault("negative-width","mask"),toBigNumber(toBN(this).maskn(value))}shl(value){return(this.isNegative()||value<0)&&throwFault("negative-width","shl"),toBigNumber(toBN(this).shln(value))}shr(value){return(this.isNegative()||value<0)&&throwFault("negative-width","shr"),toBigNumber(toBN(this).shrn(value))}eq(other){return toBN(this).eq(toBN(other))}lt(other){return toBN(this).lt(toBN(other))}lte(other){return toBN(this).lte(toBN(other))}gt(other){return toBN(this).gt(toBN(other))}gte(other){return toBN(this).gte(toBN(other))}isNegative(){return"-"===this._hex[0]}isZero(){return toBN(this).isZero()}toNumber(){try{return toBN(this).toNumber()}catch(error){throwFault("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return bignumber_logger.throwError("this platform does not support BigInt",Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?_warnedToStringRadix||(_warnedToStringRadix=!0,bignumber_logger.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?bignumber_logger.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Logger.errors.UNEXPECTED_ARGUMENT,{}):bignumber_logger.throwError("BigNumber.toString does not accept parameters",Logger.errors.UNEXPECTED_ARGUMENT,{})),toBN(this).toString(10)}toHexString(){return this._hex}toJSON(key){return{type:"BigNumber",hex:this.toHexString()}}static from(value){if(value instanceof BigNumber)return value;if("string"==typeof value)return value.match(/^-?0x[0-9a-f]+$/i)?new BigNumber(_constructorGuard,toHex(value)):value.match(/^-?[0-9]+$/)?new BigNumber(_constructorGuard,toHex(new BN(value))):bignumber_logger.throwArgumentError("invalid BigNumber string","value",value);if("number"==typeof value)return value%1&&throwFault("underflow","BigNumber.from",value),(value>=9007199254740991||value<=-9007199254740991)&&throwFault("overflow","BigNumber.from",value),BigNumber.from(String(value));const anyValue=value;if("bigint"==typeof anyValue)return BigNumber.from(anyValue.toString());if(isBytes(anyValue))return BigNumber.from(hexlify(anyValue));if(anyValue)if(anyValue.toHexString){const hex=anyValue.toHexString();if("string"==typeof hex)return BigNumber.from(hex)}else{let hex=anyValue._hex;if(null==hex&&"BigNumber"===anyValue.type&&(hex=anyValue.hex),"string"==typeof hex&&(lib_esm_isHexString(hex)||"-"===hex[0]&&lib_esm_isHexString(hex.substring(1))))return BigNumber.from(hex)}return bignumber_logger.throwArgumentError("invalid BigNumber value","value",value)}static isBigNumber(value){return!(!value||!value._isBigNumber)}}function toHex(value){if("string"!=typeof value)return toHex(value.toString(16));if("-"===value[0])return"-"===(value=value.substring(1))[0]&&bignumber_logger.throwArgumentError("invalid hex","value",value),"0x00"===(value=toHex(value))?value:"-"+value;if("0x"!==value.substring(0,2)&&(value="0x"+value),"0x"===value)return"0x00";for(value.length%2&&(value="0x0"+value.substring(2));value.length>4&&"0x00"===value.substring(0,4);)value="0x"+value.substring(4);return value}function toBigNumber(value){return BigNumber.from(toHex(value))}function toBN(value){const hex=BigNumber.from(value).toHexString();return"-"===hex[0]?new BN("-"+hex.substring(3),16):new BN(hex.substring(2),16)}function throwFault(fault,operation,value){const params={fault,operation};return null!=value&&(params.value=value),bignumber_logger.throwError(fault,Logger.errors.NUMERIC_FAULT,params)}var __awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const lib_esm_logger=new Logger("properties/5.6.0");function defineReadOnly(object,name,value){Object.defineProperty(object,name,{enumerable:!0,value,writable:!1})}function getStatic(ctor,key){for(let i=0;i<32;i++){if(ctor[key])return ctor[key];if(!ctor.prototype||"object"!=typeof ctor.prototype)break;ctor=Object.getPrototypeOf(ctor.prototype).constructor}return null}function resolveProperties(object){return __awaiter(this,void 0,void 0,(function*(){const promises=Object.keys(object).map((key=>{const value=object[key];return Promise.resolve(value).then((v=>({key,value:v})))}));return(yield Promise.all(promises)).reduce(((accum,result)=>(accum[result.key]=result.value,accum)),{})}))}function checkProperties(object,properties){object&&"object"==typeof object||lib_esm_logger.throwArgumentError("invalid object","object",object),Object.keys(object).forEach((key=>{properties[key]||lib_esm_logger.throwArgumentError("invalid object key - "+key,"transaction:"+key,object)}))}function shallowCopy(object){const result={};for(const key in object)result[key]=object[key];return result}const opaque={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function _isFrozen(object){if(null==object||opaque[typeof object])return!0;if(Array.isArray(object)||"object"==typeof object){if(!Object.isFrozen(object))return!1;const keys=Object.keys(object);for(let i=0;i<keys.length;i++){let value=null;try{value=object[keys[i]]}catch(error){continue}if(!_isFrozen(value))return!1}return!0}return lib_esm_logger.throwArgumentError("Cannot deepCopy "+typeof object,"object",object)}function _deepCopy(object){if(_isFrozen(object))return object;if(Array.isArray(object))return Object.freeze(object.map((item=>deepCopy(item))));if("object"==typeof object){const result={};for(const key in object){const value=object[key];void 0!==value&&defineReadOnly(result,key,deepCopy(value))}return result}return lib_esm_logger.throwArgumentError("Cannot deepCopy "+typeof object,"object",object)}function deepCopy(object){return _deepCopy(object)}class Description{constructor(info){for(const key in info)this[key]=deepCopy(info[key])}}const abstract_coder_logger=new Logger("abi/5.6.4");function checkResultErrors(result){const errors=[],checkErrors=function(path,object){if(Array.isArray(object))for(let key in object){const childPath=path.slice();childPath.push(key);try{checkErrors(childPath,object[key])}catch(error){errors.push({path:childPath,error})}}};return checkErrors([],result),errors}class Coder{constructor(name,type,localName,dynamic){this.name=name,this.type=type,this.localName=localName,this.dynamic=dynamic}_throwError(message,value){abstract_coder_logger.throwArgumentError(message,this.localName,value)}}class Writer{constructor(wordSize){defineReadOnly(this,"wordSize",wordSize||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(wordSize)}get data(){return hexConcat(this._data)}get length(){return this._dataLength}_writeData(data){return this._data.push(data),this._dataLength+=data.length,data.length}appendWriter(writer){return this._writeData(concat(writer._data))}writeBytes(value){let bytes=arrayify(value);const paddingOffset=bytes.length%this.wordSize;return paddingOffset&&(bytes=concat([bytes,this._padding.slice(paddingOffset)])),this._writeData(bytes)}_getValue(value){let bytes=arrayify(BigNumber.from(value));return bytes.length>this.wordSize&&abstract_coder_logger.throwError("value out-of-bounds",Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:bytes.length}),bytes.length%this.wordSize&&(bytes=concat([this._padding.slice(bytes.length%this.wordSize),bytes])),bytes}writeValue(value){return this._writeData(this._getValue(value))}writeUpdatableValue(){const offset=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,value=>{this._data[offset]=this._getValue(value)}}}class Reader{constructor(data,wordSize,coerceFunc,allowLoose){defineReadOnly(this,"_data",arrayify(data)),defineReadOnly(this,"wordSize",wordSize||32),defineReadOnly(this,"_coerceFunc",coerceFunc),defineReadOnly(this,"allowLoose",allowLoose),this._offset=0}get data(){return hexlify(this._data)}get consumed(){return this._offset}static coerce(name,value){let match=name.match("^u?int([0-9]+)$");return match&&parseInt(match[1])<=48&&(value=value.toNumber()),value}coerce(name,value){return this._coerceFunc?this._coerceFunc(name,value):Reader.coerce(name,value)}_peekBytes(offset,length,loose){let alignedLength=Math.ceil(length/this.wordSize)*this.wordSize;return this._offset+alignedLength>this._data.length&&(this.allowLoose&&loose&&this._offset+length<=this._data.length?alignedLength=length:abstract_coder_logger.throwError("data out-of-bounds",Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+alignedLength})),this._data.slice(this._offset,this._offset+alignedLength)}subReader(offset){return new Reader(this._data.slice(this._offset+offset),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(length,loose){let bytes=this._peekBytes(0,length,!!loose);return this._offset+=bytes.length,bytes.slice(0,length)}readValue(){return BigNumber.from(this.readBytes(this.wordSize))}}var sha3=__webpack_require__(1094),sha3_default=__webpack_require__.n(sha3);function keccak256(data){return"0x"+sha3_default().keccak_256(arrayify(data))}const rlp_lib_esm_logger=new Logger("rlp/5.6.1");function arrayifyInteger(value){const result=[];for(;value;)result.unshift(255&value),value>>=8;return result}function unarrayifyInteger(data,offset,length){let result=0;for(let i=0;i<length;i++)result=256*result+data[offset+i];return result}function _encode(object){if(Array.isArray(object)){let payload=[];if(object.forEach((function(child){payload=payload.concat(_encode(child))})),payload.length<=55)return payload.unshift(192+payload.length),payload;const length=arrayifyInteger(payload.length);return length.unshift(247+length.length),length.concat(payload)}isBytesLike(object)||rlp_lib_esm_logger.throwArgumentError("RLP object must be BytesLike","object",object);const data=Array.prototype.slice.call(arrayify(object));if(1===data.length&&data[0]<=127)return data;if(data.length<=55)return data.unshift(128+data.length),data;const length=arrayifyInteger(data.length);return length.unshift(183+length.length),length.concat(data)}function encode(object){return hexlify(_encode(object))}function _decodeChildren(data,offset,childOffset,length){const result=[];for(;childOffset<offset+1+length;){const decoded=_decode(data,childOffset);result.push(decoded.result),(childOffset+=decoded.consumed)>offset+1+length&&rlp_lib_esm_logger.throwError("child data too short",Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+length,result}}function _decode(data,offset){if(0===data.length&&rlp_lib_esm_logger.throwError("data too short",Logger.errors.BUFFER_OVERRUN,{}),data[offset]>=248){const lengthLength=data[offset]-247;offset+1+lengthLength>data.length&&rlp_lib_esm_logger.throwError("data short segment too short",Logger.errors.BUFFER_OVERRUN,{});const length=unarrayifyInteger(data,offset+1,lengthLength);return offset+1+lengthLength+length>data.length&&rlp_lib_esm_logger.throwError("data long segment too short",Logger.errors.BUFFER_OVERRUN,{}),_decodeChildren(data,offset,offset+1+lengthLength,lengthLength+length)}if(data[offset]>=192){const length=data[offset]-192;return offset+1+length>data.length&&rlp_lib_esm_logger.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{}),_decodeChildren(data,offset,offset+1,length)}if(data[offset]>=184){const lengthLength=data[offset]-183;offset+1+lengthLength>data.length&&rlp_lib_esm_logger.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{});const length=unarrayifyInteger(data,offset+1,lengthLength);offset+1+lengthLength+length>data.length&&rlp_lib_esm_logger.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+lengthLength+length,result:hexlify(data.slice(offset+1+lengthLength,offset+1+lengthLength+length))}}if(data[offset]>=128){const length=data[offset]-128;offset+1+length>data.length&&rlp_lib_esm_logger.throwError("data too short",Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+length,result:hexlify(data.slice(offset+1,offset+1+length))}}return{consumed:1,result:hexlify(data[offset])}}function decode(data){const bytes=arrayify(data),decoded=_decode(bytes,0);return decoded.consumed!==bytes.length&&rlp_lib_esm_logger.throwArgumentError("invalid rlp data","data",data),decoded.result}const address_lib_esm_logger=new Logger("address/5.6.1");function getChecksumAddress(address){lib_esm_isHexString(address,20)||address_lib_esm_logger.throwArgumentError("invalid address","address",address);const chars=(address=address.toLowerCase()).substring(2).split(""),expanded=new Uint8Array(40);for(let i=0;i<40;i++)expanded[i]=chars[i].charCodeAt(0);const hashed=arrayify(keccak256(expanded));for(let i=0;i<40;i+=2)hashed[i>>1]>>4>=8&&(chars[i]=chars[i].toUpperCase()),(15&hashed[i>>1])>=8&&(chars[i+1]=chars[i+1].toUpperCase());return"0x"+chars.join("")}const ibanLookup={};for(let i=0;i<10;i++)ibanLookup[String(i)]=String(i);for(let i=0;i<26;i++)ibanLookup[String.fromCharCode(65+i)]=String(10+i);const safeDigits=Math.floor(function log10(x){return Math.log10?Math.log10(x):Math.log(x)/Math.LN10}(9007199254740991));function ibanChecksum(address){let expanded=(address=(address=address.toUpperCase()).substring(4)+address.substring(0,2)+"00").split("").map((c=>ibanLookup[c])).join("");for(;expanded.length>=safeDigits;){let block=expanded.substring(0,safeDigits);expanded=parseInt(block,10)%97+expanded.substring(block.length)}let checksum=String(98-parseInt(expanded,10)%97);for(;checksum.length<2;)checksum="0"+checksum;return checksum}function getAddress(address){let result=null;if("string"!=typeof address&&address_lib_esm_logger.throwArgumentError("invalid address","address",address),address.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==address.substring(0,2)&&(address="0x"+address),result=getChecksumAddress(address),address.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&result!==address&&address_lib_esm_logger.throwArgumentError("bad address checksum","address",address);else if(address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(address.substring(2,4)!==ibanChecksum(address)&&address_lib_esm_logger.throwArgumentError("bad icap checksum","address",address),result=function _base36To16(value){return new BN(value,36).toString(16)}(address.substring(4));result.length<40;)result="0"+result;result=getChecksumAddress("0x"+result)}else address_lib_esm_logger.throwArgumentError("invalid address","address",address);return result}function isAddress(address){try{return getAddress(address),!0}catch(error){}return!1}function getIcapAddress(address){let base36=function _base16To36(value){return new BN(value,16).toString(36)}(getAddress(address).substring(2)).toUpperCase();for(;base36.length<30;)base36="0"+base36;return"XE"+ibanChecksum("XE00"+base36)+base36}function getContractAddress(transaction){let from=null;try{from=getAddress(transaction.from)}catch(error){address_lib_esm_logger.throwArgumentError("missing from address","transaction",transaction)}return getAddress(hexDataSlice(keccak256(encode([from,stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString()))])),12))}function getCreate2Address(from,salt,initCodeHash){return 32!==hexDataLength(salt)&&address_lib_esm_logger.throwArgumentError("salt must be 32 bytes","salt",salt),32!==hexDataLength(initCodeHash)&&address_lib_esm_logger.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",initCodeHash),getAddress(hexDataSlice(keccak256(concat(["0xff",getAddress(from),salt,initCodeHash])),12))}const utf8_logger=new Logger("strings/5.6.1");var UnicodeNormalizationForm,Utf8ErrorReason;function ignoreFunc(reason,offset,bytes,output,badCodepoint){if(reason===Utf8ErrorReason.BAD_PREFIX||reason===Utf8ErrorReason.UNEXPECTED_CONTINUE){let i=0;for(let o=offset+1;o<bytes.length&&bytes[o]>>6==2;o++)i++;return i}return reason===Utf8ErrorReason.OVERRUN?bytes.length-offset-1:0}!function(UnicodeNormalizationForm){UnicodeNormalizationForm.current="",UnicodeNormalizationForm.NFC="NFC",UnicodeNormalizationForm.NFD="NFD",UnicodeNormalizationForm.NFKC="NFKC",UnicodeNormalizationForm.NFKD="NFKD"}(UnicodeNormalizationForm||(UnicodeNormalizationForm={})),function(Utf8ErrorReason){Utf8ErrorReason.UNEXPECTED_CONTINUE="unexpected continuation byte",Utf8ErrorReason.BAD_PREFIX="bad codepoint prefix",Utf8ErrorReason.OVERRUN="string overrun",Utf8ErrorReason.MISSING_CONTINUE="missing continuation byte",Utf8ErrorReason.OUT_OF_RANGE="out of UTF-8 range",Utf8ErrorReason.UTF16_SURROGATE="UTF-16 surrogate",Utf8ErrorReason.OVERLONG="overlong representation"}(Utf8ErrorReason||(Utf8ErrorReason={}));const Utf8ErrorFuncs=Object.freeze({error:function errorFunc(reason,offset,bytes,output,badCodepoint){return utf8_logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`,"bytes",bytes)},ignore:ignoreFunc,replace:function replaceFunc(reason,offset,bytes,output,badCodepoint){return reason===Utf8ErrorReason.OVERLONG?(output.push(badCodepoint),0):(output.push(65533),ignoreFunc(reason,offset,bytes))}});function getUtf8CodePoints(bytes,onError){null==onError&&(onError=Utf8ErrorFuncs.error),bytes=arrayify(bytes);const result=[];let i=0;for(;i<bytes.length;){const c=bytes[i++];if(c>>7==0){result.push(c);continue}let extraLength=null,overlongMask=null;if(192==(224&c))extraLength=1,overlongMask=127;else if(224==(240&c))extraLength=2,overlongMask=2047;else{if(240!=(248&c)){i+=onError(128==(192&c)?Utf8ErrorReason.UNEXPECTED_CONTINUE:Utf8ErrorReason.BAD_PREFIX,i-1,bytes,result);continue}extraLength=3,overlongMask=65535}if(i-1+extraLength>=bytes.length){i+=onError(Utf8ErrorReason.OVERRUN,i-1,bytes,result);continue}let res=c&(1<<8-extraLength-1)-1;for(let j=0;j<extraLength;j++){let nextChar=bytes[i];if(128!=(192&nextChar)){i+=onError(Utf8ErrorReason.MISSING_CONTINUE,i,bytes,result),res=null;break}res=res<<6|63&nextChar,i++}null!==res&&(res>1114111?i+=onError(Utf8ErrorReason.OUT_OF_RANGE,i-1-extraLength,bytes,result,res):res>=55296&&res<=57343?i+=onError(Utf8ErrorReason.UTF16_SURROGATE,i-1-extraLength,bytes,result,res):res<=overlongMask?i+=onError(Utf8ErrorReason.OVERLONG,i-1-extraLength,bytes,result,res):result.push(res))}return result}function toUtf8Bytes(str,form=UnicodeNormalizationForm.current){form!=UnicodeNormalizationForm.current&&(utf8_logger.checkNormalize(),str=str.normalize(form));let result=[];for(let i=0;i<str.length;i++){const c=str.charCodeAt(i);if(c<128)result.push(c);else if(c<2048)result.push(c>>6|192),result.push(63&c|128);else if(55296==(64512&c)){i++;const c2=str.charCodeAt(i);if(i>=str.length||56320!=(64512&c2))throw new Error("invalid utf-8 string");const pair=65536+((1023&c)<<10)+(1023&c2);result.push(pair>>18|240),result.push(pair>>12&63|128),result.push(pair>>6&63|128),result.push(63&pair|128)}else result.push(c>>12|224),result.push(c>>6&63|128),result.push(63&c|128)}return arrayify(result)}function escapeChar(value){const hex="0000"+value.toString(16);return"\\u"+hex.substring(hex.length-4)}function _toEscapedUtf8String(bytes,onError){return'"'+getUtf8CodePoints(bytes,onError).map((codePoint=>{if(codePoint<256){switch(codePoint){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(codePoint>=32&&codePoint<127)return String.fromCharCode(codePoint)}return codePoint<=65535?escapeChar(codePoint):escapeChar(55296+((codePoint-=65536)>>10&1023))+escapeChar(56320+(1023&codePoint))})).join("")+'"'}function _toUtf8String(codePoints){return codePoints.map((codePoint=>codePoint<=65535?String.fromCharCode(codePoint):(codePoint-=65536,String.fromCharCode(55296+(codePoint>>10&1023),56320+(1023&codePoint))))).join("")}function toUtf8String(bytes,onError){return _toUtf8String(getUtf8CodePoints(bytes,onError))}function toUtf8CodePoints(str,form=UnicodeNormalizationForm.current){return getUtf8CodePoints(toUtf8Bytes(str,form))}function id(text){return keccak256(toUtf8Bytes(text))}class AddressCoder extends Coder{constructor(localName){super("address","address",localName,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(writer,value){try{value=getAddress(value)}catch(error){this._throwError(error.message,value)}return writer.writeValue(value)}decode(reader){return getAddress(hexZeroPad(reader.readValue().toHexString(),20))}}class AnonymousCoder extends Coder{constructor(coder){super(coder.name,coder.type,void 0,coder.dynamic),this.coder=coder}defaultValue(){return this.coder.defaultValue()}encode(writer,value){return this.coder.encode(writer,value)}decode(reader){return this.coder.decode(reader)}}const array_logger=new Logger("abi/5.6.4");function pack(writer,coders,values){let arrayValues=null;if(Array.isArray(values))arrayValues=values;else if(values&&"object"==typeof values){let unique={};arrayValues=coders.map((coder=>{const name=coder.localName;return name||array_logger.throwError("cannot encode object for signature with missing names",Logger.errors.INVALID_ARGUMENT,{argument:"values",coder,value:values}),unique[name]&&array_logger.throwError("cannot encode object for signature with duplicate names",Logger.errors.INVALID_ARGUMENT,{argument:"values",coder,value:values}),unique[name]=!0,values[name]}))}else array_logger.throwArgumentError("invalid tuple value","tuple",values);coders.length!==arrayValues.length&&array_logger.throwArgumentError("types/value length mismatch","tuple",values);let staticWriter=new Writer(writer.wordSize),dynamicWriter=new Writer(writer.wordSize),updateFuncs=[];coders.forEach(((coder,index)=>{let value=arrayValues[index];if(coder.dynamic){let dynamicOffset=dynamicWriter.length;coder.encode(dynamicWriter,value);let updateFunc=staticWriter.writeUpdatableValue();updateFuncs.push((baseOffset=>{updateFunc(baseOffset+dynamicOffset)}))}else coder.encode(staticWriter,value)})),updateFuncs.forEach((func=>{func(staticWriter.length)}));let length=writer.appendWriter(staticWriter);return length+=writer.appendWriter(dynamicWriter),length}function unpack(reader,coders){let values=[],baseReader=reader.subReader(0);coders.forEach((coder=>{let value=null;if(coder.dynamic){let offset=reader.readValue(),offsetReader=baseReader.subReader(offset.toNumber());try{value=coder.decode(offsetReader)}catch(error){if(error.code===Logger.errors.BUFFER_OVERRUN)throw error;value=error,value.baseType=coder.name,value.name=coder.localName,value.type=coder.type}}else try{value=coder.decode(reader)}catch(error){if(error.code===Logger.errors.BUFFER_OVERRUN)throw error;value=error,value.baseType=coder.name,value.name=coder.localName,value.type=coder.type}null!=value&&values.push(value)}));const uniqueNames=coders.reduce(((accum,coder)=>{const name=coder.localName;return name&&(accum[name]||(accum[name]=0),accum[name]++),accum}),{});coders.forEach(((coder,index)=>{let name=coder.localName;if(!name||1!==uniqueNames[name])return;if("length"===name&&(name="_length"),null!=values[name])return;const value=values[index];value instanceof Error?Object.defineProperty(values,name,{enumerable:!0,get:()=>{throw value}}):values[name]=value}));for(let i=0;i<values.length;i++){const value=values[i];value instanceof Error&&Object.defineProperty(values,i,{enumerable:!0,get:()=>{throw value}})}return Object.freeze(values)}class ArrayCoder extends Coder{constructor(coder,length,localName){super("array",coder.type+"["+(length>=0?length:"")+"]",localName,-1===length||coder.dynamic),this.coder=coder,this.length=length}defaultValue(){const defaultChild=this.coder.defaultValue(),result=[];for(let i=0;i<this.length;i++)result.push(defaultChild);return result}encode(writer,value){Array.isArray(value)||this._throwError("expected array value",value);let count=this.length;-1===count&&(count=value.length,writer.writeValue(value.length)),array_logger.checkArgumentCount(value.length,count,"coder array"+(this.localName?" "+this.localName:""));let coders=[];for(let i=0;i<value.length;i++)coders.push(this.coder);return pack(writer,coders,value)}decode(reader){let count=this.length;-1===count&&(count=reader.readValue().toNumber(),32*count>reader._data.length&&array_logger.throwError("insufficient data length",Logger.errors.BUFFER_OVERRUN,{length:reader._data.length,count}));let coders=[];for(let i=0;i<count;i++)coders.push(new AnonymousCoder(this.coder));return reader.coerce(this.name,unpack(reader,coders))}}class BooleanCoder extends Coder{constructor(localName){super("bool","bool",localName,!1)}defaultValue(){return!1}encode(writer,value){return writer.writeValue(value?1:0)}decode(reader){return reader.coerce(this.type,!reader.readValue().isZero())}}class DynamicBytesCoder extends Coder{constructor(type,localName){super(type,type,localName,!0)}defaultValue(){return"0x"}encode(writer,value){value=arrayify(value);let length=writer.writeValue(value.length);return length+=writer.writeBytes(value),length}decode(reader){return reader.readBytes(reader.readValue().toNumber(),!0)}}class BytesCoder extends DynamicBytesCoder{constructor(localName){super("bytes",localName)}decode(reader){return reader.coerce(this.name,hexlify(super.decode(reader)))}}class FixedBytesCoder extends Coder{constructor(size,localName){let name="bytes"+String(size);super(name,name,localName,!1),this.size=size}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(writer,value){let data=arrayify(value);return data.length!==this.size&&this._throwError("incorrect data length",value),writer.writeBytes(data)}decode(reader){return reader.coerce(this.name,hexlify(reader.readBytes(this.size)))}}class NullCoder extends Coder{constructor(localName){super("null","",localName,!1)}defaultValue(){return null}encode(writer,value){return null!=value&&this._throwError("not null",value),writer.writeBytes([])}decode(reader){return reader.readBytes(0),reader.coerce(this.name,null)}}const NegativeOne=BigNumber.from(-1),Zero=BigNumber.from(0),One=BigNumber.from(1),Two=BigNumber.from(2),WeiPerEther=BigNumber.from("1000000000000000000"),MaxUint256=BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),MinInt256=BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),MaxInt256=BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class NumberCoder extends Coder{constructor(size,signed,localName){const name=(signed?"int":"uint")+8*size;super(name,name,localName,!1),this.size=size,this.signed=signed}defaultValue(){return 0}encode(writer,value){let v=BigNumber.from(value),maxUintValue=MaxUint256.mask(8*writer.wordSize);if(this.signed){let bounds=maxUintValue.mask(8*this.size-1);(v.gt(bounds)||v.lt(bounds.add(One).mul(NegativeOne)))&&this._throwError("value out-of-bounds",value)}else(v.lt(Zero)||v.gt(maxUintValue.mask(8*this.size)))&&this._throwError("value out-of-bounds",value);return v=v.toTwos(8*this.size).mask(8*this.size),this.signed&&(v=v.fromTwos(8*this.size).toTwos(8*writer.wordSize)),writer.writeValue(v)}decode(reader){let value=reader.readValue().mask(8*this.size);return this.signed&&(value=value.fromTwos(8*this.size)),reader.coerce(this.name,value)}}class StringCoder extends DynamicBytesCoder{constructor(localName){super("string",localName)}defaultValue(){return""}encode(writer,value){return super.encode(writer,toUtf8Bytes(value))}decode(reader){return toUtf8String(super.decode(reader))}}class TupleCoder extends Coder{constructor(coders,localName){let dynamic=!1;const types=[];coders.forEach((coder=>{coder.dynamic&&(dynamic=!0),types.push(coder.type)}));super("tuple","tuple("+types.join(",")+")",localName,dynamic),this.coders=coders}defaultValue(){const values=[];this.coders.forEach((coder=>{values.push(coder.defaultValue())}));const uniqueNames=this.coders.reduce(((accum,coder)=>{const name=coder.localName;return name&&(accum[name]||(accum[name]=0),accum[name]++),accum}),{});return this.coders.forEach(((coder,index)=>{let name=coder.localName;name&&1===uniqueNames[name]&&("length"===name&&(name="_length"),null==values[name]&&(values[name]=values[index]))})),Object.freeze(values)}encode(writer,value){return pack(writer,this.coders,value)}decode(reader){return reader.coerce(this.name,unpack(reader,this.coders))}}const fragments_logger=new Logger("abi/5.6.4"),fragments_constructorGuard={};let ModifiersBytes={calldata:!0,memory:!0,storage:!0},ModifiersNest={calldata:!0,memory:!0};function checkModifier(type,name){if("bytes"===type||"string"===type){if(ModifiersBytes[name])return!0}else if("address"===type){if("payable"===name)return!0}else if((type.indexOf("[")>=0||"tuple"===type)&&ModifiersNest[name])return!0;return(ModifiersBytes[name]||"payable"===name)&&fragments_logger.throwArgumentError("invalid modifier","name",name),!1}function populate(object,params){for(let key in params)defineReadOnly(object,key,params[key])}const FormatTypes=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),paramTypeArray=new RegExp(/^(.*)\[([0-9]*)\]$/);class ParamType{constructor(constructorGuard,params){constructorGuard!==fragments_constructorGuard&&fragments_logger.throwError("use fromString",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),populate(this,params);let match=this.type.match(paramTypeArray);populate(this,match?{arrayLength:parseInt(match[2]||"-1"),arrayChildren:ParamType.fromObject({type:match[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(format){if(format||(format=FormatTypes.sighash),FormatTypes[format]||fragments_logger.throwArgumentError("invalid format type","format",format),format===FormatTypes.json){let result={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(result.indexed=this.indexed),this.components&&(result.components=this.components.map((comp=>JSON.parse(comp.format(format))))),JSON.stringify(result)}let result="";return"array"===this.baseType?(result+=this.arrayChildren.format(format),result+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(format!==FormatTypes.sighash&&(result+=this.type),result+="("+this.components.map((comp=>comp.format(format))).join(format===FormatTypes.full?", ":",")+")"):result+=this.type,format!==FormatTypes.sighash&&(!0===this.indexed&&(result+=" indexed"),format===FormatTypes.full&&this.name&&(result+=" "+this.name)),result}static from(value,allowIndexed){return"string"==typeof value?ParamType.fromString(value,allowIndexed):ParamType.fromObject(value)}static fromObject(value){return ParamType.isParamType(value)?value:new ParamType(fragments_constructorGuard,{name:value.name||null,type:verifyType(value.type),indexed:null==value.indexed?null:!!value.indexed,components:value.components?value.components.map(ParamType.fromObject):null})}static fromString(value,allowIndexed){return function ParamTypify(node){return ParamType.fromObject({name:node.name,type:node.type,indexed:node.indexed,components:node.components})}(function parseParamType(param,allowIndexed){let originalParam=param;function throwError(i){fragments_logger.throwArgumentError(`unexpected character at position ${i}`,"param",param)}function newNode(parent){let node={type:"",name:"",parent,state:{allowType:!0}};return allowIndexed&&(node.indexed=!1),node}param=param.replace(/\s/g," ");let parent={type:"",name:"",state:{allowType:!0}},node=parent;for(let i=0;i<param.length;i++){let c=param[i];switch(c){case"(":node.state.allowType&&""===node.type?node.type="tuple":node.state.allowParams||throwError(i),node.state.allowType=!1,node.type=verifyType(node.type),node.components=[newNode(node)],node=node.components[0];break;case")":delete node.state,"indexed"===node.name&&(allowIndexed||throwError(i),node.indexed=!0,node.name=""),checkModifier(node.type,node.name)&&(node.name=""),node.type=verifyType(node.type);let child=node;node=node.parent,node||throwError(i),delete child.parent,node.state.allowParams=!1,node.state.allowName=!0,node.state.allowArray=!0;break;case",":delete node.state,"indexed"===node.name&&(allowIndexed||throwError(i),node.indexed=!0,node.name=""),checkModifier(node.type,node.name)&&(node.name=""),node.type=verifyType(node.type);let sibling=newNode(node.parent);node.parent.components.push(sibling),delete node.parent,node=sibling;break;case" ":node.state.allowType&&""!==node.type&&(node.type=verifyType(node.type),delete node.state.allowType,node.state.allowName=!0,node.state.allowParams=!0),node.state.allowName&&""!==node.name&&("indexed"===node.name?(allowIndexed||throwError(i),node.indexed&&throwError(i),node.indexed=!0,node.name=""):checkModifier(node.type,node.name)?node.name="":node.state.allowName=!1);break;case"[":node.state.allowArray||throwError(i),node.type+=c,node.state.allowArray=!1,node.state.allowName=!1,node.state.readArray=!0;break;case"]":node.state.readArray||throwError(i),node.type+=c,node.state.readArray=!1,node.state.allowArray=!0,node.state.allowName=!0;break;default:node.state.allowType?(node.type+=c,node.state.allowParams=!0,node.state.allowArray=!0):node.state.allowName?(node.name+=c,delete node.state.allowArray):node.state.readArray?node.type+=c:throwError(i)}}return node.parent&&fragments_logger.throwArgumentError("unexpected eof","param",param),delete parent.state,"indexed"===node.name?(allowIndexed||throwError(originalParam.length-7),node.indexed&&throwError(originalParam.length-7),node.indexed=!0,node.name=""):checkModifier(node.type,node.name)&&(node.name=""),parent.type=verifyType(parent.type),parent}(value,!!allowIndexed))}static isParamType(value){return!(null==value||!value._isParamType)}}function parseParams(value,allowIndex){return function splitNesting(value){value=value.trim();let result=[],accum="",depth=0;for(let offset=0;offset<value.length;offset++){let c=value[offset];","===c&&0===depth?(result.push(accum),accum=""):(accum+=c,"("===c?depth++:")"===c&&(depth--,-1===depth&&fragments_logger.throwArgumentError("unbalanced parenthesis","value",value)))}accum&&result.push(accum);return result}(value).map((param=>ParamType.fromString(param,allowIndex)))}class Fragment{constructor(constructorGuard,params){constructorGuard!==fragments_constructorGuard&&fragments_logger.throwError("use a static from method",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),populate(this,params),this._isFragment=!0,Object.freeze(this)}static from(value){return Fragment.isFragment(value)?value:"string"==typeof value?Fragment.fromString(value):Fragment.fromObject(value)}static fromObject(value){if(Fragment.isFragment(value))return value;switch(value.type){case"function":return FunctionFragment.fromObject(value);case"event":return EventFragment.fromObject(value);case"constructor":return ConstructorFragment.fromObject(value);case"error":return ErrorFragment.fromObject(value);case"fallback":case"receive":return null}return fragments_logger.throwArgumentError("invalid fragment object","value",value)}static fromString(value){return"event"===(value=(value=(value=value.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?EventFragment.fromString(value.substring(5).trim()):"function"===value.split(" ")[0]?FunctionFragment.fromString(value.substring(8).trim()):"constructor"===value.split("(")[0].trim()?ConstructorFragment.fromString(value.trim()):"error"===value.split(" ")[0]?ErrorFragment.fromString(value.substring(5).trim()):fragments_logger.throwArgumentError("unsupported fragment","value",value)}static isFragment(value){return!(!value||!value._isFragment)}}class EventFragment extends Fragment{format(format){if(format||(format=FormatTypes.sighash),FormatTypes[format]||fragments_logger.throwArgumentError("invalid format type","format",format),format===FormatTypes.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((input=>JSON.parse(input.format(format))))});let result="";return format!==FormatTypes.sighash&&(result+="event "),result+=this.name+"("+this.inputs.map((input=>input.format(format))).join(format===FormatTypes.full?", ":",")+") ",format!==FormatTypes.sighash&&this.anonymous&&(result+="anonymous "),result.trim()}static from(value){return"string"==typeof value?EventFragment.fromString(value):EventFragment.fromObject(value)}static fromObject(value){if(EventFragment.isEventFragment(value))return value;"event"!==value.type&&fragments_logger.throwArgumentError("invalid event object","value",value);const params={name:verifyIdentifier(value.name),anonymous:value.anonymous,inputs:value.inputs?value.inputs.map(ParamType.fromObject):[],type:"event"};return new EventFragment(fragments_constructorGuard,params)}static fromString(value){let match=value.match(regexParen);match||fragments_logger.throwArgumentError("invalid event string","value",value);let anonymous=!1;return match[3].split(" ").forEach((modifier=>{switch(modifier.trim()){case"anonymous":anonymous=!0;break;case"":break;default:fragments_logger.warn("unknown modifier: "+modifier)}})),EventFragment.fromObject({name:match[1].trim(),anonymous,inputs:parseParams(match[2],!0),type:"event"})}static isEventFragment(value){return value&&value._isFragment&&"event"===value.type}}function parseGas(value,params){params.gas=null;let comps=value.split("@");return 1!==comps.length?(comps.length>2&&fragments_logger.throwArgumentError("invalid human-readable ABI signature","value",value),comps[1].match(/^[0-9]+$/)||fragments_logger.throwArgumentError("invalid human-readable ABI signature gas","value",value),params.gas=BigNumber.from(comps[1]),comps[0]):value}function parseModifiers(value,params){params.constant=!1,params.payable=!1,params.stateMutability="nonpayable",value.split(" ").forEach((modifier=>{switch(modifier.trim()){case"constant":params.constant=!0;break;case"payable":params.payable=!0,params.stateMutability="payable";break;case"nonpayable":params.payable=!1,params.stateMutability="nonpayable";break;case"pure":params.constant=!0,params.stateMutability="pure";break;case"view":params.constant=!0,params.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+modifier)}}))}function verifyState(value){let result={constant:!1,payable:!0,stateMutability:"payable"};return null!=value.stateMutability?(result.stateMutability=value.stateMutability,result.constant="view"===result.stateMutability||"pure"===result.stateMutability,null!=value.constant&&!!value.constant!==result.constant&&fragments_logger.throwArgumentError("cannot have constant function with mutability "+result.stateMutability,"value",value),result.payable="payable"===result.stateMutability,null!=value.payable&&!!value.payable!==result.payable&&fragments_logger.throwArgumentError("cannot have payable function with mutability "+result.stateMutability,"value",value)):null!=value.payable?(result.payable=!!value.payable,null!=value.constant||result.payable||"constructor"===value.type||fragments_logger.throwArgumentError("unable to determine stateMutability","value",value),result.constant=!!value.constant,result.constant?result.stateMutability="view":result.stateMutability=result.payable?"payable":"nonpayable",result.payable&&result.constant&&fragments_logger.throwArgumentError("cannot have constant payable function","value",value)):null!=value.constant?(result.constant=!!value.constant,result.payable=!result.constant,result.stateMutability=result.constant?"view":"payable"):"constructor"!==value.type&&fragments_logger.throwArgumentError("unable to determine stateMutability","value",value),result}class ConstructorFragment extends Fragment{format(format){if(format||(format=FormatTypes.sighash),FormatTypes[format]||fragments_logger.throwArgumentError("invalid format type","format",format),format===FormatTypes.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((input=>JSON.parse(input.format(format))))});format===FormatTypes.sighash&&fragments_logger.throwError("cannot format a constructor for sighash",Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let result="constructor("+this.inputs.map((input=>input.format(format))).join(format===FormatTypes.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(result+=this.stateMutability+" "),result.trim()}static from(value){return"string"==typeof value?ConstructorFragment.fromString(value):ConstructorFragment.fromObject(value)}static fromObject(value){if(ConstructorFragment.isConstructorFragment(value))return value;"constructor"!==value.type&&fragments_logger.throwArgumentError("invalid constructor object","value",value);let state=verifyState(value);state.constant&&fragments_logger.throwArgumentError("constructor cannot be constant","value",value);const params={name:null,type:value.type,inputs:value.inputs?value.inputs.map(ParamType.fromObject):[],payable:state.payable,stateMutability:state.stateMutability,gas:value.gas?BigNumber.from(value.gas):null};return new ConstructorFragment(fragments_constructorGuard,params)}static fromString(value){let params={type:"constructor"},parens=(value=parseGas(value,params)).match(regexParen);return parens&&"constructor"===parens[1].trim()||fragments_logger.throwArgumentError("invalid constructor string","value",value),params.inputs=parseParams(parens[2].trim(),!1),parseModifiers(parens[3].trim(),params),ConstructorFragment.fromObject(params)}static isConstructorFragment(value){return value&&value._isFragment&&"constructor"===value.type}}class FunctionFragment extends ConstructorFragment{format(format){if(format||(format=FormatTypes.sighash),FormatTypes[format]||fragments_logger.throwArgumentError("invalid format type","format",format),format===FormatTypes.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((input=>JSON.parse(input.format(format)))),outputs:this.outputs.map((output=>JSON.parse(output.format(format))))});let result="";return format!==FormatTypes.sighash&&(result+="function "),result+=this.name+"("+this.inputs.map((input=>input.format(format))).join(format===FormatTypes.full?", ":",")+") ",format!==FormatTypes.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(result+=this.stateMutability+" "):this.constant&&(result+="view "),this.outputs&&this.outputs.length&&(result+="returns ("+this.outputs.map((output=>output.format(format))).join(", ")+") "),null!=this.gas&&(result+="@"+this.gas.toString()+" ")),result.trim()}static from(value){return"string"==typeof value?FunctionFragment.fromString(value):FunctionFragment.fromObject(value)}static fromObject(value){if(FunctionFragment.isFunctionFragment(value))return value;"function"!==value.type&&fragments_logger.throwArgumentError("invalid function object","value",value);let state=verifyState(value);const params={type:value.type,name:verifyIdentifier(value.name),constant:state.constant,inputs:value.inputs?value.inputs.map(ParamType.fromObject):[],outputs:value.outputs?value.outputs.map(ParamType.fromObject):[],payable:state.payable,stateMutability:state.stateMutability,gas:value.gas?BigNumber.from(value.gas):null};return new FunctionFragment(fragments_constructorGuard,params)}static fromString(value){let params={type:"function"},comps=(value=parseGas(value,params)).split(" returns ");comps.length>2&&fragments_logger.throwArgumentError("invalid function string","value",value);let parens=comps[0].match(regexParen);if(parens||fragments_logger.throwArgumentError("invalid function signature","value",value),params.name=parens[1].trim(),params.name&&verifyIdentifier(params.name),params.inputs=parseParams(parens[2],!1),parseModifiers(parens[3].trim(),params),comps.length>1){let returns=comps[1].match(regexParen);""==returns[1].trim()&&""==returns[3].trim()||fragments_logger.throwArgumentError("unexpected tokens","value",value),params.outputs=parseParams(returns[2],!1)}else params.outputs=[];return FunctionFragment.fromObject(params)}static isFunctionFragment(value){return value&&value._isFragment&&"function"===value.type}}function checkForbidden(fragment){const sig=fragment.format();return"Error(string)"!==sig&&"Panic(uint256)"!==sig||fragments_logger.throwArgumentError(`cannot specify user defined ${sig} error`,"fragment",fragment),fragment}class ErrorFragment extends Fragment{format(format){if(format||(format=FormatTypes.sighash),FormatTypes[format]||fragments_logger.throwArgumentError("invalid format type","format",format),format===FormatTypes.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((input=>JSON.parse(input.format(format))))});let result="";return format!==FormatTypes.sighash&&(result+="error "),result+=this.name+"("+this.inputs.map((input=>input.format(format))).join(format===FormatTypes.full?", ":",")+") ",result.trim()}static from(value){return"string"==typeof value?ErrorFragment.fromString(value):ErrorFragment.fromObject(value)}static fromObject(value){if(ErrorFragment.isErrorFragment(value))return value;"error"!==value.type&&fragments_logger.throwArgumentError("invalid error object","value",value);const params={type:value.type,name:verifyIdentifier(value.name),inputs:value.inputs?value.inputs.map(ParamType.fromObject):[]};return checkForbidden(new ErrorFragment(fragments_constructorGuard,params))}static fromString(value){let params={type:"error"},parens=value.match(regexParen);return parens||fragments_logger.throwArgumentError("invalid error signature","value",value),params.name=parens[1].trim(),params.name&&verifyIdentifier(params.name),params.inputs=parseParams(parens[2],!1),checkForbidden(ErrorFragment.fromObject(params))}static isErrorFragment(value){return value&&value._isFragment&&"error"===value.type}}function verifyType(type){return type.match(/^uint($|[^1-9])/)?type="uint256"+type.substring(4):type.match(/^int($|[^1-9])/)&&(type="int256"+type.substring(3)),type}const regexIdentifier=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function verifyIdentifier(value){return value&&value.match(regexIdentifier)||fragments_logger.throwArgumentError(`invalid identifier "${value}"`,"value",value),value}const regexParen=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const abi_coder_logger=new Logger("abi/5.6.4"),paramTypeBytes=new RegExp(/^bytes([0-9]*)$/),paramTypeNumber=new RegExp(/^(u?int)([0-9]*)$/);class AbiCoder{constructor(coerceFunc){defineReadOnly(this,"coerceFunc",coerceFunc||null)}_getCoder(param){switch(param.baseType){case"address":return new AddressCoder(param.name);case"bool":return new BooleanCoder(param.name);case"string":return new StringCoder(param.name);case"bytes":return new BytesCoder(param.name);case"array":return new ArrayCoder(this._getCoder(param.arrayChildren),param.arrayLength,param.name);case"tuple":return new TupleCoder((param.components||[]).map((component=>this._getCoder(component))),param.name);case"":return new NullCoder(param.name)}let match=param.type.match(paramTypeNumber);if(match){let size=parseInt(match[2]||"256");return(0===size||size>256||size%8!=0)&&abi_coder_logger.throwArgumentError("invalid "+match[1]+" bit length","param",param),new NumberCoder(size/8,"int"===match[1],param.name)}if(match=param.type.match(paramTypeBytes),match){let size=parseInt(match[1]);return(0===size||size>32)&&abi_coder_logger.throwArgumentError("invalid bytes length","param",param),new FixedBytesCoder(size,param.name)}return abi_coder_logger.throwArgumentError("invalid type","type",param.type)}_getWordSize(){return 32}_getReader(data,allowLoose){return new Reader(data,this._getWordSize(),this.coerceFunc,allowLoose)}_getWriter(){return new Writer(this._getWordSize())}getDefaultValue(types){const coders=types.map((type=>this._getCoder(ParamType.from(type))));return new TupleCoder(coders,"_").defaultValue()}encode(types,values){types.length!==values.length&&abi_coder_logger.throwError("types/values length mismatch",Logger.errors.INVALID_ARGUMENT,{count:{types:types.length,values:values.length},value:{types,values}});const coders=types.map((type=>this._getCoder(ParamType.from(type)))),coder=new TupleCoder(coders,"_"),writer=this._getWriter();return coder.encode(writer,values),writer.data}decode(types,data,loose){const coders=types.map((type=>this._getCoder(ParamType.from(type))));return new TupleCoder(coders,"_").decode(this._getReader(arrayify(data),loose))}}const defaultAbiCoder=new AbiCoder,interface_logger=new Logger("abi/5.6.4");class LogDescription extends Description{}class TransactionDescription extends Description{}class ErrorDescription extends Description{}class Indexed extends Description{static isIndexed(value){return!(!value||!value._isIndexed)}}const BuiltinErrors={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function wrapAccessError(property,error){const wrap=new Error(`deferred error during ABI decoding triggered accessing ${property}`);return wrap.error=error,wrap}class Interface{constructor(fragments){let abi=[];abi="string"==typeof fragments?JSON.parse(fragments):fragments,defineReadOnly(this,"fragments",abi.map((fragment=>Fragment.from(fragment))).filter((fragment=>null!=fragment))),defineReadOnly(this,"_abiCoder",getStatic(new.target,"getAbiCoder")()),defineReadOnly(this,"functions",{}),defineReadOnly(this,"errors",{}),defineReadOnly(this,"events",{}),defineReadOnly(this,"structs",{}),this.fragments.forEach((fragment=>{let bucket=null;switch(fragment.type){case"constructor":return this.deploy?void interface_logger.warn("duplicate definition - constructor"):void defineReadOnly(this,"deploy",fragment);case"function":bucket=this.functions;break;case"event":bucket=this.events;break;case"error":bucket=this.errors;break;default:return}let signature=fragment.format();bucket[signature]?interface_logger.warn("duplicate definition - "+signature):bucket[signature]=fragment})),this.deploy||defineReadOnly(this,"deploy",ConstructorFragment.from({payable:!1,type:"constructor"})),defineReadOnly(this,"_isInterface",!0)}format(format){format||(format=FormatTypes.full),format===FormatTypes.sighash&&interface_logger.throwArgumentError("interface does not support formatting sighash","format",format);const abi=this.fragments.map((fragment=>fragment.format(format)));return format===FormatTypes.json?JSON.stringify(abi.map((j=>JSON.parse(j)))):abi}static getAbiCoder(){return defaultAbiCoder}static getAddress(address){return getAddress(address)}static getSighash(fragment){return hexDataSlice(id(fragment.format()),0,4)}static getEventTopic(eventFragment){return id(eventFragment.format())}getFunction(nameOrSignatureOrSighash){if(lib_esm_isHexString(nameOrSignatureOrSighash)){for(const name in this.functions)if(nameOrSignatureOrSighash===this.getSighash(name))return this.functions[name];interface_logger.throwArgumentError("no matching function","sighash",nameOrSignatureOrSighash)}if(-1===nameOrSignatureOrSighash.indexOf("(")){const name=nameOrSignatureOrSighash.trim(),matching=Object.keys(this.functions).filter((f=>f.split("(")[0]===name));return 0===matching.length?interface_logger.throwArgumentError("no matching function","name",name):matching.length>1&&interface_logger.throwArgumentError("multiple matching functions","name",name),this.functions[matching[0]]}const result=this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];return result||interface_logger.throwArgumentError("no matching function","signature",nameOrSignatureOrSighash),result}getEvent(nameOrSignatureOrTopic){if(lib_esm_isHexString(nameOrSignatureOrTopic)){const topichash=nameOrSignatureOrTopic.toLowerCase();for(const name in this.events)if(topichash===this.getEventTopic(name))return this.events[name];interface_logger.throwArgumentError("no matching event","topichash",topichash)}if(-1===nameOrSignatureOrTopic.indexOf("(")){const name=nameOrSignatureOrTopic.trim(),matching=Object.keys(this.events).filter((f=>f.split("(")[0]===name));return 0===matching.length?interface_logger.throwArgumentError("no matching event","name",name):matching.length>1&&interface_logger.throwArgumentError("multiple matching events","name",name),this.events[matching[0]]}const result=this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()];return result||interface_logger.throwArgumentError("no matching event","signature",nameOrSignatureOrTopic),result}getError(nameOrSignatureOrSighash){if(lib_esm_isHexString(nameOrSignatureOrSighash)){const getSighash=getStatic(this.constructor,"getSighash");for(const name in this.errors){if(nameOrSignatureOrSighash===getSighash(this.errors[name]))return this.errors[name]}interface_logger.throwArgumentError("no matching error","sighash",nameOrSignatureOrSighash)}if(-1===nameOrSignatureOrSighash.indexOf("(")){const name=nameOrSignatureOrSighash.trim(),matching=Object.keys(this.errors).filter((f=>f.split("(")[0]===name));return 0===matching.length?interface_logger.throwArgumentError("no matching error","name",name):matching.length>1&&interface_logger.throwArgumentError("multiple matching errors","name",name),this.errors[matching[0]]}const result=this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];return result||interface_logger.throwArgumentError("no matching error","signature",nameOrSignatureOrSighash),result}getSighash(fragment){if("string"==typeof fragment)try{fragment=this.getFunction(fragment)}catch(error){try{fragment=this.getError(fragment)}catch(_){throw error}}return getStatic(this.constructor,"getSighash")(fragment)}getEventTopic(eventFragment){return"string"==typeof eventFragment&&(eventFragment=this.getEvent(eventFragment)),getStatic(this.constructor,"getEventTopic")(eventFragment)}_decodeParams(params,data){return this._abiCoder.decode(params,data)}_encodeParams(params,values){return this._abiCoder.encode(params,values)}encodeDeploy(values){return this._encodeParams(this.deploy.inputs,values||[])}decodeErrorResult(fragment,data){"string"==typeof fragment&&(fragment=this.getError(fragment));const bytes=arrayify(data);return hexlify(bytes.slice(0,4))!==this.getSighash(fragment)&&interface_logger.throwArgumentError(`data signature does not match error ${fragment.name}.`,"data",hexlify(bytes)),this._decodeParams(fragment.inputs,bytes.slice(4))}encodeErrorResult(fragment,values){return"string"==typeof fragment&&(fragment=this.getError(fragment)),hexlify(concat([this.getSighash(fragment),this._encodeParams(fragment.inputs,values||[])]))}decodeFunctionData(functionFragment,data){"string"==typeof functionFragment&&(functionFragment=this.getFunction(functionFragment));const bytes=arrayify(data);return hexlify(bytes.slice(0,4))!==this.getSighash(functionFragment)&&interface_logger.throwArgumentError(`data signature does not match function ${functionFragment.name}.`,"data",hexlify(bytes)),this._decodeParams(functionFragment.inputs,bytes.slice(4))}encodeFunctionData(functionFragment,values){return"string"==typeof functionFragment&&(functionFragment=this.getFunction(functionFragment)),hexlify(concat([this.getSighash(functionFragment),this._encodeParams(functionFragment.inputs,values||[])]))}decodeFunctionResult(functionFragment,data){"string"==typeof functionFragment&&(functionFragment=this.getFunction(functionFragment));let bytes=arrayify(data),reason=null,message="",errorArgs=null,errorName=null,errorSignature=null;switch(bytes.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(functionFragment.outputs,bytes)}catch(error){}break;case 4:{const selector=hexlify(bytes.slice(0,4)),builtin=BuiltinErrors[selector];if(builtin)errorArgs=this._abiCoder.decode(builtin.inputs,bytes.slice(4)),errorName=builtin.name,errorSignature=builtin.signature,builtin.reason&&(reason=errorArgs[0]),"Error"===errorName?message=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(errorArgs[0])}`:"Panic"===errorName&&(message=`; VM Exception while processing transaction: reverted with panic code ${errorArgs[0]}`);else try{const error=this.getError(selector);errorArgs=this._abiCoder.decode(error.inputs,bytes.slice(4)),errorName=error.name,errorSignature=error.format()}catch(error){}break}}return interface_logger.throwError("call revert exception"+message,Logger.errors.CALL_EXCEPTION,{method:functionFragment.format(),data:hexlify(data),errorArgs,errorName,errorSignature,reason})}encodeFunctionResult(functionFragment,values){return"string"==typeof functionFragment&&(functionFragment=this.getFunction(functionFragment)),hexlify(this._abiCoder.encode(functionFragment.outputs,values||[]))}encodeFilterTopics(eventFragment,values){"string"==typeof eventFragment&&(eventFragment=this.getEvent(eventFragment)),values.length>eventFragment.inputs.length&&interface_logger.throwError("too many arguments for "+eventFragment.format(),Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:values});let topics=[];eventFragment.anonymous||topics.push(this.getEventTopic(eventFragment));const encodeTopic=(param,value)=>"string"===param.type?id(value):"bytes"===param.type?keccak256(hexlify(value)):("bool"===param.type&&"boolean"==typeof value&&(value=value?"0x01":"0x00"),param.type.match(/^u?int/)&&(value=BigNumber.from(value).toHexString()),"address"===param.type&&this._abiCoder.encode(["address"],[value]),hexZeroPad(hexlify(value),32));for(values.forEach(((value,index)=>{let param=eventFragment.inputs[index];param.indexed?null==value?topics.push(null):"array"===param.baseType||"tuple"===param.baseType?interface_logger.throwArgumentError("filtering with tuples or arrays not supported","contract."+param.name,value):Array.isArray(value)?topics.push(value.map((value=>encodeTopic(param,value)))):topics.push(encodeTopic(param,value)):null!=value&&interface_logger.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+param.name,value)}));topics.length&&null===topics[topics.length-1];)topics.pop();return topics}encodeEventLog(eventFragment,values){"string"==typeof eventFragment&&(eventFragment=this.getEvent(eventFragment));const topics=[],dataTypes=[],dataValues=[];return eventFragment.anonymous||topics.push(this.getEventTopic(eventFragment)),values.length!==eventFragment.inputs.length&&interface_logger.throwArgumentError("event arguments/values mismatch","values",values),eventFragment.inputs.forEach(((param,index)=>{const value=values[index];if(param.indexed)if("string"===param.type)topics.push(id(value));else if("bytes"===param.type)topics.push(keccak256(value));else{if("tuple"===param.baseType||"array"===param.baseType)throw new Error("not implemented");topics.push(this._abiCoder.encode([param.type],[value]))}else dataTypes.push(param),dataValues.push(value)})),{data:this._abiCoder.encode(dataTypes,dataValues),topics}}decodeEventLog(eventFragment,data,topics){if("string"==typeof eventFragment&&(eventFragment=this.getEvent(eventFragment)),null!=topics&&!eventFragment.anonymous){let topicHash=this.getEventTopic(eventFragment);lib_esm_isHexString(topics[0],32)&&topics[0].toLowerCase()===topicHash||interface_logger.throwError("fragment/topic mismatch",Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:topicHash,value:topics[0]}),topics=topics.slice(1)}let indexed=[],nonIndexed=[],dynamic=[];eventFragment.inputs.forEach(((param,index)=>{param.indexed?"string"===param.type||"bytes"===param.type||"tuple"===param.baseType||"array"===param.baseType?(indexed.push(ParamType.fromObject({type:"bytes32",name:param.name})),dynamic.push(!0)):(indexed.push(param),dynamic.push(!1)):(nonIndexed.push(param),dynamic.push(!1))}));let resultIndexed=null!=topics?this._abiCoder.decode(indexed,concat(topics)):null,resultNonIndexed=this._abiCoder.decode(nonIndexed,data,!0),result=[],nonIndexedIndex=0,indexedIndex=0;eventFragment.inputs.forEach(((param,index)=>{if(param.indexed)if(null==resultIndexed)result[index]=new Indexed({_isIndexed:!0,hash:null});else if(dynamic[index])result[index]=new Indexed({_isIndexed:!0,hash:resultIndexed[indexedIndex++]});else try{result[index]=resultIndexed[indexedIndex++]}catch(error){result[index]=error}else try{result[index]=resultNonIndexed[nonIndexedIndex++]}catch(error){result[index]=error}if(param.name&&null==result[param.name]){const value=result[index];value instanceof Error?Object.defineProperty(result,param.name,{enumerable:!0,get:()=>{throw wrapAccessError(`property ${JSON.stringify(param.name)}`,value)}}):result[param.name]=value}}));for(let i=0;i<result.length;i++){const value=result[i];value instanceof Error&&Object.defineProperty(result,i,{enumerable:!0,get:()=>{throw wrapAccessError(`index ${i}`,value)}})}return Object.freeze(result)}parseTransaction(tx){let fragment=this.getFunction(tx.data.substring(0,10).toLowerCase());return fragment?new TransactionDescription({args:this._abiCoder.decode(fragment.inputs,"0x"+tx.data.substring(10)),functionFragment:fragment,name:fragment.name,signature:fragment.format(),sighash:this.getSighash(fragment),value:BigNumber.from(tx.value||"0")}):null}parseLog(log){let fragment=this.getEvent(log.topics[0]);return!fragment||fragment.anonymous?null:new LogDescription({eventFragment:fragment,name:fragment.name,signature:fragment.format(),topic:this.getEventTopic(fragment),args:this.decodeEventLog(fragment,log.data,log.topics)})}parseError(data){const hexData=hexlify(data);let fragment=this.getError(hexData.substring(0,10).toLowerCase());return fragment?new ErrorDescription({args:this._abiCoder.decode(fragment.inputs,"0x"+hexData.substring(10)),errorFragment:fragment,name:fragment.name,signature:fragment.format(),sighash:this.getSighash(fragment)}):null}static isInterface(value){return!(!value||!value._isInterface)}}var lib_esm_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const abstract_provider_lib_esm_logger=new Logger("abstract-provider/5.6.1");class ForkEvent extends Description{static isForkEvent(value){return!(!value||!value._isForkEvent)}}class Provider{constructor(){abstract_provider_lib_esm_logger.checkAbstract(new.target,Provider),defineReadOnly(this,"_isProvider",!0)}getFeeData(){return lib_esm_awaiter(this,void 0,void 0,(function*(){const{block,gasPrice}=yield resolveProperties({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((error=>null))});let maxFeePerGas=null,maxPriorityFeePerGas=null;return block&&block.baseFeePerGas&&(maxPriorityFeePerGas=BigNumber.from("1500000000"),maxFeePerGas=block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas)),{maxFeePerGas,maxPriorityFeePerGas,gasPrice}}))}addListener(eventName,listener){return this.on(eventName,listener)}removeListener(eventName,listener){return this.off(eventName,listener)}static isProvider(value){return!(!value||!value._isProvider)}}var abstract_signer_lib_esm_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const abstract_signer_lib_esm_logger=new Logger("abstract-signer/5.6.2"),allowedTransactionKeys=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],forwardErrors=[Logger.errors.INSUFFICIENT_FUNDS,Logger.errors.NONCE_EXPIRED,Logger.errors.REPLACEMENT_UNDERPRICED];class Signer{constructor(){abstract_signer_lib_esm_logger.checkAbstract(new.target,Signer),defineReadOnly(this,"_isSigner",!0)}getBalance(blockTag){return abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),blockTag)}))}getTransactionCount(blockTag){return abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),blockTag)}))}estimateGas(transaction){return abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const tx=yield resolveProperties(this.checkTransaction(transaction));return yield this.provider.estimateGas(tx)}))}call(transaction,blockTag){return abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){this._checkProvider("call");const tx=yield resolveProperties(this.checkTransaction(transaction));return yield this.provider.call(tx,blockTag)}))}sendTransaction(transaction){return abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const tx=yield this.populateTransaction(transaction),signedTx=yield this.signTransaction(tx);return yield this.provider.sendTransaction(signedTx)}))}getChainId(){return abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(name){return abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(name)}))}checkTransaction(transaction){for(const key in transaction)-1===allowedTransactionKeys.indexOf(key)&&abstract_signer_lib_esm_logger.throwArgumentError("invalid transaction key: "+key,"transaction",transaction);const tx=shallowCopy(transaction);return null==tx.from?tx.from=this.getAddress():tx.from=Promise.all([Promise.resolve(tx.from),this.getAddress()]).then((result=>(result[0].toLowerCase()!==result[1].toLowerCase()&&abstract_signer_lib_esm_logger.throwArgumentError("from address mismatch","transaction",transaction),result[0]))),tx}populateTransaction(transaction){return abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){const tx=yield resolveProperties(this.checkTransaction(transaction));null!=tx.to&&(tx.to=Promise.resolve(tx.to).then((to=>abstract_signer_lib_esm_awaiter(this,void 0,void 0,(function*(){if(null==to)return null;const address=yield this.resolveName(to);return null==address&&abstract_signer_lib_esm_logger.throwArgumentError("provided ENS name resolves to null","tx.to",to),address})))),tx.to.catch((error=>{})));const hasEip1559=null!=tx.maxFeePerGas||null!=tx.maxPriorityFeePerGas;if(null==tx.gasPrice||2!==tx.type&&!hasEip1559?0!==tx.type&&1!==tx.type||!hasEip1559||abstract_signer_lib_esm_logger.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",transaction):abstract_signer_lib_esm_logger.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",transaction),2!==tx.type&&null!=tx.type||null==tx.maxFeePerGas||null==tx.maxPriorityFeePerGas)if(0===tx.type||1===tx.type)null==tx.gasPrice&&(tx.gasPrice=this.getGasPrice());else{const feeData=yield this.getFeeData();if(null==tx.type)if(null!=feeData.maxFeePerGas&&null!=feeData.maxPriorityFeePerGas)if(tx.type=2,null!=tx.gasPrice){const gasPrice=tx.gasPrice;delete tx.gasPrice,tx.maxFeePerGas=gasPrice,tx.maxPriorityFeePerGas=gasPrice}else null==tx.maxFeePerGas&&(tx.maxFeePerGas=feeData.maxFeePerGas),null==tx.maxPriorityFeePerGas&&(tx.maxPriorityFeePerGas=feeData.maxPriorityFeePerGas);else null!=feeData.gasPrice?(hasEip1559&&abstract_signer_lib_esm_logger.throwError("network does not support EIP-1559",Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==tx.gasPrice&&(tx.gasPrice=feeData.gasPrice),tx.type=0):abstract_signer_lib_esm_logger.throwError("failed to get consistent fee data",Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===tx.type&&(null==tx.maxFeePerGas&&(tx.maxFeePerGas=feeData.maxFeePerGas),null==tx.maxPriorityFeePerGas&&(tx.maxPriorityFeePerGas=feeData.maxPriorityFeePerGas))}else tx.type=2;return null==tx.nonce&&(tx.nonce=this.getTransactionCount("pending")),null==tx.gasLimit&&(tx.gasLimit=this.estimateGas(tx).catch((error=>{if(forwardErrors.indexOf(error.code)>=0)throw error;return abstract_signer_lib_esm_logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error,tx})}))),null==tx.chainId?tx.chainId=this.getChainId():tx.chainId=Promise.all([Promise.resolve(tx.chainId),this.getChainId()]).then((results=>(0!==results[1]&&results[0]!==results[1]&&abstract_signer_lib_esm_logger.throwArgumentError("chainId address mismatch","transaction",transaction),results[0]))),yield resolveProperties(tx)}))}_checkProvider(operation){this.provider||abstract_signer_lib_esm_logger.throwError("missing provider",Logger.errors.UNSUPPORTED_OPERATION,{operation:operation||"_checkProvider"})}static isSigner(value){return!(!value||!value._isSigner)}}class VoidSigner extends Signer{constructor(address,provider){super(),defineReadOnly(this,"address",address),defineReadOnly(this,"provider",provider||null)}getAddress(){return Promise.resolve(this.address)}_fail(message,operation){return Promise.resolve().then((()=>{abstract_signer_lib_esm_logger.throwError(message,Logger.errors.UNSUPPORTED_OPERATION,{operation})}))}signMessage(message){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(transaction){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(domain,types,value){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(provider){return new VoidSigner(this.address,provider)}}var hash=__webpack_require__(3715),hash_default=__webpack_require__.n(hash);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self&&self;function createCommonjsModule(fn,basedir,module){return module={path:basedir,exports:{},require:function(path,base){return function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==base&&module.path)}},fn(module,module.exports),module.exports}var minimalisticAssert=assert;function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}assert.equal=function assertEqual(l,r,msg){if(l!=r)throw new Error(msg||"Assertion failed: "+l+" != "+r)};var utils_1=createCommonjsModule((function(module,exports){var utils=exports;function zero2(word){return 1===word.length?"0"+word:word}function toHex(msg){for(var res="",i=0;i<msg.length;i++)res+=zero2(msg[i].toString(16));return res}utils.toArray=function toArray(msg,enc){if(Array.isArray(msg))return msg.slice();if(!msg)return[];var res=[];if("string"!=typeof msg){for(var i=0;i<msg.length;i++)res[i]=0|msg[i];return res}if("hex"===enc){(msg=msg.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(msg="0"+msg);for(i=0;i<msg.length;i+=2)res.push(parseInt(msg[i]+msg[i+1],16))}else for(i=0;i<msg.length;i++){var c=msg.charCodeAt(i),hi=c>>8,lo=255&c;hi?res.push(hi,lo):res.push(lo)}return res},utils.zero2=zero2,utils.toHex=toHex,utils.encode=function encode(arr,enc){return"hex"===enc?toHex(arr):arr}})),utils_1$1=createCommonjsModule((function(module,exports){var utils=exports;utils.assert=minimalisticAssert,utils.toArray=utils_1.toArray,utils.zero2=utils_1.zero2,utils.toHex=utils_1.toHex,utils.encode=utils_1.encode,utils.getNAF=function getNAF(num,w,bits){var naf=new Array(Math.max(num.bitLength(),bits)+1);naf.fill(0);for(var ws=1<<w+1,k=num.clone(),i=0;i<naf.length;i++){var z,mod=k.andln(ws-1);k.isOdd()?(z=mod>(ws>>1)-1?(ws>>1)-mod:mod,k.isubn(z)):z=0,naf[i]=z,k.iushrn(1)}return naf},utils.getJSF=function getJSF(k1,k2){var jsf=[[],[]];k1=k1.clone(),k2=k2.clone();for(var m8,d1=0,d2=0;k1.cmpn(-d1)>0||k2.cmpn(-d2)>0;){var u1,u2,m14=k1.andln(3)+d1&3,m24=k2.andln(3)+d2&3;3===m14&&(m14=-1),3===m24&&(m24=-1),u1=0==(1&m14)?0:3!==(m8=k1.andln(7)+d1&7)&&5!==m8||2!==m24?m14:-m14,jsf[0].push(u1),u2=0==(1&m24)?0:3!==(m8=k2.andln(7)+d2&7)&&5!==m8||2!==m14?m24:-m24,jsf[1].push(u2),2*d1===u1+1&&(d1=1-d1),2*d2===u2+1&&(d2=1-d2),k1.iushrn(1),k2.iushrn(1)}return jsf},utils.cachedProperty=function cachedProperty(obj,name,computer){var key="_"+name;obj.prototype[name]=function cachedProperty(){return void 0!==this[key]?this[key]:this[key]=computer.call(this)}},utils.parseBytes=function parseBytes(bytes){return"string"==typeof bytes?utils.toArray(bytes,"hex"):bytes},utils.intFromLE=function intFromLE(bytes){return new(bn_default())(bytes,"hex","le")}})),getNAF=utils_1$1.getNAF,getJSF=utils_1$1.getJSF,assert$1=utils_1$1.assert;function BaseCurve(type,conf){this.type=type,this.p=new(bn_default())(conf.p,16),this.red=conf.prime?bn_default().red(conf.prime):bn_default().mont(this.p),this.zero=new(bn_default())(0).toRed(this.red),this.one=new(bn_default())(1).toRed(this.red),this.two=new(bn_default())(2).toRed(this.red),this.n=conf.n&&new(bn_default())(conf.n,16),this.g=conf.g&&this.pointFromJSON(conf.g,conf.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 adjustCount=this.n&&this.p.div(this.n);!adjustCount||adjustCount.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var base=BaseCurve;function BasePoint(curve,type){this.curve=curve,this.type=type,this.precomputed=null}BaseCurve.prototype.point=function point(){throw new Error("Not implemented")},BaseCurve.prototype.validate=function validate(){throw new Error("Not implemented")},BaseCurve.prototype._fixedNafMul=function _fixedNafMul(p,k){assert$1(p.precomputed);var doubles=p._getDoubles(),naf=getNAF(k,1,this._bitLength),I=(1<<doubles.step+1)-(doubles.step%2==0?2:1);I/=3;var j,nafW,repr=[];for(j=0;j<naf.length;j+=doubles.step){nafW=0;for(var l=j+doubles.step-1;l>=j;l--)nafW=(nafW<<1)+naf[l];repr.push(nafW)}for(var a=this.jpoint(null,null,null),b=this.jpoint(null,null,null),i=I;i>0;i--){for(j=0;j<repr.length;j++)(nafW=repr[j])===i?b=b.mixedAdd(doubles.points[j]):nafW===-i&&(b=b.mixedAdd(doubles.points[j].neg()));a=a.add(b)}return a.toP()},BaseCurve.prototype._wnafMul=function _wnafMul(p,k){var w=4,nafPoints=p._getNAFPoints(w);w=nafPoints.wnd;for(var wnd=nafPoints.points,naf=getNAF(k,w,this._bitLength),acc=this.jpoint(null,null,null),i=naf.length-1;i>=0;i--){for(var l=0;i>=0&&0===naf[i];i--)l++;if(i>=0&&l++,acc=acc.dblp(l),i<0)break;var z=naf[i];assert$1(0!==z),acc="affine"===p.type?z>0?acc.mixedAdd(wnd[z-1>>1]):acc.mixedAdd(wnd[-z-1>>1].neg()):z>0?acc.add(wnd[z-1>>1]):acc.add(wnd[-z-1>>1].neg())}return"affine"===p.type?acc.toP():acc},BaseCurve.prototype._wnafMulAdd=function _wnafMulAdd(defW,points,coeffs,len,jacobianResult){var i,j,p,wndWidth=this._wnafT1,wnd=this._wnafT2,naf=this._wnafT3,max=0;for(i=0;i<len;i++){var nafPoints=(p=points[i])._getNAFPoints(defW);wndWidth[i]=nafPoints.wnd,wnd[i]=nafPoints.points}for(i=len-1;i>=1;i-=2){var a=i-1,b=i;if(1===wndWidth[a]&&1===wndWidth[b]){var comb=[points[a],null,null,points[b]];0===points[a].y.cmp(points[b].y)?(comb[1]=points[a].add(points[b]),comb[2]=points[a].toJ().mixedAdd(points[b].neg())):0===points[a].y.cmp(points[b].y.redNeg())?(comb[1]=points[a].toJ().mixedAdd(points[b]),comb[2]=points[a].add(points[b].neg())):(comb[1]=points[a].toJ().mixedAdd(points[b]),comb[2]=points[a].toJ().mixedAdd(points[b].neg()));var index=[-3,-1,-5,-7,0,7,5,1,3],jsf=getJSF(coeffs[a],coeffs[b]);for(max=Math.max(jsf[0].length,max),naf[a]=new Array(max),naf[b]=new Array(max),j=0;j<max;j++){var ja=0|jsf[0][j],jb=0|jsf[1][j];naf[a][j]=index[3*(ja+1)+(jb+1)],naf[b][j]=0,wnd[a]=comb}}else naf[a]=getNAF(coeffs[a],wndWidth[a],this._bitLength),naf[b]=getNAF(coeffs[b],wndWidth[b],this._bitLength),max=Math.max(naf[a].length,max),max=Math.max(naf[b].length,max)}var acc=this.jpoint(null,null,null),tmp=this._wnafT4;for(i=max;i>=0;i--){for(var k=0;i>=0;){var zero=!0;for(j=0;j<len;j++)tmp[j]=0|naf[j][i],0!==tmp[j]&&(zero=!1);if(!zero)break;k++,i--}if(i>=0&&k++,acc=acc.dblp(k),i<0)break;for(j=0;j<len;j++){var z=tmp[j];0!==z&&(z>0?p=wnd[j][z-1>>1]:z<0&&(p=wnd[j][-z-1>>1].neg()),acc="affine"===p.type?acc.mixedAdd(p):acc.add(p))}}for(i=0;i<len;i++)wnd[i]=null;return jacobianResult?acc:acc.toP()},BaseCurve.BasePoint=BasePoint,BasePoint.prototype.eq=function eq(){throw new Error("Not implemented")},BasePoint.prototype.validate=function validate(){return this.curve.validate(this)},BaseCurve.prototype.decodePoint=function decodePoint(bytes,enc){bytes=utils_1$1.toArray(bytes,enc);var len=this.p.byteLength();if((4===bytes[0]||6===bytes[0]||7===bytes[0])&&bytes.length-1==2*len)return 6===bytes[0]?assert$1(bytes[bytes.length-1]%2==0):7===bytes[0]&&assert$1(bytes[bytes.length-1]%2==1),this.point(bytes.slice(1,1+len),bytes.slice(1+len,1+2*len));if((2===bytes[0]||3===bytes[0])&&bytes.length-1===len)return this.pointFromX(bytes.slice(1,1+len),3===bytes[0]);throw new Error("Unknown point format")},BasePoint.prototype.encodeCompressed=function encodeCompressed(enc){return this.encode(enc,!0)},BasePoint.prototype._encode=function _encode(compact){var len=this.curve.p.byteLength(),x=this.getX().toArray("be",len);return compact?[this.getY().isEven()?2:3].concat(x):[4].concat(x,this.getY().toArray("be",len))},BasePoint.prototype.encode=function encode(enc,compact){return utils_1$1.encode(this._encode(compact),enc)},BasePoint.prototype.precompute=function precompute(power){if(this.precomputed)return this;var precomputed={doubles:null,naf:null,beta:null};return precomputed.naf=this._getNAFPoints(8),precomputed.doubles=this._getDoubles(4,power),precomputed.beta=this._getBeta(),this.precomputed=precomputed,this},BasePoint.prototype._hasDoubles=function _hasDoubles(k){if(!this.precomputed)return!1;var doubles=this.precomputed.doubles;return!!doubles&&doubles.points.length>=Math.ceil((k.bitLength()+1)/doubles.step)},BasePoint.prototype._getDoubles=function _getDoubles(step,power){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var doubles=[this],acc=this,i=0;i<power;i+=step){for(var j=0;j<step;j++)acc=acc.dbl();doubles.push(acc)}return{step,points:doubles}},BasePoint.prototype._getNAFPoints=function _getNAFPoints(wnd){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var res=[this],max=(1<<wnd)-1,dbl=1===max?null:this.dbl(),i=1;i<max;i++)res[i]=res[i-1].add(dbl);return{wnd,points:res}},BasePoint.prototype._getBeta=function _getBeta(){return null},BasePoint.prototype.dblp=function dblp(k){for(var r=this,i=0;i<k;i++)r=r.dbl();return r};var inherits_browser=createCommonjsModule((function(module){"function"==typeof Object.create?module.exports=function inherits(ctor,superCtor){superCtor&&(ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}}))}:module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}}})),assert$2=utils_1$1.assert;function ShortCurve(conf){base.call(this,"short",conf),this.a=new(bn_default())(conf.a,16).toRed(this.red),this.b=new(bn_default())(conf.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(conf),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}inherits_browser(ShortCurve,base);var short_1=ShortCurve;function Point(curve,x,y,isRed){base.BasePoint.call(this,curve,"affine"),null===x&&null===y?(this.x=null,this.y=null,this.inf=!0):(this.x=new(bn_default())(x,16),this.y=new(bn_default())(y,16),isRed&&(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 JPoint(curve,x,y,z){base.BasePoint.call(this,curve,"jacobian"),null===x&&null===y&&null===z?(this.x=this.curve.one,this.y=this.curve.one,this.z=new(bn_default())(0)):(this.x=new(bn_default())(x,16),this.y=new(bn_default())(y,16),this.z=new(bn_default())(z,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}ShortCurve.prototype._getEndomorphism=function _getEndomorphism(conf){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var beta,lambda;if(conf.beta)beta=new(bn_default())(conf.beta,16).toRed(this.red);else{var betas=this._getEndoRoots(this.p);beta=(beta=betas[0].cmp(betas[1])<0?betas[0]:betas[1]).toRed(this.red)}if(conf.lambda)lambda=new(bn_default())(conf.lambda,16);else{var lambdas=this._getEndoRoots(this.n);0===this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta))?lambda=lambdas[0]:(lambda=lambdas[1],assert$2(0===this.g.mul(lambda).x.cmp(this.g.x.redMul(beta))))}return{beta,lambda,basis:conf.basis?conf.basis.map((function(vec){return{a:new(bn_default())(vec.a,16),b:new(bn_default())(vec.b,16)}})):this._getEndoBasis(lambda)}}},ShortCurve.prototype._getEndoRoots=function _getEndoRoots(num){var red=num===this.p?this.red:bn_default().mont(num),tinv=new(bn_default())(2).toRed(red).redInvm(),ntinv=tinv.redNeg(),s=new(bn_default())(3).toRed(red).redNeg().redSqrt().redMul(tinv);return[ntinv.redAdd(s).fromRed(),ntinv.redSub(s).fromRed()]},ShortCurve.prototype._getEndoBasis=function _getEndoBasis(lambda){for(var a0,b0,a1,b1,a2,b2,prevR,r,x,aprxSqrt=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=lambda,v=this.n.clone(),x1=new(bn_default())(1),y1=new(bn_default())(0),x2=new(bn_default())(0),y2=new(bn_default())(1),i=0;0!==u.cmpn(0);){var q=v.div(u);r=v.sub(q.mul(u)),x=x2.sub(q.mul(x1));var y=y2.sub(q.mul(y1));if(!a1&&r.cmp(aprxSqrt)<0)a0=prevR.neg(),b0=x1,a1=r.neg(),b1=x;else if(a1&&2==++i)break;prevR=r,v=u,u=r,x2=x1,x1=x,y2=y1,y1=y}a2=r.neg(),b2=x;var len1=a1.sqr().add(b1.sqr());return a2.sqr().add(b2.sqr()).cmp(len1)>=0&&(a2=a0,b2=b0),a1.negative&&(a1=a1.neg(),b1=b1.neg()),a2.negative&&(a2=a2.neg(),b2=b2.neg()),[{a:a1,b:b1},{a:a2,b:b2}]},ShortCurve.prototype._endoSplit=function _endoSplit(k){var basis=this.endo.basis,v1=basis[0],v2=basis[1],c1=v2.b.mul(k).divRound(this.n),c2=v1.b.neg().mul(k).divRound(this.n),p1=c1.mul(v1.a),p2=c2.mul(v2.a),q1=c1.mul(v1.b),q2=c2.mul(v2.b);return{k1:k.sub(p1).sub(p2),k2:q1.add(q2).neg()}},ShortCurve.prototype.pointFromX=function pointFromX(x,odd){(x=new(bn_default())(x,16)).red||(x=x.toRed(this.red));var y2=x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b),y=y2.redSqrt();if(0!==y.redSqr().redSub(y2).cmp(this.zero))throw new Error("invalid point");var isOdd=y.fromRed().isOdd();return(odd&&!isOdd||!odd&&isOdd)&&(y=y.redNeg()),this.point(x,y)},ShortCurve.prototype.validate=function validate(point){if(point.inf)return!0;var x=point.x,y=point.y,ax=this.a.redMul(x),rhs=x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);return 0===y.redSqr().redISub(rhs).cmpn(0)},ShortCurve.prototype._endoWnafMulAdd=function _endoWnafMulAdd(points,coeffs,jacobianResult){for(var npoints=this._endoWnafT1,ncoeffs=this._endoWnafT2,i=0;i<points.length;i++){var split=this._endoSplit(coeffs[i]),p=points[i],beta=p._getBeta();split.k1.negative&&(split.k1.ineg(),p=p.neg(!0)),split.k2.negative&&(split.k2.ineg(),beta=beta.neg(!0)),npoints[2*i]=p,npoints[2*i+1]=beta,ncoeffs[2*i]=split.k1,ncoeffs[2*i+1]=split.k2}for(var res=this._wnafMulAdd(1,npoints,ncoeffs,2*i,jacobianResult),j=0;j<2*i;j++)npoints[j]=null,ncoeffs[j]=null;return res},inherits_browser(Point,base.BasePoint),ShortCurve.prototype.point=function point(x,y,isRed){return new Point(this,x,y,isRed)},ShortCurve.prototype.pointFromJSON=function pointFromJSON(obj,red){return Point.fromJSON(this,obj,red)},Point.prototype._getBeta=function _getBeta(){if(this.curve.endo){var pre=this.precomputed;if(pre&&pre.beta)return pre.beta;var beta=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(pre){var curve=this.curve,endoMul=function(p){return curve.point(p.x.redMul(curve.endo.beta),p.y)};pre.beta=beta,beta.precomputed={beta:null,naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(endoMul)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(endoMul)}}}return beta}},Point.prototype.toJSON=function toJSON(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Point.fromJSON=function fromJSON(curve,obj,red){"string"==typeof obj&&(obj=JSON.parse(obj));var res=curve.point(obj[0],obj[1],red);if(!obj[2])return res;function obj2point(obj){return curve.point(obj[0],obj[1],red)}var pre=obj[2];return res.precomputed={beta:null,doubles:pre.doubles&&{step:pre.doubles.step,points:[res].concat(pre.doubles.points.map(obj2point))},naf:pre.naf&&{wnd:pre.naf.wnd,points:[res].concat(pre.naf.points.map(obj2point))}},res},Point.prototype.inspect=function inspect(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Point.prototype.isInfinity=function isInfinity(){return this.inf},Point.prototype.add=function add(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(0===this.x.cmp(p.x))return this.curve.point(null,null);var c=this.y.redSub(p.y);0!==c.cmpn(0)&&(c=c.redMul(this.x.redSub(p.x).redInvm()));var nx=c.redSqr().redISub(this.x).redISub(p.x),ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)},Point.prototype.dbl=function dbl(){if(this.inf)return this;var ys1=this.y.redAdd(this.y);if(0===ys1.cmpn(0))return this.curve.point(null,null);var a=this.curve.a,x2=this.x.redSqr(),dyinv=ys1.redInvm(),c=x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv),nx=c.redSqr().redISub(this.x.redAdd(this.x)),ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)},Point.prototype.getX=function getX(){return this.x.fromRed()},Point.prototype.getY=function getY(){return this.y.fromRed()},Point.prototype.mul=function mul(k){return k=new(bn_default())(k,16),this.isInfinity()?this:this._hasDoubles(k)?this.curve._fixedNafMul(this,k):this.curve.endo?this.curve._endoWnafMulAdd([this],[k]):this.curve._wnafMul(this,k)},Point.prototype.mulAdd=function mulAdd(k1,p2,k2){var points=[this,p2],coeffs=[k1,k2];return this.curve.endo?this.curve._endoWnafMulAdd(points,coeffs):this.curve._wnafMulAdd(1,points,coeffs,2)},Point.prototype.jmulAdd=function jmulAdd(k1,p2,k2){var points=[this,p2],coeffs=[k1,k2];return this.curve.endo?this.curve._endoWnafMulAdd(points,coeffs,!0):this.curve._wnafMulAdd(1,points,coeffs,2,!0)},Point.prototype.eq=function eq(p){return this===p||this.inf===p.inf&&(this.inf||0===this.x.cmp(p.x)&&0===this.y.cmp(p.y))},Point.prototype.neg=function neg(_precompute){if(this.inf)return this;var res=this.curve.point(this.x,this.y.redNeg());if(_precompute&&this.precomputed){var pre=this.precomputed,negate=function(p){return p.neg()};res.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(negate)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(negate)}}}return res},Point.prototype.toJ=function toJ(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},inherits_browser(JPoint,base.BasePoint),ShortCurve.prototype.jpoint=function jpoint(x,y,z){return new JPoint(this,x,y,z)},JPoint.prototype.toP=function toP(){if(this.isInfinity())return this.curve.point(null,null);var zinv=this.z.redInvm(),zinv2=zinv.redSqr(),ax=this.x.redMul(zinv2),ay=this.y.redMul(zinv2).redMul(zinv);return this.curve.point(ax,ay)},JPoint.prototype.neg=function neg(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},JPoint.prototype.add=function add(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var pz2=p.z.redSqr(),z2=this.z.redSqr(),u1=this.x.redMul(pz2),u2=p.x.redMul(z2),s1=this.y.redMul(pz2.redMul(p.z)),s2=p.y.redMul(z2.redMul(this.z)),h=u1.redSub(u2),r=s1.redSub(s2);if(0===h.cmpn(0))return 0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=h.redSqr(),h3=h2.redMul(h),v=u1.redMul(h2),nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v),ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)),nz=this.z.redMul(p.z).redMul(h);return this.curve.jpoint(nx,ny,nz)},JPoint.prototype.mixedAdd=function mixedAdd(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var z2=this.z.redSqr(),u1=this.x,u2=p.x.redMul(z2),s1=this.y,s2=p.y.redMul(z2).redMul(this.z),h=u1.redSub(u2),r=s1.redSub(s2);if(0===h.cmpn(0))return 0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=h.redSqr(),h3=h2.redMul(h),v=u1.redMul(h2),nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v),ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)),nz=this.z.redMul(h);return this.curve.jpoint(nx,ny,nz)},JPoint.prototype.dblp=function dblp(pow){if(0===pow)return this;if(this.isInfinity())return this;if(!pow)return this.dbl();var i;if(this.curve.zeroA||this.curve.threeA){var r=this;for(i=0;i<pow;i++)r=r.dbl();return r}var a=this.curve.a,tinv=this.curve.tinv,jx=this.x,jy=this.y,jz=this.z,jz4=jz.redSqr().redSqr(),jyd=jy.redAdd(jy);for(i=0;i<pow;i++){var jx2=jx.redSqr(),jyd2=jyd.redSqr(),jyd4=jyd2.redSqr(),c=jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)),t1=jx.redMul(jyd2),nx=c.redSqr().redISub(t1.redAdd(t1)),t2=t1.redISub(nx),dny=c.redMul(t2);dny=dny.redIAdd(dny).redISub(jyd4);var nz=jyd.redMul(jz);i+1<pow&&(jz4=jz4.redMul(jyd4)),jx=nx,jz=nz,jyd=dny}return this.curve.jpoint(jx,jyd.redMul(tinv),jz)},JPoint.prototype.dbl=function dbl(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},JPoint.prototype._zeroDbl=function _zeroDbl(){var nx,ny,nz;if(this.zOne){var xx=this.x.redSqr(),yy=this.y.redSqr(),yyyy=yy.redSqr(),s=this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);s=s.redIAdd(s);var m=xx.redAdd(xx).redIAdd(xx),t=m.redSqr().redISub(s).redISub(s),yyyy8=yyyy.redIAdd(yyyy);yyyy8=(yyyy8=yyyy8.redIAdd(yyyy8)).redIAdd(yyyy8),nx=t,ny=m.redMul(s.redISub(t)).redISub(yyyy8),nz=this.y.redAdd(this.y)}else{var a=this.x.redSqr(),b=this.y.redSqr(),c=b.redSqr(),d=this.x.redAdd(b).redSqr().redISub(a).redISub(c);d=d.redIAdd(d);var e=a.redAdd(a).redIAdd(a),f=e.redSqr(),c8=c.redIAdd(c);c8=(c8=c8.redIAdd(c8)).redIAdd(c8),nx=f.redISub(d).redISub(d),ny=e.redMul(d.redISub(nx)).redISub(c8),nz=(nz=this.y.redMul(this.z)).redIAdd(nz)}return this.curve.jpoint(nx,ny,nz)},JPoint.prototype._threeDbl=function _threeDbl(){var nx,ny,nz;if(this.zOne){var xx=this.x.redSqr(),yy=this.y.redSqr(),yyyy=yy.redSqr(),s=this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);s=s.redIAdd(s);var m=xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a),t=m.redSqr().redISub(s).redISub(s);nx=t;var yyyy8=yyyy.redIAdd(yyyy);yyyy8=(yyyy8=yyyy8.redIAdd(yyyy8)).redIAdd(yyyy8),ny=m.redMul(s.redISub(t)).redISub(yyyy8),nz=this.y.redAdd(this.y)}else{var delta=this.z.redSqr(),gamma=this.y.redSqr(),beta=this.x.redMul(gamma),alpha=this.x.redSub(delta).redMul(this.x.redAdd(delta));alpha=alpha.redAdd(alpha).redIAdd(alpha);var beta4=beta.redIAdd(beta),beta8=(beta4=beta4.redIAdd(beta4)).redAdd(beta4);nx=alpha.redSqr().redISub(beta8),nz=this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);var ggamma8=gamma.redSqr();ggamma8=(ggamma8=(ggamma8=ggamma8.redIAdd(ggamma8)).redIAdd(ggamma8)).redIAdd(ggamma8),ny=alpha.redMul(beta4.redISub(nx)).redISub(ggamma8)}return this.curve.jpoint(nx,ny,nz)},JPoint.prototype._dbl=function _dbl(){var a=this.curve.a,jx=this.x,jy=this.y,jz=this.z,jz4=jz.redSqr().redSqr(),jx2=jx.redSqr(),jy2=jy.redSqr(),c=jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)),jxd4=jx.redAdd(jx),t1=(jxd4=jxd4.redIAdd(jxd4)).redMul(jy2),nx=c.redSqr().redISub(t1.redAdd(t1)),t2=t1.redISub(nx),jyd8=jy2.redSqr();jyd8=(jyd8=(jyd8=jyd8.redIAdd(jyd8)).redIAdd(jyd8)).redIAdd(jyd8);var ny=c.redMul(t2).redISub(jyd8),nz=jy.redAdd(jy).redMul(jz);return this.curve.jpoint(nx,ny,nz)},JPoint.prototype.trpl=function trpl(){if(!this.curve.zeroA)return this.dbl().add(this);var xx=this.x.redSqr(),yy=this.y.redSqr(),zz=this.z.redSqr(),yyyy=yy.redSqr(),m=xx.redAdd(xx).redIAdd(xx),mm=m.redSqr(),e=this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy),ee=(e=(e=(e=e.redIAdd(e)).redAdd(e).redIAdd(e)).redISub(mm)).redSqr(),t=yyyy.redIAdd(yyyy);t=(t=(t=t.redIAdd(t)).redIAdd(t)).redIAdd(t);var u=m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t),yyu4=yy.redMul(u);yyu4=(yyu4=yyu4.redIAdd(yyu4)).redIAdd(yyu4);var nx=this.x.redMul(ee).redISub(yyu4);nx=(nx=nx.redIAdd(nx)).redIAdd(nx);var ny=this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));ny=(ny=(ny=ny.redIAdd(ny)).redIAdd(ny)).redIAdd(ny);var nz=this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);return this.curve.jpoint(nx,ny,nz)},JPoint.prototype.mul=function mul(k,kbase){return k=new(bn_default())(k,kbase),this.curve._wnafMul(this,k)},JPoint.prototype.eq=function eq(p){if("affine"===p.type)return this.eq(p.toJ());if(this===p)return!0;var z2=this.z.redSqr(),pz2=p.z.redSqr();if(0!==this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0))return!1;var z3=z2.redMul(this.z),pz3=pz2.redMul(p.z);return 0===this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0)},JPoint.prototype.eqXToP=function eqXToP(x){var zs=this.z.redSqr(),rx=x.toRed(this.curve.red).redMul(zs);if(0===this.x.cmp(rx))return!0;for(var xc=x.clone(),t=this.curve.redN.redMul(zs);;){if(xc.iadd(this.curve.n),xc.cmp(this.curve.p)>=0)return!1;if(rx.redIAdd(t),0===this.x.cmp(rx))return!0}},JPoint.prototype.inspect=function inspect(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},JPoint.prototype.isInfinity=function isInfinity(){return 0===this.z.cmpn(0)};var curve_1=createCommonjsModule((function(module,exports){var curve=exports;curve.base=base,curve.short=short_1,curve.mont=null,curve.edwards=null})),curves_1=createCommonjsModule((function(module,exports){var pre,curves=exports,assert=utils_1$1.assert;function PresetCurve(options){"short"===options.type?this.curve=new curve_1.short(options):"edwards"===options.type?this.curve=new curve_1.edwards(options):this.curve=new curve_1.mont(options),this.g=this.curve.g,this.n=this.curve.n,this.hash=options.hash,assert(this.g.validate(),"Invalid curve"),assert(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function defineCurve(name,options){Object.defineProperty(curves,name,{configurable:!0,enumerable:!0,get:function(){var curve=new PresetCurve(options);return Object.defineProperty(curves,name,{configurable:!0,enumerable:!0,value:curve}),curve}})}curves.PresetCurve=PresetCurve,defineCurve("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:hash_default().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),defineCurve("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:hash_default().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),defineCurve("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:hash_default().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),defineCurve("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:hash_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"]}),defineCurve("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:hash_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"]}),defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash_default().sha256,gRed:!1,g:["9"]}),defineCurve("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:hash_default().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{pre=null.crash()}catch(e){pre=void 0}defineCurve("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:hash_default().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]})}));function HmacDRBG(options){if(!(this instanceof HmacDRBG))return new HmacDRBG(options);this.hash=options.hash,this.predResist=!!options.predResist,this.outLen=this.hash.outSize,this.minEntropy=options.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var entropy=utils_1.toArray(options.entropy,options.entropyEnc||"hex"),nonce=utils_1.toArray(options.nonce,options.nonceEnc||"hex"),pers=utils_1.toArray(options.pers,options.persEnc||"hex");minimalisticAssert(entropy.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(entropy,nonce,pers)}var hmacDrbg=HmacDRBG;HmacDRBG.prototype._init=function init(entropy,nonce,pers){var seed=entropy.concat(nonce).concat(pers);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(seed),this._reseed=1,this.reseedInterval=281474976710656},HmacDRBG.prototype._hmac=function hmac(){return new(hash_default().hmac)(this.hash,this.K)},HmacDRBG.prototype._update=function update(seed){var kmac=this._hmac().update(this.V).update([0]);seed&&(kmac=kmac.update(seed)),this.K=kmac.digest(),this.V=this._hmac().update(this.V).digest(),seed&&(this.K=this._hmac().update(this.V).update([1]).update(seed).digest(),this.V=this._hmac().update(this.V).digest())},HmacDRBG.prototype.reseed=function reseed(entropy,entropyEnc,add,addEnc){"string"!=typeof entropyEnc&&(addEnc=add,add=entropyEnc,entropyEnc=null),entropy=utils_1.toArray(entropy,entropyEnc),add=utils_1.toArray(add,addEnc),minimalisticAssert(entropy.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(entropy.concat(add||[])),this._reseed=1},HmacDRBG.prototype.generate=function generate(len,enc,add,addEnc){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof enc&&(addEnc=add,add=enc,enc=null),add&&(add=utils_1.toArray(add,addEnc||"hex"),this._update(add));for(var temp=[];temp.length<len;)this.V=this._hmac().update(this.V).digest(),temp=temp.concat(this.V);var res=temp.slice(0,len);return this._update(add),this._reseed++,utils_1.encode(res,enc)};var assert$3=utils_1$1.assert;function KeyPair(ec,options){this.ec=ec,this.priv=null,this.pub=null,options.priv&&this._importPrivate(options.priv,options.privEnc),options.pub&&this._importPublic(options.pub,options.pubEnc)}var key=KeyPair;KeyPair.fromPublic=function fromPublic(ec,pub,enc){return pub instanceof KeyPair?pub:new KeyPair(ec,{pub,pubEnc:enc})},KeyPair.fromPrivate=function fromPrivate(ec,priv,enc){return priv instanceof KeyPair?priv:new KeyPair(ec,{priv,privEnc:enc})},KeyPair.prototype.validate=function validate(){var pub=this.getPublic();return pub.isInfinity()?{result:!1,reason:"Invalid public key"}:pub.validate()?pub.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"}},KeyPair.prototype.getPublic=function getPublic(compact,enc){return"string"==typeof compact&&(enc=compact,compact=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),enc?this.pub.encode(enc,compact):this.pub},KeyPair.prototype.getPrivate=function getPrivate(enc){return"hex"===enc?this.priv.toString(16,2):this.priv},KeyPair.prototype._importPrivate=function _importPrivate(key,enc){this.priv=new(bn_default())(key,enc||16),this.priv=this.priv.umod(this.ec.curve.n)},KeyPair.prototype._importPublic=function _importPublic(key,enc){if(key.x||key.y)return"mont"===this.ec.curve.type?assert$3(key.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||assert$3(key.x&&key.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(key.x,key.y));this.pub=this.ec.curve.decodePoint(key,enc)},KeyPair.prototype.derive=function derive(pub){return pub.validate()||assert$3(pub.validate(),"public point not validated"),pub.mul(this.priv).getX()},KeyPair.prototype.sign=function sign(msg,enc,options){return this.ec.sign(msg,this,enc,options)},KeyPair.prototype.verify=function verify(msg,signature){return this.ec.verify(msg,signature,this)},KeyPair.prototype.inspect=function inspect(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var assert$4=utils_1$1.assert;function Signature(options,enc){if(options instanceof Signature)return options;this._importDER(options,enc)||(assert$4(options.r&&options.s,"Signature without r or s"),this.r=new(bn_default())(options.r,16),this.s=new(bn_default())(options.s,16),void 0===options.recoveryParam?this.recoveryParam=null:this.recoveryParam=options.recoveryParam)}var signature=Signature;function Position(){this.place=0}function getLength(buf,p){var initial=buf[p.place++];if(!(128&initial))return initial;var octetLen=15&initial;if(0===octetLen||octetLen>4)return!1;for(var val=0,i=0,off=p.place;i<octetLen;i++,off++)val<<=8,val|=buf[off],val>>>=0;return!(val<=127)&&(p.place=off,val)}function rmPadding(buf){for(var i=0,len=buf.length-1;!buf[i]&&!(128&buf[i+1])&&i<len;)i++;return 0===i?buf:buf.slice(i)}function constructLength(arr,len){if(len<128)arr.push(len);else{var octets=1+(Math.log(len)/Math.LN2>>>3);for(arr.push(128|octets);--octets;)arr.push(len>>>(octets<<3)&255);arr.push(len)}}Signature.prototype._importDER=function _importDER(data,enc){data=utils_1$1.toArray(data,enc);var p=new Position;if(48!==data[p.place++])return!1;var len=getLength(data,p);if(!1===len)return!1;if(len+p.place!==data.length)return!1;if(2!==data[p.place++])return!1;var rlen=getLength(data,p);if(!1===rlen)return!1;var r=data.slice(p.place,rlen+p.place);if(p.place+=rlen,2!==data[p.place++])return!1;var slen=getLength(data,p);if(!1===slen)return!1;if(data.length!==slen+p.place)return!1;var s=data.slice(p.place,slen+p.place);if(0===r[0]){if(!(128&r[1]))return!1;r=r.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new(bn_default())(r),this.s=new(bn_default())(s),this.recoveryParam=null,!0},Signature.prototype.toDER=function toDER(enc){var r=this.r.toArray(),s=this.s.toArray();for(128&r[0]&&(r=[0].concat(r)),128&s[0]&&(s=[0].concat(s)),r=rmPadding(r),s=rmPadding(s);!(s[0]||128&s[1]);)s=s.slice(1);var arr=[2];constructLength(arr,r.length),(arr=arr.concat(r)).push(2),constructLength(arr,s.length);var backHalf=arr.concat(s),res=[48];return constructLength(res,backHalf.length),res=res.concat(backHalf),utils_1$1.encode(res,enc)};var rand=function(){throw new Error("unsupported")},assert$5=utils_1$1.assert;function EC(options){if(!(this instanceof EC))return new EC(options);"string"==typeof options&&(assert$5(Object.prototype.hasOwnProperty.call(curves_1,options),"Unknown curve "+options),options=curves_1[options]),options instanceof curves_1.PresetCurve&&(options={curve:options}),this.curve=options.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=options.curve.g,this.g.precompute(options.curve.n.bitLength()+1),this.hash=options.hash||options.curve.hash}var ec=EC;EC.prototype.keyPair=function keyPair(options){return new key(this,options)},EC.prototype.keyFromPrivate=function keyFromPrivate(priv,enc){return key.fromPrivate(this,priv,enc)},EC.prototype.keyFromPublic=function keyFromPublic(pub,enc){return key.fromPublic(this,pub,enc)},EC.prototype.genKeyPair=function genKeyPair(options){options||(options={});for(var drbg=new hmacDrbg({hash:this.hash,pers:options.pers,persEnc:options.persEnc||"utf8",entropy:options.entropy||rand(this.hash.hmacStrength),entropyEnc:options.entropy&&options.entropyEnc||"utf8",nonce:this.n.toArray()}),bytes=this.n.byteLength(),ns2=this.n.sub(new(bn_default())(2));;){var priv=new(bn_default())(drbg.generate(bytes));if(!(priv.cmp(ns2)>0))return priv.iaddn(1),this.keyFromPrivate(priv)}},EC.prototype._truncateToN=function _truncateToN(msg,truncOnly){var delta=8*msg.byteLength()-this.n.bitLength();return delta>0&&(msg=msg.ushrn(delta)),!truncOnly&&msg.cmp(this.n)>=0?msg.sub(this.n):msg},EC.prototype.sign=function sign(msg,key,enc,options){"object"==typeof enc&&(options=enc,enc=null),options||(options={}),key=this.keyFromPrivate(key,enc),msg=this._truncateToN(new(bn_default())(msg,16));for(var bytes=this.n.byteLength(),bkey=key.getPrivate().toArray("be",bytes),nonce=msg.toArray("be",bytes),drbg=new hmacDrbg({hash:this.hash,entropy:bkey,nonce,pers:options.pers,persEnc:options.persEnc||"utf8"}),ns1=this.n.sub(new(bn_default())(1)),iter=0;;iter++){var k=options.k?options.k(iter):new(bn_default())(drbg.generate(this.n.byteLength()));if(!((k=this._truncateToN(k,!0)).cmpn(1)<=0||k.cmp(ns1)>=0)){var kp=this.g.mul(k);if(!kp.isInfinity()){var kpX=kp.getX(),r=kpX.umod(this.n);if(0!==r.cmpn(0)){var s=k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));if(0!==(s=s.umod(this.n)).cmpn(0)){var recoveryParam=(kp.getY().isOdd()?1:0)|(0!==kpX.cmp(r)?2:0);return options.canonical&&s.cmp(this.nh)>0&&(s=this.n.sub(s),recoveryParam^=1),new signature({r,s,recoveryParam})}}}}}},EC.prototype.verify=function verify(msg,signature$1,key,enc){msg=this._truncateToN(new(bn_default())(msg,16)),key=this.keyFromPublic(key,enc);var r=(signature$1=new signature(signature$1,"hex")).r,s=signature$1.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var p,sinv=s.invm(this.n),u1=sinv.mul(msg).umod(this.n),u2=sinv.mul(r).umod(this.n);return this.curve._maxwellTrick?!(p=this.g.jmulAdd(u1,key.getPublic(),u2)).isInfinity()&&p.eqXToP(r):!(p=this.g.mulAdd(u1,key.getPublic(),u2)).isInfinity()&&0===p.getX().umod(this.n).cmp(r)},EC.prototype.recoverPubKey=function(msg,signature$1,j,enc){assert$5((3&j)===j,"The recovery param is more than two bits"),signature$1=new signature(signature$1,enc);var n=this.n,e=new(bn_default())(msg),r=signature$1.r,s=signature$1.s,isYOdd=1&j,isSecondKey=j>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&isSecondKey)throw new Error("Unable to find sencond key candinate");r=isSecondKey?this.curve.pointFromX(r.add(this.curve.n),isYOdd):this.curve.pointFromX(r,isYOdd);var rInv=signature$1.r.invm(n),s1=n.sub(e).mul(rInv).umod(n),s2=s.mul(rInv).umod(n);return this.g.mulAdd(s1,r,s2)},EC.prototype.getKeyRecoveryParam=function(e,signature$1,Q,enc){if(null!==(signature$1=new signature(signature$1,enc)).recoveryParam)return signature$1.recoveryParam;for(var i=0;i<4;i++){var Qprime;try{Qprime=this.recoverPubKey(e,signature$1,i)}catch(e){continue}if(Qprime.eq(Q))return i}throw new Error("Unable to find valid recovery factor")};var EC$1=createCommonjsModule((function(module,exports){var elliptic=exports;elliptic.version="6.5.4",elliptic.utils=utils_1$1,elliptic.rand=function(){throw new Error("unsupported")},elliptic.curve=curve_1,elliptic.curves=curves_1,elliptic.ec=ec,elliptic.eddsa=null})).ec;const signing_key_lib_esm_logger=new Logger("signing-key/5.6.2");let _curve=null;function getCurve(){return _curve||(_curve=new EC$1("secp256k1")),_curve}class SigningKey{constructor(privateKey){defineReadOnly(this,"curve","secp256k1"),defineReadOnly(this,"privateKey",hexlify(privateKey)),32!==hexDataLength(this.privateKey)&&signing_key_lib_esm_logger.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const keyPair=getCurve().keyFromPrivate(arrayify(this.privateKey));defineReadOnly(this,"publicKey","0x"+keyPair.getPublic(!1,"hex")),defineReadOnly(this,"compressedPublicKey","0x"+keyPair.getPublic(!0,"hex")),defineReadOnly(this,"_isSigningKey",!0)}_addPoint(other){const p0=getCurve().keyFromPublic(arrayify(this.publicKey)),p1=getCurve().keyFromPublic(arrayify(other));return"0x"+p0.pub.add(p1.pub).encodeCompressed("hex")}signDigest(digest){const keyPair=getCurve().keyFromPrivate(arrayify(this.privateKey)),digestBytes=arrayify(digest);32!==digestBytes.length&&signing_key_lib_esm_logger.throwArgumentError("bad digest length","digest",digest);const signature=keyPair.sign(digestBytes,{canonical:!0});return splitSignature({recoveryParam:signature.recoveryParam,r:hexZeroPad("0x"+signature.r.toString(16),32),s:hexZeroPad("0x"+signature.s.toString(16),32)})}computeSharedSecret(otherKey){const keyPair=getCurve().keyFromPrivate(arrayify(this.privateKey)),otherKeyPair=getCurve().keyFromPublic(arrayify(computePublicKey(otherKey)));return hexZeroPad("0x"+keyPair.derive(otherKeyPair.getPublic()).toString(16),32)}static isSigningKey(value){return!(!value||!value._isSigningKey)}}function recoverPublicKey(digest,signature){const sig=splitSignature(signature),rs={r:arrayify(sig.r),s:arrayify(sig.s)};return"0x"+getCurve().recoverPubKey(arrayify(digest),rs,sig.recoveryParam).encode("hex",!1)}function computePublicKey(key,compressed){const bytes=arrayify(key);if(32===bytes.length){const signingKey=new SigningKey(bytes);return compressed?"0x"+getCurve().keyFromPrivate(bytes).getPublic(!0,"hex"):signingKey.publicKey}return 33===bytes.length?compressed?hexlify(bytes):"0x"+getCurve().keyFromPublic(bytes).getPublic(!1,"hex"):65===bytes.length?compressed?"0x"+getCurve().keyFromPublic(bytes).getPublic(!0,"hex"):hexlify(bytes):signing_key_lib_esm_logger.throwArgumentError("invalid public or private key","key","[REDACTED]")}const transactions_lib_esm_logger=new Logger("transactions/5.6.2");var TransactionTypes;function handleAddress(value){return"0x"===value?null:getAddress(value)}function handleNumber(value){return"0x"===value?Zero:BigNumber.from(value)}!function(TransactionTypes){TransactionTypes[TransactionTypes.legacy=0]="legacy",TransactionTypes[TransactionTypes.eip2930=1]="eip2930",TransactionTypes[TransactionTypes.eip1559=2]="eip1559"}(TransactionTypes||(TransactionTypes={}));const transactionFields=[{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"}],lib_esm_allowedTransactionKeys={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function computeAddress(key){return getAddress(hexDataSlice(keccak256(hexDataSlice(computePublicKey(key),1)),12))}function recoverAddress(digest,signature){return computeAddress(recoverPublicKey(arrayify(digest),signature))}function formatNumber(value,name){const result=stripZeros(BigNumber.from(value).toHexString());return result.length>32&&transactions_lib_esm_logger.throwArgumentError("invalid length for "+name,"transaction:"+name,value),result}function accessSetify(addr,storageKeys){return{address:getAddress(addr),storageKeys:(storageKeys||[]).map(((storageKey,index)=>(32!==hexDataLength(storageKey)&&transactions_lib_esm_logger.throwArgumentError("invalid access list storageKey",`accessList[${addr}:${index}]`,storageKey),storageKey.toLowerCase())))}}function accessListify(value){if(Array.isArray(value))return value.map(((set,index)=>Array.isArray(set)?(set.length>2&&transactions_lib_esm_logger.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${index}]`,set),accessSetify(set[0],set[1])):accessSetify(set.address,set.storageKeys)));const result=Object.keys(value).map((addr=>{const storageKeys=value[addr].reduce(((accum,storageKey)=>(accum[storageKey]=!0,accum)),{});return accessSetify(addr,Object.keys(storageKeys).sort())}));return result.sort(((a,b)=>a.address.localeCompare(b.address))),result}function formatAccessList(value){return accessListify(value).map((set=>[set.address,set.storageKeys]))}function _serializeEip1559(transaction,signature){if(null!=transaction.gasPrice){const gasPrice=BigNumber.from(transaction.gasPrice),maxFeePerGas=BigNumber.from(transaction.maxFeePerGas||0);gasPrice.eq(maxFeePerGas)||transactions_lib_esm_logger.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice,maxFeePerGas})}const fields=[formatNumber(transaction.chainId||0,"chainId"),formatNumber(transaction.nonce||0,"nonce"),formatNumber(transaction.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),formatNumber(transaction.maxFeePerGas||0,"maxFeePerGas"),formatNumber(transaction.gasLimit||0,"gasLimit"),null!=transaction.to?getAddress(transaction.to):"0x",formatNumber(transaction.value||0,"value"),transaction.data||"0x",formatAccessList(transaction.accessList||[])];if(signature){const sig=splitSignature(signature);fields.push(formatNumber(sig.recoveryParam,"recoveryParam")),fields.push(stripZeros(sig.r)),fields.push(stripZeros(sig.s))}return hexConcat(["0x02",encode(fields)])}function _serializeEip2930(transaction,signature){const fields=[formatNumber(transaction.chainId||0,"chainId"),formatNumber(transaction.nonce||0,"nonce"),formatNumber(transaction.gasPrice||0,"gasPrice"),formatNumber(transaction.gasLimit||0,"gasLimit"),null!=transaction.to?getAddress(transaction.to):"0x",formatNumber(transaction.value||0,"value"),transaction.data||"0x",formatAccessList(transaction.accessList||[])];if(signature){const sig=splitSignature(signature);fields.push(formatNumber(sig.recoveryParam,"recoveryParam")),fields.push(stripZeros(sig.r)),fields.push(stripZeros(sig.s))}return hexConcat(["0x01",encode(fields)])}function serialize(transaction,signature){if(null==transaction.type||0===transaction.type)return null!=transaction.accessList&&transactions_lib_esm_logger.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",transaction),function _serialize(transaction,signature){checkProperties(transaction,lib_esm_allowedTransactionKeys);const raw=[];transactionFields.forEach((function(fieldInfo){let value=transaction[fieldInfo.name]||[];const options={};fieldInfo.numeric&&(options.hexPad="left"),value=arrayify(hexlify(value,options)),fieldInfo.length&&value.length!==fieldInfo.length&&value.length>0&&transactions_lib_esm_logger.throwArgumentError("invalid length for "+fieldInfo.name,"transaction:"+fieldInfo.name,value),fieldInfo.maxLength&&(value=stripZeros(value),value.length>fieldInfo.maxLength&&transactions_lib_esm_logger.throwArgumentError("invalid length for "+fieldInfo.name,"transaction:"+fieldInfo.name,value)),raw.push(hexlify(value))}));let chainId=0;if(null!=transaction.chainId?(chainId=transaction.chainId,"number"!=typeof chainId&&transactions_lib_esm_logger.throwArgumentError("invalid transaction.chainId","transaction",transaction)):signature&&!isBytesLike(signature)&&signature.v>28&&(chainId=Math.floor((signature.v-35)/2)),0!==chainId&&(raw.push(hexlify(chainId)),raw.push("0x"),raw.push("0x")),!signature)return encode(raw);const sig=splitSignature(signature);let v=27+sig.recoveryParam;return 0!==chainId?(raw.pop(),raw.pop(),raw.pop(),v+=2*chainId+8,sig.v>28&&sig.v!==v&&transactions_lib_esm_logger.throwArgumentError("transaction.chainId/signature.v mismatch","signature",signature)):sig.v!==v&&transactions_lib_esm_logger.throwArgumentError("transaction.chainId/signature.v mismatch","signature",signature),raw.push(hexlify(v)),raw.push(stripZeros(arrayify(sig.r))),raw.push(stripZeros(arrayify(sig.s))),encode(raw)}(transaction,signature);switch(transaction.type){case 1:return _serializeEip2930(transaction,signature);case 2:return _serializeEip1559(transaction,signature)}return transactions_lib_esm_logger.throwError(`unsupported transaction type: ${transaction.type}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:transaction.type})}function _parseEipSignature(tx,fields,serialize){try{const recid=handleNumber(fields[0]).toNumber();if(0!==recid&&1!==recid)throw new Error("bad recid");tx.v=recid}catch(error){transactions_lib_esm_logger.throwArgumentError("invalid v for transaction type: 1","v",fields[0])}tx.r=hexZeroPad(fields[1],32),tx.s=hexZeroPad(fields[2],32);try{const digest=keccak256(serialize(tx));tx.from=recoverAddress(digest,{r:tx.r,s:tx.s,recoveryParam:tx.v})}catch(error){}}function parse(rawTransaction){const payload=arrayify(rawTransaction);if(payload[0]>127)return function _parse(rawTransaction){const transaction=decode(rawTransaction);9!==transaction.length&&6!==transaction.length&&transactions_lib_esm_logger.throwArgumentError("invalid raw transaction","rawTransaction",rawTransaction);const tx={nonce:handleNumber(transaction[0]).toNumber(),gasPrice:handleNumber(transaction[1]),gasLimit:handleNumber(transaction[2]),to:handleAddress(transaction[3]),value:handleNumber(transaction[4]),data:transaction[5],chainId:0};if(6===transaction.length)return tx;try{tx.v=BigNumber.from(transaction[6]).toNumber()}catch(error){return tx}if(tx.r=hexZeroPad(transaction[7],32),tx.s=hexZeroPad(transaction[8],32),BigNumber.from(tx.r).isZero()&&BigNumber.from(tx.s).isZero())tx.chainId=tx.v,tx.v=0;else{tx.chainId=Math.floor((tx.v-35)/2),tx.chainId<0&&(tx.chainId=0);let recoveryParam=tx.v-27;const raw=transaction.slice(0,6);0!==tx.chainId&&(raw.push(hexlify(tx.chainId)),raw.push("0x"),raw.push("0x"),recoveryParam-=2*tx.chainId+8);const digest=keccak256(encode(raw));try{tx.from=recoverAddress(digest,{r:hexlify(tx.r),s:hexlify(tx.s),recoveryParam})}catch(error){}tx.hash=keccak256(rawTransaction)}return tx.type=null,tx}(payload);switch(payload[0]){case 1:return function _parseEip2930(payload){const transaction=decode(payload.slice(1));8!==transaction.length&&11!==transaction.length&&transactions_lib_esm_logger.throwArgumentError("invalid component count for transaction type: 1","payload",hexlify(payload));const tx={type:1,chainId:handleNumber(transaction[0]).toNumber(),nonce:handleNumber(transaction[1]).toNumber(),gasPrice:handleNumber(transaction[2]),gasLimit:handleNumber(transaction[3]),to:handleAddress(transaction[4]),value:handleNumber(transaction[5]),data:transaction[6],accessList:accessListify(transaction[7])};return 8===transaction.length||(tx.hash=keccak256(payload),_parseEipSignature(tx,transaction.slice(8),_serializeEip2930)),tx}(payload);case 2:return function _parseEip1559(payload){const transaction=decode(payload.slice(1));9!==transaction.length&&12!==transaction.length&&transactions_lib_esm_logger.throwArgumentError("invalid component count for transaction type: 2","payload",hexlify(payload));const maxPriorityFeePerGas=handleNumber(transaction[2]),maxFeePerGas=handleNumber(transaction[3]),tx={type:2,chainId:handleNumber(transaction[0]).toNumber(),nonce:handleNumber(transaction[1]).toNumber(),maxPriorityFeePerGas,maxFeePerGas,gasPrice:null,gasLimit:handleNumber(transaction[4]),to:handleAddress(transaction[5]),value:handleNumber(transaction[6]),data:transaction[7],accessList:accessListify(transaction[8])};return 9===transaction.length||(tx.hash=keccak256(payload),_parseEipSignature(tx,transaction.slice(9),_serializeEip1559)),tx}(payload)}return transactions_lib_esm_logger.throwError(`unsupported transaction type: ${payload[0]}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:payload[0]})}var contracts_lib_esm_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const contracts_lib_esm_logger=new Logger("contracts/5.6.2"),contracts_lib_esm_allowedTransactionKeys={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 resolveName(resolver,nameOrPromise){return contracts_lib_esm_awaiter(this,void 0,void 0,(function*(){const name=yield nameOrPromise;"string"!=typeof name&&contracts_lib_esm_logger.throwArgumentError("invalid address or ENS name","name",name);try{return getAddress(name)}catch(error){}resolver||contracts_lib_esm_logger.throwError("a provider or signer is needed to resolve ENS names",Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const address=yield resolver.resolveName(name);return null==address&&contracts_lib_esm_logger.throwArgumentError("resolver or addr is not configured for ENS name","name",name),address}))}function resolveAddresses(resolver,value,paramType){return contracts_lib_esm_awaiter(this,void 0,void 0,(function*(){return Array.isArray(paramType)?yield Promise.all(paramType.map(((paramType,index)=>resolveAddresses(resolver,Array.isArray(value)?value[index]:value[paramType.name],paramType)))):"address"===paramType.type?yield resolveName(resolver,value):"tuple"===paramType.type?yield resolveAddresses(resolver,value,paramType.components):"array"===paramType.baseType?Array.isArray(value)?yield Promise.all(value.map((v=>resolveAddresses(resolver,v,paramType.arrayChildren)))):Promise.reject(contracts_lib_esm_logger.makeError("invalid value for array",Logger.errors.INVALID_ARGUMENT,{argument:"value",value})):value}))}function populateTransaction(contract,fragment,args){return contracts_lib_esm_awaiter(this,void 0,void 0,(function*(){let overrides={};args.length===fragment.inputs.length+1&&"object"==typeof args[args.length-1]&&(overrides=shallowCopy(args.pop())),contracts_lib_esm_logger.checkArgumentCount(args.length,fragment.inputs.length,"passed to contract"),contract.signer?overrides.from?overrides.from=resolveProperties({override:resolveName(contract.signer,overrides.from),signer:contract.signer.getAddress()}).then((check=>contracts_lib_esm_awaiter(this,void 0,void 0,(function*(){return getAddress(check.signer)!==check.override&&contracts_lib_esm_logger.throwError("Contract with a Signer cannot override from",Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),check.override})))):overrides.from=contract.signer.getAddress():overrides.from&&(overrides.from=resolveName(contract.provider,overrides.from));const resolved=yield resolveProperties({args:resolveAddresses(contract.signer||contract.provider,args,fragment.inputs),address:contract.resolvedAddress,overrides:resolveProperties(overrides)||{}}),data=contract.interface.encodeFunctionData(fragment,resolved.args),tx={data,to:resolved.address},ro=resolved.overrides;if(null!=ro.nonce&&(tx.nonce=BigNumber.from(ro.nonce).toNumber()),null!=ro.gasLimit&&(tx.gasLimit=BigNumber.from(ro.gasLimit)),null!=ro.gasPrice&&(tx.gasPrice=BigNumber.from(ro.gasPrice)),null!=ro.maxFeePerGas&&(tx.maxFeePerGas=BigNumber.from(ro.maxFeePerGas)),null!=ro.maxPriorityFeePerGas&&(tx.maxPriorityFeePerGas=BigNumber.from(ro.maxPriorityFeePerGas)),null!=ro.from&&(tx.from=ro.from),null!=ro.type&&(tx.type=ro.type),null!=ro.accessList&&(tx.accessList=accessListify(ro.accessList)),null==tx.gasLimit&&null!=fragment.gas){let intrinsic=21e3;const bytes=arrayify(data);for(let i=0;i<bytes.length;i++)intrinsic+=4,bytes[i]&&(intrinsic+=64);tx.gasLimit=BigNumber.from(fragment.gas).add(intrinsic)}if(ro.value){const roValue=BigNumber.from(ro.value);roValue.isZero()||fragment.payable||contracts_lib_esm_logger.throwError("non-payable method cannot override value",Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:overrides.value}),tx.value=roValue}ro.customData&&(tx.customData=shallowCopy(ro.customData)),ro.ccipReadEnabled&&(tx.ccipReadEnabled=!!ro.ccipReadEnabled),delete overrides.nonce,delete overrides.gasLimit,delete overrides.gasPrice,delete overrides.from,delete overrides.value,delete overrides.type,delete overrides.accessList,delete overrides.maxFeePerGas,delete overrides.maxPriorityFeePerGas,delete overrides.customData,delete overrides.ccipReadEnabled;const leftovers=Object.keys(overrides).filter((key=>null!=overrides[key]));return leftovers.length&&contracts_lib_esm_logger.throwError(`cannot override ${leftovers.map((l=>JSON.stringify(l))).join(",")}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:leftovers}),tx}))}function addContractWait(contract,tx){const wait=tx.wait.bind(tx);tx.wait=confirmations=>wait(confirmations).then((receipt=>(receipt.events=receipt.logs.map((log=>{let event=deepCopy(log),parsed=null;try{parsed=contract.interface.parseLog(log)}catch(e){}return parsed&&(event.args=parsed.args,event.decode=(data,topics)=>contract.interface.decodeEventLog(parsed.eventFragment,data,topics),event.event=parsed.name,event.eventSignature=parsed.signature),event.removeListener=()=>contract.provider,event.getBlock=()=>contract.provider.getBlock(receipt.blockHash),event.getTransaction=()=>contract.provider.getTransaction(receipt.transactionHash),event.getTransactionReceipt=()=>Promise.resolve(receipt),event})),receipt)))}function buildCall(contract,fragment,collapseSimple){const signerOrProvider=contract.signer||contract.provider;return function(...args){return contracts_lib_esm_awaiter(this,void 0,void 0,(function*(){let blockTag;if(args.length===fragment.inputs.length+1&&"object"==typeof args[args.length-1]){const overrides=shallowCopy(args.pop());null!=overrides.blockTag&&(blockTag=yield overrides.blockTag),delete overrides.blockTag,args.push(overrides)}null!=contract.deployTransaction&&(yield contract._deployed(blockTag));const tx=yield populateTransaction(contract,fragment,args),result=yield signerOrProvider.call(tx,blockTag);try{let value=contract.interface.decodeFunctionResult(fragment,result);return collapseSimple&&1===fragment.outputs.length&&(value=value[0]),value}catch(error){throw error.code===Logger.errors.CALL_EXCEPTION&&(error.address=contract.address,error.args=args,error.transaction=tx),error}}))}}function buildDefault(contract,fragment,collapseSimple){return fragment.constant?buildCall(contract,fragment,collapseSimple):function buildSend(contract,fragment){return function(...args){return contracts_lib_esm_awaiter(this,void 0,void 0,(function*(){contract.signer||contracts_lib_esm_logger.throwError("sending a transaction requires a signer",Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=contract.deployTransaction&&(yield contract._deployed());const txRequest=yield populateTransaction(contract,fragment,args),tx=yield contract.signer.sendTransaction(txRequest);return addContractWait(contract,tx),tx}))}}(contract,fragment)}function getEventTag(filter){return!filter.address||null!=filter.topics&&0!==filter.topics.length?(filter.address||"*")+"@"+(filter.topics?filter.topics.map((topic=>Array.isArray(topic)?topic.join("|"):topic)).join(":"):""):"*"}class RunningEvent{constructor(tag,filter){defineReadOnly(this,"tag",tag),defineReadOnly(this,"filter",filter),this._listeners=[]}addListener(listener,once){this._listeners.push({listener,once})}removeListener(listener){let done=!1;this._listeners=this._listeners.filter((item=>!(!done&&item.listener===listener)||(done=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((i=>i.listener))}listenerCount(){return this._listeners.length}run(args){const listenerCount=this.listenerCount();return this._listeners=this._listeners.filter((item=>{const argsCopy=args.slice();return setTimeout((()=>{item.listener.apply(this,argsCopy)}),0),!item.once})),listenerCount}prepareEvent(event){}getEmit(event){return[event]}}class ErrorRunningEvent extends RunningEvent{constructor(){super("error",null)}}class FragmentRunningEvent extends RunningEvent{constructor(address,contractInterface,fragment,topics){const filter={address};let topic=contractInterface.getEventTopic(fragment);topics?(topic!==topics[0]&&contracts_lib_esm_logger.throwArgumentError("topic mismatch","topics",topics),filter.topics=topics.slice()):filter.topics=[topic],super(getEventTag(filter),filter),defineReadOnly(this,"address",address),defineReadOnly(this,"interface",contractInterface),defineReadOnly(this,"fragment",fragment)}prepareEvent(event){super.prepareEvent(event),event.event=this.fragment.name,event.eventSignature=this.fragment.format(),event.decode=(data,topics)=>this.interface.decodeEventLog(this.fragment,data,topics);try{event.args=this.interface.decodeEventLog(this.fragment,event.data,event.topics)}catch(error){event.args=null,event.decodeError=error}}getEmit(event){const errors=checkResultErrors(event.args);if(errors.length)throw errors[0].error;const args=(event.args||[]).slice();return args.push(event),args}}class WildcardRunningEvent extends RunningEvent{constructor(address,contractInterface){super("*",{address}),defineReadOnly(this,"address",address),defineReadOnly(this,"interface",contractInterface)}prepareEvent(event){super.prepareEvent(event);try{const parsed=this.interface.parseLog(event);event.event=parsed.name,event.eventSignature=parsed.signature,event.decode=(data,topics)=>this.interface.decodeEventLog(parsed.eventFragment,data,topics),event.args=parsed.args}catch(error){}}}class BaseContract{constructor(addressOrName,contractInterface,signerOrProvider){defineReadOnly(this,"interface",getStatic(new.target,"getInterface")(contractInterface)),null==signerOrProvider?(defineReadOnly(this,"provider",null),defineReadOnly(this,"signer",null)):Signer.isSigner(signerOrProvider)?(defineReadOnly(this,"provider",signerOrProvider.provider||null),defineReadOnly(this,"signer",signerOrProvider)):Provider.isProvider(signerOrProvider)?(defineReadOnly(this,"provider",signerOrProvider),defineReadOnly(this,"signer",null)):contracts_lib_esm_logger.throwArgumentError("invalid signer or provider","signerOrProvider",signerOrProvider),defineReadOnly(this,"callStatic",{}),defineReadOnly(this,"estimateGas",{}),defineReadOnly(this,"functions",{}),defineReadOnly(this,"populateTransaction",{}),defineReadOnly(this,"filters",{});{const uniqueFilters={};Object.keys(this.interface.events).forEach((eventSignature=>{const event=this.interface.events[eventSignature];defineReadOnly(this.filters,eventSignature,((...args)=>({address:this.address,topics:this.interface.encodeFilterTopics(event,args)}))),uniqueFilters[event.name]||(uniqueFilters[event.name]=[]),uniqueFilters[event.name].push(eventSignature)})),Object.keys(uniqueFilters).forEach((name=>{const filters=uniqueFilters[name];1===filters.length?defineReadOnly(this.filters,name,this.filters[filters[0]]):contracts_lib_esm_logger.warn(`Duplicate definition of ${name} (${filters.join(", ")})`)}))}if(defineReadOnly(this,"_runningEvents",{}),defineReadOnly(this,"_wrappedEmits",{}),null==addressOrName&&contracts_lib_esm_logger.throwArgumentError("invalid contract address or ENS name","addressOrName",addressOrName),defineReadOnly(this,"address",addressOrName),this.provider)defineReadOnly(this,"resolvedAddress",resolveName(this.provider,addressOrName));else try{defineReadOnly(this,"resolvedAddress",Promise.resolve(getAddress(addressOrName)))}catch(error){contracts_lib_esm_logger.throwError("provider is required to use ENS name as contract address",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((e=>{}));const uniqueNames={},uniqueSignatures={};Object.keys(this.interface.functions).forEach((signature=>{const fragment=this.interface.functions[signature];if(uniqueSignatures[signature])contracts_lib_esm_logger.warn(`Duplicate ABI entry for ${JSON.stringify(signature)}`);else{uniqueSignatures[signature]=!0;{const name=fragment.name;uniqueNames[`%${name}`]||(uniqueNames[`%${name}`]=[]),uniqueNames[`%${name}`].push(signature)}null==this[signature]&&defineReadOnly(this,signature,buildDefault(this,fragment,!0)),null==this.functions[signature]&&defineReadOnly(this.functions,signature,buildDefault(this,fragment,!1)),null==this.callStatic[signature]&&defineReadOnly(this.callStatic,signature,buildCall(this,fragment,!0)),null==this.populateTransaction[signature]&&defineReadOnly(this.populateTransaction,signature,function buildPopulate(contract,fragment){return function(...args){return populateTransaction(contract,fragment,args)}}(this,fragment)),null==this.estimateGas[signature]&&defineReadOnly(this.estimateGas,signature,function buildEstimate(contract,fragment){const signerOrProvider=contract.signer||contract.provider;return function(...args){return contracts_lib_esm_awaiter(this,void 0,void 0,(function*(){signerOrProvider||contracts_lib_esm_logger.throwError("estimate require a provider or signer",Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const tx=yield populateTransaction(contract,fragment,args);return yield signerOrProvider.estimateGas(tx)}))}}(this,fragment))}})),Object.keys(uniqueNames).forEach((name=>{const signatures=uniqueNames[name];if(signatures.length>1)return;name=name.substring(1);const signature=signatures[0];try{null==this[name]&&defineReadOnly(this,name,this[signature])}catch(e){}null==this.functions[name]&&defineReadOnly(this.functions,name,this.functions[signature]),null==this.callStatic[name]&&defineReadOnly(this.callStatic,name,this.callStatic[signature]),null==this.populateTransaction[name]&&defineReadOnly(this.populateTransaction,name,this.populateTransaction[signature]),null==this.estimateGas[name]&&defineReadOnly(this.estimateGas,name,this.estimateGas[signature])}))}static getContractAddress(transaction){return getContractAddress(transaction)}static getInterface(contractInterface){return Interface.isInterface(contractInterface)?contractInterface:new Interface(contractInterface)}deployed(){return this._deployed()}_deployed(blockTag){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,blockTag).then((code=>("0x"===code&&contracts_lib_esm_logger.throwError("contract not deployed",Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(overrides){this.signer||contracts_lib_esm_logger.throwError("sending a transactions require a signer",Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const tx=shallowCopy(overrides||{});return["from","to"].forEach((function(key){null!=tx[key]&&contracts_lib_esm_logger.throwError("cannot override "+key,Logger.errors.UNSUPPORTED_OPERATION,{operation:key})})),tx.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(tx)))}connect(signerOrProvider){"string"==typeof signerOrProvider&&(signerOrProvider=new VoidSigner(signerOrProvider,this.provider));const contract=new this.constructor(this.address,this.interface,signerOrProvider);return this.deployTransaction&&defineReadOnly(contract,"deployTransaction",this.deployTransaction),contract}attach(addressOrName){return new this.constructor(addressOrName,this.interface,this.signer||this.provider)}static isIndexed(value){return Indexed.isIndexed(value)}_normalizeRunningEvent(runningEvent){return this._runningEvents[runningEvent.tag]?this._runningEvents[runningEvent.tag]:runningEvent}_getRunningEvent(eventName){if("string"==typeof eventName){if("error"===eventName)return this._normalizeRunningEvent(new ErrorRunningEvent);if("event"===eventName)return this._normalizeRunningEvent(new RunningEvent("event",null));if("*"===eventName)return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface));const fragment=this.interface.getEvent(eventName);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,fragment))}if(eventName.topics&&eventName.topics.length>0){try{const topic=eventName.topics[0];if("string"!=typeof topic)throw new Error("invalid topic");const fragment=this.interface.getEvent(topic);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,fragment,eventName.topics))}catch(error){}const filter={address:this.address,topics:eventName.topics};return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter),filter))}return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface))}_checkRunningEvents(runningEvent){if(0===runningEvent.listenerCount()){delete this._runningEvents[runningEvent.tag];const emit=this._wrappedEmits[runningEvent.tag];emit&&runningEvent.filter&&(this.provider.off(runningEvent.filter,emit),delete this._wrappedEmits[runningEvent.tag])}}_wrapEvent(runningEvent,log,listener){const event=deepCopy(log);return event.removeListener=()=>{listener&&(runningEvent.removeListener(listener),this._checkRunningEvents(runningEvent))},event.getBlock=()=>this.provider.getBlock(log.blockHash),event.getTransaction=()=>this.provider.getTransaction(log.transactionHash),event.getTransactionReceipt=()=>this.provider.getTransactionReceipt(log.transactionHash),runningEvent.prepareEvent(event),event}_addEventListener(runningEvent,listener,once){if(this.provider||contracts_lib_esm_logger.throwError("events require a provider or a signer with a provider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),runningEvent.addListener(listener,once),this._runningEvents[runningEvent.tag]=runningEvent,!this._wrappedEmits[runningEvent.tag]){const wrappedEmit=log=>{let event=this._wrapEvent(runningEvent,log,listener);if(null==event.decodeError)try{const args=runningEvent.getEmit(event);this.emit(runningEvent.filter,...args)}catch(error){event.decodeError=error.error}null!=runningEvent.filter&&this.emit("event",event),null!=event.decodeError&&this.emit("error",event.decodeError,event)};this._wrappedEmits[runningEvent.tag]=wrappedEmit,null!=runningEvent.filter&&this.provider.on(runningEvent.filter,wrappedEmit)}}queryFilter(event,fromBlockOrBlockhash,toBlock){const runningEvent=this._getRunningEvent(event),filter=shallowCopy(runningEvent.filter);return"string"==typeof fromBlockOrBlockhash&&lib_esm_isHexString(fromBlockOrBlockhash,32)?(null!=toBlock&&contracts_lib_esm_logger.throwArgumentError("cannot specify toBlock with blockhash","toBlock",toBlock),filter.blockHash=fromBlockOrBlockhash):(filter.fromBlock=null!=fromBlockOrBlockhash?fromBlockOrBlockhash:0,filter.toBlock=null!=toBlock?toBlock:"latest"),this.provider.getLogs(filter).then((logs=>logs.map((log=>this._wrapEvent(runningEvent,log,null)))))}on(event,listener){return this._addEventListener(this._getRunningEvent(event),listener,!1),this}once(event,listener){return this._addEventListener(this._getRunningEvent(event),listener,!0),this}emit(eventName,...args){if(!this.provider)return!1;const runningEvent=this._getRunningEvent(eventName),result=runningEvent.run(args)>0;return this._checkRunningEvents(runningEvent),result}listenerCount(eventName){return this.provider?null==eventName?Object.keys(this._runningEvents).reduce(((accum,key)=>accum+this._runningEvents[key].listenerCount()),0):this._getRunningEvent(eventName).listenerCount():0}listeners(eventName){if(!this.provider)return[];if(null==eventName){const result=[];for(let tag in this._runningEvents)this._runningEvents[tag].listeners().forEach((listener=>{result.push(listener)}));return result}return this._getRunningEvent(eventName).listeners()}removeAllListeners(eventName){if(!this.provider)return this;if(null==eventName){for(const tag in this._runningEvents){const runningEvent=this._runningEvents[tag];runningEvent.removeAllListeners(),this._checkRunningEvents(runningEvent)}return this}const runningEvent=this._getRunningEvent(eventName);return runningEvent.removeAllListeners(),this._checkRunningEvents(runningEvent),this}off(eventName,listener){if(!this.provider)return this;const runningEvent=this._getRunningEvent(eventName);return runningEvent.removeListener(listener),this._checkRunningEvents(runningEvent),this}removeListener(eventName,listener){return this.off(eventName,listener)}}class Contract extends BaseContract{}class ContractFactory{constructor(contractInterface,bytecode,signer){let bytecodeHex=null;bytecodeHex="string"==typeof bytecode?bytecode:isBytes(bytecode)?hexlify(bytecode):bytecode&&"string"==typeof bytecode.object?bytecode.object:"!","0x"!==bytecodeHex.substring(0,2)&&(bytecodeHex="0x"+bytecodeHex),(!lib_esm_isHexString(bytecodeHex)||bytecodeHex.length%2)&&contracts_lib_esm_logger.throwArgumentError("invalid bytecode","bytecode",bytecode),signer&&!Signer.isSigner(signer)&&contracts_lib_esm_logger.throwArgumentError("invalid signer","signer",signer),defineReadOnly(this,"bytecode",bytecodeHex),defineReadOnly(this,"interface",getStatic(new.target,"getInterface")(contractInterface)),defineReadOnly(this,"signer",signer||null)}getDeployTransaction(...args){let tx={};if(args.length===this.interface.deploy.inputs.length+1&&"object"==typeof args[args.length-1]){tx=shallowCopy(args.pop());for(const key in tx)if(!contracts_lib_esm_allowedTransactionKeys[key])throw new Error("unknown transaction override "+key)}if(["data","from","to"].forEach((key=>{null!=tx[key]&&contracts_lib_esm_logger.throwError("cannot override "+key,Logger.errors.UNSUPPORTED_OPERATION,{operation:key})})),tx.value){BigNumber.from(tx.value).isZero()||this.interface.deploy.payable||contracts_lib_esm_logger.throwError("non-payable constructor cannot override value",Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:tx.value})}return contracts_lib_esm_logger.checkArgumentCount(args.length,this.interface.deploy.inputs.length," in Contract constructor"),tx.data=hexlify(concat([this.bytecode,this.interface.encodeDeploy(args)])),tx}deploy(...args){return contracts_lib_esm_awaiter(this,void 0,void 0,(function*(){let overrides={};args.length===this.interface.deploy.inputs.length+1&&(overrides=args.pop()),contracts_lib_esm_logger.checkArgumentCount(args.length,this.interface.deploy.inputs.length," in Contract constructor");const params=yield resolveAddresses(this.signer,args,this.interface.deploy.inputs);params.push(overrides);const unsignedTx=this.getDeployTransaction(...params),tx=yield this.signer.sendTransaction(unsignedTx),address=getStatic(this.constructor,"getContractAddress")(tx),contract=getStatic(this.constructor,"getContract")(address,this.interface,this.signer);return addContractWait(contract,tx),defineReadOnly(contract,"deployTransaction",tx),contract}))}attach(address){return this.constructor.getContract(address,this.interface,this.signer)}connect(signer){return new this.constructor(this.interface,this.bytecode,signer)}static fromSolidity(compilerOutput,signer){null==compilerOutput&&contracts_lib_esm_logger.throwError("missing compiler output",Logger.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof compilerOutput&&(compilerOutput=JSON.parse(compilerOutput));const abi=compilerOutput.abi;let bytecode=null;return compilerOutput.bytecode?bytecode=compilerOutput.bytecode:compilerOutput.evm&&compilerOutput.evm.bytecode&&(bytecode=compilerOutput.evm.bytecode),new this(abi,bytecode,signer)}static getInterface(contractInterface){return Contract.getInterface(contractInterface)}static getContractAddress(tx){return getContractAddress(tx)}static getContract(address,contractInterface,signer){return new Contract(address,contractInterface,signer)}}const fixednumber_logger=new Logger("bignumber/5.6.2"),fixednumber_constructorGuard={},fixednumber_Zero=BigNumber.from(0),fixednumber_NegativeOne=BigNumber.from(-1);function fixednumber_throwFault(message,fault,operation,value){const params={fault,operation};return void 0!==value&&(params.value=value),fixednumber_logger.throwError(message,Logger.errors.NUMERIC_FAULT,params)}let zeros="0";for(;zeros.length<256;)zeros+=zeros;function getMultiplier(decimals){if("number"!=typeof decimals)try{decimals=BigNumber.from(decimals).toNumber()}catch(e){}return"number"==typeof decimals&&decimals>=0&&decimals<=256&&!(decimals%1)?"1"+zeros.substring(0,decimals):fixednumber_logger.throwArgumentError("invalid decimal size","decimals",decimals)}function formatFixed(value,decimals){null==decimals&&(decimals=0);const multiplier=getMultiplier(decimals),negative=(value=BigNumber.from(value)).lt(fixednumber_Zero);negative&&(value=value.mul(fixednumber_NegativeOne));let fraction=value.mod(multiplier).toString();for(;fraction.length<multiplier.length-1;)fraction="0"+fraction;fraction=fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];const whole=value.div(multiplier).toString();return value=1===multiplier.length?whole:whole+"."+fraction,negative&&(value="-"+value),value}function parseFixed(value,decimals){null==decimals&&(decimals=0);const multiplier=getMultiplier(decimals);"string"==typeof value&&value.match(/^-?[0-9.]+$/)||fixednumber_logger.throwArgumentError("invalid decimal value","value",value);const negative="-"===value.substring(0,1);negative&&(value=value.substring(1)),"."===value&&fixednumber_logger.throwArgumentError("missing value","value",value);const comps=value.split(".");comps.length>2&&fixednumber_logger.throwArgumentError("too many decimal points","value",value);let whole=comps[0],fraction=comps[1];for(whole||(whole="0"),fraction||(fraction="0");"0"===fraction[fraction.length-1];)fraction=fraction.substring(0,fraction.length-1);for(fraction.length>multiplier.length-1&&fixednumber_throwFault("fractional component exceeds decimals","underflow","parseFixed"),""===fraction&&(fraction="0");fraction.length<multiplier.length-1;)fraction+="0";const wholeValue=BigNumber.from(whole),fractionValue=BigNumber.from(fraction);let wei=wholeValue.mul(multiplier).add(fractionValue);return negative&&(wei=wei.mul(fixednumber_NegativeOne)),wei}class FixedFormat{constructor(constructorGuard,signed,width,decimals){constructorGuard!==fixednumber_constructorGuard&&fixednumber_logger.throwError("cannot use FixedFormat constructor; use FixedFormat.from",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=signed,this.width=width,this.decimals=decimals,this.name=(signed?"":"u")+"fixed"+String(width)+"x"+String(decimals),this._multiplier=getMultiplier(decimals),Object.freeze(this)}static from(value){if(value instanceof FixedFormat)return value;"number"==typeof value&&(value=`fixed128x${value}`);let signed=!0,width=128,decimals=18;if("string"==typeof value)if("fixed"===value);else if("ufixed"===value)signed=!1;else{const match=value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);match||fixednumber_logger.throwArgumentError("invalid fixed format","format",value),signed="u"!==match[1],width=parseInt(match[2]),decimals=parseInt(match[3])}else if(value){const check=(key,type,defaultValue)=>null==value[key]?defaultValue:(typeof value[key]!==type&&fixednumber_logger.throwArgumentError("invalid fixed format ("+key+" not "+type+")","format."+key,value[key]),value[key]);signed=check("signed","boolean",signed),width=check("width","number",width),decimals=check("decimals","number",decimals)}return width%8&&fixednumber_logger.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",width),decimals>80&&fixednumber_logger.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",decimals),new FixedFormat(fixednumber_constructorGuard,signed,width,decimals)}}class FixedNumber{constructor(constructorGuard,hex,value,format){constructorGuard!==fixednumber_constructorGuard&&fixednumber_logger.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=format,this._hex=hex,this._value=value,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(other){this.format.name!==other.format.name&&fixednumber_logger.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",other)}addUnsafe(other){this._checkFormat(other);const a=parseFixed(this._value,this.format.decimals),b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.add(b),this.format.decimals,this.format)}subUnsafe(other){this._checkFormat(other);const a=parseFixed(this._value,this.format.decimals),b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.sub(b),this.format.decimals,this.format)}mulUnsafe(other){this._checkFormat(other);const a=parseFixed(this._value,this.format.decimals),b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(other){this._checkFormat(other);const a=parseFixed(this._value,this.format.decimals),b=parseFixed(other._value,other.format.decimals);return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b),this.format.decimals,this.format)}floor(){const comps=this.toString().split(".");1===comps.length&&comps.push("0");let result=FixedNumber.from(comps[0],this.format);const hasFraction=!comps[1].match(/^(0*)$/);return this.isNegative()&&hasFraction&&(result=result.subUnsafe(ONE.toFormat(result.format))),result}ceiling(){const comps=this.toString().split(".");1===comps.length&&comps.push("0");let result=FixedNumber.from(comps[0],this.format);const hasFraction=!comps[1].match(/^(0*)$/);return!this.isNegative()&&hasFraction&&(result=result.addUnsafe(ONE.toFormat(result.format))),result}round(decimals){null==decimals&&(decimals=0);const comps=this.toString().split(".");if(1===comps.length&&comps.push("0"),(decimals<0||decimals>80||decimals%1)&&fixednumber_logger.throwArgumentError("invalid decimal count","decimals",decimals),comps[1].length<=decimals)return this;const factor=FixedNumber.from("1"+zeros.substring(0,decimals),this.format),bump=BUMP.toFormat(this.format);return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(width){if(null==width)return this._hex;width%8&&fixednumber_logger.throwArgumentError("invalid byte width","width",width);return hexZeroPad(BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString(),width/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(format){return FixedNumber.fromString(this._value,format)}static fromValue(value,decimals,format){return null!=format||null==decimals||function isBigNumberish(value){return null!=value&&(BigNumber.isBigNumber(value)||"number"==typeof value&&value%1==0||"string"==typeof value&&!!value.match(/^-?[0-9]+$/)||lib_esm_isHexString(value)||"bigint"==typeof value||isBytes(value))}(decimals)||(format=decimals,decimals=null),null==decimals&&(decimals=0),null==format&&(format="fixed"),FixedNumber.fromString(formatFixed(value,decimals),FixedFormat.from(format))}static fromString(value,format){null==format&&(format="fixed");const fixedFormat=FixedFormat.from(format),numeric=parseFixed(value,fixedFormat.decimals);!fixedFormat.signed&&numeric.lt(fixednumber_Zero)&&fixednumber_throwFault("unsigned value cannot be negative","overflow","value",value);let hex=null;fixedFormat.signed?hex=numeric.toTwos(fixedFormat.width).toHexString():(hex=numeric.toHexString(),hex=hexZeroPad(hex,fixedFormat.width/8));const decimal=formatFixed(numeric,fixedFormat.decimals);return new FixedNumber(fixednumber_constructorGuard,hex,decimal,fixedFormat)}static fromBytes(value,format){null==format&&(format="fixed");const fixedFormat=FixedFormat.from(format);if(arrayify(value).length>fixedFormat.width/8)throw new Error("overflow");let numeric=BigNumber.from(value);fixedFormat.signed&&(numeric=numeric.fromTwos(fixedFormat.width));const hex=numeric.toTwos((fixedFormat.signed?0:1)+fixedFormat.width).toHexString(),decimal=formatFixed(numeric,fixedFormat.decimals);return new FixedNumber(fixednumber_constructorGuard,hex,decimal,fixedFormat)}static from(value,format){if("string"==typeof value)return FixedNumber.fromString(value,format);if(isBytes(value))return FixedNumber.fromBytes(value,format);try{return FixedNumber.fromValue(value,0,format)}catch(error){if(error.code!==Logger.errors.INVALID_ARGUMENT)throw error}return fixednumber_logger.throwArgumentError("invalid FixedNumber value","value",value)}static isFixedNumber(value){return!(!value||!value._isFixedNumber)}}const ONE=FixedNumber.from(1),BUMP=FixedNumber.from("0.5");function hashMessage(message){return"string"==typeof message&&(message=toUtf8Bytes(message)),keccak256(concat([toUtf8Bytes("Ethereum Signed Message:\n"),toUtf8Bytes(String(message.length)),message]))}var typed_data_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const typed_data_logger=new Logger("hash/5.6.1"),padding=new Uint8Array(32);padding.fill(0);const typed_data_NegativeOne=BigNumber.from(-1),typed_data_Zero=BigNumber.from(0),typed_data_One=BigNumber.from(1),typed_data_MaxUint256=BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const hexTrue=hexZeroPad(typed_data_One.toHexString(),32),hexFalse=hexZeroPad(typed_data_Zero.toHexString(),32),domainFieldTypes={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},domainFieldNames=["name","version","chainId","verifyingContract","salt"];function checkString(key){return function(value){return"string"!=typeof value&&typed_data_logger.throwArgumentError(`invalid domain value for ${JSON.stringify(key)}`,`domain.${key}`,value),value}}const domainChecks={name:checkString("name"),version:checkString("version"),chainId:function(value){try{return BigNumber.from(value).toString()}catch(error){}return typed_data_logger.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",value)},verifyingContract:function(value){try{return getAddress(value).toLowerCase()}catch(error){}return typed_data_logger.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",value)},salt:function(value){try{const bytes=arrayify(value);if(32!==bytes.length)throw new Error("bad length");return hexlify(bytes)}catch(error){}return typed_data_logger.throwArgumentError('invalid domain value "salt"',"domain.salt",value)}};function getBaseEncoder(type){{const match=type.match(/^(u?)int(\d*)$/);if(match){const signed=""===match[1],width=parseInt(match[2]||"256");(width%8!=0||width>256||match[2]&&match[2]!==String(width))&&typed_data_logger.throwArgumentError("invalid numeric width","type",type);const boundsUpper=typed_data_MaxUint256.mask(signed?width-1:width),boundsLower=signed?boundsUpper.add(typed_data_One).mul(typed_data_NegativeOne):typed_data_Zero;return function(value){const v=BigNumber.from(value);return(v.lt(boundsLower)||v.gt(boundsUpper))&&typed_data_logger.throwArgumentError(`value out-of-bounds for ${type}`,"value",value),hexZeroPad(v.toTwos(256).toHexString(),32)}}}{const match=type.match(/^bytes(\d+)$/);if(match){const width=parseInt(match[1]);return(0===width||width>32||match[1]!==String(width))&&typed_data_logger.throwArgumentError("invalid bytes width","type",type),function(value){return arrayify(value).length!==width&&typed_data_logger.throwArgumentError(`invalid length for ${type}`,"value",value),function hexPadRight(value){const bytes=arrayify(value),padOffset=bytes.length%32;return padOffset?hexConcat([bytes,padding.slice(padOffset)]):hexlify(bytes)}(value)}}}switch(type){case"address":return function(value){return hexZeroPad(getAddress(value),32)};case"bool":return function(value){return value?hexTrue:hexFalse};case"bytes":return function(value){return keccak256(value)};case"string":return function(value){return id(value)}}return null}function encodeType(name,fields){return`${name}(${fields.map((({name,type})=>type+" "+name)).join(",")})`}class TypedDataEncoder{constructor(types){defineReadOnly(this,"types",Object.freeze(deepCopy(types))),defineReadOnly(this,"_encoderCache",{}),defineReadOnly(this,"_types",{});const links={},parents={},subtypes={};Object.keys(types).forEach((type=>{links[type]={},parents[type]=[],subtypes[type]={}}));for(const name in types){const uniqueNames={};types[name].forEach((field=>{uniqueNames[field.name]&&typed_data_logger.throwArgumentError(`duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`,"types",types),uniqueNames[field.name]=!0;const baseType=field.type.match(/^([^\x5b]*)(\x5b|$)/)[1];baseType===name&&typed_data_logger.throwArgumentError(`circular type reference to ${JSON.stringify(baseType)}`,"types",types);getBaseEncoder(baseType)||(parents[baseType]||typed_data_logger.throwArgumentError(`unknown type ${JSON.stringify(baseType)}`,"types",types),parents[baseType].push(name),links[name][baseType]=!0)}))}const primaryTypes=Object.keys(parents).filter((n=>0===parents[n].length));0===primaryTypes.length?typed_data_logger.throwArgumentError("missing primary type","types",types):primaryTypes.length>1&&typed_data_logger.throwArgumentError(`ambiguous primary types or unused types: ${primaryTypes.map((t=>JSON.stringify(t))).join(", ")}`,"types",types),defineReadOnly(this,"primaryType",primaryTypes[0]),function checkCircular(type,found){found[type]&&typed_data_logger.throwArgumentError(`circular type reference to ${JSON.stringify(type)}`,"types",types),found[type]=!0,Object.keys(links[type]).forEach((child=>{parents[child]&&(checkCircular(child,found),Object.keys(found).forEach((subtype=>{subtypes[subtype][child]=!0})))})),delete found[type]}(this.primaryType,{});for(const name in subtypes){const st=Object.keys(subtypes[name]);st.sort(),this._types[name]=encodeType(name,types[name])+st.map((t=>encodeType(t,types[t]))).join("")}}getEncoder(type){let encoder=this._encoderCache[type];return encoder||(encoder=this._encoderCache[type]=this._getEncoder(type)),encoder}_getEncoder(type){{const encoder=getBaseEncoder(type);if(encoder)return encoder}const match=type.match(/^(.*)(\x5b(\d*)\x5d)$/);if(match){const subtype=match[1],subEncoder=this.getEncoder(subtype),length=parseInt(match[3]);return value=>{length>=0&&value.length!==length&&typed_data_logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",value);let result=value.map(subEncoder);return this._types[subtype]&&(result=result.map(keccak256)),keccak256(hexConcat(result))}}const fields=this.types[type];if(fields){const encodedType=id(this._types[type]);return value=>{const values=fields.map((({name,type})=>{const result=this.getEncoder(type)(value[name]);return this._types[type]?keccak256(result):result}));return values.unshift(encodedType),hexConcat(values)}}return typed_data_logger.throwArgumentError(`unknown type: ${type}`,"type",type)}encodeType(name){const result=this._types[name];return result||typed_data_logger.throwArgumentError(`unknown type: ${JSON.stringify(name)}`,"name",name),result}encodeData(type,value){return this.getEncoder(type)(value)}hashStruct(name,value){return keccak256(this.encodeData(name,value))}encode(value){return this.encodeData(this.primaryType,value)}hash(value){return this.hashStruct(this.primaryType,value)}_visit(type,value,callback){if(getBaseEncoder(type))return callback(type,value);const match=type.match(/^(.*)(\x5b(\d*)\x5d)$/);if(match){const subtype=match[1],length=parseInt(match[3]);return length>=0&&value.length!==length&&typed_data_logger.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",value),value.map((v=>this._visit(subtype,v,callback)))}const fields=this.types[type];return fields?fields.reduce(((accum,{name,type})=>(accum[name]=this._visit(type,value[name],callback),accum)),{}):typed_data_logger.throwArgumentError(`unknown type: ${type}`,"type",type)}visit(value,callback){return this._visit(this.primaryType,value,callback)}static from(types){return new TypedDataEncoder(types)}static getPrimaryType(types){return TypedDataEncoder.from(types).primaryType}static hashStruct(name,types,value){return TypedDataEncoder.from(types).hashStruct(name,value)}static hashDomain(domain){const domainFields=[];for(const name in domain){const type=domainFieldTypes[name];type||typed_data_logger.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(name)}`,"domain",domain),domainFields.push({name,type})}return domainFields.sort(((a,b)=>domainFieldNames.indexOf(a.name)-domainFieldNames.indexOf(b.name))),TypedDataEncoder.hashStruct("EIP712Domain",{EIP712Domain:domainFields},domain)}static encode(domain,types,value){return hexConcat(["0x1901",TypedDataEncoder.hashDomain(domain),TypedDataEncoder.from(types).hash(value)])}static hash(domain,types,value){return keccak256(TypedDataEncoder.encode(domain,types,value))}static resolveNames(domain,types,value,resolveName){return typed_data_awaiter(this,void 0,void 0,(function*(){domain=shallowCopy(domain);const ensCache={};domain.verifyingContract&&!lib_esm_isHexString(domain.verifyingContract,20)&&(ensCache[domain.verifyingContract]="0x");const encoder=TypedDataEncoder.from(types);encoder.visit(value,((type,value)=>("address"!==type||lib_esm_isHexString(value,20)||(ensCache[value]="0x"),value)));for(const name in ensCache)ensCache[name]=yield resolveName(name);return domain.verifyingContract&&ensCache[domain.verifyingContract]&&(domain.verifyingContract=ensCache[domain.verifyingContract]),value=encoder.visit(value,((type,value)=>"address"===type&&ensCache[value]?ensCache[value]:value)),{domain,value}}))}static getPayload(domain,types,value){TypedDataEncoder.hashDomain(domain);const domainValues={},domainTypes=[];domainFieldNames.forEach((name=>{const value=domain[name];null!=value&&(domainValues[name]=domainChecks[name](value),domainTypes.push({name,type:domainFieldTypes[name]}))}));const encoder=TypedDataEncoder.from(types),typesWithDomain=shallowCopy(types);return typesWithDomain.EIP712Domain?typed_data_logger.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",types):typesWithDomain.EIP712Domain=domainTypes,encoder.encode(value),{types:typesWithDomain,domain:domainValues,primaryType:encoder.primaryType,message:encoder.visit(value,((type,value)=>{if(type.match(/^bytes(\d*)/))return hexlify(arrayify(value));if(type.match(/^u?int/))return BigNumber.from(value).toString();switch(type){case"address":return value.toLowerCase();case"bool":return!!value;case"string":return"string"!=typeof value&&typed_data_logger.throwArgumentError("invalid string","value",value),value}return typed_data_logger.throwArgumentError("unsupported type","type",type)}))}}}class BaseX{constructor(alphabet){defineReadOnly(this,"alphabet",alphabet),defineReadOnly(this,"base",alphabet.length),defineReadOnly(this,"_alphabetMap",{}),defineReadOnly(this,"_leader",alphabet.charAt(0));for(let i=0;i<alphabet.length;i++)this._alphabetMap[alphabet.charAt(i)]=i}encode(value){let source=arrayify(value);if(0===source.length)return"";let digits=[0];for(let i=0;i<source.length;++i){let carry=source[i];for(let j=0;j<digits.length;++j)carry+=digits[j]<<8,digits[j]=carry%this.base,carry=carry/this.base|0;for(;carry>0;)digits.push(carry%this.base),carry=carry/this.base|0}let string="";for(let k=0;0===source[k]&&k<source.length-1;++k)string+=this._leader;for(let q=digits.length-1;q>=0;--q)string+=this.alphabet[digits[q]];return string}decode(value){if("string"!=typeof value)throw new TypeError("Expected String");let bytes=[];if(0===value.length)return new Uint8Array(bytes);bytes.push(0);for(let i=0;i<value.length;i++){let byte=this._alphabetMap[value[i]];if(void 0===byte)throw new Error("Non-base"+this.base+" character");let carry=byte;for(let j=0;j<bytes.length;++j)carry+=bytes[j]*this.base,bytes[j]=255&carry,carry>>=8;for(;carry>0;)bytes.push(255&carry),carry>>=8}for(let k=0;value[k]===this._leader&&k<value.length-1;++k)bytes.push(0);return arrayify(new Uint8Array(bytes.reverse()))}}new BaseX("abcdefghijklmnopqrstuvwxyz234567");const Base58=new BaseX("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var SupportedAlgorithm;!function(SupportedAlgorithm){SupportedAlgorithm.sha256="sha256",SupportedAlgorithm.sha512="sha512"}(SupportedAlgorithm||(SupportedAlgorithm={}));const sha2_logger=new Logger("sha2/5.6.1");function ripemd160(data){return"0x"+hash_default().ripemd160().update(arrayify(data)).digest("hex")}function sha256(data){return"0x"+hash_default().sha256().update(arrayify(data)).digest("hex")}function sha512(data){return"0x"+hash_default().sha512().update(arrayify(data)).digest("hex")}function computeHmac(algorithm,key,data){return SupportedAlgorithm[algorithm]||sha2_logger.throwError("unsupported algorithm "+algorithm,Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm}),"0x"+hash_default().hmac(hash_default()[algorithm],arrayify(key)).update(arrayify(data)).digest("hex")}function pbkdf2(password,salt,iterations,keylen,hashAlgorithm){let hLen;password=arrayify(password),salt=arrayify(salt);let l=1;const DK=new Uint8Array(keylen),block1=new Uint8Array(salt.length+4);let r,T;block1.set(salt);for(let i=1;i<=l;i++){block1[salt.length]=i>>24&255,block1[salt.length+1]=i>>16&255,block1[salt.length+2]=i>>8&255,block1[salt.length+3]=255&i;let U=arrayify(computeHmac(hashAlgorithm,password,block1));hLen||(hLen=U.length,T=new Uint8Array(hLen),l=Math.ceil(keylen/hLen),r=keylen-(l-1)*hLen),T.set(U);for(let j=1;j<iterations;j++){U=arrayify(computeHmac(hashAlgorithm,password,U));for(let k=0;k<hLen;k++)T[k]^=U[k]}const destPos=(i-1)*hLen,len=i===l?r:hLen;DK.set(arrayify(T).slice(0,len),destPos)}return hexlify(DK)}const wordlist_logger=new Logger("wordlists/5.6.1");class Wordlist{constructor(locale){wordlist_logger.checkAbstract(new.target,Wordlist),defineReadOnly(this,"locale",locale)}split(mnemonic){return mnemonic.toLowerCase().split(/ +/g)}join(words){return words.join(" ")}static check(wordlist){const words=[];for(let i=0;i<2048;i++){const word=wordlist.getWord(i);if(i!==wordlist.getWordIndex(word))return"0x";words.push(word)}return id(words.join("\n")+"\n")}static register(lang,name){name||(name=lang.locale)}}let wordlist=null;function loadWords(lang){if(null==wordlist&&(wordlist="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==Wordlist.check(lang)))throw wordlist=null,new Error("BIP39 Wordlist for en (English) FAILED")}const langEn=new class LangEn extends Wordlist{constructor(){super("en")}getWord(index){return loadWords(this),wordlist[index]}getWordIndex(word){return loadWords(this),wordlist.indexOf(word)}};Wordlist.register(langEn);const wordlists={en:langEn},hdnode_lib_esm_logger=new Logger("hdnode/5.6.2"),N=BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),MasterSecret=toUtf8Bytes("Bitcoin seed");function getUpperMask(bits){return(1<<bits)-1<<8-bits}function bytes32(value){return hexZeroPad(hexlify(value),32)}function base58check(data){return Base58.encode(concat([data,hexDataSlice(sha256(sha256(data)),0,4)]))}function getWordlist(wordlist){if(null==wordlist)return wordlists.en;if("string"==typeof wordlist){const words=wordlists[wordlist];return null==words&&hdnode_lib_esm_logger.throwArgumentError("unknown locale","wordlist",wordlist),words}return wordlist}const lib_esm_constructorGuard={},defaultPath="m/44'/60'/0'/0/0";class HDNode{constructor(constructorGuard,privateKey,publicKey,parentFingerprint,chainCode,index,depth,mnemonicOrPath){if(constructorGuard!==lib_esm_constructorGuard)throw new Error("HDNode constructor cannot be called directly");if(privateKey){const signingKey=new SigningKey(privateKey);defineReadOnly(this,"privateKey",signingKey.privateKey),defineReadOnly(this,"publicKey",signingKey.compressedPublicKey)}else defineReadOnly(this,"privateKey",null),defineReadOnly(this,"publicKey",hexlify(publicKey));defineReadOnly(this,"parentFingerprint",parentFingerprint),defineReadOnly(this,"fingerprint",hexDataSlice(ripemd160(sha256(this.publicKey)),0,4)),defineReadOnly(this,"address",computeAddress(this.publicKey)),defineReadOnly(this,"chainCode",chainCode),defineReadOnly(this,"index",index),defineReadOnly(this,"depth",depth),null==mnemonicOrPath?(defineReadOnly(this,"mnemonic",null),defineReadOnly(this,"path",null)):"string"==typeof mnemonicOrPath?(defineReadOnly(this,"mnemonic",null),defineReadOnly(this,"path",mnemonicOrPath)):(defineReadOnly(this,"mnemonic",mnemonicOrPath),defineReadOnly(this,"path",mnemonicOrPath.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return base58check(concat([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",hexlify(this.depth),this.parentFingerprint,hexZeroPad(hexlify(this.index),4),this.chainCode,null!=this.privateKey?concat(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new HDNode(lib_esm_constructorGuard,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(index){if(index>4294967295)throw new Error("invalid index - "+String(index));let path=this.path;path&&(path+="/"+(2147483647&index));const data=new Uint8Array(37);if(2147483648&index){if(!this.privateKey)throw new Error("cannot derive child of neutered node");data.set(arrayify(this.privateKey),1),path&&(path+="'")}else data.set(arrayify(this.publicKey));for(let i=24;i>=0;i-=8)data[33+(i>>3)]=index>>24-i&255;const I=arrayify(computeHmac(SupportedAlgorithm.sha512,this.chainCode,data)),IL=I.slice(0,32),IR=I.slice(32);let ki=null,Ki=null;if(this.privateKey)ki=bytes32(BigNumber.from(IL).add(this.privateKey).mod(N));else{Ki=new SigningKey(hexlify(IL))._addPoint(this.publicKey)}let mnemonicOrPath=path;const srcMnemonic=this.mnemonic;return srcMnemonic&&(mnemonicOrPath=Object.freeze({phrase:srcMnemonic.phrase,path,locale:srcMnemonic.locale||"en"})),new HDNode(lib_esm_constructorGuard,ki,Ki,this.fingerprint,bytes32(IR),index,this.depth+1,mnemonicOrPath)}derivePath(path){const components=path.split("/");if(0===components.length||"m"===components[0]&&0!==this.depth)throw new Error("invalid path - "+path);"m"===components[0]&&components.shift();let result=this;for(let i=0;i<components.length;i++){const component=components[i];if(component.match(/^[0-9]+'$/)){const index=parseInt(component.substring(0,component.length-1));if(index>=2147483648)throw new Error("invalid path index - "+component);result=result._derive(2147483648+index)}else{if(!component.match(/^[0-9]+$/))throw new Error("invalid path component - "+component);{const index=parseInt(component);if(index>=2147483648)throw new Error("invalid path index - "+component);result=result._derive(index)}}}return result}static _fromSeed(seed,mnemonic){const seedArray=arrayify(seed);if(seedArray.length<16||seedArray.length>64)throw new Error("invalid seed");const I=arrayify(computeHmac(SupportedAlgorithm.sha512,MasterSecret,seedArray));return new HDNode(lib_esm_constructorGuard,bytes32(I.slice(0,32)),null,"0x00000000",bytes32(I.slice(32)),0,0,mnemonic)}static fromMnemonic(mnemonic,password,wordlist){return mnemonic=entropyToMnemonic(mnemonicToEntropy(mnemonic,wordlist=getWordlist(wordlist)),wordlist),HDNode._fromSeed(mnemonicToSeed(mnemonic,password),{phrase:mnemonic,path:"m",locale:wordlist.locale})}static fromSeed(seed){return HDNode._fromSeed(seed,null)}static fromExtendedKey(extendedKey){const bytes=Base58.decode(extendedKey);82===bytes.length&&base58check(bytes.slice(0,78))===extendedKey||hdnode_lib_esm_logger.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const depth=bytes[4],parentFingerprint=hexlify(bytes.slice(5,9)),index=parseInt(hexlify(bytes.slice(9,13)).substring(2),16),chainCode=hexlify(bytes.slice(13,45)),key=bytes.slice(45,78);switch(hexlify(bytes.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new HDNode(lib_esm_constructorGuard,null,hexlify(key),parentFingerprint,chainCode,index,depth,null);case"0x0488ade4":case"0x04358394 ":if(0!==key[0])break;return new HDNode(lib_esm_constructorGuard,hexlify(key.slice(1)),null,parentFingerprint,chainCode,index,depth,null)}return hdnode_lib_esm_logger.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function mnemonicToSeed(mnemonic,password){password||(password="");const salt=toUtf8Bytes("mnemonic"+password,UnicodeNormalizationForm.NFKD);return pbkdf2(toUtf8Bytes(mnemonic,UnicodeNormalizationForm.NFKD),salt,2048,64,"sha512")}function mnemonicToEntropy(mnemonic,wordlist){wordlist=getWordlist(wordlist),hdnode_lib_esm_logger.checkNormalize();const words=wordlist.split(mnemonic);if(words.length%3!=0)throw new Error("invalid mnemonic");const entropy=arrayify(new Uint8Array(Math.ceil(11*words.length/8)));let offset=0;for(let i=0;i<words.length;i++){let index=wordlist.getWordIndex(words[i].normalize("NFKD"));if(-1===index)throw new Error("invalid mnemonic");for(let bit=0;bit<11;bit++)index&1<<10-bit&&(entropy[offset>>3]|=1<<7-offset%8),offset++}const entropyBits=32*words.length/3,checksumMask=getUpperMask(words.length/3);if((arrayify(sha256(entropy.slice(0,entropyBits/8)))[0]&checksumMask)!==(entropy[entropy.length-1]&checksumMask))throw new Error("invalid checksum");return hexlify(entropy.slice(0,entropyBits/8))}function entropyToMnemonic(entropy,wordlist){if(wordlist=getWordlist(wordlist),(entropy=arrayify(entropy)).length%4!=0||entropy.length<16||entropy.length>32)throw new Error("invalid entropy");const indices=[0];let remainingBits=11;for(let i=0;i<entropy.length;i++)remainingBits>8?(indices[indices.length-1]<<=8,indices[indices.length-1]|=entropy[i],remainingBits-=8):(indices[indices.length-1]<<=remainingBits,indices[indices.length-1]|=entropy[i]>>8-remainingBits,indices.push(entropy[i]&(1<<8-remainingBits)-1),remainingBits+=3);const checksumBits=entropy.length/4,checksum=arrayify(sha256(entropy))[0]&getUpperMask(checksumBits);return indices[indices.length-1]<<=checksumBits,indices[indices.length-1]|=checksum>>8-checksumBits,wordlist.join(indices.map((index=>wordlist.getWord(index))))}function isValidMnemonic(mnemonic,wordlist){try{return mnemonicToEntropy(mnemonic,wordlist),!0}catch(error){}return!1}function getAccountPath(index){return("number"!=typeof index||index<0||index>=2147483648||index%1)&&hdnode_lib_esm_logger.throwArgumentError("invalid account index","index",index),`m/44'/60'/${index}'/0/0`}const random_logger=new Logger("random/5.6.1");const anyGlobal=function getGlobal(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==__webpack_require__.g)return __webpack_require__.g;throw new Error("unable to locate global object")}();let random_crypto=anyGlobal.crypto||anyGlobal.msCrypto;function randomBytes(length){(length<=0||length>1024||length%1||length!=length)&&random_logger.throwArgumentError("invalid length","length",length);const result=new Uint8Array(length);return random_crypto.getRandomValues(result),arrayify(result)}random_crypto&&random_crypto.getRandomValues||(random_logger.warn("WARNING: Missing strong random number source"),random_crypto={getRandomValues:function(buffer){return random_logger.throwError("no secure random source avaialble",Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var aes_js=__webpack_require__(8826),aes_js_default=__webpack_require__.n(aes_js);function looseArrayify(hexString){return"string"==typeof hexString&&"0x"!==hexString.substring(0,2)&&(hexString="0x"+hexString),arrayify(hexString)}function zpad(value,length){for(value=String(value);value.length<length;)value="0"+value;return value}function getPassword(password){return"string"==typeof password?toUtf8Bytes(password,UnicodeNormalizationForm.NFKC):arrayify(password)}function searchPath(object,path){let currentChild=object;const comps=path.toLowerCase().split("/");for(let i=0;i<comps.length;i++){let matchingChild=null;for(const key in currentChild)if(key.toLowerCase()===comps[i]){matchingChild=currentChild[key];break}if(null===matchingChild)return null;currentChild=matchingChild}return currentChild}function uuidV4(randomBytes){const bytes=arrayify(randomBytes);bytes[6]=15&bytes[6]|64,bytes[8]=63&bytes[8]|128;const value=hexlify(bytes);return[value.substring(2,10),value.substring(10,14),value.substring(14,18),value.substring(18,22),value.substring(22,34)].join("-")}const crowdsale_logger=new Logger("json-wallets/5.6.1");class CrowdsaleAccount extends Description{isCrowdsaleAccount(value){return!(!value||!value._isCrowdsaleAccount)}}function decrypt(json,password){const data=JSON.parse(json);password=getPassword(password);const ethaddr=getAddress(searchPath(data,"ethaddr")),encseed=looseArrayify(searchPath(data,"encseed"));encseed&&encseed.length%16==0||crowdsale_logger.throwArgumentError("invalid encseed","json",json);const key=arrayify(pbkdf2(password,password,2e3,32,"sha256")).slice(0,16),iv=encseed.slice(0,16),encryptedSeed=encseed.slice(16),aesCbc=new(aes_js_default().ModeOfOperation.cbc)(key,iv),seed=aes_js_default().padding.pkcs7.strip(arrayify(aesCbc.decrypt(encryptedSeed)));let seedHex="";for(let i=0;i<seed.length;i++)seedHex+=String.fromCharCode(seed[i]);const privateKey=keccak256(toUtf8Bytes(seedHex));return new CrowdsaleAccount({_isCrowdsaleAccount:!0,address:ethaddr,privateKey})}function isCrowdsaleWallet(json){let data=null;try{data=JSON.parse(json)}catch(error){return!1}return data.encseed&&data.ethaddr}function isKeystoreWallet(json){let data=null;try{data=JSON.parse(json)}catch(error){return!1}return!(!data.version||parseInt(data.version)!==data.version||3!==parseInt(data.version))}function getJsonWalletAddress(json){if(isCrowdsaleWallet(json))try{return getAddress(JSON.parse(json).ethaddr)}catch(error){return null}if(isKeystoreWallet(json))try{return getAddress(JSON.parse(json).address)}catch(error){return null}return null}var scrypt=__webpack_require__(7635),scrypt_default=__webpack_require__.n(scrypt),keystore_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const keystore_logger=new Logger("json-wallets/5.6.1");function hasMnemonic(value){return null!=value&&value.mnemonic&&value.mnemonic.phrase}class KeystoreAccount extends Description{isKeystoreAccount(value){return!(!value||!value._isKeystoreAccount)}}function _getAccount(data,key){const ciphertext=looseArrayify(searchPath(data,"crypto/ciphertext"));if(hexlify(keccak256(concat([key.slice(16,32),ciphertext]))).substring(2)!==searchPath(data,"crypto/mac").toLowerCase())throw new Error("invalid password");const privateKey=function _decrypt(data,key,ciphertext){if("aes-128-ctr"===searchPath(data,"crypto/cipher")){const iv=looseArrayify(searchPath(data,"crypto/cipherparams/iv")),counter=new(aes_js_default().Counter)(iv);return arrayify(new(aes_js_default().ModeOfOperation.ctr)(key,counter).decrypt(ciphertext))}return null}(data,key.slice(0,16),ciphertext);privateKey||keystore_logger.throwError("unsupported cipher",Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const mnemonicKey=key.slice(32,64),address=computeAddress(privateKey);if(data.address){let check=data.address.toLowerCase();if("0x"!==check.substring(0,2)&&(check="0x"+check),getAddress(check)!==address)throw new Error("address mismatch")}const account={_isKeystoreAccount:!0,address,privateKey:hexlify(privateKey)};if("0.1"===searchPath(data,"x-ethers/version")){const mnemonicCiphertext=looseArrayify(searchPath(data,"x-ethers/mnemonicCiphertext")),mnemonicIv=looseArrayify(searchPath(data,"x-ethers/mnemonicCounter")),mnemonicCounter=new(aes_js_default().Counter)(mnemonicIv),mnemonicAesCtr=new(aes_js_default().ModeOfOperation.ctr)(mnemonicKey,mnemonicCounter),path=searchPath(data,"x-ethers/path")||defaultPath,locale=searchPath(data,"x-ethers/locale")||"en",entropy=arrayify(mnemonicAesCtr.decrypt(mnemonicCiphertext));try{const mnemonic=entropyToMnemonic(entropy,locale),node=HDNode.fromMnemonic(mnemonic,null,locale).derivePath(path);if(node.privateKey!=account.privateKey)throw new Error("mnemonic mismatch");account.mnemonic=node.mnemonic}catch(error){if(error.code!==Logger.errors.INVALID_ARGUMENT||"wordlist"!==error.argument)throw error}}return new KeystoreAccount(account)}function pbkdf2Sync(passwordBytes,salt,count,dkLen,prfFunc){return arrayify(pbkdf2(passwordBytes,salt,count,dkLen,prfFunc))}function keystore_pbkdf2(passwordBytes,salt,count,dkLen,prfFunc){return Promise.resolve(pbkdf2Sync(passwordBytes,salt,count,dkLen,prfFunc))}function _computeKdfKey(data,password,pbkdf2Func,scryptFunc,progressCallback){const passwordBytes=getPassword(password),kdf=searchPath(data,"crypto/kdf");if(kdf&&"string"==typeof kdf){const throwError=function(name,value){return keystore_logger.throwArgumentError("invalid key-derivation function parameters",name,value)};if("scrypt"===kdf.toLowerCase()){const salt=looseArrayify(searchPath(data,"crypto/kdfparams/salt")),N=parseInt(searchPath(data,"crypto/kdfparams/n")),r=parseInt(searchPath(data,"crypto/kdfparams/r")),p=parseInt(searchPath(data,"crypto/kdfparams/p"));N&&r&&p||throwError("kdf",kdf),0!=(N&N-1)&&throwError("N",N);const dkLen=parseInt(searchPath(data,"crypto/kdfparams/dklen"));return 32!==dkLen&&throwError("dklen",dkLen),scryptFunc(passwordBytes,salt,N,r,p,64,progressCallback)}if("pbkdf2"===kdf.toLowerCase()){const salt=looseArrayify(searchPath(data,"crypto/kdfparams/salt"));let prfFunc=null;const prf=searchPath(data,"crypto/kdfparams/prf");"hmac-sha256"===prf?prfFunc="sha256":"hmac-sha512"===prf?prfFunc="sha512":throwError("prf",prf);const count=parseInt(searchPath(data,"crypto/kdfparams/c")),dkLen=parseInt(searchPath(data,"crypto/kdfparams/dklen"));return 32!==dkLen&&throwError("dklen",dkLen),pbkdf2Func(passwordBytes,salt,count,dkLen,prfFunc)}}return keystore_logger.throwArgumentError("unsupported key-derivation function","kdf",kdf)}function decryptJsonWallet(json,password,progressCallback){if(isCrowdsaleWallet(json)){progressCallback&&progressCallback(0);const account=decrypt(json,password);return progressCallback&&progressCallback(1),Promise.resolve(account)}return isKeystoreWallet(json)?function keystore_decrypt(json,password,progressCallback){return keystore_awaiter(this,void 0,void 0,(function*(){const data=JSON.parse(json);return _getAccount(data,yield _computeKdfKey(data,password,keystore_pbkdf2,scrypt_default().scrypt,progressCallback))}))}(json,password,progressCallback):Promise.reject(new Error("invalid JSON wallet"))}function decryptJsonWalletSync(json,password){if(isCrowdsaleWallet(json))return decrypt(json,password);if(isKeystoreWallet(json))return function decryptSync(json,password){const data=JSON.parse(json);return _getAccount(data,_computeKdfKey(data,password,pbkdf2Sync,scrypt_default().syncScrypt))}(json,password);throw new Error("invalid JSON wallet")}var wallet_lib_esm_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const wallet_lib_esm_logger=new Logger("wallet/5.6.2");class Wallet extends Signer{constructor(privateKey,provider){if(super(),function isAccount(value){return null!=value&&lib_esm_isHexString(value.privateKey,32)&&null!=value.address}(privateKey)){const signingKey=new SigningKey(privateKey.privateKey);if(defineReadOnly(this,"_signingKey",(()=>signingKey)),defineReadOnly(this,"address",computeAddress(this.publicKey)),this.address!==getAddress(privateKey.address)&&wallet_lib_esm_logger.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function lib_esm_hasMnemonic(value){const mnemonic=value.mnemonic;return mnemonic&&mnemonic.phrase}(privateKey)){const srcMnemonic=privateKey.mnemonic;defineReadOnly(this,"_mnemonic",(()=>({phrase:srcMnemonic.phrase,path:srcMnemonic.path||defaultPath,locale:srcMnemonic.locale||"en"})));const mnemonic=this.mnemonic;computeAddress(HDNode.fromMnemonic(mnemonic.phrase,null,mnemonic.locale).derivePath(mnemonic.path).privateKey)!==this.address&&wallet_lib_esm_logger.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else defineReadOnly(this,"_mnemonic",(()=>null))}else{if(SigningKey.isSigningKey(privateKey))"secp256k1"!==privateKey.curve&&wallet_lib_esm_logger.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),defineReadOnly(this,"_signingKey",(()=>privateKey));else{"string"==typeof privateKey&&privateKey.match(/^[0-9a-f]*$/i)&&64===privateKey.length&&(privateKey="0x"+privateKey);const signingKey=new SigningKey(privateKey);defineReadOnly(this,"_signingKey",(()=>signingKey))}defineReadOnly(this,"_mnemonic",(()=>null)),defineReadOnly(this,"address",computeAddress(this.publicKey))}provider&&!Provider.isProvider(provider)&&wallet_lib_esm_logger.throwArgumentError("invalid provider","provider",provider),defineReadOnly(this,"provider",provider||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(provider){return new Wallet(this,provider)}signTransaction(transaction){return resolveProperties(transaction).then((tx=>{null!=tx.from&&(getAddress(tx.from)!==this.address&&wallet_lib_esm_logger.throwArgumentError("transaction from address mismatch","transaction.from",transaction.from),delete tx.from);const signature=this._signingKey().signDigest(keccak256(serialize(tx)));return serialize(tx,signature)}))}signMessage(message){return wallet_lib_esm_awaiter(this,void 0,void 0,(function*(){return joinSignature(this._signingKey().signDigest(hashMessage(message)))}))}_signTypedData(domain,types,value){return wallet_lib_esm_awaiter(this,void 0,void 0,(function*(){const populated=yield TypedDataEncoder.resolveNames(domain,types,value,(name=>(null==this.provider&&wallet_lib_esm_logger.throwError("cannot resolve ENS names without a provider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:name}),this.provider.resolveName(name))));return joinSignature(this._signingKey().signDigest(TypedDataEncoder.hash(populated.domain,types,populated.value)))}))}encrypt(password,options,progressCallback){if("function"!=typeof options||progressCallback||(progressCallback=options,options={}),progressCallback&&"function"!=typeof progressCallback)throw new Error("invalid callback");return options||(options={}),function encrypt(account,password,options,progressCallback){try{if(getAddress(account.address)!==computeAddress(account.privateKey))throw new Error("address/privateKey mismatch");if(hasMnemonic(account)){const mnemonic=account.mnemonic;if(HDNode.fromMnemonic(mnemonic.phrase,null,mnemonic.locale).derivePath(mnemonic.path||defaultPath).privateKey!=account.privateKey)throw new Error("mnemonic mismatch")}}catch(e){return Promise.reject(e)}"function"!=typeof options||progressCallback||(progressCallback=options,options={}),options||(options={});const privateKey=arrayify(account.privateKey),passwordBytes=getPassword(password);let entropy=null,path=null,locale=null;if(hasMnemonic(account)){const srcMnemonic=account.mnemonic;entropy=arrayify(mnemonicToEntropy(srcMnemonic.phrase,srcMnemonic.locale||"en")),path=srcMnemonic.path||defaultPath,locale=srcMnemonic.locale||"en"}let client=options.client;client||(client="ethers.js");let salt=null;salt=options.salt?arrayify(options.salt):randomBytes(32);let iv=null;if(options.iv){if(iv=arrayify(options.iv),16!==iv.length)throw new Error("invalid iv")}else iv=randomBytes(16);let uuidRandom=null;if(options.uuid){if(uuidRandom=arrayify(options.uuid),16!==uuidRandom.length)throw new Error("invalid uuid")}else uuidRandom=randomBytes(16);let N=1<<17,r=8,p=1;return options.scrypt&&(options.scrypt.N&&(N=options.scrypt.N),options.scrypt.r&&(r=options.scrypt.r),options.scrypt.p&&(p=options.scrypt.p)),scrypt_default().scrypt(passwordBytes,salt,N,r,p,64,progressCallback).then((key=>{const derivedKey=(key=arrayify(key)).slice(0,16),macPrefix=key.slice(16,32),mnemonicKey=key.slice(32,64),counter=new(aes_js_default().Counter)(iv),ciphertext=arrayify(new(aes_js_default().ModeOfOperation.ctr)(derivedKey,counter).encrypt(privateKey)),mac=keccak256(concat([macPrefix,ciphertext])),data={address:account.address.substring(2).toLowerCase(),id:uuidV4(uuidRandom),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:hexlify(iv).substring(2)},ciphertext:hexlify(ciphertext).substring(2),kdf:"scrypt",kdfparams:{salt:hexlify(salt).substring(2),n:N,dklen:32,p,r},mac:mac.substring(2)}};if(entropy){const mnemonicIv=randomBytes(16),mnemonicCounter=new(aes_js_default().Counter)(mnemonicIv),mnemonicCiphertext=arrayify(new(aes_js_default().ModeOfOperation.ctr)(mnemonicKey,mnemonicCounter).encrypt(entropy)),now=new Date,timestamp=now.getUTCFullYear()+"-"+zpad(now.getUTCMonth()+1,2)+"-"+zpad(now.getUTCDate(),2)+"T"+zpad(now.getUTCHours(),2)+"-"+zpad(now.getUTCMinutes(),2)+"-"+zpad(now.getUTCSeconds(),2)+".0Z";data["x-ethers"]={client,gethFilename:"UTC--"+timestamp+"--"+data.address,mnemonicCounter:hexlify(mnemonicIv).substring(2),mnemonicCiphertext:hexlify(mnemonicCiphertext).substring(2),path,locale,version:"0.1"}}return JSON.stringify(data)}))}(this,password,options,progressCallback)}static createRandom(options){let entropy=randomBytes(16);options||(options={}),options.extraEntropy&&(entropy=arrayify(hexDataSlice(keccak256(concat([entropy,options.extraEntropy])),0,16)));const mnemonic=entropyToMnemonic(entropy,options.locale);return Wallet.fromMnemonic(mnemonic,options.path,options.locale)}static fromEncryptedJson(json,password,progressCallback){return decryptJsonWallet(json,password,progressCallback).then((account=>new Wallet(account)))}static fromEncryptedJsonSync(json,password){return new Wallet(decryptJsonWalletSync(json,password))}static fromMnemonic(mnemonic,path,wordlist){return path||(path=defaultPath),new Wallet(HDNode.fromMnemonic(mnemonic,null,wordlist).derivePath(path))}}function verifyMessage(message,signature){return recoverAddress(hashMessage(message),signature)}function verifyTypedData(domain,types,value,signature){return recoverAddress(TypedDataEncoder.hash(domain,types,value),signature)}const AddressZero="0x0000000000000000000000000000000000000000",HashZero="0x0000000000000000000000000000000000000000000000000000000000000000",EtherSymbol="Ξ",networks_lib_esm_logger=new Logger("networks/5.6.4");function ethDefaultProvider(network){const func=function(providers,options){null==options&&(options={});const providerList=[];if(providers.InfuraProvider&&"-"!==options.infura)try{providerList.push(new providers.InfuraProvider(network,options.infura))}catch(error){}if(providers.EtherscanProvider&&"-"!==options.etherscan)try{providerList.push(new providers.EtherscanProvider(network,options.etherscan))}catch(error){}if(providers.AlchemyProvider&&"-"!==options.alchemy)try{providerList.push(new providers.AlchemyProvider(network,options.alchemy))}catch(error){}if(providers.PocketProvider&&"-"!==options.pocket){const skip=["goerli","ropsten","rinkeby"];try{const provider=new providers.PocketProvider(network,options.pocket);provider.network&&-1===skip.indexOf(provider.network.name)&&providerList.push(provider)}catch(error){}}if(providers.CloudflareProvider&&"-"!==options.cloudflare)try{providerList.push(new providers.CloudflareProvider(network))}catch(error){}if(providers.AnkrProvider&&"-"!==options.ankr)try{const skip=["ropsten"],provider=new providers.AnkrProvider(network,options.ankr);provider.network&&-1===skip.indexOf(provider.network.name)&&providerList.push(provider)}catch(error){}if(0===providerList.length)return null;if(providers.FallbackProvider){let quorum=1;return null!=options.quorum?quorum=options.quorum:"homestead"===network&&(quorum=2),new providers.FallbackProvider(providerList,quorum)}return providerList[0]};return func.renetwork=function(network){return ethDefaultProvider(network)},func}function etcDefaultProvider(url,network){const func=function(providers,options){return providers.JsonRpcProvider?new providers.JsonRpcProvider(url,network):null};return func.renetwork=function(network){return etcDefaultProvider(url,network)},func}const homestead={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ethDefaultProvider("homestead")},ropsten={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ethDefaultProvider("ropsten")},classicMordor={chainId:63,name:"classicMordor",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/mordor","classicMordor")},networks={unspecified:{chainId:0,name:"unspecified"},homestead,mainnet:homestead,morden:{chainId:2,name:"morden"},ropsten,testnet:ropsten,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ethDefaultProvider("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ethDefaultProvider("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ethDefaultProvider("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},classic:{chainId:61,name:"classic",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor,classicTestnet:classicMordor,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ethDefaultProvider("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ethDefaultProvider("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"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function getNetwork(network){if(null==network)return null;if("number"==typeof network){for(const name in networks){const standard=networks[name];if(standard.chainId===network)return{name:standard.name,chainId:standard.chainId,ensAddress:standard.ensAddress||null,_defaultProvider:standard._defaultProvider||null}}return{chainId:network,name:"unknown"}}if("string"==typeof network){const standard=networks[network];return null==standard?null:{name:standard.name,chainId:standard.chainId,ensAddress:standard.ensAddress,_defaultProvider:standard._defaultProvider||null}}const standard=networks[network.name];if(!standard)return"number"!=typeof network.chainId&&networks_lib_esm_logger.throwArgumentError("invalid network chainId","network",network),network;0!==network.chainId&&network.chainId!==standard.chainId&&networks_lib_esm_logger.throwArgumentError("network chainId mismatch","network",network);let defaultProvider=network._defaultProvider||null;return null==defaultProvider&&standard._defaultProvider&&(defaultProvider=function isRenetworkable(value){return value&&"function"==typeof value.renetwork}(standard._defaultProvider)?standard._defaultProvider.renetwork(network):standard._defaultProvider),{name:network.name,chainId:standard.chainId,ensAddress:network.ensAddress||standard.ensAddress||null,_defaultProvider:defaultProvider}}function base64_decode(textData){textData=atob(textData);const data=[];for(let i=0;i<textData.length;i++)data.push(textData.charCodeAt(i));return arrayify(data)}function base64_encode(data){data=arrayify(data);let textData="";for(let i=0;i<data.length;i++)textData+=String.fromCharCode(data[i]);return btoa(textData)}function createTable(data,func){func||(func=function(value){return[parseInt(value,16)]});let lo=0,result={};return data.split(",").forEach((pair=>{let comps=pair.split(":");lo+=parseInt(comps[0],16),result[lo]=func(comps[1])})),result}function createRangeTable(data){let hi=0;return data.split(",").map((v=>{let comps=v.split("-");1===comps.length?comps[1]="0":""===comps[1]&&(comps[1]="1");let lo=hi+parseInt(comps[0],16);return hi=parseInt(comps[1],16),{l:lo,h:hi}}))}function matchMap(value,ranges){let lo=0;for(let i=0;i<ranges.length;i++){let range=ranges[i];if(lo+=range.l,value>=lo&&value<=lo+range.h&&(value-lo)%(range.d||1)==0){if(range.e&&-1!==range.e.indexOf(value-lo))continue;return range}}return null}const Table_A_1_ranges=createRangeTable("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"),Table_B_1_flags="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((v=>parseInt(v,16))),Table_B_2_ranges=[{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}],Table_B_2_lut_abs=createTable("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"),Table_B_2_lut_rel=createTable("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"),Table_B_2_complex=createTable("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 bytes2(data){if(data.length%4!=0)throw new Error("bad data");let result=[];for(let i=0;i<data.length;i+=4)result.push(parseInt(data.substring(i,i+4),16));return result})),Table_C_ranges=createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function nameprep(value){if(value.match(/^[a-z0-9-]*$/i)&&value.length<=59)return value.toLowerCase();let codes=toUtf8CodePoints(value);codes=function flatten(values){return values.reduce(((accum,value)=>(value.forEach((value=>{accum.push(value)})),accum)),[])}(codes.map((code=>{if(Table_B_1_flags.indexOf(code)>=0)return[];if(code>=65024&&code<=65039)return[];let codesTableB2=function _nameprepTableB2(codepoint){let range=matchMap(codepoint,Table_B_2_ranges);if(range)return[codepoint+range.s];let codes=Table_B_2_lut_abs[codepoint];if(codes)return codes;let shift=Table_B_2_lut_rel[codepoint];return shift?[codepoint+shift[0]]:Table_B_2_complex[codepoint]||null}(code);return codesTableB2||[code]}))),codes=toUtf8CodePoints(_toUtf8String(codes),UnicodeNormalizationForm.NFKC),codes.forEach((code=>{if(function _nameprepTableC(codepoint){return!!matchMap(codepoint,Table_C_ranges)}(code))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),codes.forEach((code=>{if(function _nameprepTableA1(codepoint){return!!matchMap(codepoint,Table_A_1_ranges)}(code))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let name=_toUtf8String(codes);if("-"===name.substring(0,1)||"--"===name.substring(2,4)||"-"===name.substring(name.length-1))throw new Error("invalid hyphen");if(name.length>63)throw new Error("too long");return name}const namehash_logger=new Logger("hash/5.6.1"),Zeros=new Uint8Array(32);Zeros.fill(0);const Partition=new RegExp("^((.*)\\.)?([^.]+)$");function isValidName(name){try{const comps=name.split(".");for(let i=0;i<comps.length;i++)if(0===nameprep(comps[i]).length)throw new Error("empty");return!0}catch(error){}return!1}function namehash(name){"string"!=typeof name&&namehash_logger.throwArgumentError("invalid ENS name; not a string","name",name);let current=name,result=Zeros;for(;current.length;){const partition=current.match(Partition);null!=partition&&""!==partition[2]||namehash_logger.throwArgumentError("invalid ENS address; missing component","name",name);result=keccak256(concat([result,keccak256(toUtf8Bytes(nameprep(partition[3])))])),current=partition[2]||""}return hexlify(result)}function dnsEncode(name){return hexlify(concat(name.split(".").map((comp=>{const bytes=toUtf8Bytes("_"+nameprep(comp));return bytes[0]=bytes.length-1,bytes}))))+"00"}var geturl_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};function getUrl(href,options){return geturl_awaiter(this,void 0,void 0,(function*(){null==options&&(options={});const request={method:options.method||"GET",headers:options.headers||{},body:options.body||void 0};!0!==options.skipFetchSetup&&(request.mode="cors",request.cache="no-cache",request.credentials="same-origin",request.redirect="follow",request.referrer="client");const response=yield fetch(href,request),body=yield response.arrayBuffer(),headers={};return response.headers.forEach?response.headers.forEach(((value,key)=>{headers[key.toLowerCase()]=value})):response.headers.keys().forEach((key=>{headers[key.toLowerCase()]=response.headers.get(key)})),{headers,statusCode:response.status,statusMessage:response.statusText,body:arrayify(new Uint8Array(body))}}))}var web_lib_esm_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const web_lib_esm_logger=new Logger("web/5.6.1");function staller(duration){return new Promise((resolve=>{setTimeout(resolve,duration)}))}function bodyify(value,type){if(null==value)return null;if("string"==typeof value)return value;if(isBytesLike(value)){if(type&&("text"===type.split("/")[0]||"application/json"===type.split(";")[0].trim()))try{return toUtf8String(value)}catch(error){}return hexlify(value)}return value}function _fetchData(connection,body,processFunc){const attemptLimit="object"==typeof connection&&null!=connection.throttleLimit?connection.throttleLimit:12;web_lib_esm_logger.assertArgument(attemptLimit>0&&attemptLimit%1==0,"invalid connection throttle limit","connection.throttleLimit",attemptLimit);const throttleCallback="object"==typeof connection?connection.throttleCallback:null,throttleSlotInterval="object"==typeof connection&&"number"==typeof connection.throttleSlotInterval?connection.throttleSlotInterval:100;web_lib_esm_logger.assertArgument(throttleSlotInterval>0&&throttleSlotInterval%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",throttleSlotInterval);const errorPassThrough="object"==typeof connection&&!!connection.errorPassThrough,headers={};let url=null;const options={method:"GET"};let allow304=!1,timeout=12e4;if("string"==typeof connection)url=connection;else if("object"==typeof connection){if(null!=connection&&null!=connection.url||web_lib_esm_logger.throwArgumentError("missing URL","connection.url",connection),url=connection.url,"number"==typeof connection.timeout&&connection.timeout>0&&(timeout=connection.timeout),connection.headers)for(const key in connection.headers)headers[key.toLowerCase()]={key,value:String(connection.headers[key])},["if-none-match","if-modified-since"].indexOf(key.toLowerCase())>=0&&(allow304=!0);if(options.allowGzip=!!connection.allowGzip,null!=connection.user&&null!=connection.password){"https:"!==url.substring(0,6)&&!0!==connection.allowInsecureAuthentication&&web_lib_esm_logger.throwError("basic authentication requires a secure https url",Logger.errors.INVALID_ARGUMENT,{argument:"url",url,user:connection.user,password:"[REDACTED]"});const authorization=connection.user+":"+connection.password;headers.authorization={key:"Authorization",value:"Basic "+base64_encode(toUtf8Bytes(authorization))}}null!=connection.skipFetchSetup&&(options.skipFetchSetup=!!connection.skipFetchSetup)}const reData=new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$","i"),dataMatch=url?url.match(reData):null;if(dataMatch)try{const response={statusCode:200,statusMessage:"OK",headers:{"content-type":dataMatch[1]},body:base64_decode(dataMatch[2])};let result=response.body;return processFunc&&(result=processFunc(response.body,response)),Promise.resolve(result)}catch(error){web_lib_esm_logger.throwError("processing response error",Logger.errors.SERVER_ERROR,{body:bodyify(dataMatch[1],dataMatch[2]),error,requestBody:null,requestMethod:"GET",url})}body&&(options.method="POST",options.body=body,null==headers["content-type"]&&(headers["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==headers["content-length"]&&(headers["content-length"]={key:"Content-Length",value:String(body.length)}));const flatHeaders={};Object.keys(headers).forEach((key=>{const header=headers[key];flatHeaders[header.key]=header.value})),options.headers=flatHeaders;const runningTimeout=function(){let timer=null;return{promise:new Promise((function(resolve,reject){timeout&&(timer=setTimeout((()=>{null!=timer&&(timer=null,reject(web_lib_esm_logger.makeError("timeout",Logger.errors.TIMEOUT,{requestBody:bodyify(options.body,flatHeaders["content-type"]),requestMethod:options.method,timeout,url})))}),timeout))})),cancel:function(){null!=timer&&(clearTimeout(timer),timer=null)}}}(),runningFetch=function(){return web_lib_esm_awaiter(this,void 0,void 0,(function*(){for(let attempt=0;attempt<attemptLimit;attempt++){let response=null;try{if(response=yield getUrl(url,options),attempt<attemptLimit)if(301===response.statusCode||302===response.statusCode){const location=response.headers.location||"";if("GET"===options.method&&location.match(/^https:/)){url=response.headers.location;continue}}else if(429===response.statusCode){let tryAgain=!0;if(throttleCallback&&(tryAgain=yield throttleCallback(attempt,url)),tryAgain){let stall=0;const retryAfter=response.headers["retry-after"];stall="string"==typeof retryAfter&&retryAfter.match(/^[1-9][0-9]*$/)?1e3*parseInt(retryAfter):throttleSlotInterval*parseInt(String(Math.random()*Math.pow(2,attempt))),yield staller(stall);continue}}}catch(error){response=error.response,null==response&&(runningTimeout.cancel(),web_lib_esm_logger.throwError("missing response",Logger.errors.SERVER_ERROR,{requestBody:bodyify(options.body,flatHeaders["content-type"]),requestMethod:options.method,serverError:error,url}))}let body=response.body;if(allow304&&304===response.statusCode?body=null:!errorPassThrough&&(response.statusCode<200||response.statusCode>=300)&&(runningTimeout.cancel(),web_lib_esm_logger.throwError("bad response",Logger.errors.SERVER_ERROR,{status:response.statusCode,headers:response.headers,body:bodyify(body,response.headers?response.headers["content-type"]:null),requestBody:bodyify(options.body,flatHeaders["content-type"]),requestMethod:options.method,url})),processFunc)try{const result=yield processFunc(body,response);return runningTimeout.cancel(),result}catch(error){if(error.throttleRetry&&attempt<attemptLimit){let tryAgain=!0;if(throttleCallback&&(tryAgain=yield throttleCallback(attempt,url)),tryAgain){const timeout=throttleSlotInterval*parseInt(String(Math.random()*Math.pow(2,attempt)));yield staller(timeout);continue}}runningTimeout.cancel(),web_lib_esm_logger.throwError("processing response error",Logger.errors.SERVER_ERROR,{body:bodyify(body,response.headers?response.headers["content-type"]:null),error,requestBody:bodyify(options.body,flatHeaders["content-type"]),requestMethod:options.method,url})}return runningTimeout.cancel(),body}return web_lib_esm_logger.throwError("failed response",Logger.errors.SERVER_ERROR,{requestBody:bodyify(options.body,flatHeaders["content-type"]),requestMethod:options.method,url})}))}();return Promise.race([runningTimeout.promise,runningFetch])}function fetchJson(connection,json,processFunc){let body=null;if(null!=json){body=toUtf8Bytes(json);const updated="string"==typeof connection?{url:connection}:shallowCopy(connection);if(updated.headers){0!==Object.keys(updated.headers).filter((k=>"content-type"===k.toLowerCase())).length||(updated.headers=shallowCopy(updated.headers),updated.headers["content-type"]="application/json")}else updated.headers={"content-type":"application/json"};connection=updated}return _fetchData(connection,body,((value,response)=>{let result=null;if(null!=value)try{result=JSON.parse(toUtf8String(value))}catch(error){web_lib_esm_logger.throwError("invalid JSON",Logger.errors.SERVER_ERROR,{body:value,error})}return processFunc&&(result=processFunc(result,response)),result}))}function poll(func,options){return options||(options={}),null==(options=shallowCopy(options)).floor&&(options.floor=0),null==options.ceiling&&(options.ceiling=1e4),null==options.interval&&(options.interval=250),new Promise((function(resolve,reject){let timer=null,done=!1;const cancel=()=>!done&&(done=!0,timer&&clearTimeout(timer),!0);options.timeout&&(timer=setTimeout((()=>{cancel()&&reject(new Error("timeout"))}),options.timeout));const retryLimit=options.retryLimit;let attempt=0;!function check(){return func().then((function(result){if(void 0!==result)cancel()&&resolve(result);else if(options.oncePoll)options.oncePoll.once("poll",check);else if(options.onceBlock)options.onceBlock.once("block",check);else if(!done){if(attempt++,attempt>retryLimit)return void(cancel()&&reject(new Error("retry limit reached")));let timeout=options.interval*parseInt(String(Math.random()*Math.pow(2,attempt)));timeout<options.floor&&(timeout=options.floor),timeout>options.ceiling&&(timeout=options.ceiling),setTimeout(check,timeout)}return null}),(function(error){cancel()&&reject(error)}))}()}))}var bech32=__webpack_require__(5751),bech32_default=__webpack_require__.n(bech32);const formatter_logger=new Logger("providers/5.6.8");class Formatter{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const formats={},address=this.address.bind(this),bigNumber=this.bigNumber.bind(this),blockTag=this.blockTag.bind(this),data=this.data.bind(this),hash=this.hash.bind(this),hex=this.hex.bind(this),number=this.number.bind(this),type=this.type.bind(this);return formats.transaction={hash,type,accessList:Formatter.allowNull(this.accessList.bind(this),null),blockHash:Formatter.allowNull(hash,null),blockNumber:Formatter.allowNull(number,null),transactionIndex:Formatter.allowNull(number,null),confirmations:Formatter.allowNull(number,null),from:address,gasPrice:Formatter.allowNull(bigNumber),maxPriorityFeePerGas:Formatter.allowNull(bigNumber),maxFeePerGas:Formatter.allowNull(bigNumber),gasLimit:bigNumber,to:Formatter.allowNull(address,null),value:bigNumber,nonce:number,data,r:Formatter.allowNull(this.uint256),s:Formatter.allowNull(this.uint256),v:Formatter.allowNull(number),creates:Formatter.allowNull(address,null),raw:Formatter.allowNull(data)},formats.transactionRequest={from:Formatter.allowNull(address),nonce:Formatter.allowNull(number),gasLimit:Formatter.allowNull(bigNumber),gasPrice:Formatter.allowNull(bigNumber),maxPriorityFeePerGas:Formatter.allowNull(bigNumber),maxFeePerGas:Formatter.allowNull(bigNumber),to:Formatter.allowNull(address),value:Formatter.allowNull(bigNumber),data:Formatter.allowNull((v=>this.data(v,!0))),type:Formatter.allowNull(number),accessList:Formatter.allowNull(this.accessList.bind(this),null)},formats.receiptLog={transactionIndex:number,blockNumber:number,transactionHash:hash,address,topics:Formatter.arrayOf(hash),data,logIndex:number,blockHash:hash},formats.receipt={to:Formatter.allowNull(this.address,null),from:Formatter.allowNull(this.address,null),contractAddress:Formatter.allowNull(address,null),transactionIndex:number,root:Formatter.allowNull(hex),gasUsed:bigNumber,logsBloom:Formatter.allowNull(data),blockHash:hash,transactionHash:hash,logs:Formatter.arrayOf(this.receiptLog.bind(this)),blockNumber:number,confirmations:Formatter.allowNull(number,null),cumulativeGasUsed:bigNumber,effectiveGasPrice:Formatter.allowNull(bigNumber),status:Formatter.allowNull(number),type},formats.block={hash:Formatter.allowNull(hash),parentHash:hash,number,timestamp:number,nonce:Formatter.allowNull(hex),difficulty:this.difficulty.bind(this),gasLimit:bigNumber,gasUsed:bigNumber,miner:Formatter.allowNull(address),extraData:data,transactions:Formatter.allowNull(Formatter.arrayOf(hash)),baseFeePerGas:Formatter.allowNull(bigNumber)},formats.blockWithTransactions=shallowCopy(formats.block),formats.blockWithTransactions.transactions=Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this))),formats.filter={fromBlock:Formatter.allowNull(blockTag,void 0),toBlock:Formatter.allowNull(blockTag,void 0),blockHash:Formatter.allowNull(hash,void 0),address:Formatter.allowNull(address,void 0),topics:Formatter.allowNull(this.topics.bind(this),void 0)},formats.filterLog={blockNumber:Formatter.allowNull(number),blockHash:Formatter.allowNull(hash),transactionIndex:number,removed:Formatter.allowNull(this.boolean.bind(this)),address,data:Formatter.allowFalsish(data,"0x"),topics:Formatter.arrayOf(hash),transactionHash:hash,logIndex:number},formats}accessList(accessList){return accessListify(accessList||[])}number(number){return"0x"===number?0:BigNumber.from(number).toNumber()}type(number){return"0x"===number||null==number?0:BigNumber.from(number).toNumber()}bigNumber(value){return BigNumber.from(value)}boolean(value){if("boolean"==typeof value)return value;if("string"==typeof value){if("true"===(value=value.toLowerCase()))return!0;if("false"===value)return!1}throw new Error("invalid boolean - "+value)}hex(value,strict){return"string"==typeof value&&(strict||"0x"===value.substring(0,2)||(value="0x"+value),lib_esm_isHexString(value))?value.toLowerCase():formatter_logger.throwArgumentError("invalid hash","value",value)}data(value,strict){const result=this.hex(value,strict);if(result.length%2!=0)throw new Error("invalid data; odd-length - "+value);return result}address(value){return getAddress(value)}callAddress(value){if(!lib_esm_isHexString(value,32))return null;const address=getAddress(hexDataSlice(value,12));return address===AddressZero?null:address}contractAddress(value){return getContractAddress(value)}blockTag(blockTag){if(null==blockTag)return"latest";if("earliest"===blockTag)return"0x0";if("latest"===blockTag||"pending"===blockTag)return blockTag;if("number"==typeof blockTag||lib_esm_isHexString(blockTag))return hexValue(blockTag);throw new Error("invalid blockTag")}hash(value,strict){const result=this.hex(value,strict);return 32!==hexDataLength(result)?formatter_logger.throwArgumentError("invalid hash","value",value):result}difficulty(value){if(null==value)return null;const v=BigNumber.from(value);try{return v.toNumber()}catch(error){}return null}uint256(value){if(!lib_esm_isHexString(value))throw new Error("invalid uint256");return hexZeroPad(value,32)}_block(value,format){null!=value.author&&null==value.miner&&(value.miner=value.author);const difficulty=null!=value._difficulty?value._difficulty:value.difficulty,result=Formatter.check(format,value);return result._difficulty=null==difficulty?null:BigNumber.from(difficulty),result}block(value){return this._block(value,this.formats.block)}blockWithTransactions(value){return this._block(value,this.formats.blockWithTransactions)}transactionRequest(value){return Formatter.check(this.formats.transactionRequest,value)}transactionResponse(transaction){null!=transaction.gas&&null==transaction.gasLimit&&(transaction.gasLimit=transaction.gas),transaction.to&&BigNumber.from(transaction.to).isZero()&&(transaction.to="0x0000000000000000000000000000000000000000"),null!=transaction.input&&null==transaction.data&&(transaction.data=transaction.input),null==transaction.to&&null==transaction.creates&&(transaction.creates=this.contractAddress(transaction)),1!==transaction.type&&2!==transaction.type||null!=transaction.accessList||(transaction.accessList=[]);const result=Formatter.check(this.formats.transaction,transaction);if(null!=transaction.chainId){let chainId=transaction.chainId;lib_esm_isHexString(chainId)&&(chainId=BigNumber.from(chainId).toNumber()),result.chainId=chainId}else{let chainId=transaction.networkId;null==chainId&&null==result.v&&(chainId=transaction.chainId),lib_esm_isHexString(chainId)&&(chainId=BigNumber.from(chainId).toNumber()),"number"!=typeof chainId&&null!=result.v&&(chainId=(result.v-35)/2,chainId<0&&(chainId=0),chainId=parseInt(chainId)),"number"!=typeof chainId&&(chainId=0),result.chainId=chainId}return result.blockHash&&"x"===result.blockHash.replace(/0/g,"")&&(result.blockHash=null),result}transaction(value){return parse(value)}receiptLog(value){return Formatter.check(this.formats.receiptLog,value)}receipt(value){const result=Formatter.check(this.formats.receipt,value);if(null!=result.root)if(result.root.length<=4){const value=BigNumber.from(result.root).toNumber();0===value||1===value?(null!=result.status&&result.status!==value&&formatter_logger.throwArgumentError("alt-root-status/status mismatch","value",{root:result.root,status:result.status}),result.status=value,delete result.root):formatter_logger.throwArgumentError("invalid alt-root-status","value.root",result.root)}else 66!==result.root.length&&formatter_logger.throwArgumentError("invalid root hash","value.root",result.root);return null!=result.status&&(result.byzantium=!0),result}topics(value){return Array.isArray(value)?value.map((v=>this.topics(v))):null!=value?this.hash(value,!0):null}filter(value){return Formatter.check(this.formats.filter,value)}filterLog(value){return Formatter.check(this.formats.filterLog,value)}static check(format,object){const result={};for(const key in format)try{const value=format[key](object[key]);void 0!==value&&(result[key]=value)}catch(error){throw error.checkKey=key,error.checkValue=object[key],error}return result}static allowNull(format,nullValue){return function(value){return null==value?nullValue:format(value)}}static allowFalsish(format,replaceValue){return function(value){return value?format(value):replaceValue}}static arrayOf(format){return function(array){if(!Array.isArray(array))throw new Error("not an array");const result=[];return array.forEach((function(value){result.push(format(value))})),result}}}function isCommunityResourcable(value){return value&&"function"==typeof value.isCommunityResource}function isCommunityResource(value){return isCommunityResourcable(value)&&value.isCommunityResource()}let throttleMessage=!1;function showThrottleMessage(){throttleMessage||(throttleMessage=!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 base_provider_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const base_provider_logger=new Logger("providers/5.6.8");function checkTopic(topic){return null==topic?"null":(32!==hexDataLength(topic)&&base_provider_logger.throwArgumentError("invalid topic","topic",topic),topic.toLowerCase())}function serializeTopics(topics){for(topics=topics.slice();topics.length>0&&null==topics[topics.length-1];)topics.pop();return topics.map((topic=>{if(Array.isArray(topic)){const unique={};topic.forEach((topic=>{unique[checkTopic(topic)]=!0}));const sorted=Object.keys(unique);return sorted.sort(),sorted.join("|")}return checkTopic(topic)})).join("&")}function base_provider_getEventTag(eventName){if("string"==typeof eventName){if(32===hexDataLength(eventName=eventName.toLowerCase()))return"tx:"+eventName;if(-1===eventName.indexOf(":"))return eventName}else{if(Array.isArray(eventName))return"filter:*:"+serializeTopics(eventName);if(ForkEvent.isForkEvent(eventName))throw base_provider_logger.warn("not implemented"),new Error("not implemented");if(eventName&&"object"==typeof eventName)return"filter:"+(eventName.address||"*")+":"+serializeTopics(eventName.topics||[])}throw new Error("invalid event - "+eventName)}function getTime(){return(new Date).getTime()}function stall(duration){return new Promise((resolve=>{setTimeout(resolve,duration)}))}const PollableEvents=["block","network","pending","poll"];class Event{constructor(tag,listener,once){defineReadOnly(this,"tag",tag),defineReadOnly(this,"listener",listener),defineReadOnly(this,"once",once),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 comps=this.tag.split(":");return"tx"!==comps[0]?null:comps[1]}get filter(){const comps=this.tag.split(":");if("filter"!==comps[0])return null;const address=comps[1],topics=function deserializeTopics(data){return""===data?[]:data.split(/&/g).map((topic=>{if(""===topic)return[];const comps=topic.split("|").map((topic=>"null"===topic?null:topic));return 1===comps.length?comps[0]:comps}))}(comps[2]),filter={};return topics.length>0&&(filter.topics=topics),address&&"*"!==address&&(filter.address=address),filter}pollable(){return this.tag.indexOf(":")>=0||PollableEvents.indexOf(this.tag)>=0}}const coinInfos={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 bytes32ify(value){return hexZeroPad(BigNumber.from(value).toHexString(),32)}function base58Encode(data){return Base58.encode(concat([data,hexDataSlice(sha256(sha256(data)),0,4)]))}const matcherIpfs=new RegExp("^(ipfs)://(.*)$","i"),matchers=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),matcherIpfs,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function _parseString(result,start){try{return toUtf8String(_parseBytes(result,start))}catch(error){}return null}function _parseBytes(result,start){if("0x"===result)return null;const offset=BigNumber.from(hexDataSlice(result,start,start+32)).toNumber(),length=BigNumber.from(hexDataSlice(result,offset,offset+32)).toNumber();return hexDataSlice(result,offset+32,offset+32+length)}function getIpfsLink(link){return link.match(/^ipfs:\/\/ipfs\//i)?link=link.substring(12):link.match(/^ipfs:\/\//i)?link=link.substring(7):base_provider_logger.throwArgumentError("unsupported IPFS format","link",link),`https://gateway.ipfs.io/ipfs/${link}`}function numPad(value){const result=arrayify(value);if(result.length>32)throw new Error("internal; should not happen");const padded=new Uint8Array(32);return padded.set(result,32-result.length),padded}function bytesPad(value){if(value.length%32==0)return value;const result=new Uint8Array(32*Math.ceil(value.length/32));return result.set(value),result}function encodeBytes(datas){const result=[];let byteCount=0;for(let i=0;i<datas.length;i++)result.push(null),byteCount+=32;for(let i=0;i<datas.length;i++){const data=arrayify(datas[i]);result[i]=numPad(byteCount),result.push(numPad(data.length)),result.push(bytesPad(data)),byteCount+=32+32*Math.ceil(data.length/32)}return hexConcat(result)}class Resolver{constructor(provider,address,name,resolvedAddress){defineReadOnly(this,"provider",provider),defineReadOnly(this,"name",name),defineReadOnly(this,"address",provider.formatter.address(address)),defineReadOnly(this,"_resolvedAddress",resolvedAddress)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((result=>BigNumber.from(result).eq(1))).catch((error=>{if(error.code===Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,error}))),this._supportsEip2544}_fetch(selector,parameters){return base_provider_awaiter(this,void 0,void 0,(function*(){const tx={to:this.address,ccipReadEnabled:!0,data:hexConcat([selector,namehash(this.name),parameters||"0x"])};let parseBytes=!1;(yield this.supportsWildcard())&&(parseBytes=!0,tx.data=hexConcat(["0x9061b923",encodeBytes([dnsEncode(this.name),tx.data])]));try{let result=yield this.provider.call(tx);return arrayify(result).length%32==4&&base_provider_logger.throwError("resolver threw error",Logger.errors.CALL_EXCEPTION,{transaction:tx,data:result}),parseBytes&&(result=_parseBytes(result,0)),result}catch(error){if(error.code===Logger.errors.CALL_EXCEPTION)return null;throw error}}))}_fetchBytes(selector,parameters){return base_provider_awaiter(this,void 0,void 0,(function*(){const result=yield this._fetch(selector,parameters);return null!=result?_parseBytes(result,0):null}))}_getAddress(coinType,hexBytes){const coinInfo=coinInfos[String(coinType)];if(null==coinInfo&&base_provider_logger.throwError(`unsupported coin type: ${coinType}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${coinType})`}),"eth"===coinInfo.ilk)return this.provider.formatter.address(hexBytes);const bytes=arrayify(hexBytes);if(null!=coinInfo.p2pkh){const p2pkh=hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(p2pkh){const length=parseInt(p2pkh[1],16);if(p2pkh[2].length===2*length&&length>=1&&length<=75)return base58Encode(concat([[coinInfo.p2pkh],"0x"+p2pkh[2]]))}}if(null!=coinInfo.p2sh){const p2sh=hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(p2sh){const length=parseInt(p2sh[1],16);if(p2sh[2].length===2*length&&length>=1&&length<=75)return base58Encode(concat([[coinInfo.p2sh],"0x"+p2sh[2]]))}}if(null!=coinInfo.prefix){const length=bytes[1];let version=bytes[0];if(0===version?20!==length&&32!==length&&(version=-1):version=-1,version>=0&&bytes.length===2+length&&length>=1&&length<=75){const words=bech32_default().toWords(bytes.slice(2));return words.unshift(version),bech32_default().encode(coinInfo.prefix,words)}}return null}getAddress(coinType){return base_provider_awaiter(this,void 0,void 0,(function*(){if(null==coinType&&(coinType=60),60===coinType)try{const result=yield this._fetch("0x3b3b57de");return"0x"===result||result===HashZero?null:this.provider.formatter.callAddress(result)}catch(error){if(error.code===Logger.errors.CALL_EXCEPTION)return null;throw error}const hexBytes=yield this._fetchBytes("0xf1cb7e06",bytes32ify(coinType));if(null==hexBytes||"0x"===hexBytes)return null;const address=this._getAddress(coinType,hexBytes);return null==address&&base_provider_logger.throwError("invalid or unsupported coin data",Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${coinType})`,coinType,data:hexBytes}),address}))}getAvatar(){return base_provider_awaiter(this,void 0,void 0,(function*(){const linkage=[{type:"name",content:this.name}];try{const avatar=yield this.getText("avatar");if(null==avatar)return null;for(let i=0;i<matchers.length;i++){const match=avatar.match(matchers[i]);if(null==match)continue;const scheme=match[1].toLowerCase();switch(scheme){case"https":return linkage.push({type:"url",content:avatar}),{linkage,url:avatar};case"data":return linkage.push({type:"data",content:avatar}),{linkage,url:avatar};case"ipfs":return linkage.push({type:"ipfs",content:avatar}),{linkage,url:getIpfsLink(avatar)};case"erc721":case"erc1155":{const selector="erc721"===scheme?"0xc87b56dd":"0x0e89341c";linkage.push({type:scheme,content:avatar});const owner=this._resolvedAddress||(yield this.getAddress()),comps=(match[2]||"").split("/");if(2!==comps.length)return null;const addr=yield this.provider.formatter.address(comps[0]),tokenId=hexZeroPad(BigNumber.from(comps[1]).toHexString(),32);if("erc721"===scheme){const tokenOwner=this.provider.formatter.callAddress(yield this.provider.call({to:addr,data:hexConcat(["0x6352211e",tokenId])}));if(owner!==tokenOwner)return null;linkage.push({type:"owner",content:tokenOwner})}else if("erc1155"===scheme){const balance=BigNumber.from(yield this.provider.call({to:addr,data:hexConcat(["0x00fdd58e",hexZeroPad(owner,32),tokenId])}));if(balance.isZero())return null;linkage.push({type:"balance",content:balance.toString()})}const tx={to:this.provider.formatter.address(comps[0]),data:hexConcat([selector,tokenId])};let metadataUrl=_parseString(yield this.provider.call(tx),0);if(null==metadataUrl)return null;linkage.push({type:"metadata-url-base",content:metadataUrl}),"erc1155"===scheme&&(metadataUrl=metadataUrl.replace("{id}",tokenId.substring(2)),linkage.push({type:"metadata-url-expanded",content:metadataUrl})),metadataUrl.match(/^ipfs:/i)&&(metadataUrl=getIpfsLink(metadataUrl)),linkage.push({type:"metadata-url",content:metadataUrl});const metadata=yield fetchJson(metadataUrl);if(!metadata)return null;linkage.push({type:"metadata",content:JSON.stringify(metadata)});let imageUrl=metadata.image;if("string"!=typeof imageUrl)return null;if(imageUrl.match(/^(https:\/\/|data:)/i));else{if(null==imageUrl.match(matcherIpfs))return null;linkage.push({type:"url-ipfs",content:imageUrl}),imageUrl=getIpfsLink(imageUrl)}return linkage.push({type:"url",content:imageUrl}),{linkage,url:imageUrl}}}}}catch(error){}return null}))}getContentHash(){return base_provider_awaiter(this,void 0,void 0,(function*(){const hexBytes=yield this._fetchBytes("0xbc1c58d1");if(null==hexBytes||"0x"===hexBytes)return null;const ipfs=hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(ipfs){const length=parseInt(ipfs[3],16);if(ipfs[4].length===2*length)return"ipfs://"+Base58.encode("0x"+ipfs[1])}const ipns=hexBytes.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(ipns){const length=parseInt(ipns[3],16);if(ipns[4].length===2*length)return"ipns://"+Base58.encode("0x"+ipns[1])}const swarm=hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(swarm&&64===swarm[1].length)return"bzz://"+swarm[1];const skynet=hexBytes.match(/^0x90b2c605([0-9a-f]*)$/);if(skynet&&68===skynet[1].length){const urlSafe={"=":"","+":"-","/":"_"};return"sia://"+base64_encode("0x"+skynet[1]).replace(/[=+\/]/g,(a=>urlSafe[a]))}return base_provider_logger.throwError("invalid or unsupported content hash data",Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:hexBytes})}))}getText(key){return base_provider_awaiter(this,void 0,void 0,(function*(){let keyBytes=toUtf8Bytes(key);keyBytes=concat([bytes32ify(64),bytes32ify(keyBytes.length),keyBytes]),keyBytes.length%32!=0&&(keyBytes=concat([keyBytes,hexZeroPad("0x",32-key.length%32)]));const hexBytes=yield this._fetchBytes("0x59d1d43c",hexlify(keyBytes));return null==hexBytes||"0x"===hexBytes?null:toUtf8String(hexBytes)}))}}let defaultFormatter=null,nextPollId=1;class BaseProvider extends Provider{constructor(network){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),defineReadOnly(this,"anyNetwork","any"===network),this.anyNetwork&&(network=this.detectNetwork()),network instanceof Promise)this._networkPromise=network,network.catch((error=>{})),this._ready().catch((error=>{}));else{const knownNetwork=getStatic(new.target,"getNetwork")(network);knownNetwork?(defineReadOnly(this,"_network",knownNetwork),this.emit("network",knownNetwork,null)):base_provider_logger.throwArgumentError("invalid network","network",network)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return base_provider_awaiter(this,void 0,void 0,(function*(){if(null==this._network){let network=null;if(this._networkPromise)try{network=yield this._networkPromise}catch(error){}null==network&&(network=yield this.detectNetwork()),network||base_provider_logger.throwError("no network detected",Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=network:defineReadOnly(this,"_network",network),this.emit("network",network,null))}return this._network}))}get ready(){return poll((()=>this._ready().then((network=>network),(error=>{if(error.code!==Logger.errors.NETWORK_ERROR||"noNetwork"!==error.event)throw error}))))}static getFormatter(){return null==defaultFormatter&&(defaultFormatter=new Formatter),defaultFormatter}static getNetwork(network){return getNetwork(null==network?"homestead":network)}ccipReadFetch(tx,calldata,urls){return base_provider_awaiter(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===urls.length)return null;const sender=tx.to.toLowerCase(),data=calldata.toLowerCase(),errorMessages=[];for(let i=0;i<urls.length;i++){const url=urls[i],href=url.replace("{sender}",sender).replace("{data}",data),json=url.indexOf("{data}")>=0?null:JSON.stringify({data,sender}),result=yield fetchJson({url:href,errorPassThrough:!0},json,((value,response)=>(value.status=response.statusCode,value)));if(result.data)return result.data;const errorMessage=result.message||"unknown error";if(result.status>=400&&result.status<500)return base_provider_logger.throwError(`response not found during CCIP fetch: ${errorMessage}`,Logger.errors.SERVER_ERROR,{url,errorMessage});errorMessages.push(errorMessage)}return base_provider_logger.throwError(`error encountered during CCIP fetch: ${errorMessages.map((m=>JSON.stringify(m))).join(", ")}`,Logger.errors.SERVER_ERROR,{urls,errorMessages})}))}_getInternalBlockNumber(maxAge){return base_provider_awaiter(this,void 0,void 0,(function*(){if(yield this._ready(),maxAge>0)for(;this._internalBlockNumber;){const internalBlockNumber=this._internalBlockNumber;try{const result=yield internalBlockNumber;if(getTime()-result.respTime<=maxAge)return result.blockNumber;break}catch(error){if(this._internalBlockNumber===internalBlockNumber)break}}const reqTime=getTime(),checkInternalBlockNumber=resolveProperties({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((network=>null),(error=>error))}).then((({blockNumber,networkError})=>{if(networkError)throw this._internalBlockNumber===checkInternalBlockNumber&&(this._internalBlockNumber=null),networkError;const respTime=getTime();return(blockNumber=BigNumber.from(blockNumber).toNumber())<this._maxInternalBlockNumber&&(blockNumber=this._maxInternalBlockNumber),this._maxInternalBlockNumber=blockNumber,this._setFastBlockNumber(blockNumber),{blockNumber,reqTime,respTime}}));return this._internalBlockNumber=checkInternalBlockNumber,checkInternalBlockNumber.catch((error=>{this._internalBlockNumber===checkInternalBlockNumber&&(this._internalBlockNumber=null)})),(yield checkInternalBlockNumber).blockNumber}))}poll(){return base_provider_awaiter(this,void 0,void 0,(function*(){const pollId=nextPollId++,runners=[];let blockNumber=null;try{blockNumber=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(error){return void this.emit("error",error)}if(this._setFastBlockNumber(blockNumber),this.emit("poll",pollId,blockNumber),blockNumber!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=blockNumber-1),Math.abs(this._emitted.block-blockNumber)>1e3)base_provider_logger.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${blockNumber})`),this.emit("error",base_provider_logger.makeError("network block skew detected",Logger.errors.NETWORK_ERROR,{blockNumber,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",blockNumber);else for(let i=this._emitted.block+1;i<=blockNumber;i++)this.emit("block",i);this._emitted.block!==blockNumber&&(this._emitted.block=blockNumber,Object.keys(this._emitted).forEach((key=>{if("block"===key)return;const eventBlockNumber=this._emitted[key];"pending"!==eventBlockNumber&&blockNumber-eventBlockNumber>12&&delete this._emitted[key]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=blockNumber-1),this._events.forEach((event=>{switch(event.type){case"tx":{const hash=event.hash;let runner=this.getTransactionReceipt(hash).then((receipt=>receipt&&null!=receipt.blockNumber?(this._emitted["t:"+hash]=receipt.blockNumber,this.emit(hash,receipt),null):null)).catch((error=>{this.emit("error",error)}));runners.push(runner);break}case"filter":if(!event._inflight){event._inflight=!0;const filter=event.filter;filter.fromBlock=event._lastBlockNumber+1,filter.toBlock=blockNumber,filter.toBlock-this._maxFilterBlockRange>filter.fromBlock&&(filter.fromBlock=filter.toBlock-this._maxFilterBlockRange);const runner=this.getLogs(filter).then((logs=>{event._inflight=!1,0!==logs.length&&logs.forEach((log=>{log.blockNumber>event._lastBlockNumber&&(event._lastBlockNumber=log.blockNumber),this._emitted["b:"+log.blockHash]=log.blockNumber,this._emitted["t:"+log.transactionHash]=log.blockNumber,this.emit(filter,log)}))})).catch((error=>{this.emit("error",error),event._inflight=!1}));runners.push(runner)}}})),this._lastBlockNumber=blockNumber,Promise.all(runners).then((()=>{this.emit("didPoll",pollId)})).catch((error=>{this.emit("error",error)}))}else this.emit("didPoll",pollId)}))}resetEventsBlock(blockNumber){this._lastBlockNumber=blockNumber-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return base_provider_awaiter(this,void 0,void 0,(function*(){return base_provider_logger.throwError("provider does not support network detection",Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return base_provider_awaiter(this,void 0,void 0,(function*(){const network=yield this._ready(),currentNetwork=yield this.detectNetwork();if(network.chainId!==currentNetwork.chainId){if(this.anyNetwork)return this._network=currentNetwork,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",currentNetwork,network),yield stall(0),this._network;const error=base_provider_logger.makeError("underlying network changed",Logger.errors.NETWORK_ERROR,{event:"changed",network,detectedNetwork:currentNetwork});throw this.emit("error",error),error}return network}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((blockNumber=>{this._setFastBlockNumber(blockNumber)}),(error=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(value){value&&!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))):!value&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(value){if("number"!=typeof value||value<=0||parseInt(String(value))!=value)throw new Error("invalid polling interval");this._pollingInterval=value,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const now=getTime();return now-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=now,this._fastBlockNumberPromise=this.getBlockNumber().then((blockNumber=>((null==this._fastBlockNumber||blockNumber>this._fastBlockNumber)&&(this._fastBlockNumber=blockNumber),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(blockNumber){null!=this._fastBlockNumber&&blockNumber<this._fastBlockNumber||(this._fastQueryDate=getTime(),(null==this._fastBlockNumber||blockNumber>this._fastBlockNumber)&&(this._fastBlockNumber=blockNumber,this._fastBlockNumberPromise=Promise.resolve(blockNumber)))}waitForTransaction(transactionHash,confirmations,timeout){return base_provider_awaiter(this,void 0,void 0,(function*(){return this._waitForTransaction(transactionHash,null==confirmations?1:confirmations,timeout||0,null)}))}_waitForTransaction(transactionHash,confirmations,timeout,replaceable){return base_provider_awaiter(this,void 0,void 0,(function*(){const receipt=yield this.getTransactionReceipt(transactionHash);return(receipt?receipt.confirmations:0)>=confirmations?receipt:new Promise(((resolve,reject)=>{const cancelFuncs=[];let done=!1;const alreadyDone=function(){return!!done||(done=!0,cancelFuncs.forEach((func=>{func()})),!1)},minedHandler=receipt=>{receipt.confirmations<confirmations||alreadyDone()||resolve(receipt)};if(this.on(transactionHash,minedHandler),cancelFuncs.push((()=>{this.removeListener(transactionHash,minedHandler)})),replaceable){let lastBlockNumber=replaceable.startBlock,scannedBlock=null;const replaceHandler=blockNumber=>base_provider_awaiter(this,void 0,void 0,(function*(){done||(yield stall(1e3),this.getTransactionCount(replaceable.from).then((nonce=>base_provider_awaiter(this,void 0,void 0,(function*(){if(!done){if(nonce<=replaceable.nonce)lastBlockNumber=blockNumber;else{{const mined=yield this.getTransaction(transactionHash);if(mined&&null!=mined.blockNumber)return}for(null==scannedBlock&&(scannedBlock=lastBlockNumber-3,scannedBlock<replaceable.startBlock&&(scannedBlock=replaceable.startBlock));scannedBlock<=blockNumber;){if(done)return;const block=yield this.getBlockWithTransactions(scannedBlock);for(let ti=0;ti<block.transactions.length;ti++){const tx=block.transactions[ti];if(tx.hash===transactionHash)return;if(tx.from===replaceable.from&&tx.nonce===replaceable.nonce){if(done)return;const receipt=yield this.waitForTransaction(tx.hash,confirmations);if(alreadyDone())return;let reason="replaced";return tx.data===replaceable.data&&tx.to===replaceable.to&&tx.value.eq(replaceable.value)?reason="repriced":"0x"===tx.data&&tx.from===tx.to&&tx.value.isZero()&&(reason="cancelled"),void reject(base_provider_logger.makeError("transaction was replaced",Logger.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===reason||"cancelled"===reason,reason,replacement:this._wrapTransaction(tx),hash:transactionHash,receipt}))}}scannedBlock++}}done||this.once("block",replaceHandler)}}))),(error=>{done||this.once("block",replaceHandler)})))}));if(done)return;this.once("block",replaceHandler),cancelFuncs.push((()=>{this.removeListener("block",replaceHandler)}))}if("number"==typeof timeout&&timeout>0){const timer=setTimeout((()=>{alreadyDone()||reject(base_provider_logger.makeError("timeout exceeded",Logger.errors.TIMEOUT,{timeout}))}),timeout);timer.unref&&timer.unref(),cancelFuncs.push((()=>{clearTimeout(timer)}))}}))}))}getBlockNumber(){return base_provider_awaiter(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork();const result=yield this.perform("getGasPrice",{});try{return BigNumber.from(result)}catch(error){return base_provider_logger.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getGasPrice",result,error})}}))}getBalance(addressOrName,blockTag){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork();const params=yield resolveProperties({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag)}),result=yield this.perform("getBalance",params);try{return BigNumber.from(result)}catch(error){return base_provider_logger.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getBalance",params,result,error})}}))}getTransactionCount(addressOrName,blockTag){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork();const params=yield resolveProperties({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag)}),result=yield this.perform("getTransactionCount",params);try{return BigNumber.from(result).toNumber()}catch(error){return base_provider_logger.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params,result,error})}}))}getCode(addressOrName,blockTag){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork();const params=yield resolveProperties({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag)}),result=yield this.perform("getCode",params);try{return hexlify(result)}catch(error){return base_provider_logger.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getCode",params,result,error})}}))}getStorageAt(addressOrName,position,blockTag){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork();const params=yield resolveProperties({address:this._getAddress(addressOrName),blockTag:this._getBlockTag(blockTag),position:Promise.resolve(position).then((p=>hexValue(p)))}),result=yield this.perform("getStorageAt",params);try{return hexlify(result)}catch(error){return base_provider_logger.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getStorageAt",params,result,error})}}))}_wrapTransaction(tx,hash,startBlock){if(null!=hash&&32!==hexDataLength(hash))throw new Error("invalid response - sendTransaction");const result=tx;return null!=hash&&tx.hash!==hash&&base_provider_logger.throwError("Transaction hash mismatch from Provider.sendTransaction.",Logger.errors.UNKNOWN_ERROR,{expectedHash:tx.hash,returnedHash:hash}),result.wait=(confirms,timeout)=>base_provider_awaiter(this,void 0,void 0,(function*(){let replacement;null==confirms&&(confirms=1),null==timeout&&(timeout=0),0!==confirms&&null!=startBlock&&(replacement={data:tx.data,from:tx.from,nonce:tx.nonce,to:tx.to,value:tx.value,startBlock});const receipt=yield this._waitForTransaction(tx.hash,confirms,timeout,replacement);return null==receipt&&0===confirms?null:(this._emitted["t:"+tx.hash]=receipt.blockNumber,0===receipt.status&&base_provider_logger.throwError("transaction failed",Logger.errors.CALL_EXCEPTION,{transactionHash:tx.hash,transaction:tx,receipt}),receipt)})),result}sendTransaction(signedTransaction){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork();const hexTx=yield Promise.resolve(signedTransaction).then((t=>hexlify(t))),tx=this.formatter.transaction(signedTransaction);null==tx.confirmations&&(tx.confirmations=0);const blockNumber=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const hash=yield this.perform("sendTransaction",{signedTransaction:hexTx});return this._wrapTransaction(tx,hash,blockNumber)}catch(error){throw error.transaction=tx,error.transactionHash=tx.hash,error}}))}_getTransactionRequest(transaction){return base_provider_awaiter(this,void 0,void 0,(function*(){const values=yield transaction,tx={};return["from","to"].forEach((key=>{null!=values[key]&&(tx[key]=Promise.resolve(values[key]).then((v=>v?this._getAddress(v):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((key=>{null!=values[key]&&(tx[key]=Promise.resolve(values[key]).then((v=>v?BigNumber.from(v):null)))})),["type"].forEach((key=>{null!=values[key]&&(tx[key]=Promise.resolve(values[key]).then((v=>null!=v?v:null)))})),values.accessList&&(tx.accessList=this.formatter.accessList(values.accessList)),["data"].forEach((key=>{null!=values[key]&&(tx[key]=Promise.resolve(values[key]).then((v=>v?hexlify(v):null)))})),this.formatter.transactionRequest(yield resolveProperties(tx))}))}_getFilter(filter){return base_provider_awaiter(this,void 0,void 0,(function*(){filter=yield filter;const result={};return null!=filter.address&&(result.address=this._getAddress(filter.address)),["blockHash","topics"].forEach((key=>{null!=filter[key]&&(result[key]=filter[key])})),["fromBlock","toBlock"].forEach((key=>{null!=filter[key]&&(result[key]=this._getBlockTag(filter[key]))})),this.formatter.filter(yield resolveProperties(result))}))}_call(transaction,blockTag,attempt){return base_provider_awaiter(this,void 0,void 0,(function*(){attempt>=10&&base_provider_logger.throwError("CCIP read exceeded maximum redirections",Logger.errors.SERVER_ERROR,{redirects:attempt,transaction});const txSender=transaction.to,result=yield this.perform("call",{transaction,blockTag});if(attempt>=0&&"latest"===blockTag&&null!=txSender&&"0x556f1830"===result.substring(0,10)&&hexDataLength(result)%32==4)try{const data=hexDataSlice(result,4),sender=hexDataSlice(data,0,32);BigNumber.from(sender).eq(txSender)||base_provider_logger.throwError("CCIP Read sender did not match",Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction,data:result});const urls=[],urlsOffset=BigNumber.from(hexDataSlice(data,32,64)).toNumber(),urlsLength=BigNumber.from(hexDataSlice(data,urlsOffset,urlsOffset+32)).toNumber(),urlsData=hexDataSlice(data,urlsOffset+32);for(let u=0;u<urlsLength;u++){const url=_parseString(urlsData,32*u);null==url&&base_provider_logger.throwError("CCIP Read contained corrupt URL string",Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction,data:result}),urls.push(url)}const calldata=_parseBytes(data,64);BigNumber.from(hexDataSlice(data,100,128)).isZero()||base_provider_logger.throwError("CCIP Read callback selector included junk",Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction,data:result});const callbackSelector=hexDataSlice(data,96,100),extraData=_parseBytes(data,128),ccipResult=yield this.ccipReadFetch(transaction,calldata,urls);null==ccipResult&&base_provider_logger.throwError("CCIP Read disabled or provided no URLs",Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction,data:result});const tx={to:txSender,data:hexConcat([callbackSelector,encodeBytes([ccipResult,extraData])])};return this._call(tx,blockTag,attempt+1)}catch(error){if(error.code===Logger.errors.SERVER_ERROR)throw error}try{return hexlify(result)}catch(error){return base_provider_logger.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"call",params:{transaction,blockTag},result,error})}}))}call(transaction,blockTag){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork();const resolved=yield resolveProperties({transaction:this._getTransactionRequest(transaction),blockTag:this._getBlockTag(blockTag),ccipReadEnabled:Promise.resolve(transaction.ccipReadEnabled)});return this._call(resolved.transaction,resolved.blockTag,resolved.ccipReadEnabled?0:-1)}))}estimateGas(transaction){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork();const params=yield resolveProperties({transaction:this._getTransactionRequest(transaction)}),result=yield this.perform("estimateGas",params);try{return BigNumber.from(result)}catch(error){return base_provider_logger.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"estimateGas",params,result,error})}}))}_getAddress(addressOrName){return base_provider_awaiter(this,void 0,void 0,(function*(){"string"!=typeof(addressOrName=yield addressOrName)&&base_provider_logger.throwArgumentError("invalid address or ENS name","name",addressOrName);const address=yield this.resolveName(addressOrName);return null==address&&base_provider_logger.throwError("ENS name not configured",Logger.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(addressOrName)})`}),address}))}_getBlock(blockHashOrBlockTag,includeTransactions){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork(),blockHashOrBlockTag=yield blockHashOrBlockTag;let blockNumber=-128;const params={includeTransactions:!!includeTransactions};if(lib_esm_isHexString(blockHashOrBlockTag,32))params.blockHash=blockHashOrBlockTag;else try{params.blockTag=yield this._getBlockTag(blockHashOrBlockTag),lib_esm_isHexString(params.blockTag)&&(blockNumber=parseInt(params.blockTag.substring(2),16))}catch(error){base_provider_logger.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",blockHashOrBlockTag)}return poll((()=>base_provider_awaiter(this,void 0,void 0,(function*(){const block=yield this.perform("getBlock",params);if(null==block)return null!=params.blockHash&&null==this._emitted["b:"+params.blockHash]||null!=params.blockTag&&blockNumber>this._emitted.block?null:void 0;if(includeTransactions){let blockNumber=null;for(let i=0;i<block.transactions.length;i++){const tx=block.transactions[i];if(null==tx.blockNumber)tx.confirmations=0;else if(null==tx.confirmations){null==blockNumber&&(blockNumber=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let confirmations=blockNumber-tx.blockNumber+1;confirmations<=0&&(confirmations=1),tx.confirmations=confirmations}}const blockWithTxs=this.formatter.blockWithTransactions(block);return blockWithTxs.transactions=blockWithTxs.transactions.map((tx=>this._wrapTransaction(tx))),blockWithTxs}return this.formatter.block(block)}))),{oncePoll:this})}))}getBlock(blockHashOrBlockTag){return this._getBlock(blockHashOrBlockTag,!1)}getBlockWithTransactions(blockHashOrBlockTag){return this._getBlock(blockHashOrBlockTag,!0)}getTransaction(transactionHash){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork(),transactionHash=yield transactionHash;const params={transactionHash:this.formatter.hash(transactionHash,!0)};return poll((()=>base_provider_awaiter(this,void 0,void 0,(function*(){const result=yield this.perform("getTransaction",params);if(null==result)return null==this._emitted["t:"+transactionHash]?null:void 0;const tx=this.formatter.transactionResponse(result);if(null==tx.blockNumber)tx.confirmations=0;else if(null==tx.confirmations){let confirmations=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-tx.blockNumber+1;confirmations<=0&&(confirmations=1),tx.confirmations=confirmations}return this._wrapTransaction(tx)}))),{oncePoll:this})}))}getTransactionReceipt(transactionHash){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork(),transactionHash=yield transactionHash;const params={transactionHash:this.formatter.hash(transactionHash,!0)};return poll((()=>base_provider_awaiter(this,void 0,void 0,(function*(){const result=yield this.perform("getTransactionReceipt",params);if(null==result)return null==this._emitted["t:"+transactionHash]?null:void 0;if(null==result.blockHash)return;const receipt=this.formatter.receipt(result);if(null==receipt.blockNumber)receipt.confirmations=0;else if(null==receipt.confirmations){let confirmations=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-receipt.blockNumber+1;confirmations<=0&&(confirmations=1),receipt.confirmations=confirmations}return receipt}))),{oncePoll:this})}))}getLogs(filter){return base_provider_awaiter(this,void 0,void 0,(function*(){yield this.getNetwork();const params=yield resolveProperties({filter:this._getFilter(filter)}),logs=yield this.perform("getLogs",params);return logs.forEach((log=>{null==log.removed&&(log.removed=!1)})),Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs)}))}getEtherPrice(){return base_provider_awaiter(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(blockTag){return base_provider_awaiter(this,void 0,void 0,(function*(){if("number"==typeof(blockTag=yield blockTag)&&blockTag<0){blockTag%1&&base_provider_logger.throwArgumentError("invalid BlockTag","blockTag",blockTag);let blockNumber=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return blockNumber+=blockTag,blockNumber<0&&(blockNumber=0),this.formatter.blockTag(blockNumber)}return this.formatter.blockTag(blockTag)}))}getResolver(name){return base_provider_awaiter(this,void 0,void 0,(function*(){let currentName=name;for(;;){if(""===currentName||"."===currentName)return null;if("eth"!==name&&"eth"===currentName)return null;const addr=yield this._getResolver(currentName,"getResolver");if(null!=addr){const resolver=new Resolver(this,addr,name);return currentName===name||(yield resolver.supportsWildcard())?resolver:null}currentName=currentName.split(".").slice(1).join(".")}}))}_getResolver(name,operation){return base_provider_awaiter(this,void 0,void 0,(function*(){null==operation&&(operation="ENS");const network=yield this.getNetwork();network.ensAddress||base_provider_logger.throwError("network does not support ENS",Logger.errors.UNSUPPORTED_OPERATION,{operation,network:network.name});try{const addrData=yield this.call({to:network.ensAddress,data:"0x0178b8bf"+namehash(name).substring(2)});return this.formatter.callAddress(addrData)}catch(error){}return null}))}resolveName(name){return base_provider_awaiter(this,void 0,void 0,(function*(){name=yield name;try{return Promise.resolve(this.formatter.address(name))}catch(error){if(lib_esm_isHexString(name))throw error}"string"!=typeof name&&base_provider_logger.throwArgumentError("invalid ENS name","name",name);const resolver=yield this.getResolver(name);return resolver?yield resolver.getAddress():null}))}lookupAddress(address){return base_provider_awaiter(this,void 0,void 0,(function*(){address=yield address;const node=(address=this.formatter.address(address)).substring(2).toLowerCase()+".addr.reverse",resolverAddr=yield this._getResolver(node,"lookupAddress");if(null==resolverAddr)return null;const name=_parseString(yield this.call({to:resolverAddr,data:"0x691f3431"+namehash(node).substring(2)}),0);return(yield this.resolveName(name))!=address?null:name}))}getAvatar(nameOrAddress){return base_provider_awaiter(this,void 0,void 0,(function*(){let resolver=null;if(lib_esm_isHexString(nameOrAddress)){const node=this.formatter.address(nameOrAddress).substring(2).toLowerCase()+".addr.reverse",resolverAddress=yield this._getResolver(node,"getAvatar");if(!resolverAddress)return null;resolver=new Resolver(this,resolverAddress,node);try{const avatar=yield resolver.getAvatar();if(avatar)return avatar.url}catch(error){if(error.code!==Logger.errors.CALL_EXCEPTION)throw error}try{const name=_parseString(yield this.call({to:resolverAddress,data:"0x691f3431"+namehash(node).substring(2)}),0);resolver=yield this.getResolver(name)}catch(error){if(error.code!==Logger.errors.CALL_EXCEPTION)throw error;return null}}else if(resolver=yield this.getResolver(nameOrAddress),!resolver)return null;const avatar=yield resolver.getAvatar();return null==avatar?null:avatar.url}))}perform(method,params){return base_provider_logger.throwError(method+" not implemented",Logger.errors.NOT_IMPLEMENTED,{operation:method})}_startEvent(event){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(event){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(eventName,listener,once){const event=new Event(base_provider_getEventTag(eventName),listener,once);return this._events.push(event),this._startEvent(event),this}on(eventName,listener){return this._addEventListener(eventName,listener,!1)}once(eventName,listener){return this._addEventListener(eventName,listener,!0)}emit(eventName,...args){let result=!1,stopped=[],eventTag=base_provider_getEventTag(eventName);return this._events=this._events.filter((event=>event.tag!==eventTag||(setTimeout((()=>{event.listener.apply(this,args)}),0),result=!0,!event.once||(stopped.push(event),!1)))),stopped.forEach((event=>{this._stopEvent(event)})),result}listenerCount(eventName){if(!eventName)return this._events.length;let eventTag=base_provider_getEventTag(eventName);return this._events.filter((event=>event.tag===eventTag)).length}listeners(eventName){if(null==eventName)return this._events.map((event=>event.listener));let eventTag=base_provider_getEventTag(eventName);return this._events.filter((event=>event.tag===eventTag)).map((event=>event.listener))}off(eventName,listener){if(null==listener)return this.removeAllListeners(eventName);const stopped=[];let found=!1,eventTag=base_provider_getEventTag(eventName);return this._events=this._events.filter((event=>event.tag!==eventTag||event.listener!=listener||(!!found||(found=!0,stopped.push(event),!1)))),stopped.forEach((event=>{this._stopEvent(event)})),this}removeAllListeners(eventName){let stopped=[];if(null==eventName)stopped=this._events,this._events=[];else{const eventTag=base_provider_getEventTag(eventName);this._events=this._events.filter((event=>event.tag!==eventTag||(stopped.push(event),!1)))}return stopped.forEach((event=>{this._stopEvent(event)})),this}}var json_rpc_provider_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const json_rpc_provider_logger=new Logger("providers/5.6.8"),errorGas=["call","estimateGas"];function spelunk(value,requireData){if(null==value)return null;if("string"==typeof value.message&&value.message.match("reverted")){const data=lib_esm_isHexString(value.data)?value.data:null;if(!requireData||data)return{message:value.message,data}}if("object"==typeof value){for(const key in value){const result=spelunk(value[key],requireData);if(result)return result}return null}if("string"==typeof value)try{return spelunk(JSON.parse(value),requireData)}catch(error){}return null}function checkError(method,error,params){const transaction=params.transaction||params.signedTransaction;if("call"===method){const result=spelunk(error,!0);if(result)return result.data;json_rpc_provider_logger.throwError("missing revert data in call exception; Transaction reverted without a reason string",Logger.errors.CALL_EXCEPTION,{data:"0x",transaction,error})}if("estimateGas"===method){let result=spelunk(error.body,!1);null==result&&(result=spelunk(error,!1)),result&&json_rpc_provider_logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:result.message,method,transaction,error})}let message=error.message;throw error.code===Logger.errors.SERVER_ERROR&&error.error&&"string"==typeof error.error.message?message=error.error.message:"string"==typeof error.body?message=error.body:"string"==typeof error.responseText&&(message=error.responseText),message=(message||"").toLowerCase(),message.match(/insufficient funds|base fee exceeds gas limit/i)&&json_rpc_provider_logger.throwError("insufficient funds for intrinsic transaction cost",Logger.errors.INSUFFICIENT_FUNDS,{error,method,transaction}),message.match(/nonce (is )?too low/i)&&json_rpc_provider_logger.throwError("nonce has already been used",Logger.errors.NONCE_EXPIRED,{error,method,transaction}),message.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&json_rpc_provider_logger.throwError("replacement fee too low",Logger.errors.REPLACEMENT_UNDERPRICED,{error,method,transaction}),message.match(/only replay-protected/i)&&json_rpc_provider_logger.throwError("legacy pre-eip-155 transactions not supported",Logger.errors.UNSUPPORTED_OPERATION,{error,method,transaction}),errorGas.indexOf(method)>=0&&message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&json_rpc_provider_logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error,method,transaction}),error}function timer(timeout){return new Promise((function(resolve){setTimeout(resolve,timeout)}))}function getResult(payload){if(payload.error){const error=new Error(payload.error.message);throw error.code=payload.error.code,error.data=payload.error.data,error}return payload.result}function getLowerCase(value){return value?value.toLowerCase():value}const json_rpc_provider_constructorGuard={};class JsonRpcSigner extends Signer{constructor(constructorGuard,provider,addressOrIndex){if(super(),constructorGuard!==json_rpc_provider_constructorGuard)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");defineReadOnly(this,"provider",provider),null==addressOrIndex&&(addressOrIndex=0),"string"==typeof addressOrIndex?(defineReadOnly(this,"_address",this.provider.formatter.address(addressOrIndex)),defineReadOnly(this,"_index",null)):"number"==typeof addressOrIndex?(defineReadOnly(this,"_index",addressOrIndex),defineReadOnly(this,"_address",null)):json_rpc_provider_logger.throwArgumentError("invalid address or index","addressOrIndex",addressOrIndex)}connect(provider){return json_rpc_provider_logger.throwError("cannot alter JSON-RPC Signer connection",Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new UncheckedJsonRpcSigner(json_rpc_provider_constructorGuard,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((accounts=>(accounts.length<=this._index&&json_rpc_provider_logger.throwError("unknown account #"+this._index,Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(accounts[this._index]))))}sendUncheckedTransaction(transaction){transaction=shallowCopy(transaction);const fromAddress=this.getAddress().then((address=>(address&&(address=address.toLowerCase()),address)));if(null==transaction.gasLimit){const estimate=shallowCopy(transaction);estimate.from=fromAddress,transaction.gasLimit=this.provider.estimateGas(estimate)}return null!=transaction.to&&(transaction.to=Promise.resolve(transaction.to).then((to=>json_rpc_provider_awaiter(this,void 0,void 0,(function*(){if(null==to)return null;const address=yield this.provider.resolveName(to);return null==address&&json_rpc_provider_logger.throwArgumentError("provided ENS name resolves to null","tx.to",to),address}))))),resolveProperties({tx:resolveProperties(transaction),sender:fromAddress}).then((({tx,sender})=>{null!=tx.from?tx.from.toLowerCase()!==sender&&json_rpc_provider_logger.throwArgumentError("from address mismatch","transaction",transaction):tx.from=sender;const hexTx=this.provider.constructor.hexlifyTransaction(tx,{from:!0});return this.provider.send("eth_sendTransaction",[hexTx]).then((hash=>hash),(error=>checkError("sendTransaction",error,hexTx)))}))}signTransaction(transaction){return json_rpc_provider_logger.throwError("signing transactions is unsupported",Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(transaction){return json_rpc_provider_awaiter(this,void 0,void 0,(function*(){const blockNumber=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),hash=yield this.sendUncheckedTransaction(transaction);try{return yield poll((()=>json_rpc_provider_awaiter(this,void 0,void 0,(function*(){const tx=yield this.provider.getTransaction(hash);if(null!==tx)return this.provider._wrapTransaction(tx,hash,blockNumber)}))),{oncePoll:this.provider})}catch(error){throw error.transactionHash=hash,error}}))}signMessage(message){return json_rpc_provider_awaiter(this,void 0,void 0,(function*(){const data="string"==typeof message?toUtf8Bytes(message):message,address=yield this.getAddress();return yield this.provider.send("personal_sign",[hexlify(data),address.toLowerCase()])}))}_legacySignMessage(message){return json_rpc_provider_awaiter(this,void 0,void 0,(function*(){const data="string"==typeof message?toUtf8Bytes(message):message,address=yield this.getAddress();return yield this.provider.send("eth_sign",[address.toLowerCase(),hexlify(data)])}))}_signTypedData(domain,types,value){return json_rpc_provider_awaiter(this,void 0,void 0,(function*(){const populated=yield TypedDataEncoder.resolveNames(domain,types,value,(name=>this.provider.resolveName(name))),address=yield this.getAddress();return yield this.provider.send("eth_signTypedData_v4",[address.toLowerCase(),JSON.stringify(TypedDataEncoder.getPayload(populated.domain,types,populated.value))])}))}unlock(password){return json_rpc_provider_awaiter(this,void 0,void 0,(function*(){const provider=this.provider,address=yield this.getAddress();return provider.send("personal_unlockAccount",[address.toLowerCase(),password,null])}))}}class UncheckedJsonRpcSigner extends JsonRpcSigner{sendTransaction(transaction){return this.sendUncheckedTransaction(transaction).then((hash=>({hash,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:confirmations=>this.provider.waitForTransaction(hash,confirmations)})))}}const json_rpc_provider_allowedTransactionKeys={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class JsonRpcProvider extends BaseProvider{constructor(url,network){let networkOrReady=network;null==networkOrReady&&(networkOrReady=new Promise(((resolve,reject)=>{setTimeout((()=>{this.detectNetwork().then((network=>{resolve(network)}),(error=>{reject(error)}))}),0)}))),super(networkOrReady),url||(url=getStatic(this.constructor,"defaultUrl")()),defineReadOnly(this,"connection","string"==typeof url?Object.freeze({url}):Object.freeze(shallowCopy(url))),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 json_rpc_provider_awaiter(this,void 0,void 0,(function*(){yield timer(0);let chainId=null;try{chainId=yield this.send("eth_chainId",[])}catch(error){try{chainId=yield this.send("net_version",[])}catch(error){}}if(null!=chainId){const getNetwork=getStatic(this.constructor,"getNetwork");try{return getNetwork(BigNumber.from(chainId).toNumber())}catch(error){return json_rpc_provider_logger.throwError("could not detect network",Logger.errors.NETWORK_ERROR,{chainId,event:"invalidNetwork",serverError:error})}}return json_rpc_provider_logger.throwError("could not detect network",Logger.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(addressOrIndex){return new JsonRpcSigner(json_rpc_provider_constructorGuard,this,addressOrIndex)}getUncheckedSigner(addressOrIndex){return this.getSigner(addressOrIndex).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((accounts=>accounts.map((a=>this.formatter.address(a)))))}send(method,params){const request={method,params,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:deepCopy(request),provider:this});const cache=["eth_chainId","eth_blockNumber"].indexOf(method)>=0;if(cache&&this._cache[method])return this._cache[method];const result=fetchJson(this.connection,JSON.stringify(request),getResult).then((result=>(this.emit("debug",{action:"response",request,response:result,provider:this}),result)),(error=>{throw this.emit("debug",{action:"response",error,request,provider:this}),error}));return cache&&(this._cache[method]=result,setTimeout((()=>{this._cache[method]=null}),0)),result}prepareRequest(method,params){switch(method){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[getLowerCase(params.address),params.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[getLowerCase(params.address),params.blockTag]];case"getCode":return["eth_getCode",[getLowerCase(params.address),params.blockTag]];case"getStorageAt":return["eth_getStorageAt",[getLowerCase(params.address),hexZeroPad(params.position,32),params.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[params.signedTransaction]];case"getBlock":return params.blockTag?["eth_getBlockByNumber",[params.blockTag,!!params.includeTransactions]]:params.blockHash?["eth_getBlockByHash",[params.blockHash,!!params.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[params.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[params.transactionHash]];case"call":return["eth_call",[getStatic(this.constructor,"hexlifyTransaction")(params.transaction,{from:!0}),params.blockTag]];case"estimateGas":return["eth_estimateGas",[getStatic(this.constructor,"hexlifyTransaction")(params.transaction,{from:!0})]];case"getLogs":return params.filter&&null!=params.filter.address&&(params.filter.address=getLowerCase(params.filter.address)),["eth_getLogs",[params.filter]]}return null}perform(method,params){return json_rpc_provider_awaiter(this,void 0,void 0,(function*(){if("call"===method||"estimateGas"===method){const tx=params.transaction;if(tx&&null!=tx.type&&BigNumber.from(tx.type).isZero()&&null==tx.maxFeePerGas&&null==tx.maxPriorityFeePerGas){const feeData=yield this.getFeeData();null==feeData.maxFeePerGas&&null==feeData.maxPriorityFeePerGas&&((params=shallowCopy(params)).transaction=shallowCopy(tx),delete params.transaction.type)}}const args=this.prepareRequest(method,params);null==args&&json_rpc_provider_logger.throwError(method+" not implemented",Logger.errors.NOT_IMPLEMENTED,{operation:method});try{return yield this.send(args[0],args[1])}catch(error){return checkError(method,error,params)}}))}_startEvent(event){"pending"===event.tag&&this._startPending(),super._startEvent(event)}_startPending(){if(null!=this._pendingFilter)return;const self=this,pendingFilter=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=pendingFilter,pendingFilter.then((function(filterId){return function poll(){self.send("eth_getFilterChanges",[filterId]).then((function(hashes){if(self._pendingFilter!=pendingFilter)return null;let seq=Promise.resolve();return hashes.forEach((function(hash){self._emitted["t:"+hash.toLowerCase()]="pending",seq=seq.then((function(){return self.getTransaction(hash).then((function(tx){return self.emit("pending",tx),null}))}))})),seq.then((function(){return timer(1e3)}))})).then((function(){if(self._pendingFilter==pendingFilter)return setTimeout((function(){poll()}),0),null;self.send("eth_uninstallFilter",[filterId])})).catch((error=>{}))}(),filterId})).catch((error=>{}))}_stopEvent(event){"pending"===event.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(event)}static hexlifyTransaction(transaction,allowExtra){const allowed=shallowCopy(json_rpc_provider_allowedTransactionKeys);if(allowExtra)for(const key in allowExtra)allowExtra[key]&&(allowed[key]=!0);checkProperties(transaction,allowed);const result={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(key){if(null==transaction[key])return;const value=hexValue(BigNumber.from(transaction[key]));"gasLimit"===key&&(key="gas"),result[key]=value})),["from","to","data"].forEach((function(key){null!=transaction[key]&&(result[key]=hexlify(transaction[key]))})),transaction.accessList&&(result.accessList=accessListify(transaction.accessList)),result}}let WS=null;try{if(WS=WebSocket,null==WS)throw new Error("inject please")}catch(error){const logger=new Logger("providers/5.6.8");WS=function(){logger.throwError("WebSockets not supported in this environment",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var websocket_provider_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const websocket_provider_logger=new Logger("providers/5.6.8");let NextId=1;class WebSocketProvider extends JsonRpcProvider{constructor(url,network){"any"===network&&websocket_provider_logger.throwError("WebSocketProvider does not support 'any' network yet",Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof url?url:"_websocket",network),this._pollingInterval=-1,this._wsReady=!1,defineReadOnly(this,"_websocket","string"==typeof url?new WS(this.connection.url):url),defineReadOnly(this,"_requests",{}),defineReadOnly(this,"_subs",{}),defineReadOnly(this,"_subIds",{}),defineReadOnly(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((id=>{this.websocket.send(this._requests[id].payload)}))},this.websocket.onmessage=messageEvent=>{const data=messageEvent.data,result=JSON.parse(data);if(null!=result.id){const id=String(result.id),request=this._requests[id];if(delete this._requests[id],void 0!==result.result)request.callback(null,result.result),this.emit("debug",{action:"response",request:JSON.parse(request.payload),response:result.result,provider:this});else{let error=null;result.error?(error=new Error(result.error.message||"unknown error"),defineReadOnly(error,"code",result.error.code||null),defineReadOnly(error,"response",data)):error=new Error("unknown error"),request.callback(error,void 0),this.emit("debug",{action:"response",error,request:JSON.parse(request.payload),provider:this})}}else if("eth_subscription"===result.method){const sub=this._subs[result.params.subscription];sub&&sub.processFunc(result.params.result)}else console.warn("this should not happen")};const fauxPoll=setInterval((()=>{this.emit("poll")}),1e3);fauxPoll.unref&&fauxPoll.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(blockNumber){websocket_provider_logger.throwError("cannot reset events block on WebSocketProvider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(value){websocket_provider_logger.throwError("cannot set polling interval on WebSocketProvider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return websocket_provider_awaiter(this,void 0,void 0,(function*(){return null}))}set polling(value){value&&websocket_provider_logger.throwError("cannot set polling on WebSocketProvider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(method,params){const rid=NextId++;return new Promise(((resolve,reject)=>{const payload=JSON.stringify({method,params,id:rid,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(payload),provider:this}),this._requests[String(rid)]={callback:function callback(error,result){return error?reject(error):resolve(result)},payload},this._wsReady&&this.websocket.send(payload)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(tag,param,processFunc){return websocket_provider_awaiter(this,void 0,void 0,(function*(){let subIdPromise=this._subIds[tag];null==subIdPromise&&(subIdPromise=Promise.all(param).then((param=>this.send("eth_subscribe",param))),this._subIds[tag]=subIdPromise);const subId=yield subIdPromise;this._subs[subId]={tag,processFunc}}))}_startEvent(event){switch(event.type){case"block":this._subscribe("block",["newHeads"],(result=>{const blockNumber=BigNumber.from(result.number).toNumber();this._emitted.block=blockNumber,this.emit("block",blockNumber)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(result=>{this.emit("pending",result)}));break;case"filter":this._subscribe(event.tag,["logs",this._getFilter(event.filter)],(result=>{null==result.removed&&(result.removed=!1),this.emit(event.filter,this.formatter.filterLog(result))}));break;case"tx":{const emitReceipt=event=>{const hash=event.hash;this.getTransactionReceipt(hash).then((receipt=>{receipt&&this.emit(hash,receipt)}))};emitReceipt(event),this._subscribe("tx",["newHeads"],(result=>{this._events.filter((e=>"tx"===e.type)).forEach(emitReceipt)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",event)}}_stopEvent(event){let tag=event.tag;if("tx"===event.type){if(this._events.filter((e=>"tx"===e.type)).length)return;tag="tx"}else if(this.listenerCount(event.event))return;const subId=this._subIds[tag];subId&&(delete this._subIds[tag],subId.then((subId=>{this._subs[subId]&&(delete this._subs[subId],this.send("eth_unsubscribe",[subId]))})))}destroy(){return websocket_provider_awaiter(this,void 0,void 0,(function*(){this.websocket.readyState===WS.CONNECTING&&(yield new Promise((resolve=>{this.websocket.onopen=function(){resolve(!0)},this.websocket.onerror=function(){resolve(!1)}}))),this.websocket.close(1e3)}))}}var url_json_rpc_provider_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const url_json_rpc_provider_logger=new Logger("providers/5.6.8");class StaticJsonRpcProvider extends JsonRpcProvider{detectNetwork(){const _super=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return url_json_rpc_provider_awaiter(this,void 0,void 0,(function*(){let network=this.network;return null==network&&(network=yield _super.detectNetwork.call(this),network||url_json_rpc_provider_logger.throwError("no network detected",Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(defineReadOnly(this,"_network",network),this.emit("network",network,null))),network}))}}class UrlJsonRpcProvider extends StaticJsonRpcProvider{constructor(network,apiKey){url_json_rpc_provider_logger.checkAbstract(new.target,UrlJsonRpcProvider),network=getStatic(new.target,"getNetwork")(network),apiKey=getStatic(new.target,"getApiKey")(apiKey);super(getStatic(new.target,"getUrl")(network,apiKey),network),"string"==typeof apiKey?defineReadOnly(this,"apiKey",apiKey):null!=apiKey&&Object.keys(apiKey).forEach((key=>{defineReadOnly(this,key,apiKey[key])}))}_startPending(){url_json_rpc_provider_logger.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(address){return url_json_rpc_provider_logger.throwError("API provider does not support signing",Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(apiKey){return apiKey}static getUrl(network,apiKey){return url_json_rpc_provider_logger.throwError("not implemented; sub-classes must override getUrl",Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const alchemy_provider_logger=new Logger("providers/5.6.8"),defaultApiKey="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class AlchemyWebSocketProvider extends WebSocketProvider{constructor(network,apiKey){const provider=new AlchemyProvider(network,apiKey);super(provider.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),provider.network),defineReadOnly(this,"apiKey",provider.apiKey)}isCommunityResource(){return this.apiKey===defaultApiKey}}class AlchemyProvider extends UrlJsonRpcProvider{static getWebSocketProvider(network,apiKey){return new AlchemyWebSocketProvider(network,apiKey)}static getApiKey(apiKey){return null==apiKey?defaultApiKey:(apiKey&&"string"!=typeof apiKey&&alchemy_provider_logger.throwArgumentError("invalid apiKey","apiKey",apiKey),apiKey)}static getUrl(network,apiKey){let host=null;switch(network.name){case"homestead":host="eth-mainnet.alchemyapi.io/v2/";break;case"ropsten":host="eth-ropsten.alchemyapi.io/v2/";break;case"rinkeby":host="eth-rinkeby.alchemyapi.io/v2/";break;case"goerli":host="eth-goerli.alchemyapi.io/v2/";break;case"kovan":host="eth-kovan.alchemyapi.io/v2/";break;case"matic":host="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":host="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":host="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-rinkeby":host="arb-rinkeby.g.alchemy.com/v2/";break;case"optimism":host="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-kovan":host="opt-kovan.g.alchemy.com/v2/";break;default:alchemy_provider_logger.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+host+apiKey,throttleCallback:(attempt,url)=>(apiKey===defaultApiKey&&showThrottleMessage(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===defaultApiKey}}const ankr_provider_logger=new Logger("providers/5.6.8"),ankr_provider_defaultApiKey="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function getHost(name){switch(name){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 ankr_provider_logger.throwArgumentError("unsupported network","name",name)}class AnkrProvider extends UrlJsonRpcProvider{isCommunityResource(){return this.apiKey===ankr_provider_defaultApiKey}static getApiKey(apiKey){return null==apiKey?ankr_provider_defaultApiKey:apiKey}static getUrl(network,apiKey){null==apiKey&&(apiKey=ankr_provider_defaultApiKey);const connection={allowGzip:!0,url:"https://"+getHost(network.name)+apiKey,throttleCallback:(attempt,url)=>(apiKey.apiKey===ankr_provider_defaultApiKey&&showThrottleMessage(),Promise.resolve(!0))};return null!=apiKey.projectSecret&&(connection.user="",connection.password=apiKey.projectSecret),connection}}var cloudflare_provider_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const cloudflare_provider_logger=new Logger("providers/5.6.8");class CloudflareProvider extends UrlJsonRpcProvider{static getApiKey(apiKey){return null!=apiKey&&cloudflare_provider_logger.throwArgumentError("apiKey not supported for cloudflare","apiKey",apiKey),null}static getUrl(network,apiKey){let host=null;if("homestead"===network.name)host="https://cloudflare-eth.com/";else cloudflare_provider_logger.throwArgumentError("unsupported network","network",arguments[0]);return host}perform(method,params){const _super=Object.create(null,{perform:{get:()=>super.perform}});return cloudflare_provider_awaiter(this,void 0,void 0,(function*(){if("getBlockNumber"===method){return(yield _super.perform.call(this,"getBlock",{blockTag:"latest"})).number}return _super.perform.call(this,method,params)}))}}var etherscan_provider_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const etherscan_provider_logger=new Logger("providers/5.6.8");function getTransactionPostData(transaction){const result={};for(let key in transaction){if(null==transaction[key])continue;let value=transaction[key];"type"===key&&0===value||(value={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[key]?hexValue(hexlify(value)):"accessList"===key?"["+accessListify(value).map((set=>`{address:"${set.address}",storageKeys:["${set.storageKeys.join('","')}"]}`)).join(",")+"]":hexlify(value),result[key]=value)}return result}function etherscan_provider_getResult(result){if(0==result.status&&("No records found"===result.message||"No transactions found"===result.message))return result.result;if(1!=result.status||"OK"!=result.message){const error=new Error("invalid response");throw error.result=JSON.stringify(result),(result.result||"").toLowerCase().indexOf("rate limit")>=0&&(error.throttleRetry=!0),error}return result.result}function getJsonResult(result){if(result&&0==result.status&&"NOTOK"==result.message&&(result.result||"").toLowerCase().indexOf("rate limit")>=0){const error=new Error("throttled response");throw error.result=JSON.stringify(result),error.throttleRetry=!0,error}if("2.0"!=result.jsonrpc){const error=new Error("invalid response");throw error.result=JSON.stringify(result),error}if(result.error){const error=new Error(result.error.message||"unknown error");throw result.error.code&&(error.code=result.error.code),result.error.data&&(error.data=result.error.data),error}return result.result}function checkLogTag(blockTag){if("pending"===blockTag)throw new Error("pending not supported");return"latest"===blockTag?blockTag:parseInt(blockTag.substring(2),16)}function etherscan_provider_checkError(method,error,transaction){if("call"===method&&error.code===Logger.errors.SERVER_ERROR){const e=error.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let data=e.data;if(data&&(data="0x"+data.replace(/^.*0x/i,"")),lib_esm_isHexString(data))return data;etherscan_provider_logger.throwError("missing revert data in call exception",Logger.errors.CALL_EXCEPTION,{error,data:"0x"})}}let message=error.message;throw error.code===Logger.errors.SERVER_ERROR&&(error.error&&"string"==typeof error.error.message?message=error.error.message:"string"==typeof error.body?message=error.body:"string"==typeof error.responseText&&(message=error.responseText)),message=(message||"").toLowerCase(),message.match(/insufficient funds/)&&etherscan_provider_logger.throwError("insufficient funds for intrinsic transaction cost",Logger.errors.INSUFFICIENT_FUNDS,{error,method,transaction}),message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&etherscan_provider_logger.throwError("nonce has already been used",Logger.errors.NONCE_EXPIRED,{error,method,transaction}),message.match(/another transaction with same nonce/)&&etherscan_provider_logger.throwError("replacement fee too low",Logger.errors.REPLACEMENT_UNDERPRICED,{error,method,transaction}),message.match(/execution failed due to an exception|execution reverted/)&&etherscan_provider_logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error,method,transaction}),error}class EtherscanProvider extends BaseProvider{constructor(network,apiKey){super(network),defineReadOnly(this,"baseUrl",this.getBaseUrl()),defineReadOnly(this,"apiKey",apiKey||"9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB")}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"ropsten":return"https://api-ropsten.etherscan.io";case"rinkeby":return"https://api-rinkeby.etherscan.io";case"kovan":return"https://api-kovan.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"optimism":return"https://api-optimistic.etherscan.io"}return etherscan_provider_logger.throwArgumentError("unsupported network","network",this.network.name)}getUrl(module,params){const query=Object.keys(params).reduce(((accum,key)=>{const value=params[key];return null!=value&&(accum+=`&${key}=${value}`),accum}),""),apiKey=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${module}${query}${apiKey}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(module,params){return params.module=module,params.apikey=this.apiKey,params}fetch(module,params,post){return etherscan_provider_awaiter(this,void 0,void 0,(function*(){const url=post?this.getPostUrl():this.getUrl(module,params),payload=post?this.getPostData(module,params):null,procFunc="proxy"===module?getJsonResult:etherscan_provider_getResult;this.emit("debug",{action:"request",request:url,provider:this});const connection={url,throttleSlotInterval:1e3,throttleCallback:(attempt,url)=>(this.isCommunityResource()&&showThrottleMessage(),Promise.resolve(!0))};let payloadStr=null;payload&&(connection.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},payloadStr=Object.keys(payload).map((key=>`${key}=${payload[key]}`)).join("&"));const result=yield fetchJson(connection,payloadStr,procFunc||getJsonResult);return this.emit("debug",{action:"response",request:url,response:deepCopy(result),provider:this}),result}))}detectNetwork(){return etherscan_provider_awaiter(this,void 0,void 0,(function*(){return this.network}))}perform(method,params){const _super=Object.create(null,{perform:{get:()=>super.perform}});return etherscan_provider_awaiter(this,void 0,void 0,(function*(){switch(method){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:params.address,tag:params.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:params.address,tag:params.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:params.address,tag:params.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:params.address,position:params.position,tag:params.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:params.signedTransaction},!0).catch((error=>etherscan_provider_checkError("sendTransaction",error,params.signedTransaction)));case"getBlock":if(params.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:params.blockTag,boolean:params.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:params.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:params.transactionHash});case"call":{if("latest"!==params.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const postData=getTransactionPostData(params.transaction);postData.module="proxy",postData.action="eth_call";try{return yield this.fetch("proxy",postData,!0)}catch(error){return etherscan_provider_checkError("call",error,params.transaction)}}case"estimateGas":{const postData=getTransactionPostData(params.transaction);postData.module="proxy",postData.action="eth_estimateGas";try{return yield this.fetch("proxy",postData,!0)}catch(error){return etherscan_provider_checkError("estimateGas",error,params.transaction)}}case"getLogs":{const args={action:"getLogs"};if(params.filter.fromBlock&&(args.fromBlock=checkLogTag(params.filter.fromBlock)),params.filter.toBlock&&(args.toBlock=checkLogTag(params.filter.toBlock)),params.filter.address&&(args.address=params.filter.address),params.filter.topics&&params.filter.topics.length>0&&(params.filter.topics.length>1&&etherscan_provider_logger.throwError("unsupported topic count",Logger.errors.UNSUPPORTED_OPERATION,{topics:params.filter.topics}),1===params.filter.topics.length)){const topic0=params.filter.topics[0];"string"==typeof topic0&&66===topic0.length||etherscan_provider_logger.throwError("unsupported topic format",Logger.errors.UNSUPPORTED_OPERATION,{topic0}),args.topic0=topic0}const logs=yield this.fetch("logs",args);let blocks={};for(let i=0;i<logs.length;i++){const log=logs[i];if(null==log.blockHash){if(null==blocks[log.blockNumber]){const block=yield this.getBlock(log.blockNumber);block&&(blocks[log.blockNumber]=block.hash)}log.blockHash=blocks[log.blockNumber]}}return logs}case"getEtherPrice":return"homestead"!==this.network.name?0:parseFloat((yield this.fetch("stats",{action:"ethprice"})).ethusd)}return _super.perform.call(this,method,params)}))}getHistory(addressOrName,startBlock,endBlock){return etherscan_provider_awaiter(this,void 0,void 0,(function*(){const params={action:"txlist",address:yield this.resolveName(addressOrName),startblock:null==startBlock?0:startBlock,endblock:null==endBlock?99999999:endBlock,sort:"asc"};return(yield this.fetch("account",params)).map((tx=>{["contractAddress","to"].forEach((function(key){""==tx[key]&&delete tx[key]})),null==tx.creates&&null!=tx.contractAddress&&(tx.creates=tx.contractAddress);const item=this.formatter.transactionResponse(tx);return tx.timeStamp&&(item.timestamp=parseInt(tx.timeStamp)),item}))}))}isCommunityResource(){return"9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB"===this.apiKey}}function shuffled(array){for(let i=(array=array.slice()).length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1)),tmp=array[i];array[i]=array[j],array[j]=tmp}return array}var fallback_provider_awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};const fallback_provider_logger=new Logger("providers/5.6.8");function now(){return(new Date).getTime()}function checkNetworks(networks){let result=null;for(let i=0;i<networks.length;i++){const network=networks[i];if(null==network)return null;result?result.name===network.name&&result.chainId===network.chainId&&(result.ensAddress===network.ensAddress||null==result.ensAddress&&null==network.ensAddress)||fallback_provider_logger.throwArgumentError("provider mismatch","networks",networks):result=network}return result}function median(values,maxDelta){values=values.slice().sort();const middle=Math.floor(values.length/2);if(values.length%2)return values[middle];const a=values[middle-1],b=values[middle];return null!=maxDelta&&Math.abs(a-b)>maxDelta?null:(a+b)/2}function fallback_provider_serialize(value){if(null===value)return"null";if("number"==typeof value||"boolean"==typeof value)return JSON.stringify(value);if("string"==typeof value)return value;if(BigNumber.isBigNumber(value))return value.toString();if(Array.isArray(value))return JSON.stringify(value.map((i=>fallback_provider_serialize(i))));if("object"==typeof value){const keys=Object.keys(value);return keys.sort(),"{"+keys.map((key=>{let v=value[key];return v="function"==typeof v?"[function]":fallback_provider_serialize(v),JSON.stringify(key)+":"+v})).join(",")+"}"}throw new Error("unknown value type: "+typeof value)}let nextRid=1;function fallback_provider_stall(duration){let cancel=null,timer=null,promise=new Promise((resolve=>{cancel=function(){timer&&(clearTimeout(timer),timer=null),resolve()},timer=setTimeout(cancel,duration)}));return{cancel,getPromise:function getPromise(){return promise},wait:func=>(promise=promise.then(func),promise)}}const ForwardErrors=[Logger.errors.CALL_EXCEPTION,Logger.errors.INSUFFICIENT_FUNDS,Logger.errors.NONCE_EXPIRED,Logger.errors.REPLACEMENT_UNDERPRICED,Logger.errors.UNPREDICTABLE_GAS_LIMIT],ForwardProperties=["address","args","errorArgs","errorSignature","method","transaction"];function exposeDebugConfig(config,now){const result={weight:config.weight};return Object.defineProperty(result,"provider",{get:()=>config.provider}),config.start&&(result.start=config.start),now&&(result.duration=now-config.start),config.done&&(config.error?result.error=config.error:result.result=config.result||null),result}function getProcessFunc(provider,method,params){let normalize=fallback_provider_serialize;switch(method){case"getBlockNumber":return function(configs){const values=configs.map((c=>c.result));let blockNumber=median(configs.map((c=>c.result)),2);if(null!=blockNumber)return blockNumber=Math.ceil(blockNumber),values.indexOf(blockNumber+1)>=0&&blockNumber++,blockNumber>=provider._highestBlockNumber&&(provider._highestBlockNumber=blockNumber),provider._highestBlockNumber};case"getGasPrice":return function(configs){const values=configs.map((c=>c.result));return values.sort(),values[Math.floor(values.length/2)]};case"getEtherPrice":return function(configs){return median(configs.map((c=>c.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":normalize=function(tx){return null==tx?null:((tx=shallowCopy(tx)).confirmations=-1,fallback_provider_serialize(tx))};break;case"getBlock":normalize=params.includeTransactions?function(block){return null==block?null:((block=shallowCopy(block)).transactions=block.transactions.map((tx=>((tx=shallowCopy(tx)).confirmations=-1,tx))),fallback_provider_serialize(block))}:function(block){return null==block?null:fallback_provider_serialize(block)};break;default:throw new Error("unknown method: "+method)}return function normalizedTally(normalize,quorum){return function(configs){const tally={};configs.forEach((c=>{const value=normalize(c.result);tally[value]||(tally[value]={count:0,result:c.result}),tally[value].count++}));const keys=Object.keys(tally);for(let i=0;i<keys.length;i++){const check=tally[keys[i]];if(check.count>=quorum)return check.result}}}(normalize,provider.quorum)}function waitForSync(config,blockNumber){return fallback_provider_awaiter(this,void 0,void 0,(function*(){const provider=config.provider;return null!=provider.blockNumber&&provider.blockNumber>=blockNumber||-1===blockNumber?provider:poll((()=>new Promise(((resolve,reject)=>{setTimeout((function(){return provider.blockNumber>=blockNumber?resolve(provider):config.cancelled?resolve(null):resolve(void 0)}),0)}))),{oncePoll:provider})}))}function getRunner(config,currentBlockNumber,method,params){return fallback_provider_awaiter(this,void 0,void 0,(function*(){let provider=config.provider;switch(method){case"getBlockNumber":case"getGasPrice":return provider[method]();case"getEtherPrice":if(provider.getEtherPrice)return provider.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return params.blockTag&&lib_esm_isHexString(params.blockTag)&&(provider=yield waitForSync(config,currentBlockNumber)),provider[method](params.address,params.blockTag||"latest");case"getStorageAt":return params.blockTag&&lib_esm_isHexString(params.blockTag)&&(provider=yield waitForSync(config,currentBlockNumber)),provider.getStorageAt(params.address,params.position,params.blockTag||"latest");case"getBlock":return params.blockTag&&lib_esm_isHexString(params.blockTag)&&(provider=yield waitForSync(config,currentBlockNumber)),provider[params.includeTransactions?"getBlockWithTransactions":"getBlock"](params.blockTag||params.blockHash);case"call":case"estimateGas":return params.blockTag&&lib_esm_isHexString(params.blockTag)&&(provider=yield waitForSync(config,currentBlockNumber)),provider[method](params.transaction);case"getTransaction":case"getTransactionReceipt":return provider[method](params.transactionHash);case"getLogs":{let filter=params.filter;return(filter.fromBlock&&lib_esm_isHexString(filter.fromBlock)||filter.toBlock&&lib_esm_isHexString(filter.toBlock))&&(provider=yield waitForSync(config,currentBlockNumber)),provider.getLogs(filter)}}return fallback_provider_logger.throwError("unknown method error",Logger.errors.UNKNOWN_ERROR,{method,params})}))}class FallbackProvider extends BaseProvider{constructor(providers,quorum){0===providers.length&&fallback_provider_logger.throwArgumentError("missing providers","providers",providers);const providerConfigs=providers.map(((configOrProvider,index)=>{if(Provider.isProvider(configOrProvider)){const stallTimeout=isCommunityResource(configOrProvider)?2e3:750,priority=1;return Object.freeze({provider:configOrProvider,weight:1,stallTimeout,priority})}const config=shallowCopy(configOrProvider);null==config.priority&&(config.priority=1),null==config.stallTimeout&&(config.stallTimeout=isCommunityResource(configOrProvider)?2e3:750),null==config.weight&&(config.weight=1);const weight=config.weight;return(weight%1||weight>512||weight<1)&&fallback_provider_logger.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${index}].weight`,weight),Object.freeze(config)})),total=providerConfigs.reduce(((accum,c)=>accum+c.weight),0);null==quorum?quorum=total/2:quorum>total&&fallback_provider_logger.throwArgumentError("quorum will always fail; larger than total weight","quorum",quorum);let networkOrReady=checkNetworks(providerConfigs.map((c=>c.provider.network)));null==networkOrReady&&(networkOrReady=new Promise(((resolve,reject)=>{setTimeout((()=>{this.detectNetwork().then(resolve,reject)}),0)}))),super(networkOrReady),defineReadOnly(this,"providerConfigs",Object.freeze(providerConfigs)),defineReadOnly(this,"quorum",quorum),this._highestBlockNumber=-1}detectNetwork(){return fallback_provider_awaiter(this,void 0,void 0,(function*(){return checkNetworks(yield Promise.all(this.providerConfigs.map((c=>c.provider.getNetwork()))))}))}perform(method,params){return fallback_provider_awaiter(this,void 0,void 0,(function*(){if("sendTransaction"===method){const results=yield Promise.all(this.providerConfigs.map((c=>c.provider.sendTransaction(params.signedTransaction).then((result=>result.hash),(error=>error)))));for(let i=0;i<results.length;i++){const result=results[i];if("string"==typeof result)return result}throw results[0]}-1===this._highestBlockNumber&&"getBlockNumber"!==method&&(yield this.getBlockNumber());const processFunc=getProcessFunc(this,method,params),configs=shuffled(this.providerConfigs.map(shallowCopy));configs.sort(((a,b)=>a.priority-b.priority));const currentBlockNumber=this._highestBlockNumber;let i=0,first=!0;for(;;){const t0=now();let inflightWeight=configs.filter((c=>c.runner&&t0-c.start<c.stallTimeout)).reduce(((accum,c)=>accum+c.weight),0);for(;inflightWeight<this.quorum&&i<configs.length;){const config=configs[i++],rid=nextRid++;config.start=now(),config.staller=fallback_provider_stall(config.stallTimeout),config.staller.wait((()=>{config.staller=null})),config.runner=getRunner(config,currentBlockNumber,method,params).then((result=>{config.done=!0,config.result=result,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid,backend:exposeDebugConfig(config,now()),request:{method,params:deepCopy(params)},provider:this})}),(error=>{config.done=!0,config.error=error,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid,backend:exposeDebugConfig(config,now()),request:{method,params:deepCopy(params)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid,backend:exposeDebugConfig(config,null),request:{method,params:deepCopy(params)},provider:this}),inflightWeight+=config.weight}const waiting=[];configs.forEach((c=>{!c.done&&c.runner&&(waiting.push(c.runner),c.staller&&waiting.push(c.staller.getPromise()))})),waiting.length&&(yield Promise.race(waiting));const results=configs.filter((c=>c.done&&null==c.error));if(results.length>=this.quorum){const result=processFunc(results);if(void 0!==result)return configs.forEach((c=>{c.staller&&c.staller.cancel(),c.cancelled=!0})),result;first||(yield fallback_provider_stall(100).getPromise()),first=!1}const errors=configs.reduce(((accum,c)=>{if(!c.done||null==c.error)return accum;const code=c.error.code;return ForwardErrors.indexOf(code)>=0&&(accum[code]||(accum[code]={error:c.error,weight:0}),accum[code].weight+=c.weight),accum}),{});if(Object.keys(errors).forEach((errorCode=>{const tally=errors[errorCode];if(tally.weight<this.quorum)return;configs.forEach((c=>{c.staller&&c.staller.cancel(),c.cancelled=!0}));const e=tally.error,props={};ForwardProperties.forEach((name=>{null!=e[name]&&(props[name]=e[name])})),fallback_provider_logger.throwError(e.reason||e.message,errorCode,props)})),0===configs.filter((c=>!c.done)).length)break}return configs.forEach((c=>{c.staller&&c.staller.cancel(),c.cancelled=!0})),fallback_provider_logger.throwError("failed to meet quorum",Logger.errors.SERVER_ERROR,{method,params,results:configs.map((c=>exposeDebugConfig(c))),provider:this})}))}}const IpcProvider=null,infura_provider_logger=new Logger("providers/5.6.8"),defaultProjectId="84842078b09946638c03157f83405213";class InfuraWebSocketProvider extends WebSocketProvider{constructor(network,apiKey){const provider=new InfuraProvider(network,apiKey),connection=provider.connection;connection.password&&infura_provider_logger.throwError("INFURA WebSocket project secrets unsupported",Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(connection.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),network),defineReadOnly(this,"apiKey",provider.projectId),defineReadOnly(this,"projectId",provider.projectId),defineReadOnly(this,"projectSecret",provider.projectSecret)}isCommunityResource(){return this.projectId===defaultProjectId}}class InfuraProvider extends UrlJsonRpcProvider{static getWebSocketProvider(network,apiKey){return new InfuraWebSocketProvider(network,apiKey)}static getApiKey(apiKey){const apiKeyObj={apiKey:defaultProjectId,projectId:defaultProjectId,projectSecret:null};return null==apiKey||("string"==typeof apiKey?apiKeyObj.projectId=apiKey:null!=apiKey.projectSecret?(infura_provider_logger.assertArgument("string"==typeof apiKey.projectId,"projectSecret requires a projectId","projectId",apiKey.projectId),infura_provider_logger.assertArgument("string"==typeof apiKey.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),apiKeyObj.projectId=apiKey.projectId,apiKeyObj.projectSecret=apiKey.projectSecret):apiKey.projectId&&(apiKeyObj.projectId=apiKey.projectId),apiKeyObj.apiKey=apiKeyObj.projectId),apiKeyObj}static getUrl(network,apiKey){let host=null;switch(network?network.name:"unknown"){case"homestead":host="mainnet.infura.io";break;case"ropsten":host="ropsten.infura.io";break;case"rinkeby":host="rinkeby.infura.io";break;case"kovan":host="kovan.infura.io";break;case"goerli":host="goerli.infura.io";break;case"matic":host="polygon-mainnet.infura.io";break;case"maticmum":host="polygon-mumbai.infura.io";break;case"optimism":host="optimism-mainnet.infura.io";break;case"optimism-kovan":host="optimism-kovan.infura.io";break;case"arbitrum":host="arbitrum-mainnet.infura.io";break;case"arbitrum-rinkeby":host="arbitrum-rinkeby.infura.io";break;default:infura_provider_logger.throwError("unsupported network",Logger.errors.INVALID_ARGUMENT,{argument:"network",value:network})}const connection={allowGzip:!0,url:"https://"+host+"/v3/"+apiKey.projectId,throttleCallback:(attempt,url)=>(apiKey.projectId===defaultProjectId&&showThrottleMessage(),Promise.resolve(!0))};return null!=apiKey.projectSecret&&(connection.user="",connection.password=apiKey.projectSecret),connection}isCommunityResource(){return this.projectId===defaultProjectId}}class JsonRpcBatchProvider extends JsonRpcProvider{send(method,params){const request={method,params,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const inflightRequest={request,resolve:null,reject:null},promise=new Promise(((resolve,reject)=>{inflightRequest.resolve=resolve,inflightRequest.reject=reject}));return this._pendingBatch.push(inflightRequest),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const batch=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const request=batch.map((inflight=>inflight.request));return this.emit("debug",{action:"requestBatch",request:deepCopy(request),provider:this}),fetchJson(this.connection,JSON.stringify(request)).then((result=>{this.emit("debug",{action:"response",request,response:result,provider:this}),batch.forEach(((inflightRequest,index)=>{const payload=result[index];if(payload.error){const error=new Error(payload.error.message);error.code=payload.error.code,error.data=payload.error.data,inflightRequest.reject(error)}else inflightRequest.resolve(payload.result)}))}),(error=>{this.emit("debug",{action:"response",error,request,provider:this}),batch.forEach((inflightRequest=>{inflightRequest.reject(error)}))}))}),10)),promise}}const nodesmith_provider_logger=new Logger("providers/5.6.8");class NodesmithProvider extends UrlJsonRpcProvider{static getApiKey(apiKey){return apiKey&&"string"!=typeof apiKey&&nodesmith_provider_logger.throwArgumentError("invalid apiKey","apiKey",apiKey),apiKey||"ETHERS_JS_SHARED"}static getUrl(network,apiKey){nodesmith_provider_logger.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let host=null;switch(network.name){case"homestead":host="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":host="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":host="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":host="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":host="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:nodesmith_provider_logger.throwArgumentError("unsupported network","network",arguments[0])}return host+"?apiKey="+apiKey}}const pocket_provider_logger=new Logger("providers/5.6.8"),defaultApplicationIds={homestead:"6004bcd10040261633ade990",ropsten:"6004bd4d0040261633ade991",rinkeby:"6004bda20040261633ade994",goerli:"6004bd860040261633ade992"};class PocketProvider extends UrlJsonRpcProvider{constructor(network,apiKey){if(null==apiKey){const n=getStatic(new.target,"getNetwork")(network);if(n){const applicationId=defaultApplicationIds[n.name];applicationId&&(apiKey={applicationId,loadBalancer:!0})}null==apiKey&&pocket_provider_logger.throwError("unsupported network",Logger.errors.INVALID_ARGUMENT,{argument:"network",value:network})}super(network,apiKey)}static getApiKey(apiKey){null==apiKey&&pocket_provider_logger.throwArgumentError("PocketProvider.getApiKey does not support null apiKey","apiKey",apiKey);const apiKeyObj={applicationId:null,loadBalancer:!1,applicationSecretKey:null};return"string"==typeof apiKey?apiKeyObj.applicationId=apiKey:null!=apiKey.applicationSecretKey?(pocket_provider_logger.assertArgument("string"==typeof apiKey.applicationId,"applicationSecretKey requires an applicationId","applicationId",apiKey.applicationId),pocket_provider_logger.assertArgument("string"==typeof apiKey.applicationSecretKey,"invalid applicationSecretKey","applicationSecretKey","[REDACTED]"),apiKeyObj.applicationId=apiKey.applicationId,apiKeyObj.applicationSecretKey=apiKey.applicationSecretKey,apiKeyObj.loadBalancer=!!apiKey.loadBalancer):apiKey.applicationId?(pocket_provider_logger.assertArgument("string"==typeof apiKey.applicationId,"apiKey.applicationId must be a string","apiKey.applicationId",apiKey.applicationId),apiKeyObj.applicationId=apiKey.applicationId,apiKeyObj.loadBalancer=!!apiKey.loadBalancer):pocket_provider_logger.throwArgumentError("unsupported PocketProvider apiKey","apiKey",apiKey),apiKeyObj}static getUrl(network,apiKey){let host=null;switch(network?network.name:"unknown"){case"homestead":host="eth-mainnet.gateway.pokt.network";break;case"ropsten":host="eth-ropsten.gateway.pokt.network";break;case"rinkeby":host="eth-rinkeby.gateway.pokt.network";break;case"goerli":host="eth-goerli.gateway.pokt.network";break;default:pocket_provider_logger.throwError("unsupported network",Logger.errors.INVALID_ARGUMENT,{argument:"network",value:network})}let url=null;url=apiKey.loadBalancer?`https://${host}/v1/lb/${apiKey.applicationId}`:`https://${host}/v1/${apiKey.applicationId}`;const connection={url,headers:{}};return null!=apiKey.applicationSecretKey&&(connection.user="",connection.password=apiKey.applicationSecretKey),connection}isCommunityResource(){return this.applicationId===defaultApplicationIds[this.network.name]}}const web3_provider_logger=new Logger("providers/5.6.8");let _nextId=1;function buildWeb3LegacyFetcher(provider,sendFunc){const fetcher="Web3LegacyFetcher";return function(method,params){const request={method,params,id:_nextId++,jsonrpc:"2.0"};return new Promise(((resolve,reject)=>{this.emit("debug",{action:"request",fetcher,request:deepCopy(request),provider:this}),sendFunc(request,((error,response)=>{if(error)return this.emit("debug",{action:"response",fetcher,error,request,provider:this}),reject(error);if(this.emit("debug",{action:"response",fetcher,request,response,provider:this}),response.error){const error=new Error(response.error.message);return error.code=response.error.code,error.data=response.error.data,reject(error)}resolve(response.result)}))}))}}class Web3Provider extends JsonRpcProvider{constructor(provider,network){null==provider&&web3_provider_logger.throwArgumentError("missing provider","provider",provider);let path=null,jsonRpcFetchFunc=null,subprovider=null;"function"==typeof provider?(path="unknown:",jsonRpcFetchFunc=provider):(path=provider.host||provider.path||"",!path&&provider.isMetaMask&&(path="metamask"),subprovider=provider,provider.request?(""===path&&(path="eip-1193:"),jsonRpcFetchFunc=function buildEip1193Fetcher(provider){return function(method,params){null==params&&(params=[]);const request={method,params};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:deepCopy(request),provider:this}),provider.request(request).then((response=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request,response,provider:this}),response)),(error=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request,error,provider:this}),error}))}}(provider)):provider.sendAsync?jsonRpcFetchFunc=buildWeb3LegacyFetcher(0,provider.sendAsync.bind(provider)):provider.send?jsonRpcFetchFunc=buildWeb3LegacyFetcher(0,provider.send.bind(provider)):web3_provider_logger.throwArgumentError("unsupported provider","provider",provider),path||(path="unknown:")),super(path,network),defineReadOnly(this,"jsonRpcFetchFunc",jsonRpcFetchFunc),defineReadOnly(this,"provider",subprovider)}send(method,params){return this.jsonRpcFetchFunc(method,params)}}const providers_lib_esm_logger=new Logger("providers/5.6.8");function getDefaultProvider(network,options){if(null==network&&(network="homestead"),"string"==typeof network){const match=network.match(/^(ws|http)s?:/i);if(match)switch(match[1].toLowerCase()){case"http":case"https":return new JsonRpcProvider(network);case"ws":case"wss":return new WebSocketProvider(network);default:providers_lib_esm_logger.throwArgumentError("unsupported URL scheme","network",network)}}const n=getNetwork(network);return n&&n._defaultProvider||providers_lib_esm_logger.throwError("unsupported getDefaultProvider network",Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network}),n._defaultProvider({FallbackProvider,AlchemyProvider,AnkrProvider,CloudflareProvider,EtherscanProvider,InfuraProvider,JsonRpcProvider,NodesmithProvider,PocketProvider,Web3Provider,IpcProvider},options)}const regexBytes=new RegExp("^bytes([0-9]+)$"),regexNumber=new RegExp("^(u?int)([0-9]*)$"),regexArray=new RegExp("^(.*)\\[([0-9]*)\\]$"),solidity_lib_esm_logger=new Logger("solidity/5.6.1");function _pack(type,value,isArray){switch(type){case"address":return isArray?zeroPad(value,32):arrayify(value);case"string":return toUtf8Bytes(value);case"bytes":return arrayify(value);case"bool":return value=value?"0x01":"0x00",isArray?zeroPad(value,32):arrayify(value)}let match=type.match(regexNumber);if(match){let size=parseInt(match[2]||"256");return(match[2]&&String(size)!==match[2]||size%8!=0||0===size||size>256)&&solidity_lib_esm_logger.throwArgumentError("invalid number type","type",type),isArray&&(size=256),zeroPad(value=BigNumber.from(value).toTwos(size),size/8)}if(match=type.match(regexBytes),match){const size=parseInt(match[1]);return(String(size)!==match[1]||0===size||size>32)&&solidity_lib_esm_logger.throwArgumentError("invalid bytes type","type",type),arrayify(value).byteLength!==size&&solidity_lib_esm_logger.throwArgumentError(`invalid value for ${type}`,"value",value),isArray?arrayify((value+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):value}if(match=type.match(regexArray),match&&Array.isArray(value)){const baseType=match[1];parseInt(match[2]||String(value.length))!=value.length&&solidity_lib_esm_logger.throwArgumentError(`invalid array length for ${type}`,"value",value);const result=[];return value.forEach((function(value){result.push(_pack(baseType,value,!0))})),concat(result)}return solidity_lib_esm_logger.throwArgumentError("invalid type","type",type)}function lib_esm_pack(types,values){types.length!=values.length&&solidity_lib_esm_logger.throwArgumentError("wrong number of values; expected ${ types.length }","values",values);const tight=[];return types.forEach((function(type,index){tight.push(_pack(type,values[index]))})),hexlify(concat(tight))}function lib_esm_keccak256(types,values){return keccak256(lib_esm_pack(types,values))}function lib_esm_sha256(types,values){return sha256(lib_esm_pack(types,values))}function formatBytes32String(text){const bytes=toUtf8Bytes(text);if(bytes.length>31)throw new Error("bytes32 string must be less than 32 bytes");return hexlify(concat([bytes,HashZero]).slice(0,32))}function parseBytes32String(bytes){const data=arrayify(bytes);if(32!==data.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==data[31])throw new Error("invalid bytes32 string - no null terminator");let length=31;for(;0===data[length-1];)length--;return toUtf8String(data.slice(0,length))}const units_lib_esm_logger=new Logger("units/5.6.1"),names=["wei","kwei","mwei","gwei","szabo","finney","ether"];function commify(value){const comps=String(value).split(".");(comps.length>2||!comps[0].match(/^-?[0-9]*$/)||comps[1]&&!comps[1].match(/^[0-9]*$/)||"."===value||"-."===value)&&units_lib_esm_logger.throwArgumentError("invalid value","value",value);let whole=comps[0],negative="";for("-"===whole.substring(0,1)&&(negative="-",whole=whole.substring(1));"0"===whole.substring(0,1);)whole=whole.substring(1);""===whole&&(whole="0");let suffix="";for(2===comps.length&&(suffix="."+(comps[1]||"0"));suffix.length>2&&"0"===suffix[suffix.length-1];)suffix=suffix.substring(0,suffix.length-1);const formatted=[];for(;whole.length;){if(whole.length<=3){formatted.unshift(whole);break}{const index=whole.length-3;formatted.unshift(whole.substring(index)),whole=whole.substring(0,index)}}return negative+formatted.join(",")+suffix}function formatUnits(value,unitName){if("string"==typeof unitName){const index=names.indexOf(unitName);-1!==index&&(unitName=3*index)}return formatFixed(value,null!=unitName?unitName:18)}function parseUnits(value,unitName){if("string"!=typeof value&&units_lib_esm_logger.throwArgumentError("value must be a string","value",value),"string"==typeof unitName){const index=names.indexOf(unitName);-1!==index&&(unitName=3*index)}return parseFixed(value,null!=unitName?unitName:18)}function formatEther(wei){return formatUnits(wei,18)}function parseEther(ether){return parseUnits(ether,18)}const ethers_lib_esm_version_version="ethers/5.6.9",ethers_logger=new Logger(ethers_lib_esm_version_version);try{const anyGlobal=window;null==anyGlobal._ethers&&(anyGlobal._ethers=ethers_namespaceObject)}catch(error){}},7187:module=>{"use strict";var ReflectOwnKeys,R="object"==typeof Reflect?Reflect:null,ReflectApply=R&&"function"==typeof R.apply?R.apply:function ReflectApply(target,receiver,args){return Function.prototype.apply.call(target,receiver,args)};ReflectOwnKeys=R&&"function"==typeof R.ownKeys?R.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(target){return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))}:function ReflectOwnKeys(target){return Object.getOwnPropertyNames(target)};var NumberIsNaN=Number.isNaN||function NumberIsNaN(value){return value!=value};function EventEmitter(){EventEmitter.init.call(this)}module.exports=EventEmitter,module.exports.once=function once(emitter,name){return new Promise((function(resolve,reject){function errorListener(err){emitter.removeListener(name,resolver),reject(err)}function resolver(){"function"==typeof emitter.removeListener&&emitter.removeListener("error",errorListener),resolve([].slice.call(arguments))}eventTargetAgnosticAddListener(emitter,name,resolver,{once:!0}),"error"!==name&&function addErrorHandlerIfEventEmitter(emitter,handler,flags){"function"==typeof emitter.on&&eventTargetAgnosticAddListener(emitter,"error",handler,flags)}(emitter,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(listener){if("function"!=typeof listener)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof listener)}function _getMaxListeners(that){return void 0===that._maxListeners?EventEmitter.defaultMaxListeners:that._maxListeners}function _addListener(target,type,listener,prepend){var m,events,existing;if(checkListener(listener),void 0===(events=target._events)?(events=target._events=Object.create(null),target._eventsCount=0):(void 0!==events.newListener&&(target.emit("newListener",type,listener.listener?listener.listener:listener),events=target._events),existing=events[type]),void 0===existing)existing=events[type]=listener,++target._eventsCount;else if("function"==typeof existing?existing=events[type]=prepend?[listener,existing]:[existing,listener]:prepend?existing.unshift(listener):existing.push(listener),(m=_getMaxListeners(target))>0&&existing.length>m&&!existing.warned){existing.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+" "+String(type)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=target,w.type=type,w.count=existing.length,function ProcessEmitWarning(warning){console&&console.warn&&console.warn(warning)}(w)}return target}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(target,type,listener){var state={fired:!1,wrapFn:void 0,target,type,listener},wrapped=onceWrapper.bind(state);return wrapped.listener=listener,state.wrapFn=wrapped,wrapped}function _listeners(target,type,unwrap){var events=target._events;if(void 0===events)return[];var evlistener=events[type];return void 0===evlistener?[]:"function"==typeof evlistener?unwrap?[evlistener.listener||evlistener]:[evlistener]:unwrap?function unwrapListeners(arr){for(var ret=new Array(arr.length),i=0;i<ret.length;++i)ret[i]=arr[i].listener||arr[i];return ret}(evlistener):arrayClone(evlistener,evlistener.length)}function listenerCount(type){var events=this._events;if(void 0!==events){var evlistener=events[type];if("function"==typeof evlistener)return 1;if(void 0!==evlistener)return evlistener.length}return 0}function arrayClone(arr,n){for(var copy=new Array(n),i=0;i<n;++i)copy[i]=arr[i];return copy}function eventTargetAgnosticAddListener(emitter,name,listener,flags){if("function"==typeof emitter.on)flags.once?emitter.once(name,listener):emitter.on(name,listener);else{if("function"!=typeof emitter.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof emitter);emitter.addEventListener(name,(function wrapListener(arg){flags.once&&emitter.removeEventListener(name,wrapListener),listener(arg)}))}}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(arg){if("number"!=typeof arg||arg<0||NumberIsNaN(arg))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+arg+".");defaultMaxListeners=arg}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(n){if("number"!=typeof n||n<0||NumberIsNaN(n))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".");return this._maxListeners=n,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(type){for(var args=[],i=1;i<arguments.length;i++)args.push(arguments[i]);var doError="error"===type,events=this._events;if(void 0!==events)doError=doError&&void 0===events.error;else if(!doError)return!1;if(doError){var er;if(args.length>0&&(er=args[0]),er instanceof Error)throw er;var err=new Error("Unhandled error."+(er?" ("+er.message+")":""));throw err.context=er,err}var handler=events[type];if(void 0===handler)return!1;if("function"==typeof handler)ReflectApply(handler,this,args);else{var len=handler.length,listeners=arrayClone(handler,len);for(i=0;i<len;++i)ReflectApply(listeners[i],this,args)}return!0},EventEmitter.prototype.addListener=function addListener(type,listener){return _addListener(this,type,listener,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function prependListener(type,listener){return _addListener(this,type,listener,!0)},EventEmitter.prototype.once=function once(type,listener){return checkListener(listener),this.on(type,_onceWrap(this,type,listener)),this},EventEmitter.prototype.prependOnceListener=function prependOnceListener(type,listener){return checkListener(listener),this.prependListener(type,_onceWrap(this,type,listener)),this},EventEmitter.prototype.removeListener=function removeListener(type,listener){var list,events,position,i,originalListener;if(checkListener(listener),void 0===(events=this._events))return this;if(void 0===(list=events[type]))return this;if(list===listener||list.listener===listener)0==--this._eventsCount?this._events=Object.create(null):(delete events[type],events.removeListener&&this.emit("removeListener",type,list.listener||listener));else if("function"!=typeof list){for(position=-1,i=list.length-1;i>=0;i--)if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener,position=i;break}if(position<0)return this;0===position?list.shift():function spliceOne(list,index){for(;index+1<list.length;index++)list[index]=list[index+1];list.pop()}(list,position),1===list.length&&(events[type]=list[0]),void 0!==events.removeListener&&this.emit("removeListener",type,originalListener||listener)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function removeAllListeners(type){var listeners,events,i;if(void 0===(events=this._events))return this;if(void 0===events.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==events[type]&&(0==--this._eventsCount?this._events=Object.create(null):delete events[type]),this;if(0===arguments.length){var key,keys=Object.keys(events);for(i=0;i<keys.length;++i)"removeListener"!==(key=keys[i])&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(listeners=events[type]))this.removeListener(type,listeners);else if(void 0!==listeners)for(i=listeners.length-1;i>=0;i--)this.removeListener(type,listeners[i]);return this},EventEmitter.prototype.listeners=function listeners(type){return _listeners(this,type,!0)},EventEmitter.prototype.rawListeners=function rawListeners(type){return _listeners(this,type,!1)},EventEmitter.listenerCount=function(emitter,type){return"function"==typeof emitter.listenerCount?emitter.listenerCount(type):listenerCount.call(emitter,type)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]}},3048:(module,__unused_webpack_exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer,MD5=__webpack_require__(2318);module.exports=function EVP_BytesToKey(password,salt,keyBits,ivLen){if(Buffer.isBuffer(password)||(password=Buffer.from(password,"binary")),salt&&(Buffer.isBuffer(salt)||(salt=Buffer.from(salt,"binary")),8!==salt.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var keyLen=keyBits/8,key=Buffer.alloc(keyLen),iv=Buffer.alloc(ivLen||0),tmp=Buffer.alloc(0);keyLen>0||ivLen>0;){var hash=new MD5;hash.update(tmp),hash.update(password),salt&&hash.update(salt),tmp=hash.digest();var used=0;if(keyLen>0){var keyStart=key.length-keyLen;used=Math.min(keyLen,tmp.length),tmp.copy(key,keyStart,0,used),keyLen-=used}if(used<tmp.length&&ivLen>0){var ivStart=iv.length-ivLen,length=Math.min(ivLen,tmp.length-used);tmp.copy(iv,ivStart,used,used+length),ivLen-=length}}return tmp.fill(0),{key,iv}}},9804:module=>{var hasOwn=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;module.exports=function forEach(obj,fn,ctx){if("[object Function]"!==toString.call(fn))throw new TypeError("iterator must be a function");var l=obj.length;if(l===+l)for(var i=0;i<l;i++)fn.call(ctx,obj[i],i,obj);else for(var k in obj)hasOwn.call(obj,k)&&fn.call(ctx,obj[k],k,obj)}},7648:module=>{"use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice=Array.prototype.slice,toStr=Object.prototype.toString;module.exports=function bind(that){var target=this;if("function"!=typeof target||"[object Function]"!==toStr.call(target))throw new TypeError(ERROR_MESSAGE+target);for(var bound,args=slice.call(arguments,1),binder=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))},boundLength=Math.max(0,target.length-args.length),boundArgs=[],i=0;i<boundLength;i++)boundArgs.push("$"+i);if(bound=Function("binder","return function ("+boundArgs.join(",")+"){ return binder.apply(this,arguments); }")(binder),target.prototype){var Empty=function Empty(){};Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null}return bound}},8612:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var implementation=__webpack_require__(7648);module.exports=Function.prototype.bind||implementation},210:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var $SyntaxError=SyntaxError,$Function=Function,$TypeError=TypeError,getEvalledConstructor=function(expressionSyntax){try{return $Function('"use strict"; return ('+expressionSyntax+").constructor;")()}catch(e){}},$gOPD=Object.getOwnPropertyDescriptor;if($gOPD)try{$gOPD({},"")}catch(e){$gOPD=null}var throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD?function(){try{return throwTypeError}catch(calleeThrows){try{return $gOPD(arguments,"callee").get}catch(gOPDthrows){return throwTypeError}}}():throwTypeError,hasSymbols=__webpack_require__(1405)(),getProto=Object.getPrototypeOf||function(x){return x.__proto__},needsEval={},TypedArray="undefined"==typeof Uint8Array?undefined:getProto(Uint8Array),INTRINSICS={"%AggregateError%":"undefined"==typeof AggregateError?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols?getProto((new Map)[Symbol.iterator]()):undefined,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols?getProto((new Set)[Symbol.iterator]()):undefined,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet},doEval=function doEval(name){var value;if("%AsyncFunction%"===name)value=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===name)value=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===name)value=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===name){var fn=doEval("%AsyncGeneratorFunction%");fn&&(value=fn.prototype)}else if("%AsyncIteratorPrototype%"===name){var gen=doEval("%AsyncGenerator%");gen&&(value=getProto(gen.prototype))}return INTRINSICS[name]=value,value},LEGACY_ALIASES={"%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"]},bind=__webpack_require__(8612),hasOwn=__webpack_require__(7642),$concat=bind.call(Function.call,Array.prototype.concat),$spliceApply=bind.call(Function.apply,Array.prototype.splice),$replace=bind.call(Function.call,String.prototype.replace),$strSlice=bind.call(Function.call,String.prototype.slice),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function stringToPath(string){var first=$strSlice(string,0,1),last=$strSlice(string,-1);if("%"===first&&"%"!==last)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===last&&"%"!==first)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var result=[];return $replace(string,rePropName,(function(match,number,quote,subString){result[result.length]=quote?$replace(subString,reEscapeChar,"$1"):number||match})),result},getBaseIntrinsic=function getBaseIntrinsic(name,allowMissing){var alias,intrinsicName=name;if(hasOwn(LEGACY_ALIASES,intrinsicName)&&(intrinsicName="%"+(alias=LEGACY_ALIASES[intrinsicName])[0]+"%"),hasOwn(INTRINSICS,intrinsicName)){var value=INTRINSICS[intrinsicName];if(value===needsEval&&(value=doEval(intrinsicName)),void 0===value&&!allowMissing)throw new $TypeError("intrinsic "+name+" exists, but is not available. Please file an issue!");return{alias,name:intrinsicName,value}}throw new $SyntaxError("intrinsic "+name+" does not exist!")};module.exports=function GetIntrinsic(name,allowMissing){if("string"!=typeof name||0===name.length)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof allowMissing)throw new $TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name),intrinsicBaseName=parts.length>0?parts[0]:"",intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing),intrinsicRealName=intrinsic.name,value=intrinsic.value,skipFurtherCaching=!1,alias=intrinsic.alias;alias&&(intrinsicBaseName=alias[0],$spliceApply(parts,$concat([0,1],alias)));for(var i=1,isOwn=!0;i<parts.length;i+=1){var part=parts[i],first=$strSlice(part,0,1),last=$strSlice(part,-1);if(('"'===first||"'"===first||"`"===first||'"'===last||"'"===last||"`"===last)&&first!==last)throw new $SyntaxError("property names with quotes must have matching quotes");if("constructor"!==part&&isOwn||(skipFurtherCaching=!0),hasOwn(INTRINSICS,intrinsicRealName="%"+(intrinsicBaseName+="."+part)+"%"))value=INTRINSICS[intrinsicRealName];else if(null!=value){if(!(part in value)){if(!allowMissing)throw new $TypeError("base intrinsic for "+name+" exists, but the property is not available.");return}if($gOPD&&i+1>=parts.length){var desc=$gOPD(value,part);value=(isOwn=!!desc)&&"get"in desc&&!("originalValue"in desc.get)?desc.get:value[part]}else isOwn=hasOwn(value,part),value=value[part];isOwn&&!skipFurtherCaching&&(INTRINSICS[intrinsicRealName]=value)}}return value}},1044:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var $defineProperty=__webpack_require__(210)("%Object.defineProperty%",!0),hasPropertyDescriptors=function hasPropertyDescriptors(){if($defineProperty)try{return $defineProperty({},"a",{value:1}),!0}catch(e){return!1}return!1};hasPropertyDescriptors.hasArrayLengthDefineBug=function hasArrayLengthDefineBug(){if(!hasPropertyDescriptors())return null;try{return 1!==$defineProperty([],"length",{value:1}).length}catch(e){return!0}},module.exports=hasPropertyDescriptors},1405:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var origSymbol="undefined"!=typeof Symbol&&Symbol,hasSymbolSham=__webpack_require__(5419);module.exports=function hasNativeSymbols(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))}},5419:module=>{"use strict";module.exports=function hasSymbols(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var obj={},sym=Symbol("test"),symObj=Object(sym);if("string"==typeof sym)return!1;if("[object Symbol]"!==Object.prototype.toString.call(sym))return!1;if("[object Symbol]"!==Object.prototype.toString.call(symObj))return!1;for(sym in obj[sym]=42,obj)return!1;if("function"==typeof Object.keys&&0!==Object.keys(obj).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(obj).length)return!1;var syms=Object.getOwnPropertySymbols(obj);if(1!==syms.length||syms[0]!==sym)return!1;if(!Object.prototype.propertyIsEnumerable.call(obj,sym))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(42!==descriptor.value||!0!==descriptor.enumerable)return!1}return!0}},6410:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var hasSymbols=__webpack_require__(5419);module.exports=function hasToStringTagShams(){return hasSymbols()&&!!Symbol.toStringTag}},7642:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var bind=__webpack_require__(8612);module.exports=bind.call(Function.call,Object.prototype.hasOwnProperty)},3349:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var Buffer=__webpack_require__(9509).Buffer,Transform=__webpack_require__(8473).Transform;function HashBase(blockSize){Transform.call(this),this._block=Buffer.allocUnsafe(blockSize),this._blockSize=blockSize,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}__webpack_require__(5717)(HashBase,Transform),HashBase.prototype._transform=function(chunk,encoding,callback){var error=null;try{this.update(chunk,encoding)}catch(err){error=err}callback(error)},HashBase.prototype._flush=function(callback){var error=null;try{this.push(this.digest())}catch(err){error=err}callback(error)},HashBase.prototype.update=function(data,encoding){if(function throwIfNotStringOrBuffer(val,prefix){if(!Buffer.isBuffer(val)&&"string"!=typeof val)throw new TypeError(prefix+" must be a string or a buffer")}(data,"Data"),this._finalized)throw new Error("Digest already called");Buffer.isBuffer(data)||(data=Buffer.from(data,encoding));for(var block=this._block,offset=0;this._blockOffset+data.length-offset>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)block[i++]=data[offset++];this._update(),this._blockOffset=0}for(;offset<data.length;)block[this._blockOffset++]=data[offset++];for(var j=0,carry=8*data.length;carry>0;++j)this._length[j]+=carry,(carry=this._length[j]/4294967296|0)>0&&(this._length[j]-=4294967296*carry);return this},HashBase.prototype._update=function(){throw new Error("_update is not implemented")},HashBase.prototype.digest=function(encoding){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var digest=this._digest();void 0!==encoding&&(digest=digest.toString(encoding)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return digest},HashBase.prototype._digest=function(){throw new Error("_digest is not implemented")},module.exports=HashBase},3715:(__unused_webpack_module,exports,__webpack_require__)=>{var hash=exports;hash.utils=__webpack_require__(6436),hash.common=__webpack_require__(5772),hash.sha=__webpack_require__(9041),hash.ripemd=__webpack_require__(2949),hash.hmac=__webpack_require__(2344),hash.sha1=hash.sha.sha1,hash.sha256=hash.sha.sha256,hash.sha224=hash.sha.sha224,hash.sha384=hash.sha.sha384,hash.sha512=hash.sha.sha512,hash.ripemd160=hash.ripemd.ripemd160},5772:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(6436),assert=__webpack_require__(9746);function BlockHash(){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}exports.BlockHash=BlockHash,BlockHash.prototype.update=function update(msg,enc){if(msg=utils.toArray(msg,enc),this.pending?this.pending=this.pending.concat(msg):this.pending=msg,this.pendingTotal+=msg.length,this.pending.length>=this._delta8){var r=(msg=this.pending).length%this._delta8;this.pending=msg.slice(msg.length-r,msg.length),0===this.pending.length&&(this.pending=null),msg=utils.join32(msg,0,msg.length-r,this.endian);for(var i=0;i<msg.length;i+=this._delta32)this._update(msg,i,i+this._delta32)}return this},BlockHash.prototype.digest=function digest(enc){return this.update(this._pad()),assert(null===this.pending),this._digest(enc)},BlockHash.prototype._pad=function pad(){var len=this.pendingTotal,bytes=this._delta8,k=bytes-(len+this.padLength)%bytes,res=new Array(k+this.padLength);res[0]=128;for(var i=1;i<k;i++)res[i]=0;if(len<<=3,"big"===this.endian){for(var t=8;t<this.padLength;t++)res[i++]=0;res[i++]=0,res[i++]=0,res[i++]=0,res[i++]=0,res[i++]=len>>>24&255,res[i++]=len>>>16&255,res[i++]=len>>>8&255,res[i++]=255&len}else for(res[i++]=255&len,res[i++]=len>>>8&255,res[i++]=len>>>16&255,res[i++]=len>>>24&255,res[i++]=0,res[i++]=0,res[i++]=0,res[i++]=0,t=8;t<this.padLength;t++)res[i++]=0;return res}},2344:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(6436),assert=__webpack_require__(9746);function Hmac(hash,key,enc){if(!(this instanceof Hmac))return new Hmac(hash,key,enc);this.Hash=hash,this.blockSize=hash.blockSize/8,this.outSize=hash.outSize/8,this.inner=null,this.outer=null,this._init(utils.toArray(key,enc))}module.exports=Hmac,Hmac.prototype._init=function init(key){key.length>this.blockSize&&(key=(new this.Hash).update(key).digest()),assert(key.length<=this.blockSize);for(var i=key.length;i<this.blockSize;i++)key.push(0);for(i=0;i<key.length;i++)key[i]^=54;for(this.inner=(new this.Hash).update(key),i=0;i<key.length;i++)key[i]^=106;this.outer=(new this.Hash).update(key)},Hmac.prototype.update=function update(msg,enc){return this.inner.update(msg,enc),this},Hmac.prototype.digest=function digest(enc){return this.outer.update(this.inner.digest()),this.outer.digest(enc)}},2949:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(6436),common=__webpack_require__(5772),rotl32=utils.rotl32,sum32=utils.sum32,sum32_3=utils.sum32_3,sum32_4=utils.sum32_4,BlockHash=common.BlockHash;function RIPEMD160(){if(!(this instanceof RIPEMD160))return new RIPEMD160;BlockHash.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(j,x,y,z){return j<=15?x^y^z:j<=31?x&y|~x&z:j<=47?(x|~y)^z:j<=63?x&z|y&~z:x^(y|~z)}function K(j){return j<=15?0:j<=31?1518500249:j<=47?1859775393:j<=63?2400959708:2840853838}function Kh(j){return j<=15?1352829926:j<=31?1548603684:j<=47?1836072691:j<=63?2053994217:0}utils.inherits(RIPEMD160,BlockHash),exports.ripemd160=RIPEMD160,RIPEMD160.blockSize=512,RIPEMD160.outSize=160,RIPEMD160.hmacStrength=192,RIPEMD160.padLength=64,RIPEMD160.prototype._update=function update(msg,start){for(var A=this.h[0],B=this.h[1],C=this.h[2],D=this.h[3],E=this.h[4],Ah=A,Bh=B,Ch=C,Dh=D,Eh=E,j=0;j<80;j++){var T=sum32(rotl32(sum32_4(A,f(j,B,C,D),msg[r[j]+start],K(j)),s[j]),E);A=E,E=D,D=rotl32(C,10),C=B,B=T,T=sum32(rotl32(sum32_4(Ah,f(79-j,Bh,Ch,Dh),msg[rh[j]+start],Kh(j)),sh[j]),Eh),Ah=Eh,Eh=Dh,Dh=rotl32(Ch,10),Ch=Bh,Bh=T}T=sum32_3(this.h[1],C,Dh),this.h[1]=sum32_3(this.h[2],D,Eh),this.h[2]=sum32_3(this.h[3],E,Ah),this.h[3]=sum32_3(this.h[4],A,Bh),this.h[4]=sum32_3(this.h[0],B,Ch),this.h[0]=T},RIPEMD160.prototype._digest=function digest(enc){return"hex"===enc?utils.toHex32(this.h,"little"):utils.split32(this.h,"little")};var r=[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],rh=[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],s=[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],sh=[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]},9041:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.sha1=__webpack_require__(4761),exports.sha224=__webpack_require__(799),exports.sha256=__webpack_require__(9344),exports.sha384=__webpack_require__(772),exports.sha512=__webpack_require__(5900)},4761:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(6436),common=__webpack_require__(5772),shaCommon=__webpack_require__(7038),rotl32=utils.rotl32,sum32=utils.sum32,sum32_5=utils.sum32_5,ft_1=shaCommon.ft_1,BlockHash=common.BlockHash,sha1_K=[1518500249,1859775393,2400959708,3395469782];function SHA1(){if(!(this instanceof SHA1))return new SHA1;BlockHash.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}utils.inherits(SHA1,BlockHash),module.exports=SHA1,SHA1.blockSize=512,SHA1.outSize=160,SHA1.hmacStrength=80,SHA1.padLength=64,SHA1.prototype._update=function _update(msg,start){for(var W=this.W,i=0;i<16;i++)W[i]=msg[start+i];for(;i<W.length;i++)W[i]=rotl32(W[i-3]^W[i-8]^W[i-14]^W[i-16],1);var a=this.h[0],b=this.h[1],c=this.h[2],d=this.h[3],e=this.h[4];for(i=0;i<W.length;i++){var s=~~(i/20),t=sum32_5(rotl32(a,5),ft_1(s,b,c,d),e,W[i],sha1_K[s]);e=d,d=c,c=rotl32(b,30),b=a,a=t}this.h[0]=sum32(this.h[0],a),this.h[1]=sum32(this.h[1],b),this.h[2]=sum32(this.h[2],c),this.h[3]=sum32(this.h[3],d),this.h[4]=sum32(this.h[4],e)},SHA1.prototype._digest=function digest(enc){return"hex"===enc?utils.toHex32(this.h,"big"):utils.split32(this.h,"big")}},799:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(6436),SHA256=__webpack_require__(9344);function SHA224(){if(!(this instanceof SHA224))return new SHA224;SHA256.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}utils.inherits(SHA224,SHA256),module.exports=SHA224,SHA224.blockSize=512,SHA224.outSize=224,SHA224.hmacStrength=192,SHA224.padLength=64,SHA224.prototype._digest=function digest(enc){return"hex"===enc?utils.toHex32(this.h.slice(0,7),"big"):utils.split32(this.h.slice(0,7),"big")}},9344:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(6436),common=__webpack_require__(5772),shaCommon=__webpack_require__(7038),assert=__webpack_require__(9746),sum32=utils.sum32,sum32_4=utils.sum32_4,sum32_5=utils.sum32_5,ch32=shaCommon.ch32,maj32=shaCommon.maj32,s0_256=shaCommon.s0_256,s1_256=shaCommon.s1_256,g0_256=shaCommon.g0_256,g1_256=shaCommon.g1_256,BlockHash=common.BlockHash,sha256_K=[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 SHA256(){if(!(this instanceof SHA256))return new SHA256;BlockHash.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=sha256_K,this.W=new Array(64)}utils.inherits(SHA256,BlockHash),module.exports=SHA256,SHA256.blockSize=512,SHA256.outSize=256,SHA256.hmacStrength=192,SHA256.padLength=64,SHA256.prototype._update=function _update(msg,start){for(var W=this.W,i=0;i<16;i++)W[i]=msg[start+i];for(;i<W.length;i++)W[i]=sum32_4(g1_256(W[i-2]),W[i-7],g0_256(W[i-15]),W[i-16]);var a=this.h[0],b=this.h[1],c=this.h[2],d=this.h[3],e=this.h[4],f=this.h[5],g=this.h[6],h=this.h[7];for(assert(this.k.length===W.length),i=0;i<W.length;i++){var T1=sum32_5(h,s1_256(e),ch32(e,f,g),this.k[i],W[i]),T2=sum32(s0_256(a),maj32(a,b,c));h=g,g=f,f=e,e=sum32(d,T1),d=c,c=b,b=a,a=sum32(T1,T2)}this.h[0]=sum32(this.h[0],a),this.h[1]=sum32(this.h[1],b),this.h[2]=sum32(this.h[2],c),this.h[3]=sum32(this.h[3],d),this.h[4]=sum32(this.h[4],e),this.h[5]=sum32(this.h[5],f),this.h[6]=sum32(this.h[6],g),this.h[7]=sum32(this.h[7],h)},SHA256.prototype._digest=function digest(enc){return"hex"===enc?utils.toHex32(this.h,"big"):utils.split32(this.h,"big")}},772:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(6436),SHA512=__webpack_require__(5900);function SHA384(){if(!(this instanceof SHA384))return new SHA384;SHA512.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}utils.inherits(SHA384,SHA512),module.exports=SHA384,SHA384.blockSize=1024,SHA384.outSize=384,SHA384.hmacStrength=192,SHA384.padLength=128,SHA384.prototype._digest=function digest(enc){return"hex"===enc?utils.toHex32(this.h.slice(0,12),"big"):utils.split32(this.h.slice(0,12),"big")}},5900:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var utils=__webpack_require__(6436),common=__webpack_require__(5772),assert=__webpack_require__(9746),rotr64_hi=utils.rotr64_hi,rotr64_lo=utils.rotr64_lo,shr64_hi=utils.shr64_hi,shr64_lo=utils.shr64_lo,sum64=utils.sum64,sum64_hi=utils.sum64_hi,sum64_lo=utils.sum64_lo,sum64_4_hi=utils.sum64_4_hi,sum64_4_lo=utils.sum64_4_lo,sum64_5_hi=utils.sum64_5_hi,sum64_5_lo=utils.sum64_5_lo,BlockHash=common.BlockHash,sha512_K=[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 SHA512(){if(!(this instanceof SHA512))return new SHA512;BlockHash.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=sha512_K,this.W=new Array(160)}function ch64_hi(xh,xl,yh,yl,zh){var r=xh&yh^~xh&zh;return r<0&&(r+=4294967296),r}function ch64_lo(xh,xl,yh,yl,zh,zl){var r=xl&yl^~xl&zl;return r<0&&(r+=4294967296),r}function maj64_hi(xh,xl,yh,yl,zh){var r=xh&yh^xh&zh^yh&zh;return r<0&&(r+=4294967296),r}function maj64_lo(xh,xl,yh,yl,zh,zl){var r=xl&yl^xl&zl^yl&zl;return r<0&&(r+=4294967296),r}function s0_512_hi(xh,xl){var r=rotr64_hi(xh,xl,28)^rotr64_hi(xl,xh,2)^rotr64_hi(xl,xh,7);return r<0&&(r+=4294967296),r}function s0_512_lo(xh,xl){var r=rotr64_lo(xh,xl,28)^rotr64_lo(xl,xh,2)^rotr64_lo(xl,xh,7);return r<0&&(r+=4294967296),r}function s1_512_hi(xh,xl){var r=rotr64_hi(xh,xl,14)^rotr64_hi(xh,xl,18)^rotr64_hi(xl,xh,9);return r<0&&(r+=4294967296),r}function s1_512_lo(xh,xl){var r=rotr64_lo(xh,xl,14)^rotr64_lo(xh,xl,18)^rotr64_lo(xl,xh,9);return r<0&&(r+=4294967296),r}function g0_512_hi(xh,xl){var r=rotr64_hi(xh,xl,1)^rotr64_hi(xh,xl,8)^shr64_hi(xh,xl,7);return r<0&&(r+=4294967296),r}function g0_512_lo(xh,xl){var r=rotr64_lo(xh,xl,1)^rotr64_lo(xh,xl,8)^shr64_lo(xh,xl,7);return r<0&&(r+=4294967296),r}function g1_512_hi(xh,xl){var r=rotr64_hi(xh,xl,19)^rotr64_hi(xl,xh,29)^shr64_hi(xh,xl,6);return r<0&&(r+=4294967296),r}function g1_512_lo(xh,xl){var r=rotr64_lo(xh,xl,19)^rotr64_lo(xl,xh,29)^shr64_lo(xh,xl,6);return r<0&&(r+=4294967296),r}utils.inherits(SHA512,BlockHash),module.exports=SHA512,SHA512.blockSize=1024,SHA512.outSize=512,SHA512.hmacStrength=192,SHA512.padLength=128,SHA512.prototype._prepareBlock=function _prepareBlock(msg,start){for(var W=this.W,i=0;i<32;i++)W[i]=msg[start+i];for(;i<W.length;i+=2){var c0_hi=g1_512_hi(W[i-4],W[i-3]),c0_lo=g1_512_lo(W[i-4],W[i-3]),c1_hi=W[i-14],c1_lo=W[i-13],c2_hi=g0_512_hi(W[i-30],W[i-29]),c2_lo=g0_512_lo(W[i-30],W[i-29]),c3_hi=W[i-32],c3_lo=W[i-31];W[i]=sum64_4_hi(c0_hi,c0_lo,c1_hi,c1_lo,c2_hi,c2_lo,c3_hi,c3_lo),W[i+1]=sum64_4_lo(c0_hi,c0_lo,c1_hi,c1_lo,c2_hi,c2_lo,c3_hi,c3_lo)}},SHA512.prototype._update=function _update(msg,start){this._prepareBlock(msg,start);var W=this.W,ah=this.h[0],al=this.h[1],bh=this.h[2],bl=this.h[3],ch=this.h[4],cl=this.h[5],dh=this.h[6],dl=this.h[7],eh=this.h[8],el=this.h[9],fh=this.h[10],fl=this.h[11],gh=this.h[12],gl=this.h[13],hh=this.h[14],hl=this.h[15];assert(this.k.length===W.length);for(var i=0;i<W.length;i+=2){var c0_hi=hh,c0_lo=hl,c1_hi=s1_512_hi(eh,el),c1_lo=s1_512_lo(eh,el),c2_hi=ch64_hi(eh,el,fh,fl,gh),c2_lo=ch64_lo(eh,el,fh,fl,gh,gl),c3_hi=this.k[i],c3_lo=this.k[i+1],c4_hi=W[i],c4_lo=W[i+1],T1_hi=sum64_5_hi(c0_hi,c0_lo,c1_hi,c1_lo,c2_hi,c2_lo,c3_hi,c3_lo,c4_hi,c4_lo),T1_lo=sum64_5_lo(c0_hi,c0_lo,c1_hi,c1_lo,c2_hi,c2_lo,c3_hi,c3_lo,c4_hi,c4_lo);c0_hi=s0_512_hi(ah,al),c0_lo=s0_512_lo(ah,al),c1_hi=maj64_hi(ah,al,bh,bl,ch),c1_lo=maj64_lo(ah,al,bh,bl,ch,cl);var T2_hi=sum64_hi(c0_hi,c0_lo,c1_hi,c1_lo),T2_lo=sum64_lo(c0_hi,c0_lo,c1_hi,c1_lo);hh=gh,hl=gl,gh=fh,gl=fl,fh=eh,fl=el,eh=sum64_hi(dh,dl,T1_hi,T1_lo),el=sum64_lo(dl,dl,T1_hi,T1_lo),dh=ch,dl=cl,ch=bh,cl=bl,bh=ah,bl=al,ah=sum64_hi(T1_hi,T1_lo,T2_hi,T2_lo),al=sum64_lo(T1_hi,T1_lo,T2_hi,T2_lo)}sum64(this.h,0,ah,al),sum64(this.h,2,bh,bl),sum64(this.h,4,ch,cl),sum64(this.h,6,dh,dl),sum64(this.h,8,eh,el),sum64(this.h,10,fh,fl),sum64(this.h,12,gh,gl),sum64(this.h,14,hh,hl)},SHA512.prototype._digest=function digest(enc){return"hex"===enc?utils.toHex32(this.h,"big"):utils.split32(this.h,"big")}},7038:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var rotr32=__webpack_require__(6436).rotr32;function ch32(x,y,z){return x&y^~x&z}function maj32(x,y,z){return x&y^x&z^y&z}function p32(x,y,z){return x^y^z}exports.ft_1=function ft_1(s,x,y,z){return 0===s?ch32(x,y,z):1===s||3===s?p32(x,y,z):2===s?maj32(x,y,z):void 0},exports.ch32=ch32,exports.maj32=maj32,exports.p32=p32,exports.s0_256=function s0_256(x){return rotr32(x,2)^rotr32(x,13)^rotr32(x,22)},exports.s1_256=function s1_256(x){return rotr32(x,6)^rotr32(x,11)^rotr32(x,25)},exports.g0_256=function g0_256(x){return rotr32(x,7)^rotr32(x,18)^x>>>3},exports.g1_256=function g1_256(x){return rotr32(x,17)^rotr32(x,19)^x>>>10}},6436:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var assert=__webpack_require__(9746),inherits=__webpack_require__(5717);function isSurrogatePair(msg,i){return 55296==(64512&msg.charCodeAt(i))&&(!(i<0||i+1>=msg.length)&&56320==(64512&msg.charCodeAt(i+1)))}function htonl(w){return(w>>>24|w>>>8&65280|w<<8&16711680|(255&w)<<24)>>>0}function zero2(word){return 1===word.length?"0"+word:word}function zero8(word){return 7===word.length?"0"+word:6===word.length?"00"+word:5===word.length?"000"+word:4===word.length?"0000"+word:3===word.length?"00000"+word:2===word.length?"000000"+word:1===word.length?"0000000"+word:word}exports.inherits=inherits,exports.toArray=function toArray(msg,enc){if(Array.isArray(msg))return msg.slice();if(!msg)return[];var res=[];if("string"==typeof msg)if(enc){if("hex"===enc)for((msg=msg.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(msg="0"+msg),i=0;i<msg.length;i+=2)res.push(parseInt(msg[i]+msg[i+1],16))}else for(var p=0,i=0;i<msg.length;i++){var c=msg.charCodeAt(i);c<128?res[p++]=c:c<2048?(res[p++]=c>>6|192,res[p++]=63&c|128):isSurrogatePair(msg,i)?(c=65536+((1023&c)<<10)+(1023&msg.charCodeAt(++i)),res[p++]=c>>18|240,res[p++]=c>>12&63|128,res[p++]=c>>6&63|128,res[p++]=63&c|128):(res[p++]=c>>12|224,res[p++]=c>>6&63|128,res[p++]=63&c|128)}else for(i=0;i<msg.length;i++)res[i]=0|msg[i];return res},exports.toHex=function toHex(msg){for(var res="",i=0;i<msg.length;i++)res+=zero2(msg[i].toString(16));return res},exports.htonl=htonl,exports.toHex32=function toHex32(msg,endian){for(var res="",i=0;i<msg.length;i++){var w=msg[i];"little"===endian&&(w=htonl(w)),res+=zero8(w.toString(16))}return res},exports.zero2=zero2,exports.zero8=zero8,exports.join32=function join32(msg,start,end,endian){var len=end-start;assert(len%4==0);for(var res=new Array(len/4),i=0,k=start;i<res.length;i++,k+=4){var w;w="big"===endian?msg[k]<<24|msg[k+1]<<16|msg[k+2]<<8|msg[k+3]:msg[k+3]<<24|msg[k+2]<<16|msg[k+1]<<8|msg[k],res[i]=w>>>0}return res},exports.split32=function split32(msg,endian){for(var res=new Array(4*msg.length),i=0,k=0;i<msg.length;i++,k+=4){var m=msg[i];"big"===endian?(res[k]=m>>>24,res[k+1]=m>>>16&255,res[k+2]=m>>>8&255,res[k+3]=255&m):(res[k+3]=m>>>24,res[k+2]=m>>>16&255,res[k+1]=m>>>8&255,res[k]=255&m)}return res},exports.rotr32=function rotr32(w,b){return w>>>b|w<<32-b},exports.rotl32=function rotl32(w,b){return w<<b|w>>>32-b},exports.sum32=function sum32(a,b){return a+b>>>0},exports.sum32_3=function sum32_3(a,b,c){return a+b+c>>>0},exports.sum32_4=function sum32_4(a,b,c,d){return a+b+c+d>>>0},exports.sum32_5=function sum32_5(a,b,c,d,e){return a+b+c+d+e>>>0},exports.sum64=function sum64(buf,pos,ah,al){var bh=buf[pos],lo=al+buf[pos+1]>>>0,hi=(lo<al?1:0)+ah+bh;buf[pos]=hi>>>0,buf[pos+1]=lo},exports.sum64_hi=function sum64_hi(ah,al,bh,bl){return(al+bl>>>0<al?1:0)+ah+bh>>>0},exports.sum64_lo=function sum64_lo(ah,al,bh,bl){return al+bl>>>0},exports.sum64_4_hi=function sum64_4_hi(ah,al,bh,bl,ch,cl,dh,dl){var carry=0,lo=al;return carry+=(lo=lo+bl>>>0)<al?1:0,carry+=(lo=lo+cl>>>0)<cl?1:0,ah+bh+ch+dh+(carry+=(lo=lo+dl>>>0)<dl?1:0)>>>0},exports.sum64_4_lo=function sum64_4_lo(ah,al,bh,bl,ch,cl,dh,dl){return al+bl+cl+dl>>>0},exports.sum64_5_hi=function sum64_5_hi(ah,al,bh,bl,ch,cl,dh,dl,eh,el){var carry=0,lo=al;return carry+=(lo=lo+bl>>>0)<al?1:0,carry+=(lo=lo+cl>>>0)<cl?1:0,carry+=(lo=lo+dl>>>0)<dl?1:0,ah+bh+ch+dh+eh+(carry+=(lo=lo+el>>>0)<el?1:0)>>>0},exports.sum64_5_lo=function sum64_5_lo(ah,al,bh,bl,ch,cl,dh,dl,eh,el){return al+bl+cl+dl+el>>>0},exports.rotr64_hi=function rotr64_hi(ah,al,num){return(al<<32-num|ah>>>num)>>>0},exports.rotr64_lo=function rotr64_lo(ah,al,num){return(ah<<32-num|al>>>num)>>>0},exports.shr64_hi=function shr64_hi(ah,al,num){return ah>>>num},exports.shr64_lo=function shr64_lo(ah,al,num){return(ah<<32-num|al>>>num)>>>0}},9840:(module,__unused_webpack_exports,__webpack_require__)=>{var assert=__webpack_require__(9282),Buffer=__webpack_require__(9509).Buffer,crypto=__webpack_require__(5835),bs58check=__webpack_require__(8334),secp256k1=__webpack_require__(7221),MASTER_SECRET=Buffer.from("Bitcoin seed","utf8"),BITCOIN_VERSIONS={private:76066276,public:76067358};function HDKey(versions){this.versions=versions||BITCOIN_VERSIONS,this.depth=0,this.index=0,this._privateKey=null,this._publicKey=null,this.chainCode=null,this._fingerprint=0,this.parentFingerprint=0}function serialize(hdkey,version,key){var buffer=Buffer.allocUnsafe(78);buffer.writeUInt32BE(version,0),buffer.writeUInt8(hdkey.depth,4);var fingerprint=hdkey.depth?hdkey.parentFingerprint:0;return buffer.writeUInt32BE(fingerprint,5),buffer.writeUInt32BE(hdkey.index,9),hdkey.chainCode.copy(buffer,13),key.copy(buffer,45),buffer}function hash160(buf){var sha=crypto.createHash("sha256").update(buf).digest();return crypto.createHash("ripemd160").update(sha).digest()}Object.defineProperty(HDKey.prototype,"fingerprint",{get:function(){return this._fingerprint}}),Object.defineProperty(HDKey.prototype,"identifier",{get:function(){return this._identifier}}),Object.defineProperty(HDKey.prototype,"pubKeyHash",{get:function(){return this.identifier}}),Object.defineProperty(HDKey.prototype,"privateKey",{get:function(){return this._privateKey},set:function(value){assert.equal(value.length,32,"Private key must be 32 bytes."),assert(!0===secp256k1.privateKeyVerify(value),"Invalid private key"),this._privateKey=value,this._publicKey=Buffer.from(secp256k1.publicKeyCreate(value,!0)),this._identifier=hash160(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0)}}),Object.defineProperty(HDKey.prototype,"publicKey",{get:function(){return this._publicKey},set:function(value){assert(33===value.length||65===value.length,"Public key must be 33 or 65 bytes."),assert(!0===secp256k1.publicKeyVerify(value),"Invalid public key"),this._publicKey=Buffer.from(secp256k1.publicKeyConvert(value,!0)),this._identifier=hash160(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0),this._privateKey=null}}),Object.defineProperty(HDKey.prototype,"privateExtendedKey",{get:function(){return this._privateKey?bs58check.encode(serialize(this,this.versions.private,Buffer.concat([Buffer.alloc(1,0),this.privateKey]))):null}}),Object.defineProperty(HDKey.prototype,"publicExtendedKey",{get:function(){return bs58check.encode(serialize(this,this.versions.public,this.publicKey))}}),HDKey.prototype.derive=function(path){if("m"===path||"M"===path||"m'"===path||"M'"===path)return this;var entries=path.split("/"),hdkey=this;return entries.forEach((function(c,i){if(0!==i){var hardened=c.length>1&&"'"===c[c.length-1],childIndex=parseInt(c,10);assert(childIndex<2147483648,"Invalid index"),hardened&&(childIndex+=2147483648),hdkey=hdkey.deriveChild(childIndex)}else assert(/^[mM]{1}/.test(c),'Path must start with "m" or "M"')})),hdkey},HDKey.prototype.deriveChild=function(index){var data,isHardened=index>=2147483648,indexBuffer=Buffer.allocUnsafe(4);if(indexBuffer.writeUInt32BE(index,0),isHardened){assert(this.privateKey,"Could not derive hardened child key");var pk=this.privateKey,zb=Buffer.alloc(1,0);pk=Buffer.concat([zb,pk]),data=Buffer.concat([pk,indexBuffer])}else data=Buffer.concat([this.publicKey,indexBuffer]);var I=crypto.createHmac("sha512",this.chainCode).update(data).digest(),IL=I.slice(0,32),IR=I.slice(32),hd=new HDKey(this.versions);if(this.privateKey)try{hd.privateKey=Buffer.from(secp256k1.privateKeyTweakAdd(Buffer.from(this.privateKey),IL))}catch(err){return this.deriveChild(index+1)}else try{hd.publicKey=Buffer.from(secp256k1.publicKeyTweakAdd(Buffer.from(this.publicKey),IL,!0))}catch(err){return this.deriveChild(index+1)}return hd.chainCode=IR,hd.depth=this.depth+1,hd.parentFingerprint=this.fingerprint,hd.index=index,hd},HDKey.prototype.sign=function(hash){return Buffer.from(secp256k1.ecdsaSign(hash,this.privateKey).signature)},HDKey.prototype.verify=function(hash,signature){return secp256k1.ecdsaVerify(Uint8Array.from(signature),Uint8Array.from(hash),Uint8Array.from(this.publicKey))},HDKey.prototype.wipePrivateData=function(){return this._privateKey&&crypto.randomBytes(this._privateKey.length).copy(this._privateKey),this._privateKey=null,this},HDKey.prototype.toJSON=function(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}},HDKey.fromMasterSeed=function(seedBuffer,versions){var I=crypto.createHmac("sha512",MASTER_SECRET).update(seedBuffer).digest(),IL=I.slice(0,32),IR=I.slice(32),hdkey=new HDKey(versions);return hdkey.chainCode=IR,hdkey.privateKey=IL,hdkey},HDKey.fromExtendedKey=function(base58key,versions){var hdkey=new HDKey(versions=versions||BITCOIN_VERSIONS),keyBuffer=bs58check.decode(base58key),version=keyBuffer.readUInt32BE(0);assert(version===versions.private||version===versions.public,"Version mismatch: does not match private or public"),hdkey.depth=keyBuffer.readUInt8(4),hdkey.parentFingerprint=keyBuffer.readUInt32BE(5),hdkey.index=keyBuffer.readUInt32BE(9),hdkey.chainCode=keyBuffer.slice(13,45);var key=keyBuffer.slice(45);return 0===key.readUInt8(0)?(assert(version===versions.private,"Version mismatch: version does not match private"),hdkey.privateKey=key.slice(1)):(assert(version===versions.public,"Version mismatch: version does not match public"),hdkey.publicKey=key),hdkey},HDKey.fromJSON=function(obj){return HDKey.fromExtendedKey(obj.xpriv)},HDKey.HARDENED_OFFSET=2147483648,module.exports=HDKey},2156:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var hash=__webpack_require__(3715),utils=__webpack_require__(4504),assert=__webpack_require__(9746);function HmacDRBG(options){if(!(this instanceof HmacDRBG))return new HmacDRBG(options);this.hash=options.hash,this.predResist=!!options.predResist,this.outLen=this.hash.outSize,this.minEntropy=options.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var entropy=utils.toArray(options.entropy,options.entropyEnc||"hex"),nonce=utils.toArray(options.nonce,options.nonceEnc||"hex"),pers=utils.toArray(options.pers,options.persEnc||"hex");assert(entropy.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(entropy,nonce,pers)}module.exports=HmacDRBG,HmacDRBG.prototype._init=function init(entropy,nonce,pers){var seed=entropy.concat(nonce).concat(pers);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(seed),this._reseed=1,this.reseedInterval=281474976710656},HmacDRBG.prototype._hmac=function hmac(){return new hash.hmac(this.hash,this.K)},HmacDRBG.prototype._update=function update(seed){var kmac=this._hmac().update(this.V).update([0]);seed&&(kmac=kmac.update(seed)),this.K=kmac.digest(),this.V=this._hmac().update(this.V).digest(),seed&&(this.K=this._hmac().update(this.V).update([1]).update(seed).digest(),this.V=this._hmac().update(this.V).digest())},HmacDRBG.prototype.reseed=function reseed(entropy,entropyEnc,add,addEnc){"string"!=typeof entropyEnc&&(addEnc=add,add=entropyEnc,entropyEnc=null),entropy=utils.toArray(entropy,entropyEnc),add=utils.toArray(add,addEnc),assert(entropy.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(entropy.concat(add||[])),this._reseed=1},HmacDRBG.prototype.generate=function generate(len,enc,add,addEnc){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof enc&&(addEnc=add,add=enc,enc=null),add&&(add=utils.toArray(add,addEnc||"hex"),this._update(add));for(var temp=[];temp.length<len;)this.V=this._hmac().update(this.V).digest(),temp=temp.concat(this.V);var res=temp.slice(0,len);return this._update(add),this._reseed++,utils.encode(res,enc)}},645:(__unused_webpack_module,exports)=>{exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),(value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias))*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},5717:module=>{"function"==typeof Object.create?module.exports=function inherits(ctor,superCtor){superCtor&&(ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}}))}:module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}}},2584:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var hasToStringTag=__webpack_require__(6410)(),$toString=__webpack_require__(1924)("Object.prototype.toString"),isStandardArguments=function isArguments(value){return!(hasToStringTag&&value&&"object"==typeof value&&Symbol.toStringTag in value)&&"[object Arguments]"===$toString(value)},isLegacyArguments=function isArguments(value){return!!isStandardArguments(value)||null!==value&&"object"==typeof value&&"number"==typeof value.length&&value.length>=0&&"[object Array]"!==$toString(value)&&"[object Function]"===$toString(value.callee)},supportsStandardArguments=function(){return isStandardArguments(arguments)}();isStandardArguments.isLegacyArguments=isLegacyArguments,module.exports=supportsStandardArguments?isStandardArguments:isLegacyArguments},8662:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var GeneratorFunction,toStr=Object.prototype.toString,fnToStr=Function.prototype.toString,isFnRegex=/^\s*(?:function)?\*/,hasToStringTag=__webpack_require__(6410)(),getProto=Object.getPrototypeOf;module.exports=function isGeneratorFunction(fn){if("function"!=typeof fn)return!1;if(isFnRegex.test(fnToStr.call(fn)))return!0;if(!hasToStringTag)return"[object GeneratorFunction]"===toStr.call(fn);if(!getProto)return!1;if(void 0===GeneratorFunction){var generatorFunc=function(){if(!hasToStringTag)return!1;try{return Function("return function*() {}")()}catch(e){}}();GeneratorFunction=!!generatorFunc&&getProto(generatorFunc)}return getProto(fn)===GeneratorFunction}},8611:module=>{"use strict";module.exports=function isNaN(value){return value!=value}},360:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var callBind=__webpack_require__(5559),define=__webpack_require__(4289),implementation=__webpack_require__(8611),getPolyfill=__webpack_require__(9415),shim=__webpack_require__(3194),polyfill=callBind(getPolyfill(),Number);define(polyfill,{getPolyfill,implementation,shim}),module.exports=polyfill},9415:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var implementation=__webpack_require__(8611);module.exports=function getPolyfill(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:implementation}},3194:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var define=__webpack_require__(4289),getPolyfill=__webpack_require__(9415);module.exports=function shimNumberIsNaN(){var polyfill=getPolyfill();return define(Number,{isNaN:polyfill},{isNaN:function testIsNaN(){return Number.isNaN!==polyfill}}),polyfill}},5692:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var forEach=__webpack_require__(9804),availableTypedArrays=__webpack_require__(3083),callBound=__webpack_require__(1924),$toString=callBound("Object.prototype.toString"),hasToStringTag=__webpack_require__(6410)(),g="undefined"==typeof globalThis?__webpack_require__.g:globalThis,typedArrays=availableTypedArrays(),$indexOf=callBound("Array.prototype.indexOf",!0)||function indexOf(array,value){for(var i=0;i<array.length;i+=1)if(array[i]===value)return i;return-1},$slice=callBound("String.prototype.slice"),toStrTags={},gOPD=__webpack_require__(882),getPrototypeOf=Object.getPrototypeOf;hasToStringTag&&gOPD&&getPrototypeOf&&forEach(typedArrays,(function(typedArray){var arr=new g[typedArray];if(Symbol.toStringTag in arr){var proto=getPrototypeOf(arr),descriptor=gOPD(proto,Symbol.toStringTag);if(!descriptor){var superProto=getPrototypeOf(proto);descriptor=gOPD(superProto,Symbol.toStringTag)}toStrTags[typedArray]=descriptor.get}}));module.exports=function isTypedArray(value){if(!value||"object"!=typeof value)return!1;if(!hasToStringTag||!(Symbol.toStringTag in value)){var tag=$slice($toString(value),8,-1);return $indexOf(typedArrays,tag)>-1}return!!gOPD&&function tryAllTypedArrays(value){var anyTrue=!1;return forEach(toStrTags,(function(getter,typedArray){if(!anyTrue)try{anyTrue=getter.call(value)===typedArray}catch(e){}})),anyTrue}(value)}},6792:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var ws=null;"undefined"!=typeof WebSocket?ws=WebSocket:"undefined"!=typeof MozWebSocket?ws=MozWebSocket:void 0!==__webpack_require__.g?ws=__webpack_require__.g.WebSocket||__webpack_require__.g.MozWebSocket:"undefined"!=typeof window?ws=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(ws=self.WebSocket||self.MozWebSocket);const __WEBPACK_DEFAULT_EXPORT__=ws},1094:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;!function(){"use strict";var INPUT_ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA3_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self;!root.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?root=__webpack_require__.g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA3_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),CSHAKE_PADDING=[4,1024,262144,67108864],SHIFT=[0,8,16,24],RC=[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],BITS=[224,256,384,512],SHAKE_BITS=[128,256],OUTPUT_TYPES=["hex","buffer","arrayBuffer","array","digest"],CSHAKE_BYTEPAD={128:168,256:136};!root.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(obj){return"[object Array]"===Object.prototype.toString.call(obj)}),!ARRAY_BUFFER||!root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(obj){return"object"==typeof obj&&obj.buffer&&obj.buffer.constructor===ArrayBuffer});for(var createOutputMethod=function(bits,padding,outputType){return function(message){return new Keccak(bits,padding,bits).update(message)[outputType]()}},createShakeOutputMethod=function(bits,padding,outputType){return function(message,outputBits){return new Keccak(bits,padding,outputBits).update(message)[outputType]()}},createCshakeOutputMethod=function(bits,padding,outputType){return function(message,outputBits,n,s){return methods["cshake"+bits].update(message,outputBits,n,s)[outputType]()}},createKmacOutputMethod=function(bits,padding,outputType){return function(key,message,outputBits,s){return methods["kmac"+bits].update(key,message,outputBits,s)[outputType]()}},createOutputMethods=function(method,createMethod,bits,padding){for(var i=0;i<OUTPUT_TYPES.length;++i){var type=OUTPUT_TYPES[i];method[type]=createMethod(bits,padding,type)}return method},createMethod=function(bits,padding){var method=createOutputMethod(bits,padding,"hex");return method.create=function(){return new Keccak(bits,padding,bits)},method.update=function(message){return method.create().update(message)},createOutputMethods(method,createOutputMethod,bits,padding)},algorithms=[{name:"keccak",padding:[1,256,65536,16777216],bits:BITS,createMethod},{name:"sha3",padding:[6,1536,393216,100663296],bits:BITS,createMethod},{name:"shake",padding:[31,7936,2031616,520093696],bits:SHAKE_BITS,createMethod:function(bits,padding){var method=createShakeOutputMethod(bits,padding,"hex");return method.create=function(outputBits){return new Keccak(bits,padding,outputBits)},method.update=function(message,outputBits){return method.create(outputBits).update(message)},createOutputMethods(method,createShakeOutputMethod,bits,padding)}},{name:"cshake",padding:CSHAKE_PADDING,bits:SHAKE_BITS,createMethod:function(bits,padding){var w=CSHAKE_BYTEPAD[bits],method=createCshakeOutputMethod(bits,0,"hex");return method.create=function(outputBits,n,s){return n||s?new Keccak(bits,padding,outputBits).bytepad([n,s],w):methods["shake"+bits].create(outputBits)},method.update=function(message,outputBits,n,s){return method.create(outputBits,n,s).update(message)},createOutputMethods(method,createCshakeOutputMethod,bits,padding)}},{name:"kmac",padding:CSHAKE_PADDING,bits:SHAKE_BITS,createMethod:function(bits,padding){var w=CSHAKE_BYTEPAD[bits],method=createKmacOutputMethod(bits,0,"hex");return method.create=function(key,outputBits,s){return new Kmac(bits,padding,outputBits).bytepad(["KMAC",s],w).bytepad([key],w)},method.update=function(key,message,outputBits,s){return method.create(key,outputBits,s).update(message)},createOutputMethods(method,createKmacOutputMethod,bits,padding)}}],methods={},methodNames=[],i=0;i<algorithms.length;++i)for(var algorithm=algorithms[i],bits=algorithm.bits,j=0;j<bits.length;++j){var methodName=algorithm.name+"_"+bits[j];if(methodNames.push(methodName),methods[methodName]=algorithm.createMethod(bits[j],algorithm.padding),"sha3"!==algorithm.name){var newMethodName=algorithm.name+bits[j];methodNames.push(newMethodName),methods[newMethodName]=methods[methodName]}}function Keccak(bits,padding,outputBits){this.blocks=[],this.s=[],this.padding=padding,this.outputBits=outputBits,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(bits<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=outputBits>>5,this.extraBytes=(31&outputBits)>>3;for(var i=0;i<50;++i)this.s[i]=0}function Kmac(bits,padding,outputBits){Keccak.call(this,bits,padding,outputBits)}Keccak.prototype.update=function(message){if(this.finalized)throw new Error("finalize already called");var notString,type=typeof message;if("string"!==type){if("object"!==type)throw new Error(INPUT_ERROR);if(null===message)throw new Error(INPUT_ERROR);if(ARRAY_BUFFER&&message.constructor===ArrayBuffer)message=new Uint8Array(message);else if(!(Array.isArray(message)||ARRAY_BUFFER&&ArrayBuffer.isView(message)))throw new Error(INPUT_ERROR);notString=!0}for(var i,code,blocks=this.blocks,byteCount=this.byteCount,length=message.length,blockCount=this.blockCount,index=0,s=this.s;index<length;){if(this.reset)for(this.reset=!1,blocks[0]=this.block,i=1;i<blockCount+1;++i)blocks[i]=0;if(notString)for(i=this.start;index<length&&i<byteCount;++index)blocks[i>>2]|=message[index]<<SHIFT[3&i++];else for(i=this.start;index<length&&i<byteCount;++index)(code=message.charCodeAt(index))<128?blocks[i>>2]|=code<<SHIFT[3&i++]:code<2048?(blocks[i>>2]|=(192|code>>6)<<SHIFT[3&i++],blocks[i>>2]|=(128|63&code)<<SHIFT[3&i++]):code<55296||code>=57344?(blocks[i>>2]|=(224|code>>12)<<SHIFT[3&i++],blocks[i>>2]|=(128|code>>6&63)<<SHIFT[3&i++],blocks[i>>2]|=(128|63&code)<<SHIFT[3&i++]):(code=65536+((1023&code)<<10|1023&message.charCodeAt(++index)),blocks[i>>2]|=(240|code>>18)<<SHIFT[3&i++],blocks[i>>2]|=(128|code>>12&63)<<SHIFT[3&i++],blocks[i>>2]|=(128|code>>6&63)<<SHIFT[3&i++],blocks[i>>2]|=(128|63&code)<<SHIFT[3&i++]);if(this.lastByteIndex=i,i>=byteCount){for(this.start=i-byteCount,this.block=blocks[blockCount],i=0;i<blockCount;++i)s[i]^=blocks[i];f(s),this.reset=!0}else this.start=i}return this},Keccak.prototype.encode=function(x,right){var o=255&x,n=1,bytes=[o];for(o=255&(x>>=8);o>0;)bytes.unshift(o),o=255&(x>>=8),++n;return right?bytes.push(n):bytes.unshift(n),this.update(bytes),bytes.length},Keccak.prototype.encodeString=function(str){var notString,type=typeof str;if("string"!==type){if("object"!==type)throw new Error(INPUT_ERROR);if(null===str)throw new Error(INPUT_ERROR);if(ARRAY_BUFFER&&str.constructor===ArrayBuffer)str=new Uint8Array(str);else if(!(Array.isArray(str)||ARRAY_BUFFER&&ArrayBuffer.isView(str)))throw new Error(INPUT_ERROR);notString=!0}var bytes=0,length=str.length;if(notString)bytes=length;else for(var i=0;i<str.length;++i){var code=str.charCodeAt(i);code<128?bytes+=1:code<2048?bytes+=2:code<55296||code>=57344?bytes+=3:(code=65536+((1023&code)<<10|1023&str.charCodeAt(++i)),bytes+=4)}return bytes+=this.encode(8*bytes),this.update(str),bytes},Keccak.prototype.bytepad=function(strs,w){for(var bytes=this.encode(w),i=0;i<strs.length;++i)bytes+=this.encodeString(strs[i]);var paddingBytes=w-bytes%w,zeros=[];return zeros.length=paddingBytes,this.update(zeros),this},Keccak.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var blocks=this.blocks,i=this.lastByteIndex,blockCount=this.blockCount,s=this.s;if(blocks[i>>2]|=this.padding[3&i],this.lastByteIndex===this.byteCount)for(blocks[0]=blocks[blockCount],i=1;i<blockCount+1;++i)blocks[i]=0;for(blocks[blockCount-1]|=2147483648,i=0;i<blockCount;++i)s[i]^=blocks[i];f(s)}},Keccak.prototype.toString=Keccak.prototype.hex=function(){this.finalize();for(var block,blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0,hex="";j<outputBlocks;){for(i=0;i<blockCount&&j<outputBlocks;++i,++j)block=s[i],hex+=HEX_CHARS[block>>4&15]+HEX_CHARS[15&block]+HEX_CHARS[block>>12&15]+HEX_CHARS[block>>8&15]+HEX_CHARS[block>>20&15]+HEX_CHARS[block>>16&15]+HEX_CHARS[block>>28&15]+HEX_CHARS[block>>24&15];j%blockCount==0&&(f(s),i=0)}return extraBytes&&(block=s[i],hex+=HEX_CHARS[block>>4&15]+HEX_CHARS[15&block],extraBytes>1&&(hex+=HEX_CHARS[block>>12&15]+HEX_CHARS[block>>8&15]),extraBytes>2&&(hex+=HEX_CHARS[block>>20&15]+HEX_CHARS[block>>16&15])),hex},Keccak.prototype.arrayBuffer=function(){this.finalize();var buffer,blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0,bytes=this.outputBits>>3;buffer=extraBytes?new ArrayBuffer(outputBlocks+1<<2):new ArrayBuffer(bytes);for(var array=new Uint32Array(buffer);j<outputBlocks;){for(i=0;i<blockCount&&j<outputBlocks;++i,++j)array[j]=s[i];j%blockCount==0&&f(s)}return extraBytes&&(array[i]=s[i],buffer=buffer.slice(0,bytes)),buffer},Keccak.prototype.buffer=Keccak.prototype.arrayBuffer,Keccak.prototype.digest=Keccak.prototype.array=function(){this.finalize();for(var offset,block,blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0,array=[];j<outputBlocks;){for(i=0;i<blockCount&&j<outputBlocks;++i,++j)offset=j<<2,block=s[i],array[offset]=255&block,array[offset+1]=block>>8&255,array[offset+2]=block>>16&255,array[offset+3]=block>>24&255;j%blockCount==0&&f(s)}return extraBytes&&(offset=j<<2,block=s[i],array[offset]=255&block,extraBytes>1&&(array[offset+1]=block>>8&255),extraBytes>2&&(array[offset+2]=block>>16&255)),array},Kmac.prototype=new Keccak,Kmac.prototype.finalize=function(){return this.encode(this.outputBits,!0),Keccak.prototype.finalize.call(this)};var f=function(s){var h,l,n,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,b31,b32,b33,b34,b35,b36,b37,b38,b39,b40,b41,b42,b43,b44,b45,b46,b47,b48,b49;for(n=0;n<48;n+=2)c0=s[0]^s[10]^s[20]^s[30]^s[40],c1=s[1]^s[11]^s[21]^s[31]^s[41],c2=s[2]^s[12]^s[22]^s[32]^s[42],c3=s[3]^s[13]^s[23]^s[33]^s[43],c4=s[4]^s[14]^s[24]^s[34]^s[44],c5=s[5]^s[15]^s[25]^s[35]^s[45],c6=s[6]^s[16]^s[26]^s[36]^s[46],c7=s[7]^s[17]^s[27]^s[37]^s[47],h=(c8=s[8]^s[18]^s[28]^s[38]^s[48])^(c2<<1|c3>>>31),l=(c9=s[9]^s[19]^s[29]^s[39]^s[49])^(c3<<1|c2>>>31),s[0]^=h,s[1]^=l,s[10]^=h,s[11]^=l,s[20]^=h,s[21]^=l,s[30]^=h,s[31]^=l,s[40]^=h,s[41]^=l,h=c0^(c4<<1|c5>>>31),l=c1^(c5<<1|c4>>>31),s[2]^=h,s[3]^=l,s[12]^=h,s[13]^=l,s[22]^=h,s[23]^=l,s[32]^=h,s[33]^=l,s[42]^=h,s[43]^=l,h=c2^(c6<<1|c7>>>31),l=c3^(c7<<1|c6>>>31),s[4]^=h,s[5]^=l,s[14]^=h,s[15]^=l,s[24]^=h,s[25]^=l,s[34]^=h,s[35]^=l,s[44]^=h,s[45]^=l,h=c4^(c8<<1|c9>>>31),l=c5^(c9<<1|c8>>>31),s[6]^=h,s[7]^=l,s[16]^=h,s[17]^=l,s[26]^=h,s[27]^=l,s[36]^=h,s[37]^=l,s[46]^=h,s[47]^=l,h=c6^(c0<<1|c1>>>31),l=c7^(c1<<1|c0>>>31),s[8]^=h,s[9]^=l,s[18]^=h,s[19]^=l,s[28]^=h,s[29]^=l,s[38]^=h,s[39]^=l,s[48]^=h,s[49]^=l,b0=s[0],b1=s[1],b32=s[11]<<4|s[10]>>>28,b33=s[10]<<4|s[11]>>>28,b14=s[20]<<3|s[21]>>>29,b15=s[21]<<3|s[20]>>>29,b46=s[31]<<9|s[30]>>>23,b47=s[30]<<9|s[31]>>>23,b28=s[40]<<18|s[41]>>>14,b29=s[41]<<18|s[40]>>>14,b20=s[2]<<1|s[3]>>>31,b21=s[3]<<1|s[2]>>>31,b2=s[13]<<12|s[12]>>>20,b3=s[12]<<12|s[13]>>>20,b34=s[22]<<10|s[23]>>>22,b35=s[23]<<10|s[22]>>>22,b16=s[33]<<13|s[32]>>>19,b17=s[32]<<13|s[33]>>>19,b48=s[42]<<2|s[43]>>>30,b49=s[43]<<2|s[42]>>>30,b40=s[5]<<30|s[4]>>>2,b41=s[4]<<30|s[5]>>>2,b22=s[14]<<6|s[15]>>>26,b23=s[15]<<6|s[14]>>>26,b4=s[25]<<11|s[24]>>>21,b5=s[24]<<11|s[25]>>>21,b36=s[34]<<15|s[35]>>>17,b37=s[35]<<15|s[34]>>>17,b18=s[45]<<29|s[44]>>>3,b19=s[44]<<29|s[45]>>>3,b10=s[6]<<28|s[7]>>>4,b11=s[7]<<28|s[6]>>>4,b42=s[17]<<23|s[16]>>>9,b43=s[16]<<23|s[17]>>>9,b24=s[26]<<25|s[27]>>>7,b25=s[27]<<25|s[26]>>>7,b6=s[36]<<21|s[37]>>>11,b7=s[37]<<21|s[36]>>>11,b38=s[47]<<24|s[46]>>>8,b39=s[46]<<24|s[47]>>>8,b30=s[8]<<27|s[9]>>>5,b31=s[9]<<27|s[8]>>>5,b12=s[18]<<20|s[19]>>>12,b13=s[19]<<20|s[18]>>>12,b44=s[29]<<7|s[28]>>>25,b45=s[28]<<7|s[29]>>>25,b26=s[38]<<8|s[39]>>>24,b27=s[39]<<8|s[38]>>>24,b8=s[48]<<14|s[49]>>>18,b9=s[49]<<14|s[48]>>>18,s[0]=b0^~b2&b4,s[1]=b1^~b3&b5,s[10]=b10^~b12&b14,s[11]=b11^~b13&b15,s[20]=b20^~b22&b24,s[21]=b21^~b23&b25,s[30]=b30^~b32&b34,s[31]=b31^~b33&b35,s[40]=b40^~b42&b44,s[41]=b41^~b43&b45,s[2]=b2^~b4&b6,s[3]=b3^~b5&b7,s[12]=b12^~b14&b16,s[13]=b13^~b15&b17,s[22]=b22^~b24&b26,s[23]=b23^~b25&b27,s[32]=b32^~b34&b36,s[33]=b33^~b35&b37,s[42]=b42^~b44&b46,s[43]=b43^~b45&b47,s[4]=b4^~b6&b8,s[5]=b5^~b7&b9,s[14]=b14^~b16&b18,s[15]=b15^~b17&b19,s[24]=b24^~b26&b28,s[25]=b25^~b27&b29,s[34]=b34^~b36&b38,s[35]=b35^~b37&b39,s[44]=b44^~b46&b48,s[45]=b45^~b47&b49,s[6]=b6^~b8&b0,s[7]=b7^~b9&b1,s[16]=b16^~b18&b10,s[17]=b17^~b19&b11,s[26]=b26^~b28&b20,s[27]=b27^~b29&b21,s[36]=b36^~b38&b30,s[37]=b37^~b39&b31,s[46]=b46^~b48&b40,s[47]=b47^~b49&b41,s[8]=b8^~b0&b2,s[9]=b9^~b1&b3,s[18]=b18^~b10&b12,s[19]=b19^~b11&b13,s[28]=b28^~b20&b22,s[29]=b29^~b21&b23,s[38]=b38^~b30&b32,s[39]=b39^~b31&b33,s[48]=b48^~b40&b42,s[49]=b49^~b41&b43,s[0]^=RC[n],s[1]^=RC[n+1]};if(COMMON_JS)module.exports=methods;else{for(i=0;i<methodNames.length;++i)root[methodNames[i]]=methods[methodNames[i]];AMD&&(void 0===(__WEBPACK_AMD_DEFINE_RESULT__=function(){return methods}.call(exports,__webpack_require__,exports,module))||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}}()},2318:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var inherits=__webpack_require__(5717),HashBase=__webpack_require__(3349),Buffer=__webpack_require__(9509).Buffer,ARRAY16=new Array(16);function MD5(){HashBase.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function rotl(x,n){return x<<n|x>>>32-n}function fnF(a,b,c,d,m,k,s){return rotl(a+(b&c|~b&d)+m+k|0,s)+b|0}function fnG(a,b,c,d,m,k,s){return rotl(a+(b&d|c&~d)+m+k|0,s)+b|0}function fnH(a,b,c,d,m,k,s){return rotl(a+(b^c^d)+m+k|0,s)+b|0}function fnI(a,b,c,d,m,k,s){return rotl(a+(c^(b|~d))+m+k|0,s)+b|0}inherits(MD5,HashBase),MD5.prototype._update=function(){for(var M=ARRAY16,i=0;i<16;++i)M[i]=this._block.readInt32LE(4*i);var a=this._a,b=this._b,c=this._c,d=this._d;a=fnF(a,b,c,d,M[0],3614090360,7),d=fnF(d,a,b,c,M[1],3905402710,12),c=fnF(c,d,a,b,M[2],606105819,17),b=fnF(b,c,d,a,M[3],3250441966,22),a=fnF(a,b,c,d,M[4],4118548399,7),d=fnF(d,a,b,c,M[5],1200080426,12),c=fnF(c,d,a,b,M[6],2821735955,17),b=fnF(b,c,d,a,M[7],4249261313,22),a=fnF(a,b,c,d,M[8],1770035416,7),d=fnF(d,a,b,c,M[9],2336552879,12),c=fnF(c,d,a,b,M[10],4294925233,17),b=fnF(b,c,d,a,M[11],2304563134,22),a=fnF(a,b,c,d,M[12],1804603682,7),d=fnF(d,a,b,c,M[13],4254626195,12),c=fnF(c,d,a,b,M[14],2792965006,17),a=fnG(a,b=fnF(b,c,d,a,M[15],1236535329,22),c,d,M[1],4129170786,5),d=fnG(d,a,b,c,M[6],3225465664,9),c=fnG(c,d,a,b,M[11],643717713,14),b=fnG(b,c,d,a,M[0],3921069994,20),a=fnG(a,b,c,d,M[5],3593408605,5),d=fnG(d,a,b,c,M[10],38016083,9),c=fnG(c,d,a,b,M[15],3634488961,14),b=fnG(b,c,d,a,M[4],3889429448,20),a=fnG(a,b,c,d,M[9],568446438,5),d=fnG(d,a,b,c,M[14],3275163606,9),c=fnG(c,d,a,b,M[3],4107603335,14),b=fnG(b,c,d,a,M[8],1163531501,20),a=fnG(a,b,c,d,M[13],2850285829,5),d=fnG(d,a,b,c,M[2],4243563512,9),c=fnG(c,d,a,b,M[7],1735328473,14),a=fnH(a,b=fnG(b,c,d,a,M[12],2368359562,20),c,d,M[5],4294588738,4),d=fnH(d,a,b,c,M[8],2272392833,11),c=fnH(c,d,a,b,M[11],1839030562,16),b=fnH(b,c,d,a,M[14],4259657740,23),a=fnH(a,b,c,d,M[1],2763975236,4),d=fnH(d,a,b,c,M[4],1272893353,11),c=fnH(c,d,a,b,M[7],4139469664,16),b=fnH(b,c,d,a,M[10],3200236656,23),a=fnH(a,b,c,d,M[13],681279174,4),d=fnH(d,a,b,c,M[0],3936430074,11),c=fnH(c,d,a,b,M[3],3572445317,16),b=fnH(b,c,d,a,M[6],76029189,23),a=fnH(a,b,c,d,M[9],3654602809,4),d=fnH(d,a,b,c,M[12],3873151461,11),c=fnH(c,d,a,b,M[15],530742520,16),a=fnI(a,b=fnH(b,c,d,a,M[2],3299628645,23),c,d,M[0],4096336452,6),d=fnI(d,a,b,c,M[7],1126891415,10),c=fnI(c,d,a,b,M[14],2878612391,15),b=fnI(b,c,d,a,M[5],4237533241,21),a=fnI(a,b,c,d,M[12],1700485571,6),d=fnI(d,a,b,c,M[3],2399980690,10),c=fnI(c,d,a,b,M[10],4293915773,15),b=fnI(b,c,d,a,M[1],2240044497,21),a=fnI(a,b,c,d,M[8],1873313359,6),d=fnI(d,a,b,c,M[15],4264355552,10),c=fnI(c,d,a,b,M[6],2734768916,15),b=fnI(b,c,d,a,M[13],1309151649,21),a=fnI(a,b,c,d,M[4],4149444226,6),d=fnI(d,a,b,c,M[11],3174756917,10),c=fnI(c,d,a,b,M[2],718787259,15),b=fnI(b,c,d,a,M[9],3951481745,21),this._a=this._a+a|0,this._b=this._b+b|0,this._c=this._c+c|0,this._d=this._d+d|0},MD5.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 buffer=Buffer.allocUnsafe(16);return buffer.writeInt32LE(this._a,0),buffer.writeInt32LE(this._b,4),buffer.writeInt32LE(this._c,8),buffer.writeInt32LE(this._d,12),buffer},module.exports=MD5},3047:(module,__unused_webpack_exports,__webpack_require__)=>{var bn=__webpack_require__(6240),brorand=__webpack_require__(9931);function MillerRabin(rand){this.rand=rand||new brorand.Rand}module.exports=MillerRabin,MillerRabin.create=function create(rand){return new MillerRabin(rand)},MillerRabin.prototype._randbelow=function _randbelow(n){var len=n.bitLength(),min_bytes=Math.ceil(len/8);do{var a=new bn(this.rand.generate(min_bytes))}while(a.cmp(n)>=0);return a},MillerRabin.prototype._randrange=function _randrange(start,stop){var size=stop.sub(start);return start.add(this._randbelow(size))},MillerRabin.prototype.test=function test(n,k,cb){var len=n.bitLength(),red=bn.mont(n),rone=new bn(1).toRed(red);k||(k=Math.max(1,len/48|0));for(var n1=n.subn(1),s=0;!n1.testn(s);s++);for(var d=n.shrn(s),rn1=n1.toRed(red);k>0;k--){var a=this._randrange(new bn(2),n1);cb&&cb(a);var x=a.toRed(red).redPow(d);if(0!==x.cmp(rone)&&0!==x.cmp(rn1)){for(var i=1;i<s;i++){if(0===(x=x.redSqr()).cmp(rone))return!1;if(0===x.cmp(rn1))break}if(i===s)return!1}}return!0},MillerRabin.prototype.getDivisor=function getDivisor(n,k){var len=n.bitLength(),red=bn.mont(n),rone=new bn(1).toRed(red);k||(k=Math.max(1,len/48|0));for(var n1=n.subn(1),s=0;!n1.testn(s);s++);for(var d=n.shrn(s),rn1=n1.toRed(red);k>0;k--){var a=this._randrange(new bn(2),n1),g=n.gcd(a);if(0!==g.cmpn(1))return g;var x=a.toRed(red).redPow(d);if(0!==x.cmp(rone)&&0!==x.cmp(rn1)){for(var i=1;i<s;i++){if(0===(x=x.redSqr()).cmp(rone))return x.fromRed().subn(1).gcd(n);if(0===x.cmp(rn1))break}if(i===s)return(x=x.redSqr()).fromRed().subn(1).gcd(n)}}return!1}},6240:function(module,__unused_webpack_exports,__webpack_require__){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}var Buffer;"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;try{Buffer="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:__webpack_require__(6619).Buffer}catch(e){}function parseHex4Bits(string,index){var c=string.charCodeAt(index);return c>=65&&c<=70?c-55:c>=97&&c<=102?c-87:c-48&15}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);return index-1>=lowerBound&&(r|=parseHex4Bits(string,index-1)<<4),r}function parseBase(str,start,end,mul){for(var r=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul,r+=c>=49?c-49+10:c>=17?c-17+10:c}return r}BN.isBN=function isBN(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function max(left,right){return left.cmp(right)>0?left:right},BN.min=function min(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function init(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&(start++,this.negative=1),start<number.length&&(16===base?this._parseHex(number,start,endian):(this._parseBase(number,base,start),"le"===endian&&this._initArray(this.toArray(),base,endian)))},BN.prototype._initNumber=function _initNumber(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function _initArray(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this.strip()},BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var w,off=0,j=0;if("be"===endian)for(i=number.length-1;i>=start;i-=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;else for(i=(number.length-start)%2==0?start+1:start;i<number.length;i+=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;this.strip()},BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}this.strip()},BN.prototype.copy=function copy(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype.clone=function clone(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function _expand(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype.strip=function strip(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var zeros=["","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"],groupSizes=[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],groupBases=[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 smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){for(var ncarry=carry>>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out.strip()}BN.prototype.toString=function toString(base,padding){var out;if(padding=0|padding||1,16===(base=base||10)||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);out=0!==(carry=w>>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function toJSON(){return this.toString(16)},BN.prototype.toBuffer=function toBuffer(endian,length){return assert(void 0!==Buffer),this.toArrayLike(Buffer,endian,length)},BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)},BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0"),this.strip();var b,i,littleEndian="le"===endian,res=new ArrayType(reqLength),q=this.clone();if(littleEndian){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[i]=b;for(;i<reqLength;i++)res[i]=0}else{for(i=0;i<reqLength-byteLength;i++)res[i]=0;for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[reqLength-i-1]=b}return res},Math.clz32?BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function _countBits(w){var t=w,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},BN.prototype._zeroBits=function _zeroBits(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function toTwos(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function fromTwos(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function isNeg(){return 0!==this.negative},BN.prototype.neg=function neg(){return this.clone().ineg()},BN.prototype.ineg=function ineg(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function iuor(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this.strip()},BN.prototype.ior=function ior(num){return assert(0==(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function or(num){return this.length>num.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function uor(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function iuand(num){var b;b=this.length>num.length?num:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this.strip()},BN.prototype.iand=function iand(num){return assert(0==(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function and(num){return this.length>num.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function uand(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function iuxor(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this.strip()},BN.prototype.ixor=function ixor(num){return assert(0==(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function xor(num){return this.length>num.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function uxor(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function inotn(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this.strip()},BN.prototype.notn=function notn(width){return this.clone().inotn(width)},BN.prototype.setn=function setn(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<<wbit:this.words[off]&~(1<<wbit),this.strip()},BN.prototype.iadd=function iadd(num){var r,a,b;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function add(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function isub(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)carry=(r=(0|a.words[i])-(0|b.words[i])+carry)>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)carry=(r=(0|a.words[i])+carry)>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this.strip()},BN.prototype.sub=function sub(num){return this.clone().isub(num)};var comb10MulTo=function comb10MulTo(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function jumboMulTo(self,num,out){return(new FFTM).mulp(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function mulTo(num,out){var res,len=this.length+num.length;return res=10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j,r=(0|self.words[i])*(0|num.words[j]),lo=67108863&r;rword=67108863&(lo=lo+rword|0),hncarry+=(ncarry=(ncarry=ncarry+(r/67108864|0)|0)+(lo>>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out.strip()}(this,num,out):jumboMulTo(this,num,out),res},FFTM.prototype.makeRBT=function makeRBT(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function revBin(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function transform(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function guessLen13b(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function conjugate(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function normalize13b(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function convert13b(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0==(-8192&carry))},FFTM.prototype.stub=function stub(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function mulp(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out.strip()},BN.prototype.mul=function mul(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function mulf(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function imuln(num){assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.muln=function muln(num){return this.clone().imuln(num)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(num){var w=function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=(num.words[off]&1<<wbit)>>>wbit}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function iushln(bits){assert("number"==typeof bits&&bits>=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this.strip()},BN.prototype.ishln=function ishln(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function iushrn(bits,hint,extended){var h;assert("number"==typeof bits&&bits>=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;i>=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function ishrn(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function testn(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<<r;return!(this.length<=s)&&!!(this.words[s]&q)},BN.prototype.imaskn=function imaskn(bits){assert("number"==typeof bits&&bits>=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this.strip()},BN.prototype.maskn=function maskn(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function iaddn(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function _iaddn(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},BN.prototype.addn=function addn(num){return this.clone().iaddn(num)},BN.prototype.subn=function subn(num){return this.clone().isubn(num)},BN.prototype.iabs=function iabs(){return this.negative=0,this},BN.prototype.abs=function abs(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function _ishlnsubmul(num,mul,shift){var i,w,len=num.length+shift;this._expand(len);var carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;carry=((w-=67108863&right)>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)carry=(w=(0|this.words[i+shift])+carry)>>26,this.words[i+shift]=67108863&w;if(0===carry)return this.strip();for(assert(-1===carry),carry=0,i=0;i<this.length;i++)carry=(w=-(0|this.words[i])+carry)>>26,this.words[i]=67108863&w;return this.negative=1,this.strip()},BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q.strip(),a.strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function divmod(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div,mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function div(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function mod(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function umod(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modn=function modn(num){assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return acc},BN.prototype.idivn=function idivn(num){assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this.strip()},BN.prototype.divn=function divn(num){return this.clone().idivn(num)},BN.prototype.egcd=function egcd(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function _invmp(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(num){return this.words[0]&num},BN.prototype.bincn=function bincn(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];carry=(w+=carry)>>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this.strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function cmp(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function ucmp(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(res=1);break}}return res},BN.prototype.gtn=function gtn(num){return 1===this.cmpn(num)},BN.prototype.gt=function gt(num){return 1===this.cmp(num)},BN.prototype.gten=function gten(num){return this.cmpn(num)>=0},BN.prototype.gte=function gte(num){return this.cmp(num)>=0},BN.prototype.ltn=function ltn(num){return-1===this.cmpn(num)},BN.prototype.lt=function lt(num){return-1===this.cmp(num)},BN.prototype.lten=function lten(num){return this.cmpn(num)<=0},BN.prototype.lte=function lte(num){return this.cmp(num)<=0},BN.prototype.eqn=function eqn(num){return 0===this.cmpn(num)},BN.prototype.eq=function eq(num){return 0===this.cmp(num)},BN.red=function red(num){return new Red(num)},BN.prototype.toRed=function toRed(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(ctx){return this.red=ctx,this},BN.prototype.forceRed=function forceRed(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function redAdd(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function redIAdd(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function redSub(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function redISub(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function redShl(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function redMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function redIMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function ireduce(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(input,output){for(var outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(4194303&next)<<4|prev>>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function imulK(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function imulK(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function _verify1(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function imod(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},Red.prototype.neg=function neg(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function shl(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function imul(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function mul(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())},Red.prototype.sqr=function sqr(a){return this.mul(a,a)},Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function invm(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function pow(a,num){if(num.isZero())return new BN(1).toRed(this);if(0===num.cmpn(1))return a.clone();var wnd=new Array(16);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;i>=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();return res.red=null,res},BN.mont=function mont(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function invm(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(module=__webpack_require__.nmd(module),this)},9746:module=>{function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}module.exports=assert,assert.equal=function assertEqual(l,r,msg){if(l!=r)throw new Error(msg||"Assertion failed: "+l+" != "+r)}},4504:(__unused_webpack_module,exports)=>{"use strict";var utils=exports;function zero2(word){return 1===word.length?"0"+word:word}function toHex(msg){for(var res="",i=0;i<msg.length;i++)res+=zero2(msg[i].toString(16));return res}utils.toArray=function toArray(msg,enc){if(Array.isArray(msg))return msg.slice();if(!msg)return[];var res=[];if("string"!=typeof msg){for(var i=0;i<msg.length;i++)res[i]=0|msg[i];return res}if("hex"===enc){(msg=msg.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(msg="0"+msg);for(i=0;i<msg.length;i+=2)res.push(parseInt(msg[i]+msg[i+1],16))}else for(i=0;i<msg.length;i++){var c=msg.charCodeAt(i),hi=c>>8,lo=255&c;hi?res.push(hi,lo):res.push(lo)}return res},utils.zero2=zero2,utils.toHex=toHex,utils.encode=function encode(arr,enc){return"hex"===enc?toHex(arr):arr}},4244:module=>{"use strict";var numberIsNaN=function(value){return value!=value};module.exports=function is(a,b){return 0===a&&0===b?1/a==1/b:a===b||!(!numberIsNaN(a)||!numberIsNaN(b))}},609:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var define=__webpack_require__(4289),callBind=__webpack_require__(5559),implementation=__webpack_require__(4244),getPolyfill=__webpack_require__(5624),shim=__webpack_require__(2281),polyfill=callBind(getPolyfill(),Object);define(polyfill,{getPolyfill,implementation,shim}),module.exports=polyfill},5624:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var implementation=__webpack_require__(4244);module.exports=function getPolyfill(){return"function"==typeof Object.is?Object.is:implementation}},2281:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var getPolyfill=__webpack_require__(5624),define=__webpack_require__(4289);module.exports=function shimObjectIs(){var polyfill=getPolyfill();return define(Object,{is:polyfill},{is:function testObjectIs(){return Object.is!==polyfill}}),polyfill}},8987:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var keysShim;if(!Object.keys){var has=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,isArgs=__webpack_require__(1414),isEnumerable=Object.prototype.propertyIsEnumerable,hasDontEnumBug=!isEnumerable.call({toString:null},"toString"),hasProtoEnumBug=isEnumerable.call((function(){}),"prototype"),dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],equalsConstructorPrototype=function(o){var ctor=o.constructor;return ctor&&ctor.prototype===o},excludedKeys={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},hasAutomationEqualityBug=function(){if("undefined"==typeof window)return!1;for(var k in window)try{if(!excludedKeys["$"+k]&&has.call(window,k)&&null!==window[k]&&"object"==typeof window[k])try{equalsConstructorPrototype(window[k])}catch(e){return!0}}catch(e){return!0}return!1}();keysShim=function keys(object){var isObject=null!==object&&"object"==typeof object,isFunction="[object Function]"===toStr.call(object),isArguments=isArgs(object),isString=isObject&&"[object String]"===toStr.call(object),theKeys=[];if(!isObject&&!isFunction&&!isArguments)throw new TypeError("Object.keys called on a non-object");var skipProto=hasProtoEnumBug&&isFunction;if(isString&&object.length>0&&!has.call(object,0))for(var i=0;i<object.length;++i)theKeys.push(String(i));if(isArguments&&object.length>0)for(var j=0;j<object.length;++j)theKeys.push(String(j));else for(var name in object)skipProto&&"prototype"===name||!has.call(object,name)||theKeys.push(String(name));if(hasDontEnumBug)for(var skipConstructor=function(o){if("undefined"==typeof window||!hasAutomationEqualityBug)return equalsConstructorPrototype(o);try{return equalsConstructorPrototype(o)}catch(e){return!1}}(object),k=0;k<dontEnums.length;++k)skipConstructor&&"constructor"===dontEnums[k]||!has.call(object,dontEnums[k])||theKeys.push(dontEnums[k]);return theKeys}}module.exports=keysShim},2215:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var slice=Array.prototype.slice,isArgs=__webpack_require__(1414),origKeys=Object.keys,keysShim=origKeys?function keys(o){return origKeys(o)}:__webpack_require__(8987),originalKeys=Object.keys;keysShim.shim=function shimObjectKeys(){if(Object.keys){var keysWorksWithArguments=function(){var args=Object.keys(arguments);return args&&args.length===arguments.length}(1,2);keysWorksWithArguments||(Object.keys=function keys(object){return isArgs(object)?originalKeys(slice.call(object)):originalKeys(object)})}else Object.keys=keysShim;return Object.keys||keysShim},module.exports=keysShim},1414:module=>{"use strict";var toStr=Object.prototype.toString;module.exports=function isArguments(value){var str=toStr.call(value),isArgs="[object Arguments]"===str;return isArgs||(isArgs="[object Array]"!==str&&null!==value&&"object"==typeof value&&"number"==typeof value.length&&value.length>=0&&"[object Function]"===toStr.call(value.callee)),isArgs}},2818:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var asn1=__webpack_require__(9809);exports.certificate=__webpack_require__(1934);var RSAPrivateKey=asn1.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())}));exports.RSAPrivateKey=RSAPrivateKey;var RSAPublicKey=asn1.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));exports.RSAPublicKey=RSAPublicKey;var PublicKey=asn1.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPublicKey").bitstr())}));exports.PublicKey=PublicKey;var AlgorithmIdentifier=asn1.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())})),PrivateKeyInfo=asn1.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPrivateKey").octstr())}));exports.PrivateKey=PrivateKeyInfo;var EncryptedPrivateKeyInfo=asn1.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())}));exports.EncryptedPrivateKey=EncryptedPrivateKeyInfo;var DSAPrivateKey=asn1.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())}));exports.DSAPrivateKey=DSAPrivateKey,exports.DSAparam=asn1.define("DSAparam",(function(){this.int()}));var ECPrivateKey=asn1.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(ECParameters),this.key("publicKey").optional().explicit(1).bitstr())}));exports.ECPrivateKey=ECPrivateKey;var ECParameters=asn1.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));exports.signature=asn1.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1934:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var asn=__webpack_require__(9809),Time=asn.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),AttributeTypeValue=asn.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),AlgorithmIdentifier=asn.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),SubjectPublicKeyInfo=asn.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPublicKey").bitstr())})),RelativeDistinguishedName=asn.define("RelativeDistinguishedName",(function(){this.setof(AttributeTypeValue)})),RDNSequence=asn.define("RDNSequence",(function(){this.seqof(RelativeDistinguishedName)})),Name=asn.define("Name",(function(){this.choice({rdnSequence:this.use(RDNSequence)})})),Validity=asn.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(Time),this.key("notAfter").use(Time))})),Extension=asn.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),TBSCertificate=asn.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(AlgorithmIdentifier),this.key("issuer").use(Name),this.key("validity").use(Validity),this.key("subject").use(Name),this.key("subjectPublicKeyInfo").use(SubjectPublicKeyInfo),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(Extension).optional())})),X509Certificate=asn.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(TBSCertificate),this.key("signatureAlgorithm").use(AlgorithmIdentifier),this.key("signatureValue").bitstr())}));module.exports=X509Certificate},7631:(module,__unused_webpack_exports,__webpack_require__)=>{var findProc=/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,startRegex=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,fullRegex=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,evp=__webpack_require__(3048),ciphers=__webpack_require__(4696),Buffer=__webpack_require__(9509).Buffer;module.exports=function(okey,password){var decrypted,key=okey.toString(),match=key.match(findProc);if(match){var suite="aes"+match[1],iv=Buffer.from(match[2],"hex"),cipherText=Buffer.from(match[3].replace(/[\r\n]/g,""),"base64"),cipherKey=evp(password,iv.slice(0,8),parseInt(match[1],10)).key,out=[],cipher=ciphers.createDecipheriv(suite,cipherKey,iv);out.push(cipher.update(cipherText)),out.push(cipher.final()),decrypted=Buffer.concat(out)}else{var match2=key.match(fullRegex);decrypted=Buffer.from(match2[2].replace(/[\r\n]/g,""),"base64")}return{tag:key.match(startRegex)[1],data:decrypted}}},980:(module,__unused_webpack_exports,__webpack_require__)=>{var asn1=__webpack_require__(2818),aesid=__webpack_require__(2562),fixProc=__webpack_require__(7631),ciphers=__webpack_require__(4696),compat=__webpack_require__(5632),Buffer=__webpack_require__(9509).Buffer;function parseKeys(buffer){var password;"object"!=typeof buffer||Buffer.isBuffer(buffer)||(password=buffer.passphrase,buffer=buffer.key),"string"==typeof buffer&&(buffer=Buffer.from(buffer));var subtype,ndata,stripped=fixProc(buffer,password),type=stripped.tag,data=stripped.data;switch(type){case"CERTIFICATE":ndata=asn1.certificate.decode(data,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(ndata||(ndata=asn1.PublicKey.decode(data,"der")),subtype=ndata.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return ndata.subjectPrivateKey=ndata.subjectPublicKey,{type:"ec",data:ndata};case"1.2.840.10040.4.1":return ndata.algorithm.params.pub_key=asn1.DSAparam.decode(ndata.subjectPublicKey.data,"der"),{type:"dsa",data:ndata.algorithm.params};default:throw new Error("unknown key id "+subtype)}case"ENCRYPTED PRIVATE KEY":data=function decrypt(data,password){var salt=data.algorithm.decrypt.kde.kdeparams.salt,iters=parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(),10),algo=aesid[data.algorithm.decrypt.cipher.algo.join(".")],iv=data.algorithm.decrypt.cipher.iv,cipherText=data.subjectPrivateKey,keylen=parseInt(algo.split("-")[1],10)/8,key=compat.pbkdf2Sync(password,salt,iters,keylen,"sha1"),cipher=ciphers.createDecipheriv(algo,key,iv),out=[];return out.push(cipher.update(cipherText)),out.push(cipher.final()),Buffer.concat(out)}(data=asn1.EncryptedPrivateKey.decode(data,"der"),password);case"PRIVATE KEY":switch(subtype=(ndata=asn1.PrivateKey.decode(data,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:ndata.algorithm.curve,privateKey:asn1.ECPrivateKey.decode(ndata.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return ndata.algorithm.params.priv_key=asn1.DSAparam.decode(ndata.subjectPrivateKey,"der"),{type:"dsa",params:ndata.algorithm.params};default:throw new Error("unknown key id "+subtype)}case"RSA PUBLIC KEY":return asn1.RSAPublicKey.decode(data,"der");case"RSA PRIVATE KEY":return asn1.RSAPrivateKey.decode(data,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:asn1.DSAPrivateKey.decode(data,"der")};case"EC PRIVATE KEY":return{curve:(data=asn1.ECPrivateKey.decode(data,"der")).parameters.value,privateKey:data.privateKey};default:throw new Error("unknown key type "+type)}}module.exports=parseKeys,parseKeys.signature=asn1.signature},5632:(__unused_webpack_module,exports,__webpack_require__)=>{exports.pbkdf2=__webpack_require__(8638),exports.pbkdf2Sync=__webpack_require__(1257)},8638:(module,__unused_webpack_exports,__webpack_require__)=>{var ZERO_BUF,nextTick,Buffer=__webpack_require__(9509).Buffer,checkParameters=__webpack_require__(7357),defaultEncoding=__webpack_require__(2368),sync=__webpack_require__(1257),toBuffer=__webpack_require__(7777),subtle=__webpack_require__.g.crypto&&__webpack_require__.g.crypto.subtle,toBrowser={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"},checks=[];function getNextTick(){return nextTick||(nextTick=__webpack_require__.g.process&&__webpack_require__.g.process.nextTick?__webpack_require__.g.process.nextTick:__webpack_require__.g.queueMicrotask?__webpack_require__.g.queueMicrotask:__webpack_require__.g.setImmediate?__webpack_require__.g.setImmediate:__webpack_require__.g.setTimeout)}function browserPbkdf2(password,salt,iterations,length,algo){return subtle.importKey("raw",password,{name:"PBKDF2"},!1,["deriveBits"]).then((function(key){return subtle.deriveBits({name:"PBKDF2",salt,iterations,hash:{name:algo}},key,length<<3)})).then((function(res){return Buffer.from(res)}))}module.exports=function(password,salt,iterations,keylen,digest,callback){"function"==typeof digest&&(callback=digest,digest=void 0);var algo=toBrowser[(digest=digest||"sha1").toLowerCase()];if(algo&&"function"==typeof __webpack_require__.g.Promise){if(checkParameters(iterations,keylen),password=toBuffer(password,defaultEncoding,"Password"),salt=toBuffer(salt,defaultEncoding,"Salt"),"function"!=typeof callback)throw new Error("No callback provided to pbkdf2");!function resolvePromise(promise,callback){promise.then((function(out){getNextTick()((function(){callback(null,out)}))}),(function(e){getNextTick()((function(){callback(e)}))}))}(function checkNative(algo){if(__webpack_require__.g.process&&!__webpack_require__.g.process.browser)return Promise.resolve(!1);if(!subtle||!subtle.importKey||!subtle.deriveBits)return Promise.resolve(!1);if(void 0!==checks[algo])return checks[algo];var prom=browserPbkdf2(ZERO_BUF=ZERO_BUF||Buffer.alloc(8),ZERO_BUF,10,128,algo).then((function(){return!0})).catch((function(){return!1}));return checks[algo]=prom,prom}(algo).then((function(resp){return resp?browserPbkdf2(password,salt,iterations,keylen,algo):sync(password,salt,iterations,keylen,digest)})),callback)}else getNextTick()((function(){var out;try{out=sync(password,salt,iterations,keylen,digest)}catch(e){return callback(e)}callback(null,out)}))}},2368:(module,__unused_webpack_exports,__webpack_require__)=>{var defaultEncoding;if(__webpack_require__.g.process&&__webpack_require__.g.process.browser)defaultEncoding="utf-8";else if(__webpack_require__.g.process&&__webpack_require__.g.process.version){defaultEncoding=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else defaultEncoding="utf-8";module.exports=defaultEncoding},7357:module=>{var MAX_ALLOC=Math.pow(2,30)-1;module.exports=function(iterations,keylen){if("number"!=typeof iterations)throw new TypeError("Iterations not a number");if(iterations<0)throw new TypeError("Bad iterations");if("number"!=typeof keylen)throw new TypeError("Key length not a number");if(keylen<0||keylen>MAX_ALLOC||keylen!=keylen)throw new TypeError("Bad key length")}},1257:(module,__unused_webpack_exports,__webpack_require__)=>{var md5=__webpack_require__(8028),RIPEMD160=__webpack_require__(9785),sha=__webpack_require__(9072),Buffer=__webpack_require__(9509).Buffer,checkParameters=__webpack_require__(7357),defaultEncoding=__webpack_require__(2368),toBuffer=__webpack_require__(7777),ZEROS=Buffer.alloc(128),sizes={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function Hmac(alg,key,saltLen){var hash=function getDigest(alg){function shaFunc(data){return sha(alg).update(data).digest()}function rmd160Func(data){return(new RIPEMD160).update(data).digest()}return"rmd160"===alg||"ripemd160"===alg?rmd160Func:"md5"===alg?md5:shaFunc}(alg),blocksize="sha512"===alg||"sha384"===alg?128:64;key.length>blocksize?key=hash(key):key.length<blocksize&&(key=Buffer.concat([key,ZEROS],blocksize));for(var ipad=Buffer.allocUnsafe(blocksize+sizes[alg]),opad=Buffer.allocUnsafe(blocksize+sizes[alg]),i=0;i<blocksize;i++)ipad[i]=54^key[i],opad[i]=92^key[i];var ipad1=Buffer.allocUnsafe(blocksize+saltLen+4);ipad.copy(ipad1,0,0,blocksize),this.ipad1=ipad1,this.ipad2=ipad,this.opad=opad,this.alg=alg,this.blocksize=blocksize,this.hash=hash,this.size=sizes[alg]}Hmac.prototype.run=function(data,ipad){return data.copy(ipad,this.blocksize),this.hash(ipad).copy(this.opad,this.blocksize),this.hash(this.opad)},module.exports=function pbkdf2(password,salt,iterations,keylen,digest){checkParameters(iterations,keylen);var hmac=new Hmac(digest=digest||"sha1",password=toBuffer(password,defaultEncoding,"Password"),(salt=toBuffer(salt,defaultEncoding,"Salt")).length),DK=Buffer.allocUnsafe(keylen),block1=Buffer.allocUnsafe(salt.length+4);salt.copy(block1,0,0,salt.length);for(var destPos=0,hLen=sizes[digest],l=Math.ceil(keylen/hLen),i=1;i<=l;i++){block1.writeUInt32BE(i,salt.length);for(var T=hmac.run(block1,hmac.ipad1),U=T,j=1;j<iterations;j++){U=hmac.run(U,hmac.ipad2);for(var k=0;k<hLen;k++)T[k]^=U[k]}T.copy(DK,destPos),destPos+=hLen}return DK}},7777:(module,__unused_webpack_exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer;module.exports=function(thing,encoding,name){if(Buffer.isBuffer(thing))return thing;if("string"==typeof thing)return Buffer.from(thing,encoding);if(ArrayBuffer.isView(thing))return Buffer.from(thing.buffer);throw new TypeError(name+" must be a string, a Buffer, a typed array or a DataView")}},7900:(__unused_webpack_module,exports,__webpack_require__)=>{exports.publicEncrypt=__webpack_require__(6559),exports.privateDecrypt=__webpack_require__(6138),exports.privateEncrypt=function privateEncrypt(key,buf){return exports.publicEncrypt(key,buf,!0)},exports.publicDecrypt=function publicDecrypt(key,buf){return exports.privateDecrypt(key,buf,!0)}},9199:(module,__unused_webpack_exports,__webpack_require__)=>{var createHash=__webpack_require__(3482),Buffer=__webpack_require__(9509).Buffer;function i2ops(c){var out=Buffer.allocUnsafe(4);return out.writeUInt32BE(c,0),out}module.exports=function(seed,len){for(var c,t=Buffer.alloc(0),i=0;t.length<len;)c=i2ops(i++),t=Buffer.concat([t,createHash("sha1").update(seed).update(c).digest()]);return t.slice(0,len)}},2144:function(module,__unused_webpack_exports,__webpack_require__){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}var Buffer;"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;try{Buffer="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:__webpack_require__(7108).Buffer}catch(e){}function parseHex4Bits(string,index){var c=string.charCodeAt(index);return c>=65&&c<=70?c-55:c>=97&&c<=102?c-87:c-48&15}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);return index-1>=lowerBound&&(r|=parseHex4Bits(string,index-1)<<4),r}function parseBase(str,start,end,mul){for(var r=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul,r+=c>=49?c-49+10:c>=17?c-17+10:c}return r}BN.isBN=function isBN(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function max(left,right){return left.cmp(right)>0?left:right},BN.min=function min(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function init(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&(start++,this.negative=1),start<number.length&&(16===base?this._parseHex(number,start,endian):(this._parseBase(number,base,start),"le"===endian&&this._initArray(this.toArray(),base,endian)))},BN.prototype._initNumber=function _initNumber(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function _initArray(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this.strip()},BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var w,off=0,j=0;if("be"===endian)for(i=number.length-1;i>=start;i-=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;else for(i=(number.length-start)%2==0?start+1:start;i<number.length;i+=2)w=parseHexByte(number,start,i)<<off,this.words[j]|=67108863&w,off>=18?(off-=18,j+=1,this.words[j]|=w>>>26):off+=8;this.strip()},BN.prototype._parseBase=function _parseBase(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}this.strip()},BN.prototype.copy=function copy(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype.clone=function clone(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function _expand(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype.strip=function strip(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var zeros=["","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"],groupSizes=[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],groupBases=[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 smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){for(var ncarry=carry>>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out.strip()}BN.prototype.toString=function toString(base,padding){var out;if(padding=0|padding||1,16===(base=base||10)||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);out=0!==(carry=w>>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function toJSON(){return this.toString(16)},BN.prototype.toBuffer=function toBuffer(endian,length){return assert(void 0!==Buffer),this.toArrayLike(Buffer,endian,length)},BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)},BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0"),this.strip();var b,i,littleEndian="le"===endian,res=new ArrayType(reqLength),q=this.clone();if(littleEndian){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[i]=b;for(;i<reqLength;i++)res[i]=0}else{for(i=0;i<reqLength-byteLength;i++)res[i]=0;for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[reqLength-i-1]=b}return res},Math.clz32?BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function _countBits(w){var t=w,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},BN.prototype._zeroBits=function _zeroBits(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function toTwos(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function fromTwos(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function isNeg(){return 0!==this.negative},BN.prototype.neg=function neg(){return this.clone().ineg()},BN.prototype.ineg=function ineg(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function iuor(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this.strip()},BN.prototype.ior=function ior(num){return assert(0==(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function or(num){return this.length>num.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function uor(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function iuand(num){var b;b=this.length>num.length?num:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this.strip()},BN.prototype.iand=function iand(num){return assert(0==(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function and(num){return this.length>num.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function uand(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function iuxor(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this.strip()},BN.prototype.ixor=function ixor(num){return assert(0==(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function xor(num){return this.length>num.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function uxor(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function inotn(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this.strip()},BN.prototype.notn=function notn(width){return this.clone().inotn(width)},BN.prototype.setn=function setn(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<<wbit:this.words[off]&~(1<<wbit),this.strip()},BN.prototype.iadd=function iadd(num){var r,a,b;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function add(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function isub(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)carry=(r=(0|a.words[i])-(0|b.words[i])+carry)>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)carry=(r=(0|a.words[i])+carry)>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this.strip()},BN.prototype.sub=function sub(num){return this.clone().isub(num)};var comb10MulTo=function comb10MulTo(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function jumboMulTo(self,num,out){return(new FFTM).mulp(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function mulTo(num,out){var res,len=this.length+num.length;return res=10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j,r=(0|self.words[i])*(0|num.words[j]),lo=67108863&r;rword=67108863&(lo=lo+rword|0),hncarry+=(ncarry=(ncarry=ncarry+(r/67108864|0)|0)+(lo>>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out.strip()}(this,num,out):jumboMulTo(this,num,out),res},FFTM.prototype.makeRBT=function makeRBT(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function revBin(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function permute(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function transform(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function guessLen13b(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function conjugate(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function normalize13b(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function convert13b(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0==(-8192&carry))},FFTM.prototype.stub=function stub(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function mulp(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out.strip()},BN.prototype.mul=function mul(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function mulf(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function imuln(num){assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.muln=function muln(num){return this.clone().imuln(num)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(num){var w=function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=(num.words[off]&1<<wbit)>>>wbit}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function iushln(bits){assert("number"==typeof bits&&bits>=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this.strip()},BN.prototype.ishln=function ishln(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function iushrn(bits,hint,extended){var h;assert("number"==typeof bits&&bits>=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;i>=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function ishrn(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function testn(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<<r;return!(this.length<=s)&&!!(this.words[s]&q)},BN.prototype.imaskn=function imaskn(bits){assert("number"==typeof bits&&bits>=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this.strip()},BN.prototype.maskn=function maskn(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function iaddn(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function _iaddn(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},BN.prototype.addn=function addn(num){return this.clone().iaddn(num)},BN.prototype.subn=function subn(num){return this.clone().isubn(num)},BN.prototype.iabs=function iabs(){return this.negative=0,this},BN.prototype.abs=function abs(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function _ishlnsubmul(num,mul,shift){var i,w,len=num.length+shift;this._expand(len);var carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;carry=((w-=67108863&right)>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)carry=(w=(0|this.words[i+shift])+carry)>>26,this.words[i+shift]=67108863&w;if(0===carry)return this.strip();for(assert(-1===carry),carry=0,i=0;i<this.length;i++)carry=(w=-(0|this.words[i])+carry)>>26,this.words[i]=67108863&w;return this.negative=1,this.strip()},BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q.strip(),a.strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function divmod(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div,mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function div(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function mod(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function umod(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modn=function modn(num){assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return acc},BN.prototype.idivn=function idivn(num){assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this.strip()},BN.prototype.divn=function divn(num){return this.clone().idivn(num)},BN.prototype.egcd=function egcd(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function _invmp(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(num){return this.words[0]&num},BN.prototype.bincn=function bincn(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];carry=(w+=carry)>>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this.strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function cmp(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function ucmp(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(res=1);break}}return res},BN.prototype.gtn=function gtn(num){return 1===this.cmpn(num)},BN.prototype.gt=function gt(num){return 1===this.cmp(num)},BN.prototype.gten=function gten(num){return this.cmpn(num)>=0},BN.prototype.gte=function gte(num){return this.cmp(num)>=0},BN.prototype.ltn=function ltn(num){return-1===this.cmpn(num)},BN.prototype.lt=function lt(num){return-1===this.cmp(num)},BN.prototype.lten=function lten(num){return this.cmpn(num)<=0},BN.prototype.lte=function lte(num){return this.cmp(num)<=0},BN.prototype.eqn=function eqn(num){return 0===this.cmpn(num)},BN.prototype.eq=function eq(num){return 0===this.cmp(num)},BN.red=function red(num){return new Red(num)},BN.prototype.toRed=function toRed(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(ctx){return this.red=ctx,this},BN.prototype.forceRed=function forceRed(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function redAdd(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function redIAdd(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function redSub(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function redISub(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function redShl(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function redMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function redIMul(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function ireduce(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(input,output){for(var outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(4194303&next)<<4|prev>>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function imulK(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function imulK(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function _verify1(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function imod(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},Red.prototype.neg=function neg(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function shl(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function imul(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function mul(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())},Red.prototype.sqr=function sqr(a){return this.mul(a,a)},Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function invm(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function pow(a,num){if(num.isZero())return new BN(1).toRed(this);if(0===num.cmpn(1))return a.clone();var wnd=new Array(16);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;i>=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();return res.red=null,res},BN.mont=function mont(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function invm(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(module=__webpack_require__.nmd(module),this)},6138:(module,__unused_webpack_exports,__webpack_require__)=>{var parseKeys=__webpack_require__(980),mgf=__webpack_require__(9199),xor=__webpack_require__(7859),BN=__webpack_require__(2144),crt=__webpack_require__(3663),createHash=__webpack_require__(3482),withPublic=__webpack_require__(4818),Buffer=__webpack_require__(9509).Buffer;module.exports=function privateDecrypt(privateKey,enc,reverse){var padding;padding=privateKey.padding?privateKey.padding:reverse?1:4;var msg,key=parseKeys(privateKey),k=key.modulus.byteLength();if(enc.length>k||new BN(enc).cmp(key.modulus)>=0)throw new Error("decryption error");msg=reverse?withPublic(new BN(enc),key):crt(enc,key);var zBuffer=Buffer.alloc(k-msg.length);if(msg=Buffer.concat([zBuffer,msg],k),4===padding)return function oaep(key,msg){var k=key.modulus.byteLength(),iHash=createHash("sha1").update(Buffer.alloc(0)).digest(),hLen=iHash.length;if(0!==msg[0])throw new Error("decryption error");var maskedSeed=msg.slice(1,hLen+1),maskedDb=msg.slice(hLen+1),seed=xor(maskedSeed,mgf(maskedDb,hLen)),db=xor(maskedDb,mgf(seed,k-hLen-1));if(function compare(a,b){a=Buffer.from(a),b=Buffer.from(b);var dif=0,len=a.length;a.length!==b.length&&(dif++,len=Math.min(a.length,b.length));var i=-1;for(;++i<len;)dif+=a[i]^b[i];return dif}(iHash,db.slice(0,hLen)))throw new Error("decryption error");var i=hLen;for(;0===db[i];)i++;if(1!==db[i++])throw new Error("decryption error");return db.slice(i)}(key,msg);if(1===padding)return function pkcs1(key,msg,reverse){var p1=msg.slice(0,2),i=2,status=0;for(;0!==msg[i++];)if(i>=msg.length){status++;break}var ps=msg.slice(2,i-1);("0002"!==p1.toString("hex")&&!reverse||"0001"!==p1.toString("hex")&&reverse)&&status++;ps.length<8&&status++;if(status)throw new Error("decryption error");return msg.slice(i)}(0,msg,reverse);if(3===padding)return msg;throw new Error("unknown padding")}},6559:(module,__unused_webpack_exports,__webpack_require__)=>{var parseKeys=__webpack_require__(980),randomBytes=__webpack_require__(1798),createHash=__webpack_require__(3482),mgf=__webpack_require__(9199),xor=__webpack_require__(7859),BN=__webpack_require__(2144),withPublic=__webpack_require__(4818),crt=__webpack_require__(3663),Buffer=__webpack_require__(9509).Buffer;module.exports=function publicEncrypt(publicKey,msg,reverse){var padding;padding=publicKey.padding?publicKey.padding:reverse?1:4;var paddedMsg,key=parseKeys(publicKey);if(4===padding)paddedMsg=function oaep(key,msg){var k=key.modulus.byteLength(),mLen=msg.length,iHash=createHash("sha1").update(Buffer.alloc(0)).digest(),hLen=iHash.length,hLen2=2*hLen;if(mLen>k-hLen2-2)throw new Error("message too long");var ps=Buffer.alloc(k-mLen-hLen2-2),dblen=k-hLen-1,seed=randomBytes(hLen),maskedDb=xor(Buffer.concat([iHash,ps,Buffer.alloc(1,1),msg],dblen),mgf(seed,dblen)),maskedSeed=xor(seed,mgf(maskedDb,hLen));return new BN(Buffer.concat([Buffer.alloc(1),maskedSeed,maskedDb],k))}(key,msg);else if(1===padding)paddedMsg=function pkcs1(key,msg,reverse){var ps,mLen=msg.length,k=key.modulus.byteLength();if(mLen>k-11)throw new Error("message too long");ps=reverse?Buffer.alloc(k-mLen-3,255):function nonZero(len){var num,out=Buffer.allocUnsafe(len),i=0,cache=randomBytes(2*len),cur=0;for(;i<len;)cur===cache.length&&(cache=randomBytes(2*len),cur=0),(num=cache[cur++])&&(out[i++]=num);return out}(k-mLen-3);return new BN(Buffer.concat([Buffer.from([0,reverse?1:2]),ps,Buffer.alloc(1),msg],k))}(key,msg,reverse);else{if(3!==padding)throw new Error("unknown padding");if((paddedMsg=new BN(msg)).cmp(key.modulus)>=0)throw new Error("data too long for modulus")}return reverse?crt(paddedMsg,key):withPublic(paddedMsg,key)}},4818:(module,__unused_webpack_exports,__webpack_require__)=>{var BN=__webpack_require__(2144),Buffer=__webpack_require__(9509).Buffer;module.exports=function withPublic(paddedMsg,key){return Buffer.from(paddedMsg.toRed(BN.mont(key.modulus)).redPow(new BN(key.publicExponent)).fromRed().toArray())}},7859:module=>{module.exports=function xor(a,b){for(var len=a.length,i=-1;++i<len;)a[i]^=b[i];return a}},1798:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var Buffer=__webpack_require__(9509).Buffer,crypto=__webpack_require__.g.crypto||__webpack_require__.g.msCrypto;crypto&&crypto.getRandomValues?module.exports=function randomBytes(size,cb){if(size>4294967295)throw new RangeError("requested too many random bytes");var bytes=Buffer.allocUnsafe(size);if(size>0)if(size>65536)for(var generated=0;generated<size;generated+=65536)crypto.getRandomValues(bytes.slice(generated,generated+65536));else crypto.getRandomValues(bytes);if("function"==typeof cb)return process.nextTick((function(){cb(null,bytes)}));return bytes}:module.exports=function oldBrowser(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},7963:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function oldBrowser(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var safeBuffer=__webpack_require__(9509),randombytes=__webpack_require__(1798),Buffer=safeBuffer.Buffer,kBufferMaxLength=safeBuffer.kMaxLength,crypto=__webpack_require__.g.crypto||__webpack_require__.g.msCrypto,kMaxUint32=Math.pow(2,32)-1;function assertOffset(offset,length){if("number"!=typeof offset||offset!=offset)throw new TypeError("offset must be a number");if(offset>kMaxUint32||offset<0)throw new TypeError("offset must be a uint32");if(offset>kBufferMaxLength||offset>length)throw new RangeError("offset out of range")}function assertSize(size,offset,length){if("number"!=typeof size||size!=size)throw new TypeError("size must be a number");if(size>kMaxUint32||size<0)throw new TypeError("size must be a uint32");if(size+offset>length||size>kBufferMaxLength)throw new RangeError("buffer too small")}function actualFill(buf,offset,size,cb){if(process.browser){var ourBuf=buf.buffer,uint=new Uint8Array(ourBuf,offset,size);return crypto.getRandomValues(uint),cb?void process.nextTick((function(){cb(null,buf)})):buf}if(!cb)return randombytes(size).copy(buf,offset),buf;randombytes(size,(function(err,bytes){if(err)return cb(err);bytes.copy(buf,offset),cb(null,buf)}))}crypto&&crypto.getRandomValues||!process.browser?(exports.randomFill=function randomFill(buf,offset,size,cb){if(!(Buffer.isBuffer(buf)||buf instanceof __webpack_require__.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof offset)cb=offset,offset=0,size=buf.length;else if("function"==typeof size)cb=size,size=buf.length-offset;else if("function"!=typeof cb)throw new TypeError('"cb" argument must be a function');return assertOffset(offset,buf.length),assertSize(size,offset,buf.length),actualFill(buf,offset,size,cb)},exports.randomFillSync=function randomFillSync(buf,offset,size){void 0===offset&&(offset=0);if(!(Buffer.isBuffer(buf)||buf instanceof __webpack_require__.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');assertOffset(offset,buf.length),void 0===size&&(size=buf.length-offset);return assertSize(size,offset,buf.length),actualFill(buf,offset,size)}):(exports.randomFill=oldBrowser,exports.randomFillSync=oldBrowser)},4281:module=>{"use strict";var codes={};function createErrorType(code,message,Base){Base||(Base=Error);var NodeError=function(_Base){function NodeError(arg1,arg2,arg3){return _Base.call(this,function getMessage(arg1,arg2,arg3){return"string"==typeof message?message:message(arg1,arg2,arg3)}(arg1,arg2,arg3))||this}return function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass}(NodeError,_Base),NodeError}(Base);NodeError.prototype.name=Base.name,NodeError.prototype.code=code,codes[code]=NodeError}function oneOf(expected,thing){if(Array.isArray(expected)){var len=expected.length;return expected=expected.map((function(i){return String(i)})),len>2?"one of ".concat(thing," ").concat(expected.slice(0,len-1).join(", "),", or ")+expected[len-1]:2===len?"one of ".concat(thing," ").concat(expected[0]," or ").concat(expected[1]):"of ".concat(thing," ").concat(expected[0])}return"of ".concat(thing," ").concat(String(expected))}createErrorType("ERR_INVALID_OPT_VALUE",(function(name,value){return'The value "'+value+'" is invalid for option "'+name+'"'}),TypeError),createErrorType("ERR_INVALID_ARG_TYPE",(function(name,expected,actual){var determiner,msg;if("string"==typeof expected&&function startsWith(str,search,pos){return str.substr(!pos||pos<0?0:+pos,search.length)===search}(expected,"not ")?(determiner="must not be",expected=expected.replace(/^not /,"")):determiner="must be",function endsWith(str,search,this_len){return(void 0===this_len||this_len>str.length)&&(this_len=str.length),str.substring(this_len-search.length,this_len)===search}(name," argument"))msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,"type"));else{var type=function includes(str,search,start){return"number"!=typeof start&&(start=0),!(start+search.length>str.length)&&-1!==str.indexOf(search,start)}(name,".")?"property":"argument";msg='The "'.concat(name,'" ').concat(type," ").concat(determiner," ").concat(oneOf(expected,"type"))}return msg+=". Received type ".concat(typeof actual)}),TypeError),createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),createErrorType("ERR_METHOD_NOT_IMPLEMENTED",(function(name){return"The "+name+" method is not implemented"})),createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close"),createErrorType("ERR_STREAM_DESTROYED",(function(name){return"Cannot call "+name+" after a stream was destroyed"})),createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end"),createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),createErrorType("ERR_UNKNOWN_ENCODING",(function(arg){return"Unknown encoding: "+arg}),TypeError),createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),module.exports.q=codes},6753:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var Readable=__webpack_require__(9481),Writable=__webpack_require__(4229);__webpack_require__(5717)(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options),Writable.call(this,options),this.allowHalfOpen=!0,options&&(!1===options.readable&&(this.readable=!1),!1===options.writable&&(this.writable=!1),!1===options.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",onend)))}function onend(){this._writableState.ended||process.nextTick(onEndNT,this)}function onEndNT(self){self.end()}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:!1,get:function get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function set(value){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=value,this._writableState.destroyed=value)}})},2725:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=PassThrough;var Transform=__webpack_require__(4605);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options)}__webpack_require__(5717)(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},9481:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var Duplex;module.exports=Readable,Readable.ReadableState=ReadableState;__webpack_require__(7187).EventEmitter;var EElistenerCount=function EElistenerCount(emitter,type){return emitter.listeners(type).length},Stream=__webpack_require__(2503),Buffer=__webpack_require__(8764).Buffer,OurUint8Array=__webpack_require__.g.Uint8Array||function(){};var debug,debugUtil=__webpack_require__(4616);debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function debug(){};var StringDecoder,createReadableStreamAsyncIterator,from,BufferList=__webpack_require__(7327),destroyImpl=__webpack_require__(1195),getHighWaterMark=__webpack_require__(2457).getHighWaterMark,_require$codes=__webpack_require__(4281).q,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_STREAM_PUSH_AFTER_EOF=_require$codes.ERR_STREAM_PUSH_AFTER_EOF,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_STREAM_UNSHIFT_AFTER_END_EVENT=_require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;__webpack_require__(5717)(Readable,Stream);var errorOrDestroy=destroyImpl.errorOrDestroy,kProxyEvents=["error","close","destroy","pause","resume"];function ReadableState(options,stream,isDuplex){Duplex=Duplex||__webpack_require__(6753),options=options||{},"boolean"!=typeof isDuplex&&(isDuplex=stream instanceof Duplex),this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode),this.highWaterMark=getHighWaterMark(this,options,"readableHighWaterMark",isDuplex),this.buffer=new BufferList,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!==options.emitClose,this.autoDestroy=!!options.autoDestroy,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(2553).s),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){if(Duplex=Duplex||__webpack_require__(6753),!(this instanceof Readable))return new Readable(options);var isDuplex=this instanceof Duplex;this._readableState=new ReadableState(options,this,isDuplex),this.readable=!0,options&&("function"==typeof options.read&&(this._read=options.read),"function"==typeof options.destroy&&(this._destroy=options.destroy)),Stream.call(this)}function readableAddChunk(stream,chunk,encoding,addToFront,skipChunkCheck){debug("readableAddChunk",chunk);var er,state=stream._readableState;if(null===chunk)state.reading=!1,function onEofChunk(stream,state){if(debug("onEofChunk"),state.ended)return;if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,state.sync?emitReadable(stream):(state.needReadable=!1,state.emittedReadable||(state.emittedReadable=!0,emitReadable_(stream)))}(stream,state);else if(skipChunkCheck||(er=function chunkInvalid(state,chunk){var er;(function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array})(chunk)||"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new ERR_INVALID_ARG_TYPE("chunk",["string","Buffer","Uint8Array"],chunk));return er}(state,chunk)),er)errorOrDestroy(stream,er);else if(state.objectMode||chunk&&chunk.length>0)if("string"==typeof chunk||state.objectMode||Object.getPrototypeOf(chunk)===Buffer.prototype||(chunk=function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk)}(chunk)),addToFront)state.endEmitted?errorOrDestroy(stream,new ERR_STREAM_UNSHIFT_AFTER_END_EVENT):addChunk(stream,state,chunk,!0);else if(state.ended)errorOrDestroy(stream,new ERR_STREAM_PUSH_AFTER_EOF);else{if(state.destroyed)return!1;state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||0!==chunk.length?addChunk(stream,state,chunk,!1):maybeReadMore(stream,state)):addChunk(stream,state,chunk,!1)}else addToFront||(state.reading=!1,maybeReadMore(stream,state));return!state.ended&&(state.length<state.highWaterMark||0===state.length)}function addChunk(stream,state,chunk,addToFront){state.flowing&&0===state.length&&!state.sync?(state.awaitDrain=0,stream.emit("data",chunk)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream)),maybeReadMore(stream,state)}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:!1,get:function get(){return void 0!==this._readableState&&this._readableState.destroyed},set:function set(value){this._readableState&&(this._readableState.destroyed=value)}}),Readable.prototype.destroy=destroyImpl.destroy,Readable.prototype._undestroy=destroyImpl.undestroy,Readable.prototype._destroy=function(err,cb){cb(err)},Readable.prototype.push=function(chunk,encoding){var skipChunkCheck,state=this._readableState;return state.objectMode?skipChunkCheck=!0:"string"==typeof chunk&&((encoding=encoding||state.defaultEncoding)!==state.encoding&&(chunk=Buffer.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)},Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(enc){StringDecoder||(StringDecoder=__webpack_require__(2553).s);var decoder=new StringDecoder(enc);this._readableState.decoder=decoder,this._readableState.encoding=this._readableState.decoder.encoding;for(var p=this._readableState.buffer.head,content="";null!==p;)content+=decoder.write(p.data),p=p.next;return this._readableState.buffer.clear(),""!==content&&this._readableState.buffer.push(content),this._readableState.length=content.length,this};function howMuchToRead(n,state){return n<=0||0===state.length&&state.ended?0:state.objectMode?1:n!=n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=function computeNewHighWaterMark(n){return n>=1073741824?n=1073741824:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}function emitReadable(stream){var state=stream._readableState;debug("emitReadable",state.needReadable,state.emittedReadable),state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,process.nextTick(emitReadable_,stream))}function emitReadable_(stream){var state=stream._readableState;debug("emitReadable_",state.destroyed,state.length,state.ended),state.destroyed||!state.length&&!state.ended||(stream.emit("readable"),state.emittedReadable=!1),state.needReadable=!state.flowing&&!state.ended&&state.length<=state.highWaterMark,flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,process.nextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(;!state.reading&&!state.ended&&(state.length<state.highWaterMark||state.flowing&&0===state.length);){var len=state.length;if(debug("maybeReadMore read 0"),stream.read(0),len===state.length)break}state.readingMore=!1}function updateReadableListening(self){var state=self._readableState;state.readableListening=self.listenerCount("readable")>0,state.resumeScheduled&&!state.paused?state.flowing=!0:self.listenerCount("data")>0&&self.resume()}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume_(stream,state){debug("resume",state.reading),state.reading||stream.read(0),state.resumeScheduled=!1,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&null!==stream.read(););}function fromList(n,state){return 0===state.length?null:(state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.first():state.buffer.concat(state.length),state.buffer.clear()):ret=state.buffer.consume(n,state.decoder),ret);var ret}function endReadable(stream){var state=stream._readableState;debug("endReadable",state.endEmitted),state.endEmitted||(state.ended=!0,process.nextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){if(debug("endReadableNT",state.endEmitted,state.length),!state.endEmitted&&0===state.length&&(state.endEmitted=!0,stream.readable=!1,stream.emit("end"),state.autoDestroy)){var wState=stream._writableState;(!wState||wState.autoDestroy&&wState.finished)&&stream.destroy()}}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(0!==n&&(state.emittedReadable=!1),0===n&&state.needReadable&&((0!==state.highWaterMark?state.length>=state.highWaterMark:state.length>0)||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(0===(n=howMuchToRead(n,state))&&state.ended)return 0===state.length&&endReadable(this),null;var ret,doRead=state.needReadable;return debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&debug("length less than watermark",doRead=!0),state.ended||state.reading?debug("reading or ended",doRead=!1):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state))),null===(ret=n>0?fromList(n,state):null)?(state.needReadable=state.length<=state.highWaterMark,n=0):(state.length-=n,state.awaitDrain=0),0===state.length&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){errorOrDestroy(this,new ERR_METHOD_NOT_IMPLEMENTED("_read()"))},Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var endFn=(!pipeOpts||!1!==pipeOpts.end)&&dest!==process.stdout&&dest!==process.stderr?onend:unpipe;function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&!1===unpipeInfo.hasUnpiped&&(unpipeInfo.hasUnpiped=!0,function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}())}function onend(){debug("onend"),dest.end()}state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=function pipeOnDrain(src){return function pipeOnDrainFunctionResult(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}(src);dest.on("drain",ondrain);var cleanedUp=!1;function ondata(chunk){debug("ondata");var ret=dest.write(chunk);debug("dest.write",ret),!1===ret&&((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&-1!==indexOf(state.pipes,dest))&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&errorOrDestroy(dest,er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}return src.on("data",ondata),function prependListener(emitter,event,fn){if("function"==typeof emitter.prependListener)return emitter.prependListener(event,fn);emitter._events&&emitter._events[event]?Array.isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]:emitter.on(event,fn)}(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes||(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo)),this;if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);return-1===index||(state.pipes.splice(index,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo)),this},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn),state=this._readableState;return"data"===ev?(state.readableListening=this.listenerCount("readable")>0,!1!==state.flowing&&this.resume()):"readable"===ev&&(state.endEmitted||state.readableListening||(state.readableListening=state.needReadable=!0,state.flowing=!1,state.emittedReadable=!1,debug("on readable",state.length,state.reading),state.length?emitReadable(this):state.reading||process.nextTick(nReadingNextTick,this))),res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(ev,fn){var res=Stream.prototype.removeListener.call(this,ev,fn);return"readable"===ev&&process.nextTick(updateReadableListening,this),res},Readable.prototype.removeAllListeners=function(ev){var res=Stream.prototype.removeAllListeners.apply(this,arguments);return"readable"!==ev&&void 0!==ev||process.nextTick(updateReadableListening,this),res},Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!state.readableListening,function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,process.nextTick(resume_,stream,state))}(this,state)),state.paused=!1,this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(stream){var _this=this,state=this._readableState,paused=!1;for(var i in stream.on("end",(function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk)}_this.push(null)})),stream.on("data",(function(chunk){(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),state.objectMode&&null==chunk)||(state.objectMode||chunk&&chunk.length)&&(_this.push(chunk)||(paused=!0,stream.pause()))})),stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function methodWrap(method){return function methodWrapReturnFunction(){return stream[method].apply(stream,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},this},"function"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===createReadableStreamAsyncIterator&&(createReadableStreamAsyncIterator=__webpack_require__(5850)),createReadableStreamAsyncIterator(this)}),Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function get(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:!1,get:function get(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:!1,get:function get(){return this._readableState.flowing},set:function set(state){this._readableState&&(this._readableState.flowing=state)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,"readableLength",{enumerable:!1,get:function get(){return this._readableState.length}}),"function"==typeof Symbol&&(Readable.from=function(iterable,opts){return void 0===from&&(from=__webpack_require__(5167)),from(Readable,iterable,opts)})},4605:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=Transform;var _require$codes=__webpack_require__(4281).q,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_TRANSFORM_ALREADY_TRANSFORMING=_require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,ERR_TRANSFORM_WITH_LENGTH_0=_require$codes.ERR_TRANSFORM_WITH_LENGTH_0,Duplex=__webpack_require__(6753);function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(null===cb)return this.emit("error",new ERR_MULTIPLE_CALLBACK);ts.writechunk=null,ts.writecb=null,null!=data&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options&&("function"==typeof options.transform&&(this._transform=options.transform),"function"==typeof options.flush&&(this._flush=options.flush)),this.on("prefinish",prefinish)}function prefinish(){var _this=this;"function"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush((function(er,data){done(_this,er,data)}))}function done(stream,er,data){if(er)return stream.emit("error",er);if(null!=data&&stream.push(data),stream._writableState.length)throw new ERR_TRANSFORM_WITH_LENGTH_0;if(stream._transformState.transforming)throw new ERR_TRANSFORM_ALREADY_TRANSFORMING;return stream.push(null)}__webpack_require__(5717)(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"))},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;null===ts.writechunk||ts.transforming?ts.needTransform=!0:(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform))},Transform.prototype._destroy=function(err,cb){Duplex.prototype._destroy.call(this,err,(function(err2){cb(err2)}))}},4229:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){!function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;corkReq.entry=null;for(;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree.next=corkReq}(_this,state)}}var Duplex;module.exports=Writable,Writable.WritableState=WritableState;var internalUtil={deprecate:__webpack_require__(4927)},Stream=__webpack_require__(2503),Buffer=__webpack_require__(8764).Buffer,OurUint8Array=__webpack_require__.g.Uint8Array||function(){};var realHasInstance,destroyImpl=__webpack_require__(1195),getHighWaterMark=__webpack_require__(2457).getHighWaterMark,_require$codes=__webpack_require__(4281).q,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_STREAM_CANNOT_PIPE=_require$codes.ERR_STREAM_CANNOT_PIPE,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED,ERR_STREAM_NULL_VALUES=_require$codes.ERR_STREAM_NULL_VALUES,ERR_STREAM_WRITE_AFTER_END=_require$codes.ERR_STREAM_WRITE_AFTER_END,ERR_UNKNOWN_ENCODING=_require$codes.ERR_UNKNOWN_ENCODING,errorOrDestroy=destroyImpl.errorOrDestroy;function nop(){}function WritableState(options,stream,isDuplex){Duplex=Duplex||__webpack_require__(6753),options=options||{},"boolean"!=typeof isDuplex&&(isDuplex=stream instanceof Duplex),this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode),this.highWaterMark=getHighWaterMark(this,options,"writableHighWaterMark",isDuplex),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=!1===options.decodeStrings;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){!function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if("function"!=typeof cb)throw new ERR_MULTIPLE_CALLBACK;if(function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}(state),er)!function onwriteError(stream,state,sync,er,cb){--state.pendingcb,sync?(process.nextTick(cb,er),process.nextTick(finishMaybe,stream,state),stream._writableState.errorEmitted=!0,errorOrDestroy(stream,er)):(cb(er),stream._writableState.errorEmitted=!0,errorOrDestroy(stream,er),finishMaybe(stream,state))}(stream,state,sync,er,cb);else{var finished=needFinish(state)||stream.destroyed;finished||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(stream,state),sync?process.nextTick(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==options.emitClose,this.autoDestroy=!!options.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(options){var isDuplex=this instanceof(Duplex=Duplex||__webpack_require__(6753));if(!isDuplex&&!realHasInstance.call(Writable,this))return new Writable(options);this._writableState=new WritableState(options,this,isDuplex),this.writable=!0,options&&("function"==typeof options.write&&(this._write=options.write),"function"==typeof options.writev&&(this._writev=options.writev),"function"==typeof options.destroy&&(this._destroy=options.destroy),"function"==typeof options.final&&(this._final=options.final)),Stream.call(this)}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,state.destroyed?state.onwrite(new ERR_STREAM_DESTROYED("write")):writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function afterWrite(stream,state,finished,cb){finished||function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state),state.bufferedRequestCount=0}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback;if(doWrite(stream,state,!1,state.objectMode?1:chunk.length,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}null===entry&&(state.lastBufferedRequest=null)}state.bufferedRequest=entry,state.bufferProcessing=!1}function needFinish(state){return state.ending&&0===state.length&&null===state.bufferedRequest&&!state.finished&&!state.writing}function callFinal(stream,state){stream._final((function(err){state.pendingcb--,err&&errorOrDestroy(stream,err),state.prefinished=!0,stream.emit("prefinish"),finishMaybe(stream,state)}))}function finishMaybe(stream,state){var need=needFinish(state);if(need&&(function prefinish(stream,state){state.prefinished||state.finalCalled||("function"!=typeof stream._final||state.destroyed?(state.prefinished=!0,stream.emit("prefinish")):(state.pendingcb++,state.finalCalled=!0,process.nextTick(callFinal,stream,state)))}(stream,state),0===state.pendingcb&&(state.finished=!0,stream.emit("finish"),state.autoDestroy))){var rState=stream._readableState;(!rState||rState.autoDestroy&&rState.endEmitted)&&stream.destroy()}return need}__webpack_require__(5717)(Writable,Stream),WritableState.prototype.getBuffer=function getBuffer(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(_){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(object){return!!realHasInstance.call(this,object)||this===Writable&&(object&&object._writableState instanceof WritableState)}})):realHasInstance=function realHasInstance(object){return object instanceof this},Writable.prototype.pipe=function(){errorOrDestroy(this,new ERR_STREAM_CANNOT_PIPE)},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array}(chunk);return isBuf&&!Buffer.isBuffer(chunk)&&(chunk=function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk)}(chunk)),"function"==typeof encoding&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ending?function writeAfterEnd(stream,cb){var er=new ERR_STREAM_WRITE_AFTER_END;errorOrDestroy(stream,er),process.nextTick(cb,er)}(this,cb):(isBuf||function validChunk(stream,state,chunk,cb){var er;return null===chunk?er=new ERR_STREAM_NULL_VALUES:"string"==typeof chunk||state.objectMode||(er=new ERR_INVALID_ARG_TYPE("chunk",["string","Buffer"],chunk)),!er||(errorOrDestroy(stream,er),process.nextTick(cb,er),!1)}(this,state,chunk,cb))&&(state.pendingcb++,ret=function writeOrBuffer(stream,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=function decodeChunk(state,chunk,encoding){state.objectMode||!1===state.decodeStrings||"string"!=typeof chunk||(chunk=Buffer.from(chunk,encoding));return chunk}(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk)}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;ret||(state.needDrain=!0);if(state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk,encoding,isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}(this,state,isBuf,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function setDefaultEncoding(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new ERR_UNKNOWN_ENCODING(encoding);return this._writableState.defaultEncoding=encoding,this},Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(chunk,encoding,cb){cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;return"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!=chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?process.nextTick(cb):stream.once("finish",cb));state.ended=!0,stream.writable=!1}(this,state,cb),this},Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function get(){return void 0!==this._writableState&&this._writableState.destroyed},set:function set(value){this._writableState&&(this._writableState.destroyed=value)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(err,cb){cb(err)}},5850:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _Object$setPrototypeO;function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var finished=__webpack_require__(8610),kLastResolve=Symbol("lastResolve"),kLastReject=Symbol("lastReject"),kError=Symbol("error"),kEnded=Symbol("ended"),kLastPromise=Symbol("lastPromise"),kHandlePromise=Symbol("handlePromise"),kStream=Symbol("stream");function createIterResult(value,done){return{value,done}}function readAndResolve(iter){var resolve=iter[kLastResolve];if(null!==resolve){var data=iter[kStream].read();null!==data&&(iter[kLastPromise]=null,iter[kLastResolve]=null,iter[kLastReject]=null,resolve(createIterResult(data,!1)))}}function onReadable(iter){process.nextTick(readAndResolve,iter)}var AsyncIteratorPrototype=Object.getPrototypeOf((function(){})),ReadableStreamAsyncIteratorPrototype=Object.setPrototypeOf((_defineProperty(_Object$setPrototypeO={get stream(){return this[kStream]},next:function next(){var _this=this,error=this[kError];if(null!==error)return Promise.reject(error);if(this[kEnded])return Promise.resolve(createIterResult(void 0,!0));if(this[kStream].destroyed)return new Promise((function(resolve,reject){process.nextTick((function(){_this[kError]?reject(_this[kError]):resolve(createIterResult(void 0,!0))}))}));var promise,lastPromise=this[kLastPromise];if(lastPromise)promise=new Promise(function wrapForNext(lastPromise,iter){return function(resolve,reject){lastPromise.then((function(){iter[kEnded]?resolve(createIterResult(void 0,!0)):iter[kHandlePromise](resolve,reject)}),reject)}}(lastPromise,this));else{var data=this[kStream].read();if(null!==data)return Promise.resolve(createIterResult(data,!1));promise=new Promise(this[kHandlePromise])}return this[kLastPromise]=promise,promise}},Symbol.asyncIterator,(function(){return this})),_defineProperty(_Object$setPrototypeO,"return",(function _return(){var _this2=this;return new Promise((function(resolve,reject){_this2[kStream].destroy(null,(function(err){err?reject(err):resolve(createIterResult(void 0,!0))}))}))})),_Object$setPrototypeO),AsyncIteratorPrototype);module.exports=function createReadableStreamAsyncIterator(stream){var _Object$create,iterator=Object.create(ReadableStreamAsyncIteratorPrototype,(_defineProperty(_Object$create={},kStream,{value:stream,writable:!0}),_defineProperty(_Object$create,kLastResolve,{value:null,writable:!0}),_defineProperty(_Object$create,kLastReject,{value:null,writable:!0}),_defineProperty(_Object$create,kError,{value:null,writable:!0}),_defineProperty(_Object$create,kEnded,{value:stream._readableState.endEmitted,writable:!0}),_defineProperty(_Object$create,kHandlePromise,{value:function value(resolve,reject){var data=iterator[kStream].read();data?(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve(createIterResult(data,!1))):(iterator[kLastResolve]=resolve,iterator[kLastReject]=reject)},writable:!0}),_Object$create));return iterator[kLastPromise]=null,finished(stream,(function(err){if(err&&"ERR_STREAM_PREMATURE_CLOSE"!==err.code){var reject=iterator[kLastReject];return null!==reject&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,reject(err)),void(iterator[kError]=err)}var resolve=iterator[kLastResolve];null!==resolve&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve(createIterResult(void 0,!0))),iterator[kEnded]=!0})),stream.on("readable",onReadable.bind(null,iterator)),iterator}},7327:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var Buffer=__webpack_require__(8764).Buffer,inspect=__webpack_require__(2361).inspect,custom=inspect&&inspect.custom||"inspect";module.exports=function(){function BufferList(){!function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,BufferList),this.head=null,this.tail=null,this.length=0}return function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}(BufferList,[{key:"push",value:function push(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length}},{key:"unshift",value:function unshift(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length}},{key:"shift",value:function shift(){if(0!==this.length){var ret=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}}},{key:"clear",value:function clear(){this.head=this.tail=null,this.length=0}},{key:"join",value:function join(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret}},{key:"concat",value:function concat(n){if(0===this.length)return Buffer.alloc(0);for(var src,target,offset,ret=Buffer.allocUnsafe(n>>>0),p=this.head,i=0;p;)src=p.data,target=ret,offset=i,Buffer.prototype.copy.call(src,target,offset),i+=p.data.length,p=p.next;return ret}},{key:"consume",value:function consume(n,hasStrings){var ret;return n<this.head.data.length?(ret=this.head.data.slice(0,n),this.head.data=this.head.data.slice(n)):ret=n===this.head.data.length?this.shift():hasStrings?this._getString(n):this._getBuffer(n),ret}},{key:"first",value:function first(){return this.head.data}},{key:"_getString",value:function _getString(n){var p=this.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),0===(n-=nb)){nb===str.length?(++c,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=str.slice(nb));break}++c}return this.length-=c,ret}},{key:"_getBuffer",value:function _getBuffer(n){var ret=Buffer.allocUnsafe(n),p=this.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),0===(n-=nb)){nb===buf.length?(++c,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=buf.slice(nb));break}++c}return this.length-=c,ret}},{key:custom,value:function value(_,options){return inspect(this,function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}({},options,{depth:0,customInspect:!1}))}}]),BufferList}()},1195:module=>{"use strict";function emitErrorAndCloseNT(self,err){emitErrorNT(self,err),emitCloseNT(self)}function emitCloseNT(self){self._writableState&&!self._writableState.emitClose||self._readableState&&!self._readableState.emitClose||self.emit("close")}function emitErrorNT(self,err){self.emit("error",err)}module.exports={destroy:function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;return readableDestroyed||writableDestroyed?(cb?cb(err):err&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(emitErrorNT,this,err)):process.nextTick(emitErrorNT,this,err)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,(function(err){!cb&&err?_this._writableState?_this._writableState.errorEmitted?process.nextTick(emitCloseNT,_this):(_this._writableState.errorEmitted=!0,process.nextTick(emitErrorAndCloseNT,_this,err)):process.nextTick(emitErrorAndCloseNT,_this,err):cb?(process.nextTick(emitCloseNT,_this),cb(err)):process.nextTick(emitCloseNT,_this)})),this)},undestroy:function undestroy(){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 errorOrDestroy(stream,err){var rState=stream._readableState,wState=stream._writableState;rState&&rState.autoDestroy||wState&&wState.autoDestroy?stream.destroy(err):stream.emit("error",err)}}},8610:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var ERR_STREAM_PREMATURE_CLOSE=__webpack_require__(4281).q.ERR_STREAM_PREMATURE_CLOSE;function noop(){}module.exports=function eos(stream,opts,callback){if("function"==typeof opts)return eos(stream,null,opts);opts||(opts={}),callback=function once(callback){var called=!1;return function(){if(!called){called=!0;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];callback.apply(this,args)}}}(callback||noop);var readable=opts.readable||!1!==opts.readable&&stream.readable,writable=opts.writable||!1!==opts.writable&&stream.writable,onlegacyfinish=function onlegacyfinish(){stream.writable||onfinish()},writableEnded=stream._writableState&&stream._writableState.finished,onfinish=function onfinish(){writable=!1,writableEnded=!0,readable||callback.call(stream)},readableEnded=stream._readableState&&stream._readableState.endEmitted,onend=function onend(){readable=!1,readableEnded=!0,writable||callback.call(stream)},onerror=function onerror(err){callback.call(stream,err)},onclose=function onclose(){var err;return readable&&!readableEnded?(stream._readableState&&stream._readableState.ended||(err=new ERR_STREAM_PREMATURE_CLOSE),callback.call(stream,err)):writable&&!writableEnded?(stream._writableState&&stream._writableState.ended||(err=new ERR_STREAM_PREMATURE_CLOSE),callback.call(stream,err)):void 0},onrequest=function onrequest(){stream.req.on("finish",onfinish)};return!function isRequest(stream){return stream.setHeader&&"function"==typeof stream.abort}(stream)?writable&&!stream._writableState&&(stream.on("end",onlegacyfinish),stream.on("close",onlegacyfinish)):(stream.on("complete",onfinish),stream.on("abort",onclose),stream.req?onrequest():stream.on("request",onrequest)),stream.on("end",onend),stream.on("finish",onfinish),!1!==opts.error&&stream.on("error",onerror),stream.on("close",onclose),function(){stream.removeListener("complete",onfinish),stream.removeListener("abort",onclose),stream.removeListener("request",onrequest),stream.req&&stream.req.removeListener("finish",onfinish),stream.removeListener("end",onlegacyfinish),stream.removeListener("close",onlegacyfinish),stream.removeListener("finish",onfinish),stream.removeListener("end",onend),stream.removeListener("error",onerror),stream.removeListener("close",onclose)}}},5167:module=>{module.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var eos;var _require$codes=__webpack_require__(4281).q,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED;function noop(err){if(err)throw err}function destroyer(stream,reading,writing,callback){callback=function once(callback){var called=!1;return function(){called||(called=!0,callback.apply(void 0,arguments))}}(callback);var closed=!1;stream.on("close",(function(){closed=!0})),void 0===eos&&(eos=__webpack_require__(8610)),eos(stream,{readable:reading,writable:writing},(function(err){if(err)return callback(err);closed=!0,callback()}));var destroyed=!1;return function(err){if(!closed&&!destroyed)return destroyed=!0,function isRequest(stream){return stream.setHeader&&"function"==typeof stream.abort}(stream)?stream.abort():"function"==typeof stream.destroy?stream.destroy():void callback(err||new ERR_STREAM_DESTROYED("pipe"))}}function call(fn){fn()}function pipe(from,to){return from.pipe(to)}function popCallback(streams){return streams.length?"function"!=typeof streams[streams.length-1]?noop:streams.pop():noop}module.exports=function pipeline(){for(var _len=arguments.length,streams=new Array(_len),_key=0;_key<_len;_key++)streams[_key]=arguments[_key];var error,callback=popCallback(streams);if(Array.isArray(streams[0])&&(streams=streams[0]),streams.length<2)throw new ERR_MISSING_ARGS("streams");var destroys=streams.map((function(stream,i){var reading=i<streams.length-1;return destroyer(stream,reading,i>0,(function(err){error||(error=err),err&&destroys.forEach(call),reading||(destroys.forEach(call),callback(error))}))}));return streams.reduce(pipe)}},2457:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var ERR_INVALID_OPT_VALUE=__webpack_require__(4281).q.ERR_INVALID_OPT_VALUE;module.exports={getHighWaterMark:function getHighWaterMark(state,options,duplexKey,isDuplex){var hwm=function highWaterMarkFrom(options,isDuplex,duplexKey){return null!=options.highWaterMark?options.highWaterMark:isDuplex?options[duplexKey]:null}(options,isDuplex,duplexKey);if(null!=hwm){if(!isFinite(hwm)||Math.floor(hwm)!==hwm||hwm<0)throw new ERR_INVALID_OPT_VALUE(isDuplex?duplexKey:"highWaterMark",hwm);return Math.floor(hwm)}return state.objectMode?16:16384}}},2503:(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__(7187).EventEmitter},8473:(module,exports,__webpack_require__)=>{(exports=module.exports=__webpack_require__(9481)).Stream=exports,exports.Readable=exports,exports.Writable=__webpack_require__(4229),exports.Duplex=__webpack_require__(6753),exports.Transform=__webpack_require__(4605),exports.PassThrough=__webpack_require__(2725),exports.finished=__webpack_require__(8610),exports.pipeline=__webpack_require__(9946)},9785:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var Buffer=__webpack_require__(8764).Buffer,inherits=__webpack_require__(5717),HashBase=__webpack_require__(3349),ARRAY16=new Array(16),zl=[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],zr=[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],sl=[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],sr=[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],hl=[0,1518500249,1859775393,2400959708,2840853838],hr=[1352829926,1548603684,1836072691,2053994217,0];function RIPEMD160(){HashBase.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function rotl(x,n){return x<<n|x>>>32-n}function fn1(a,b,c,d,e,m,k,s){return rotl(a+(b^c^d)+m+k|0,s)+e|0}function fn2(a,b,c,d,e,m,k,s){return rotl(a+(b&c|~b&d)+m+k|0,s)+e|0}function fn3(a,b,c,d,e,m,k,s){return rotl(a+((b|~c)^d)+m+k|0,s)+e|0}function fn4(a,b,c,d,e,m,k,s){return rotl(a+(b&d|c&~d)+m+k|0,s)+e|0}function fn5(a,b,c,d,e,m,k,s){return rotl(a+(b^(c|~d))+m+k|0,s)+e|0}inherits(RIPEMD160,HashBase),RIPEMD160.prototype._update=function(){for(var words=ARRAY16,j=0;j<16;++j)words[j]=this._block.readInt32LE(4*j);for(var al=0|this._a,bl=0|this._b,cl=0|this._c,dl=0|this._d,el=0|this._e,ar=0|this._a,br=0|this._b,cr=0|this._c,dr=0|this._d,er=0|this._e,i=0;i<80;i+=1){var tl,tr;i<16?(tl=fn1(al,bl,cl,dl,el,words[zl[i]],hl[0],sl[i]),tr=fn5(ar,br,cr,dr,er,words[zr[i]],hr[0],sr[i])):i<32?(tl=fn2(al,bl,cl,dl,el,words[zl[i]],hl[1],sl[i]),tr=fn4(ar,br,cr,dr,er,words[zr[i]],hr[1],sr[i])):i<48?(tl=fn3(al,bl,cl,dl,el,words[zl[i]],hl[2],sl[i]),tr=fn3(ar,br,cr,dr,er,words[zr[i]],hr[2],sr[i])):i<64?(tl=fn4(al,bl,cl,dl,el,words[zl[i]],hl[3],sl[i]),tr=fn2(ar,br,cr,dr,er,words[zr[i]],hr[3],sr[i])):(tl=fn5(al,bl,cl,dl,el,words[zl[i]],hl[4],sl[i]),tr=fn1(ar,br,cr,dr,er,words[zr[i]],hr[4],sr[i])),al=el,el=dl,dl=rotl(cl,10),cl=bl,bl=tl,ar=er,er=dr,dr=rotl(cr,10),cr=br,br=tr}var t=this._b+cl+dr|0;this._b=this._c+dl+er|0,this._c=this._d+el+ar|0,this._d=this._e+al+br|0,this._e=this._a+bl+cr|0,this._a=t},RIPEMD160.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 buffer=Buffer.alloc?Buffer.alloc(20):new Buffer(20);return buffer.writeInt32LE(this._a,0),buffer.writeInt32LE(this._b,4),buffer.writeInt32LE(this._c,8),buffer.writeInt32LE(this._d,12),buffer.writeInt32LE(this._e,16),buffer},module.exports=RIPEMD160},9509:(module,exports,__webpack_require__)=>{var buffer=__webpack_require__(8764),Buffer=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key]}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(Buffer.prototype),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(arg,encodingOrOffset,length){if("number"==typeof arg)throw new TypeError("Argument must not be a number");return Buffer(arg,encodingOrOffset,length)},SafeBuffer.alloc=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError("Argument must be a number");var buf=Buffer(size);return void 0!==fill?"string"==typeof encoding?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf},SafeBuffer.allocUnsafe=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return Buffer(size)},SafeBuffer.allocUnsafeSlow=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}},2399:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var key,buffer=__webpack_require__(8764),Buffer=buffer.Buffer,safer={};for(key in buffer)buffer.hasOwnProperty(key)&&"SlowBuffer"!==key&&"Buffer"!==key&&(safer[key]=buffer[key]);var Safer=safer.Buffer={};for(key in Buffer)Buffer.hasOwnProperty(key)&&"allocUnsafe"!==key&&"allocUnsafeSlow"!==key&&(Safer[key]=Buffer[key]);if(safer.Buffer.prototype=Buffer.prototype,Safer.from&&Safer.from!==Uint8Array.from||(Safer.from=function(value,encodingOrOffset,length){if("number"==typeof value)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof value);if(value&&void 0===value.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value);return Buffer(value,encodingOrOffset,length)}),Safer.alloc||(Safer.alloc=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError('The "size" argument must be of type number. Received type '+typeof size);if(size<0||size>=2*(1<<30))throw new RangeError('The value "'+size+'" is invalid for option "size"');var buf=Buffer(size);return fill&&0!==fill.length?"string"==typeof encoding?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf}),!safer.kStringMaxLength)try{safer.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(e){}safer.constants||(safer.constants={MAX_LENGTH:safer.kMaxLength},safer.kStringMaxLength&&(safer.constants.MAX_STRING_LENGTH=safer.kStringMaxLength)),module.exports=safer},7635:function(module){"use strict";!function(root){function SHA256(m){const K=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 h0=1779033703,h1=3144134277,h2=1013904242,h3=2773480762,h4=1359893119,h5=2600822924,h6=528734635,h7=1541459225;const w=new Uint32Array(64);function blocks(p){let off=0,len=p.length;for(;len>=64;){let u,i,j,t1,t2,a=h0,b=h1,c=h2,d=h3,e=h4,f=h5,g=h6,h=h7;for(i=0;i<16;i++)j=off+4*i,w[i]=(255&p[j])<<24|(255&p[j+1])<<16|(255&p[j+2])<<8|255&p[j+3];for(i=16;i<64;i++)u=w[i-2],t1=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,u=w[i-15],t2=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3,w[i]=(t1+w[i-7]|0)+(t2+w[i-16]|0)|0;for(i=0;i<64;i++)t1=(((e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7))+(e&f^~e&g)|0)+(h+(K[i]+w[i]|0)|0)|0,t2=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&b^a&c^b&c)|0,h=g,g=f,f=e,e=d+t1|0,d=c,c=b,b=a,a=t1+t2|0;h0=h0+a|0,h1=h1+b|0,h2=h2+c|0,h3=h3+d|0,h4=h4+e|0,h5=h5+f|0,h6=h6+g|0,h7=h7+h|0,off+=64,len-=64}}blocks(m);let i,bytesLeft=m.length%64,bitLenHi=m.length/536870912|0,bitLenLo=m.length<<3,numZeros=bytesLeft<56?56:120,p=m.slice(m.length-bytesLeft,m.length);for(p.push(128),i=bytesLeft+1;i<numZeros;i++)p.push(0);return p.push(bitLenHi>>>24&255),p.push(bitLenHi>>>16&255),p.push(bitLenHi>>>8&255),p.push(bitLenHi>>>0&255),p.push(bitLenLo>>>24&255),p.push(bitLenLo>>>16&255),p.push(bitLenLo>>>8&255),p.push(bitLenLo>>>0&255),blocks(p),[h0>>>24&255,h0>>>16&255,h0>>>8&255,h0>>>0&255,h1>>>24&255,h1>>>16&255,h1>>>8&255,h1>>>0&255,h2>>>24&255,h2>>>16&255,h2>>>8&255,h2>>>0&255,h3>>>24&255,h3>>>16&255,h3>>>8&255,h3>>>0&255,h4>>>24&255,h4>>>16&255,h4>>>8&255,h4>>>0&255,h5>>>24&255,h5>>>16&255,h5>>>8&255,h5>>>0&255,h6>>>24&255,h6>>>16&255,h6>>>8&255,h6>>>0&255,h7>>>24&255,h7>>>16&255,h7>>>8&255,h7>>>0&255]}function PBKDF2_HMAC_SHA256_OneIter(password,salt,dkLen){password=password.length<=64?password:SHA256(password);const innerLen=64+salt.length+4,inner=new Array(innerLen),outerKey=new Array(64);let i,dk=[];for(i=0;i<64;i++)inner[i]=54;for(i=0;i<password.length;i++)inner[i]^=password[i];for(i=0;i<salt.length;i++)inner[64+i]=salt[i];for(i=innerLen-4;i<innerLen;i++)inner[i]=0;for(i=0;i<64;i++)outerKey[i]=92;for(i=0;i<password.length;i++)outerKey[i]^=password[i];function incrementCounter(){for(let i=innerLen-1;i>=innerLen-4;i--){if(inner[i]++,inner[i]<=255)return;inner[i]=0}}for(;dkLen>=32;)incrementCounter(),dk=dk.concat(SHA256(outerKey.concat(SHA256(inner)))),dkLen-=32;return dkLen>0&&(incrementCounter(),dk=dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0,dkLen))),dk}function blockmix_salsa8(BY,Yi,r,x,_X){let i;for(arraycopy(BY,16*(2*r-1),_X,0,16),i=0;i<2*r;i++)blockxor(BY,16*i,_X,16),salsa20_8(_X,x),arraycopy(_X,0,BY,Yi+16*i,16);for(i=0;i<r;i++)arraycopy(BY,Yi+2*i*16,BY,16*i,16);for(i=0;i<r;i++)arraycopy(BY,Yi+16*(2*i+1),BY,16*(i+r),16)}function R(a,b){return a<<b|a>>>32-b}function salsa20_8(B,x){arraycopy(B,0,x,0,16);for(let i=8;i>0;i-=2)x[4]^=R(x[0]+x[12],7),x[8]^=R(x[4]+x[0],9),x[12]^=R(x[8]+x[4],13),x[0]^=R(x[12]+x[8],18),x[9]^=R(x[5]+x[1],7),x[13]^=R(x[9]+x[5],9),x[1]^=R(x[13]+x[9],13),x[5]^=R(x[1]+x[13],18),x[14]^=R(x[10]+x[6],7),x[2]^=R(x[14]+x[10],9),x[6]^=R(x[2]+x[14],13),x[10]^=R(x[6]+x[2],18),x[3]^=R(x[15]+x[11],7),x[7]^=R(x[3]+x[15],9),x[11]^=R(x[7]+x[3],13),x[15]^=R(x[11]+x[7],18),x[1]^=R(x[0]+x[3],7),x[2]^=R(x[1]+x[0],9),x[3]^=R(x[2]+x[1],13),x[0]^=R(x[3]+x[2],18),x[6]^=R(x[5]+x[4],7),x[7]^=R(x[6]+x[5],9),x[4]^=R(x[7]+x[6],13),x[5]^=R(x[4]+x[7],18),x[11]^=R(x[10]+x[9],7),x[8]^=R(x[11]+x[10],9),x[9]^=R(x[8]+x[11],13),x[10]^=R(x[9]+x[8],18),x[12]^=R(x[15]+x[14],7),x[13]^=R(x[12]+x[15],9),x[14]^=R(x[13]+x[12],13),x[15]^=R(x[14]+x[13],18);for(let i=0;i<16;++i)B[i]+=x[i]}function blockxor(S,Si,D,len){for(let i=0;i<len;i++)D[i]^=S[Si+i]}function arraycopy(src,srcPos,dest,destPos,length){for(;length--;)dest[destPos++]=src[srcPos++]}function checkBufferish(o){if(!o||"number"!=typeof o.length)return!1;for(let i=0;i<o.length;i++){const v=o[i];if("number"!=typeof v||v%1||v<0||v>=256)return!1}return!0}function ensureInteger(value,name){if("number"!=typeof value||value%1)throw new Error("invalid "+name);return value}function _scrypt(password,salt,N,r,p,dkLen,callback){if(N=ensureInteger(N,"N"),r=ensureInteger(r,"r"),p=ensureInteger(p,"p"),dkLen=ensureInteger(dkLen,"dkLen"),0===N||0!=(N&N-1))throw new Error("N must be power of 2");if(N>2147483647/128/r)throw new Error("N too large");if(r>2147483647/128/p)throw new Error("r too large");if(!checkBufferish(password))throw new Error("password must be an array or buffer");if(password=Array.prototype.slice.call(password),!checkBufferish(salt))throw new Error("salt must be an array or buffer");salt=Array.prototype.slice.call(salt);let b=PBKDF2_HMAC_SHA256_OneIter(password,salt,128*p*r);const B=new Uint32Array(32*p*r);for(let i=0;i<B.length;i++){const j=4*i;B[i]=(255&b[j+3])<<24|(255&b[j+2])<<16|(255&b[j+1])<<8|(255&b[j+0])<<0}const XY=new Uint32Array(64*r),V=new Uint32Array(32*r*N),Yi=32*r,x=new Uint32Array(16),_X=new Uint32Array(16),totalOps=p*N*2;let i1,Bi,currentOp=0,lastPercent10=null,stop=!1,state=0,i0=0;const limit=callback?parseInt(1e3/r):4294967295,nextTick="undefined"!=typeof setImmediate?setImmediate:setTimeout,incrementalSMix=function(){if(stop)return callback(new Error("cancelled"),currentOp/totalOps);let steps;switch(state){case 0:Bi=32*i0*r,arraycopy(B,Bi,XY,0,Yi),state=1,i1=0;case 1:steps=N-i1,steps>limit&&(steps=limit);for(let i=0;i<steps;i++)arraycopy(XY,0,V,(i1+i)*Yi,Yi),blockmix_salsa8(XY,Yi,r,x,_X);if(i1+=steps,currentOp+=steps,callback){const percent10=parseInt(1e3*currentOp/totalOps);if(percent10!==lastPercent10){if(stop=callback(null,currentOp/totalOps),stop)break;lastPercent10=percent10}}if(i1<N)break;i1=0,state=2;case 2:steps=N-i1,steps>limit&&(steps=limit);for(let i=0;i<steps;i++){const j=XY[16*(2*r-1)]&N-1;blockxor(V,j*Yi,XY,Yi),blockmix_salsa8(XY,Yi,r,x,_X)}if(i1+=steps,currentOp+=steps,callback){const percent10=parseInt(1e3*currentOp/totalOps);if(percent10!==lastPercent10){if(stop=callback(null,currentOp/totalOps),stop)break;lastPercent10=percent10}}if(i1<N)break;if(arraycopy(XY,0,B,Bi,Yi),i0++,i0<p){state=0;break}b=[];for(let i=0;i<B.length;i++)b.push(B[i]>>0&255),b.push(B[i]>>8&255),b.push(B[i]>>16&255),b.push(B[i]>>24&255);const derivedKey=PBKDF2_HMAC_SHA256_OneIter(password,b,dkLen);return callback&&callback(null,1,derivedKey),derivedKey}callback&&nextTick(incrementalSMix)};if(!callback)for(;;){const derivedKey=incrementalSMix();if(null!=derivedKey)return derivedKey}incrementalSMix()}const lib={scrypt:function(password,salt,N,r,p,dkLen,progressCallback){return new Promise((function(resolve,reject){let lastProgress=0;progressCallback&&progressCallback(0),_scrypt(password,salt,N,r,p,dkLen,(function(error,progress,key){if(error)reject(error);else if(key)progressCallback&&1!==lastProgress&&progressCallback(1),resolve(new Uint8Array(key));else if(progressCallback&&progress!==lastProgress)return lastProgress=progress,progressCallback(progress)}))}))},syncScrypt:function(password,salt,N,r,p,dkLen){return new Uint8Array(_scrypt(password,salt,N,r,p,dkLen))}};module.exports=lib}()},7221:(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__(9119)(__webpack_require__(8573))},8573:(module,__unused_webpack_exports,__webpack_require__)=>{const ec=new(0,__webpack_require__(6266).ec)("secp256k1"),ecparams=ec.curve,BN=ecparams.n.constructor;function loadPublicKey(pubkey){const first=pubkey[0];switch(first){case 2:case 3:return 33!==pubkey.length?null:function loadCompressedPublicKey(first,xbuf){let x=new BN(xbuf);if(x.cmp(ecparams.p)>=0)return null;x=x.toRed(ecparams.red);let y=x.redSqr().redIMul(x).redIAdd(ecparams.b).redSqrt();return 3===first!==y.isOdd()&&(y=y.redNeg()),ec.keyPair({pub:{x,y}})}(first,pubkey.subarray(1,33));case 4:case 6:case 7:return 65!==pubkey.length?null:function loadUncompressedPublicKey(first,xbuf,ybuf){let x=new BN(xbuf),y=new BN(ybuf);if(x.cmp(ecparams.p)>=0||y.cmp(ecparams.p)>=0)return null;if(x=x.toRed(ecparams.red),y=y.toRed(ecparams.red),(6===first||7===first)&&y.isOdd()!==(7===first))return null;const x3=x.redSqr().redIMul(x);return y.redSqr().redISub(x3.redIAdd(ecparams.b)).isZero()?ec.keyPair({pub:{x,y}}):null}(first,pubkey.subarray(1,33),pubkey.subarray(33,65));default:return null}}function savePublicKey(output,point){const pubkey=point.encode(null,33===output.length);for(let i=0;i<output.length;++i)output[i]=pubkey[i]}module.exports={contextRandomize:()=>0,privateKeyVerify(seckey){const bn=new BN(seckey);return bn.cmp(ecparams.n)<0&&!bn.isZero()?0:1},privateKeyNegate(seckey){const bn=new BN(seckey),negate=ecparams.n.sub(bn).umod(ecparams.n).toArrayLike(Uint8Array,"be",32);return seckey.set(negate),0},privateKeyTweakAdd(seckey,tweak){const bn=new BN(tweak);if(bn.cmp(ecparams.n)>=0)return 1;if(bn.iadd(new BN(seckey)),bn.cmp(ecparams.n)>=0&&bn.isub(ecparams.n),bn.isZero())return 1;const tweaked=bn.toArrayLike(Uint8Array,"be",32);return seckey.set(tweaked),0},privateKeyTweakMul(seckey,tweak){let bn=new BN(tweak);if(bn.cmp(ecparams.n)>=0||bn.isZero())return 1;bn.imul(new BN(seckey)),bn.cmp(ecparams.n)>=0&&(bn=bn.umod(ecparams.n));const tweaked=bn.toArrayLike(Uint8Array,"be",32);return seckey.set(tweaked),0},publicKeyVerify:pubkey=>null===loadPublicKey(pubkey)?1:0,publicKeyCreate(output,seckey){const bn=new BN(seckey);if(bn.cmp(ecparams.n)>=0||bn.isZero())return 1;return savePublicKey(output,ec.keyFromPrivate(seckey).getPublic()),0},publicKeyConvert(output,pubkey){const pair=loadPublicKey(pubkey);if(null===pair)return 1;return savePublicKey(output,pair.getPublic()),0},publicKeyNegate(output,pubkey){const pair=loadPublicKey(pubkey);if(null===pair)return 1;const point=pair.getPublic();return point.y=point.y.redNeg(),savePublicKey(output,point),0},publicKeyCombine(output,pubkeys){const pairs=new Array(pubkeys.length);for(let i=0;i<pubkeys.length;++i)if(pairs[i]=loadPublicKey(pubkeys[i]),null===pairs[i])return 1;let point=pairs[0].getPublic();for(let i=1;i<pairs.length;++i)point=point.add(pairs[i].pub);return point.isInfinity()?2:(savePublicKey(output,point),0)},publicKeyTweakAdd(output,pubkey,tweak){const pair=loadPublicKey(pubkey);if(null===pair)return 1;if((tweak=new BN(tweak)).cmp(ecparams.n)>=0)return 2;const point=pair.getPublic().add(ecparams.g.mul(tweak));return point.isInfinity()?2:(savePublicKey(output,point),0)},publicKeyTweakMul(output,pubkey,tweak){const pair=loadPublicKey(pubkey);if(null===pair)return 1;if((tweak=new BN(tweak)).cmp(ecparams.n)>=0||tweak.isZero())return 2;return savePublicKey(output,pair.getPublic().mul(tweak)),0},signatureNormalize(sig){const r=new BN(sig.subarray(0,32)),s=new BN(sig.subarray(32,64));return r.cmp(ecparams.n)>=0||s.cmp(ecparams.n)>=0?1:(1===s.cmp(ec.nh)&&sig.set(ecparams.n.sub(s).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(obj,sig){const sigR=sig.subarray(0,32),sigS=sig.subarray(32,64);if(new BN(sigR).cmp(ecparams.n)>=0)return 1;if(new BN(sigS).cmp(ecparams.n)>=0)return 1;const{output}=obj;let r=output.subarray(4,37);r[0]=0,r.set(sigR,1);let lenR=33,posR=0;for(;lenR>1&&0===r[posR]&&!(128&r[posR+1]);--lenR,++posR);if(r=r.subarray(posR),128&r[0])return 1;if(lenR>1&&0===r[0]&&!(128&r[1]))return 1;let s=output.subarray(39,72);s[0]=0,s.set(sigS,1);let lenS=33,posS=0;for(;lenS>1&&0===s[posS]&&!(128&s[posS+1]);--lenS,++posS);return s=s.subarray(posS),128&s[0]||lenS>1&&0===s[0]&&!(128&s[1])?1:(obj.outputlen=6+lenR+lenS,output[0]=48,output[1]=obj.outputlen-2,output[2]=2,output[3]=r.length,output.set(r,4),output[4+lenR]=2,output[5+lenR]=s.length,output.set(s,6+lenR),0)},signatureImport(output,sig){if(sig.length<8)return 1;if(sig.length>72)return 1;if(48!==sig[0])return 1;if(sig[1]!==sig.length-2)return 1;if(2!==sig[2])return 1;const lenR=sig[3];if(0===lenR)return 1;if(5+lenR>=sig.length)return 1;if(2!==sig[4+lenR])return 1;const lenS=sig[5+lenR];if(0===lenS)return 1;if(6+lenR+lenS!==sig.length)return 1;if(128&sig[4])return 1;if(lenR>1&&0===sig[4]&&!(128&sig[5]))return 1;if(128&sig[lenR+6])return 1;if(lenS>1&&0===sig[lenR+6]&&!(128&sig[lenR+7]))return 1;let sigR=sig.subarray(4,4+lenR);if(33===sigR.length&&0===sigR[0]&&(sigR=sigR.subarray(1)),sigR.length>32)return 1;let sigS=sig.subarray(6+lenR);if(33===sigS.length&&0===sigS[0]&&(sigS=sigS.slice(1)),sigS.length>32)throw new Error("S length is too long");let r=new BN(sigR);r.cmp(ecparams.n)>=0&&(r=new BN(0));let s=new BN(sig.subarray(6+lenR));return s.cmp(ecparams.n)>=0&&(s=new BN(0)),output.set(r.toArrayLike(Uint8Array,"be",32),0),output.set(s.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(obj,message,seckey,data,noncefn){if(noncefn){const _noncefn=noncefn;noncefn=counter=>{const nonce=_noncefn(message,seckey,null,data,counter);if(!(nonce instanceof Uint8Array&&32===nonce.length))throw new Error("This is the way");return new BN(nonce)}}const d=new BN(seckey);if(d.cmp(ecparams.n)>=0||d.isZero())return 1;let sig;try{sig=ec.sign(message,seckey,{canonical:!0,k:noncefn,pers:data})}catch(err){return 1}return obj.signature.set(sig.r.toArrayLike(Uint8Array,"be",32),0),obj.signature.set(sig.s.toArrayLike(Uint8Array,"be",32),32),obj.recid=sig.recoveryParam,0},ecdsaVerify(sig,msg32,pubkey){const sigObj={r:sig.subarray(0,32),s:sig.subarray(32,64)},sigr=new BN(sigObj.r),sigs=new BN(sigObj.s);if(sigr.cmp(ecparams.n)>=0||sigs.cmp(ecparams.n)>=0)return 1;if(1===sigs.cmp(ec.nh)||sigr.isZero()||sigs.isZero())return 3;const pair=loadPublicKey(pubkey);if(null===pair)return 2;const point=pair.getPublic();return ec.verify(msg32,sigObj,point)?0:3},ecdsaRecover(output,sig,recid,msg32){const sigObj={r:sig.slice(0,32),s:sig.slice(32,64)},sigr=new BN(sigObj.r),sigs=new BN(sigObj.s);if(sigr.cmp(ecparams.n)>=0||sigs.cmp(ecparams.n)>=0)return 1;if(sigr.isZero()||sigs.isZero())return 2;let point;try{point=ec.recoverPubKey(msg32,sigObj,recid)}catch(err){return 2}return savePublicKey(output,point),0},ecdh(output,pubkey,seckey,data,hashfn,xbuf,ybuf){const pair=loadPublicKey(pubkey);if(null===pair)return 1;const scalar=new BN(seckey);if(scalar.cmp(ecparams.n)>=0||scalar.isZero())return 2;const point=pair.getPublic().mul(scalar);if(void 0===hashfn){const data=point.encode(null,!0),sha256=ec.hash().update(data).digest();for(let i=0;i<32;++i)output[i]=sha256[i]}else{xbuf||(xbuf=new Uint8Array(32));const x=point.getX().toArray("be",32);for(let i=0;i<32;++i)xbuf[i]=x[i];ybuf||(ybuf=new Uint8Array(32));const y=point.getY().toArray("be",32);for(let i=0;i<32;++i)ybuf[i]=y[i];const hash=hashfn(xbuf,ybuf,data);if(!(hash instanceof Uint8Array&&hash.length===output.length))return 2;output.set(hash)}return 0}}},9119:module=>{const errors_IMPOSSIBLE_CASE="Impossible case. Please create issue.",errors_TWEAK_ADD="The tweak was out of range or the resulted private key is invalid",errors_TWEAK_MUL="The tweak was out of range or equal to zero",errors_CONTEXT_RANDOMIZE_UNKNOW="Unknow error on context randomization",errors_SECKEY_INVALID="Private Key is invalid",errors_PUBKEY_PARSE="Public Key could not be parsed",errors_PUBKEY_SERIALIZE="Public Key serialization error",errors_PUBKEY_COMBINE="The sum of the public keys is not valid",errors_SIG_PARSE="Signature could not be parsed",errors_SIGN="The nonce generation function failed, or the private key was invalid",errors_RECOVER="Public key could not be recover",errors_ECDH="Scalar was invalid (zero or overflow)";function assert(cond,msg){if(!cond)throw new Error(msg)}function isUint8Array(name,value,length){if(assert(value instanceof Uint8Array,`Expected ${name} to be an Uint8Array`),void 0!==length)if(Array.isArray(length)){const msg=`Expected ${name} to be an Uint8Array with length [${length.join(", ")}]`;assert(length.includes(value.length),msg)}else{const msg=`Expected ${name} to be an Uint8Array with length ${length}`;assert(value.length===length,msg)}}function isCompressed(value){assert("Boolean"===toTypeString(value),"Expected compressed to be a Boolean")}function getAssertedOutput(output=(len=>new Uint8Array(len)),length){return"function"==typeof output&&(output=output(length)),isUint8Array("output",output,length),output}function toTypeString(value){return Object.prototype.toString.call(value).slice(8,-1)}module.exports=secp256k1=>({contextRandomize(seed){if(assert(null===seed||seed instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==seed&&isUint8Array("seed",seed,32),1===secp256k1.contextRandomize(seed))throw new Error(errors_CONTEXT_RANDOMIZE_UNKNOW)},privateKeyVerify:seckey=>(isUint8Array("private key",seckey,32),0===secp256k1.privateKeyVerify(seckey)),privateKeyNegate(seckey){switch(isUint8Array("private key",seckey,32),secp256k1.privateKeyNegate(seckey)){case 0:return seckey;case 1:throw new Error(errors_IMPOSSIBLE_CASE)}},privateKeyTweakAdd(seckey,tweak){switch(isUint8Array("private key",seckey,32),isUint8Array("tweak",tweak,32),secp256k1.privateKeyTweakAdd(seckey,tweak)){case 0:return seckey;case 1:throw new Error(errors_TWEAK_ADD)}},privateKeyTweakMul(seckey,tweak){switch(isUint8Array("private key",seckey,32),isUint8Array("tweak",tweak,32),secp256k1.privateKeyTweakMul(seckey,tweak)){case 0:return seckey;case 1:throw new Error(errors_TWEAK_MUL)}},publicKeyVerify:pubkey=>(isUint8Array("public key",pubkey,[33,65]),0===secp256k1.publicKeyVerify(pubkey)),publicKeyCreate(seckey,compressed=!0,output){switch(isUint8Array("private key",seckey,32),isCompressed(compressed),output=getAssertedOutput(output,compressed?33:65),secp256k1.publicKeyCreate(output,seckey)){case 0:return output;case 1:throw new Error(errors_SECKEY_INVALID);case 2:throw new Error(errors_PUBKEY_SERIALIZE)}},publicKeyConvert(pubkey,compressed=!0,output){switch(isUint8Array("public key",pubkey,[33,65]),isCompressed(compressed),output=getAssertedOutput(output,compressed?33:65),secp256k1.publicKeyConvert(output,pubkey)){case 0:return output;case 1:throw new Error(errors_PUBKEY_PARSE);case 2:throw new Error(errors_PUBKEY_SERIALIZE)}},publicKeyNegate(pubkey,compressed=!0,output){switch(isUint8Array("public key",pubkey,[33,65]),isCompressed(compressed),output=getAssertedOutput(output,compressed?33:65),secp256k1.publicKeyNegate(output,pubkey)){case 0:return output;case 1:throw new Error(errors_PUBKEY_PARSE);case 2:throw new Error(errors_IMPOSSIBLE_CASE);case 3:throw new Error(errors_PUBKEY_SERIALIZE)}},publicKeyCombine(pubkeys,compressed=!0,output){assert(Array.isArray(pubkeys),"Expected public keys to be an Array"),assert(pubkeys.length>0,"Expected public keys array will have more than zero items");for(const pubkey of pubkeys)isUint8Array("public key",pubkey,[33,65]);switch(isCompressed(compressed),output=getAssertedOutput(output,compressed?33:65),secp256k1.publicKeyCombine(output,pubkeys)){case 0:return output;case 1:throw new Error(errors_PUBKEY_PARSE);case 2:throw new Error(errors_PUBKEY_COMBINE);case 3:throw new Error(errors_PUBKEY_SERIALIZE)}},publicKeyTweakAdd(pubkey,tweak,compressed=!0,output){switch(isUint8Array("public key",pubkey,[33,65]),isUint8Array("tweak",tweak,32),isCompressed(compressed),output=getAssertedOutput(output,compressed?33:65),secp256k1.publicKeyTweakAdd(output,pubkey,tweak)){case 0:return output;case 1:throw new Error(errors_PUBKEY_PARSE);case 2:throw new Error(errors_TWEAK_ADD)}},publicKeyTweakMul(pubkey,tweak,compressed=!0,output){switch(isUint8Array("public key",pubkey,[33,65]),isUint8Array("tweak",tweak,32),isCompressed(compressed),output=getAssertedOutput(output,compressed?33:65),secp256k1.publicKeyTweakMul(output,pubkey,tweak)){case 0:return output;case 1:throw new Error(errors_PUBKEY_PARSE);case 2:throw new Error(errors_TWEAK_MUL)}},signatureNormalize(sig){switch(isUint8Array("signature",sig,64),secp256k1.signatureNormalize(sig)){case 0:return sig;case 1:throw new Error(errors_SIG_PARSE)}},signatureExport(sig,output){isUint8Array("signature",sig,64);const obj={output:output=getAssertedOutput(output,72),outputlen:72};switch(secp256k1.signatureExport(obj,sig)){case 0:return output.slice(0,obj.outputlen);case 1:throw new Error(errors_SIG_PARSE);case 2:throw new Error(errors_IMPOSSIBLE_CASE)}},signatureImport(sig,output){switch(isUint8Array("signature",sig),output=getAssertedOutput(output,64),secp256k1.signatureImport(output,sig)){case 0:return output;case 1:throw new Error(errors_SIG_PARSE);case 2:throw new Error(errors_IMPOSSIBLE_CASE)}},ecdsaSign(msg32,seckey,options={},output){isUint8Array("message",msg32,32),isUint8Array("private key",seckey,32),assert("Object"===toTypeString(options),"Expected options to be an Object"),void 0!==options.data&&isUint8Array("options.data",options.data),void 0!==options.noncefn&&assert("Function"===toTypeString(options.noncefn),"Expected options.noncefn to be a Function");const obj={signature:output=getAssertedOutput(output,64),recid:null};switch(secp256k1.ecdsaSign(obj,msg32,seckey,options.data,options.noncefn)){case 0:return obj;case 1:throw new Error(errors_SIGN);case 2:throw new Error(errors_IMPOSSIBLE_CASE)}},ecdsaVerify(sig,msg32,pubkey){switch(isUint8Array("signature",sig,64),isUint8Array("message",msg32,32),isUint8Array("public key",pubkey,[33,65]),secp256k1.ecdsaVerify(sig,msg32,pubkey)){case 0:return!0;case 3:return!1;case 1:throw new Error(errors_SIG_PARSE);case 2:throw new Error(errors_PUBKEY_PARSE)}},ecdsaRecover(sig,recid,msg32,compressed=!0,output){switch(isUint8Array("signature",sig,64),assert("Number"===toTypeString(recid)&&recid>=0&&recid<=3,"Expected recovery id to be a Number within interval [0, 3]"),isUint8Array("message",msg32,32),isCompressed(compressed),output=getAssertedOutput(output,compressed?33:65),secp256k1.ecdsaRecover(output,sig,recid,msg32)){case 0:return output;case 1:throw new Error(errors_SIG_PARSE);case 2:throw new Error(errors_RECOVER);case 3:throw new Error(errors_IMPOSSIBLE_CASE)}},ecdh(pubkey,seckey,options={},output){switch(isUint8Array("public key",pubkey,[33,65]),isUint8Array("private key",seckey,32),assert("Object"===toTypeString(options),"Expected options to be an Object"),void 0!==options.data&&isUint8Array("options.data",options.data),void 0!==options.hashfn?(assert("Function"===toTypeString(options.hashfn),"Expected options.hashfn to be a Function"),void 0!==options.xbuf&&isUint8Array("options.xbuf",options.xbuf,32),void 0!==options.ybuf&&isUint8Array("options.ybuf",options.ybuf,32),isUint8Array("output",output)):output=getAssertedOutput(output,32),secp256k1.ecdh(output,pubkey,seckey,options.data,options.hashfn,options.xbuf,options.ybuf)){case 0:return output;case 1:throw new Error(errors_PUBKEY_PARSE);case 2:throw new Error(errors_ECDH)}}})},4189:(module,__unused_webpack_exports,__webpack_require__)=>{var Buffer=__webpack_require__(9509).Buffer;function Hash(blockSize,finalSize){this._block=Buffer.alloc(blockSize),this._finalSize=finalSize,this._blockSize=blockSize,this._len=0}Hash.prototype.update=function(data,enc){"string"==typeof data&&(enc=enc||"utf8",data=Buffer.from(data,enc));for(var block=this._block,blockSize=this._blockSize,length=data.length,accum=this._len,offset=0;offset<length;){for(var assigned=accum%blockSize,remainder=Math.min(length-offset,blockSize-assigned),i=0;i<remainder;i++)block[assigned+i]=data[offset+i];offset+=remainder,(accum+=remainder)%blockSize==0&&this._update(block)}return this._len+=length,this},Hash.prototype.digest=function(enc){var rem=this._len%this._blockSize;this._block[rem]=128,this._block.fill(0,rem+1),rem>=this._finalSize&&(this._update(this._block),this._block.fill(0));var bits=8*this._len;if(bits<=4294967295)this._block.writeUInt32BE(bits,this._blockSize-4);else{var lowBits=(4294967295&bits)>>>0,highBits=(bits-lowBits)/4294967296;this._block.writeUInt32BE(highBits,this._blockSize-8),this._block.writeUInt32BE(lowBits,this._blockSize-4)}this._update(this._block);var hash=this._hash();return enc?hash.toString(enc):hash},Hash.prototype._update=function(){throw new Error("_update must be implemented by subclass")},module.exports=Hash},9072:(module,__unused_webpack_exports,__webpack_require__)=>{var exports=module.exports=function SHA(algorithm){algorithm=algorithm.toLowerCase();var Algorithm=exports[algorithm];if(!Algorithm)throw new Error(algorithm+" is not supported (we accept pull requests)");return new Algorithm};exports.sha=__webpack_require__(4448),exports.sha1=__webpack_require__(8336),exports.sha224=__webpack_require__(8432),exports.sha256=__webpack_require__(7499),exports.sha384=__webpack_require__(1686),exports.sha512=__webpack_require__(7816)},4448:(module,__unused_webpack_exports,__webpack_require__)=>{var inherits=__webpack_require__(5717),Hash=__webpack_require__(4189),Buffer=__webpack_require__(9509).Buffer,K=[1518500249,1859775393,-1894007588,-899497514],W=new Array(80);function Sha(){this.init(),this._w=W,Hash.call(this,64,56)}function rotl30(num){return num<<30|num>>>2}function ft(s,b,c,d){return 0===s?b&c|~b&d:2===s?b&c|b&d|c&d:b^c^d}inherits(Sha,Hash),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(M){for(var num,W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,i=0;i<16;++i)W[i]=M.readInt32BE(4*i);for(;i<80;++i)W[i]=W[i-3]^W[i-8]^W[i-14]^W[i-16];for(var j=0;j<80;++j){var s=~~(j/20),t=0|((num=a)<<5|num>>>27)+ft(s,b,c,d)+e+W[j]+K[s];e=d,d=c,c=rotl30(b),b=a,a=t}this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0},Sha.prototype._hash=function(){var H=Buffer.allocUnsafe(20);return H.writeInt32BE(0|this._a,0),H.writeInt32BE(0|this._b,4),H.writeInt32BE(0|this._c,8),H.writeInt32BE(0|this._d,12),H.writeInt32BE(0|this._e,16),H},module.exports=Sha},8336:(module,__unused_webpack_exports,__webpack_require__)=>{var inherits=__webpack_require__(5717),Hash=__webpack_require__(4189),Buffer=__webpack_require__(9509).Buffer,K=[1518500249,1859775393,-1894007588,-899497514],W=new Array(80);function Sha1(){this.init(),this._w=W,Hash.call(this,64,56)}function rotl5(num){return num<<5|num>>>27}function rotl30(num){return num<<30|num>>>2}function ft(s,b,c,d){return 0===s?b&c|~b&d:2===s?b&c|b&d|c&d:b^c^d}inherits(Sha1,Hash),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(M){for(var num,W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,i=0;i<16;++i)W[i]=M.readInt32BE(4*i);for(;i<80;++i)W[i]=(num=W[i-3]^W[i-8]^W[i-14]^W[i-16])<<1|num>>>31;for(var j=0;j<80;++j){var s=~~(j/20),t=rotl5(a)+ft(s,b,c,d)+e+W[j]+K[s]|0;e=d,d=c,c=rotl30(b),b=a,a=t}this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0},Sha1.prototype._hash=function(){var H=Buffer.allocUnsafe(20);return H.writeInt32BE(0|this._a,0),H.writeInt32BE(0|this._b,4),H.writeInt32BE(0|this._c,8),H.writeInt32BE(0|this._d,12),H.writeInt32BE(0|this._e,16),H},module.exports=Sha1},8432:(module,__unused_webpack_exports,__webpack_require__)=>{var inherits=__webpack_require__(5717),Sha256=__webpack_require__(7499),Hash=__webpack_require__(4189),Buffer=__webpack_require__(9509).Buffer,W=new Array(64);function Sha224(){this.init(),this._w=W,Hash.call(this,64,56)}inherits(Sha224,Sha256),Sha224.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},Sha224.prototype._hash=function(){var H=Buffer.allocUnsafe(28);return H.writeInt32BE(this._a,0),H.writeInt32BE(this._b,4),H.writeInt32BE(this._c,8),H.writeInt32BE(this._d,12),H.writeInt32BE(this._e,16),H.writeInt32BE(this._f,20),H.writeInt32BE(this._g,24),H},module.exports=Sha224},7499:(module,__unused_webpack_exports,__webpack_require__)=>{var inherits=__webpack_require__(5717),Hash=__webpack_require__(4189),Buffer=__webpack_require__(9509).Buffer,K=[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],W=new Array(64);function Sha256(){this.init(),this._w=W,Hash.call(this,64,56)}function ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x){return(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10)}function sigma1(x){return(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7)}function gamma0(x){return(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3}inherits(Sha256,Hash),Sha256.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},Sha256.prototype._update=function(M){for(var x,W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,f=0|this._f,g=0|this._g,h=0|this._h,i=0;i<16;++i)W[i]=M.readInt32BE(4*i);for(;i<64;++i)W[i]=0|(((x=W[i-2])>>>17|x<<15)^(x>>>19|x<<13)^x>>>10)+W[i-7]+gamma0(W[i-15])+W[i-16];for(var j=0;j<64;++j){var T1=h+sigma1(e)+ch(e,f,g)+K[j]+W[j]|0,T2=sigma0(a)+maj(a,b,c)|0;h=g,g=f,f=e,e=d+T1|0,d=c,c=b,b=a,a=T1+T2|0}this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0,this._f=f+this._f|0,this._g=g+this._g|0,this._h=h+this._h|0},Sha256.prototype._hash=function(){var H=Buffer.allocUnsafe(32);return H.writeInt32BE(this._a,0),H.writeInt32BE(this._b,4),H.writeInt32BE(this._c,8),H.writeInt32BE(this._d,12),H.writeInt32BE(this._e,16),H.writeInt32BE(this._f,20),H.writeInt32BE(this._g,24),H.writeInt32BE(this._h,28),H},module.exports=Sha256},1686:(module,__unused_webpack_exports,__webpack_require__)=>{var inherits=__webpack_require__(5717),SHA512=__webpack_require__(7816),Hash=__webpack_require__(4189),Buffer=__webpack_require__(9509).Buffer,W=new Array(160);function Sha384(){this.init(),this._w=W,Hash.call(this,128,112)}inherits(Sha384,SHA512),Sha384.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},Sha384.prototype._hash=function(){var H=Buffer.allocUnsafe(48);function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset),H.writeInt32BE(l,offset+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),H},module.exports=Sha384},7816:(module,__unused_webpack_exports,__webpack_require__)=>{var inherits=__webpack_require__(5717),Hash=__webpack_require__(4189),Buffer=__webpack_require__(9509).Buffer,K=[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],W=new Array(160);function Sha512(){this.init(),this._w=W,Hash.call(this,128,112)}function Ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x,xl){return(x>>>28|xl<<4)^(xl>>>2|x<<30)^(xl>>>7|x<<25)}function sigma1(x,xl){return(x>>>14|xl<<18)^(x>>>18|xl<<14)^(xl>>>9|x<<23)}function Gamma0(x,xl){return(x>>>1|xl<<31)^(x>>>8|xl<<24)^x>>>7}function Gamma0l(x,xl){return(x>>>1|xl<<31)^(x>>>8|xl<<24)^(x>>>7|xl<<25)}function Gamma1(x,xl){return(x>>>19|xl<<13)^(xl>>>29|x<<3)^x>>>6}function Gamma1l(x,xl){return(x>>>19|xl<<13)^(xl>>>29|x<<3)^(x>>>6|xl<<26)}function getCarry(a,b){return a>>>0<b>>>0?1:0}inherits(Sha512,Hash),Sha512.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},Sha512.prototype._update=function(M){for(var W=this._w,ah=0|this._ah,bh=0|this._bh,ch=0|this._ch,dh=0|this._dh,eh=0|this._eh,fh=0|this._fh,gh=0|this._gh,hh=0|this._hh,al=0|this._al,bl=0|this._bl,cl=0|this._cl,dl=0|this._dl,el=0|this._el,fl=0|this._fl,gl=0|this._gl,hl=0|this._hl,i=0;i<32;i+=2)W[i]=M.readInt32BE(4*i),W[i+1]=M.readInt32BE(4*i+4);for(;i<160;i+=2){var xh=W[i-30],xl=W[i-30+1],gamma0=Gamma0(xh,xl),gamma0l=Gamma0l(xl,xh),gamma1=Gamma1(xh=W[i-4],xl=W[i-4+1]),gamma1l=Gamma1l(xl,xh),Wi7h=W[i-14],Wi7l=W[i-14+1],Wi16h=W[i-32],Wi16l=W[i-32+1],Wil=gamma0l+Wi7l|0,Wih=gamma0+Wi7h+getCarry(Wil,gamma0l)|0;Wih=(Wih=Wih+gamma1+getCarry(Wil=Wil+gamma1l|0,gamma1l)|0)+Wi16h+getCarry(Wil=Wil+Wi16l|0,Wi16l)|0,W[i]=Wih,W[i+1]=Wil}for(var j=0;j<160;j+=2){Wih=W[j],Wil=W[j+1];var majh=maj(ah,bh,ch),majl=maj(al,bl,cl),sigma0h=sigma0(ah,al),sigma0l=sigma0(al,ah),sigma1h=sigma1(eh,el),sigma1l=sigma1(el,eh),Kih=K[j],Kil=K[j+1],chh=Ch(eh,fh,gh),chl=Ch(el,fl,gl),t1l=hl+sigma1l|0,t1h=hh+sigma1h+getCarry(t1l,hl)|0;t1h=(t1h=(t1h=t1h+chh+getCarry(t1l=t1l+chl|0,chl)|0)+Kih+getCarry(t1l=t1l+Kil|0,Kil)|0)+Wih+getCarry(t1l=t1l+Wil|0,Wil)|0;var t2l=sigma0l+majl|0,t2h=sigma0h+majh+getCarry(t2l,sigma0l)|0;hh=gh,hl=gl,gh=fh,gl=fl,fh=eh,fl=el,eh=dh+t1h+getCarry(el=dl+t1l|0,dl)|0,dh=ch,dl=cl,ch=bh,cl=bl,bh=ah,bl=al,ah=t1h+t2h+getCarry(al=t1l+t2l|0,t1l)|0}this._al=this._al+al|0,this._bl=this._bl+bl|0,this._cl=this._cl+cl|0,this._dl=this._dl+dl|0,this._el=this._el+el|0,this._fl=this._fl+fl|0,this._gl=this._gl+gl|0,this._hl=this._hl+hl|0,this._ah=this._ah+ah+getCarry(this._al,al)|0,this._bh=this._bh+bh+getCarry(this._bl,bl)|0,this._ch=this._ch+ch+getCarry(this._cl,cl)|0,this._dh=this._dh+dh+getCarry(this._dl,dl)|0,this._eh=this._eh+eh+getCarry(this._el,el)|0,this._fh=this._fh+fh+getCarry(this._fl,fl)|0,this._gh=this._gh+gh+getCarry(this._gl,gl)|0,this._hh=this._hh+hh+getCarry(this._hl,hl)|0},Sha512.prototype._hash=function(){var H=Buffer.allocUnsafe(64);function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset),H.writeInt32BE(l,offset+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),H},module.exports=Sha512},1860:function(module){!function(window,define){var _={version:"2.13.2",areas:{},apis:{},inherit:function(api,o){for(var p in api)o.hasOwnProperty(p)||Object.defineProperty(o,p,Object.getOwnPropertyDescriptor(api,p));return o},stringify:function(d,fn){return void 0===d||"function"==typeof d?d+"":JSON.stringify(d,fn||_.replace)},parse:function(s,fn){try{return JSON.parse(s,fn||_.revive)}catch(e){return s}},fn:function(name,fn){for(var api in _.storeAPI[name]=fn,_.apis)_.apis[api][name]=fn},get:function(area,key){return area.getItem(key)},set:function(area,key,string){area.setItem(key,string)},remove:function(area,key){area.removeItem(key)},key:function(area,i){return area.key(i)},length:function(area){return area.length},clear:function(area){area.clear()},Store:function(id,area,namespace){var store=_.inherit(_.storeAPI,(function(key,data,overwrite){return 0===arguments.length?store.getAll():"function"==typeof data?store.transact(key,data,overwrite):void 0!==data?store.set(key,data,overwrite):"string"==typeof key||"number"==typeof key?store.get(key):"function"==typeof key?store.each(key):key?store.setAll(key,data):store.clear()}));store._id=id;try{area.setItem("__store2_test","ok"),store._area=area,area.removeItem("__store2_test")}catch(e){store._area=_.storage("fake")}return store._ns=namespace||"",_.areas[id]||(_.areas[id]=store._area),_.apis[store._ns+store._id]||(_.apis[store._ns+store._id]=store),store},storeAPI:{area:function(id,area){var store=this[id];return store&&store.area||(store=_.Store(id,area,this._ns),this[id]||(this[id]=store)),store},namespace:function(namespace,singleArea){if(!namespace)return this._ns?this._ns.substring(0,this._ns.length-1):"";var ns=namespace,store=this[ns];if(!(store&&store.namespace||(store=_.Store(this._id,this._area,this._ns+ns+"."),this[ns]||(this[ns]=store),singleArea)))for(var name in _.areas)store.area(name,_.areas[name]);return store},isFake:function(force){return force?(this._real=this._area,this._area=_.storage("fake")):!1===force&&(this._area=this._real||this._area),"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(key){return this._area.has?this._area.has(this._in(key)):!!(this._in(key)in this._area)},size:function(){return this.keys().length},each:function(fn,fill){for(var i=0,m=_.length(this._area);i<m;i++){var key=this._out(_.key(this._area,i));if(void 0!==key&&!1===fn.call(this,key,this.get(key),fill))break;m>_.length(this._area)&&(m--,i--)}return fill||this},keys:function(fillList){return this.each((function(k,v,list){list.push(k)}),fillList||[])},get:function(key,alt){var fn,s=_.get(this._area,this._in(key));return"function"==typeof alt&&(fn=alt,alt=null),null!==s?_.parse(s,fn):null!=alt?alt:s},getAll:function(fillObj){return this.each((function(k,v,all){all[k]=v}),fillObj||{})},transact:function(key,fn,alt){var val=this.get(key,alt),ret=fn(val);return this.set(key,void 0===ret?val:ret),this},set:function(key,data,overwrite){var replacer,d=this.get(key);return null!=d&&!1===overwrite?data:("boolean"!=typeof overwrite&&(replacer=overwrite),_.set(this._area,this._in(key),_.stringify(data,replacer))||d)},setAll:function(data,overwrite){var changed,val;for(var key in data)val=data[key],this.set(key,val,overwrite)!==val&&(changed=!0);return changed},add:function(key,data,replacer){var d=this.get(key);if(d instanceof Array)data=d.concat(data);else if(null!==d){var type=typeof d;if(type===typeof data&&"object"===type){for(var k in data)d[k]=data[k];data=d}else data=d+data}return _.set(this._area,this._in(key),_.stringify(data,replacer)),data},remove:function(key,alt){var d=this.get(key,alt);return _.remove(this._area,this._in(key)),d},clear:function(){return this._ns?this.each((function(k){_.remove(this._area,this._in(k))}),1):_.clear(this._area),this},clearAll:function(){var area=this._area;for(var id in _.areas)_.areas.hasOwnProperty(id)&&(this._area=_.areas[id],this.clear());return this._area=area,this},_in:function(k){return"string"!=typeof k&&(k=_.stringify(k)),this._ns?this._ns+k:k},_out:function(k){return this._ns?k&&0===k.indexOf(this._ns)?k.substring(this._ns.length):void 0:k}},storage:function(name){return _.inherit(_.storageAPI,{items:{},name})},storageAPI:{length:0,has:function(k){return this.items.hasOwnProperty(k)},key:function(i){var c=0;for(var k in this.items)if(this.has(k)&&i===c++)return k},setItem:function(k,v){this.has(k)||this.length++,this.items[k]=v},removeItem:function(k){this.has(k)&&(delete this.items[k],this.length--)},getItem:function(k){return this.has(k)?this.items[k]:null},clear:function(){for(var k in this.items)this.removeItem(k)}}},store=_.Store("local",function(){try{return localStorage}catch(e){}}());store.local=store,store._=_,store.area("session",function(){try{return sessionStorage}catch(e){}}()),store.area("page",_.storage("page")),"function"==typeof define&&void 0!==define.amd?define("store2",[],(function(){return store})):module.exports?module.exports=store:(window.store&&(_.conflict=window.store),window.store=store)}(this,this&&this.define)},2830:(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=Stream;var EE=__webpack_require__(7187).EventEmitter;function Stream(){EE.call(this)}__webpack_require__(5717)(Stream,EE),Stream.Readable=__webpack_require__(9481),Stream.Writable=__webpack_require__(4229),Stream.Duplex=__webpack_require__(6753),Stream.Transform=__webpack_require__(4605),Stream.PassThrough=__webpack_require__(2725),Stream.finished=__webpack_require__(8610),Stream.pipeline=__webpack_require__(9946),Stream.Stream=Stream,Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){dest.writable&&!1===dest.write(chunk)&&source.pause&&source.pause()}function ondrain(){source.readable&&source.resume&&source.resume()}source.on("data",ondata),dest.on("drain",ondrain),dest._isStdio||options&&!1===options.end||(source.on("end",onend),source.on("close",onclose));var didOnEnd=!1;function onend(){didOnEnd||(didOnEnd=!0,dest.end())}function onclose(){didOnEnd||(didOnEnd=!0,"function"==typeof dest.destroy&&dest.destroy())}function onerror(er){if(cleanup(),0===EE.listenerCount(this,"error"))throw er}function cleanup(){source.removeListener("data",ondata),dest.removeListener("drain",ondrain),source.removeListener("end",onend),source.removeListener("close",onclose),source.removeListener("error",onerror),dest.removeListener("error",onerror),source.removeListener("end",cleanup),source.removeListener("close",cleanup),dest.removeListener("close",cleanup)}return source.on("error",onerror),dest.on("error",onerror),source.on("end",cleanup),source.on("close",cleanup),dest.on("close",cleanup),dest.emit("pipe",source),dest}},2553:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var Buffer=__webpack_require__(9509).Buffer,isEncoding=Buffer.isEncoding||function(encoding){switch((encoding=""+encoding)&&encoding.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 StringDecoder(encoding){var nb;switch(this.encoding=function normalizeEncoding(enc){var nenc=function _normalizeEncoding(enc){if(!enc)return"utf8";for(var retried;;)switch(enc){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 enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0}}(enc);if("string"!=typeof nenc&&(Buffer.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}(encoding),this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(nb)}function utf8CheckByte(byte){return byte<=127?0:byte>>5==6?2:byte>>4==14?3:byte>>3==30?4:byte>>6==2?-1:-2}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=function utf8CheckExtraBytes(self,buf,p){if(128!=(192&buf[0]))return self.lastNeed=0,"�";if(self.lastNeed>1&&buf.length>1){if(128!=(192&buf[1]))return self.lastNeed=1,"�";if(self.lastNeed>2&&buf.length>2&&128!=(192&buf[2]))return self.lastNeed=2,"�"}}(this,buf);return void 0!==r?r:this.lastNeed<=buf.length?(buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(buf.copy(this.lastChar,p,0,buf.length),void(this.lastNeed-=buf.length))}function utf16Text(buf,i){if((buf.length-i)%2==0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return 0===n?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}exports.s=StringDecoder,StringDecoder.prototype.write=function(buf){if(0===buf.length)return"";var r,i;if(this.lastNeed){if(void 0===(r=this.fillLast(buf)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""},StringDecoder.prototype.end=function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"�":r},StringDecoder.prototype.text=function utf8Text(buf,i){var total=function utf8CheckIncomplete(self,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);if(nb>=0)return nb>0&&(self.lastNeed=nb-1),nb;if(--j<i||-2===nb)return 0;if((nb=utf8CheckByte(buf[j]))>=0)return nb>0&&(self.lastNeed=nb-2),nb;if(--j<i||-2===nb)return 0;if((nb=utf8CheckByte(buf[j]))>=0)return nb>0&&(2===nb?nb=0:self.lastNeed=nb-3),nb;return 0}(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)},StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length}},4927:(module,__unused_webpack_exports,__webpack_require__)=>{function config(name){try{if(!__webpack_require__.g.localStorage)return!1}catch(_){return!1}var val=__webpack_require__.g.localStorage[name];return null!=val&&"true"===String(val).toLowerCase()}module.exports=function deprecate(fn,msg){if(config("noDeprecation"))return fn;var warned=!1;return function deprecated(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);config("traceDeprecation")?console.trace(msg):console.warn(msg),warned=!0}return fn.apply(this,arguments)}}},384:module=>{module.exports=function isBuffer(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},5955:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var isArgumentsObject=__webpack_require__(2584),isGeneratorFunction=__webpack_require__(8662),whichTypedArray=__webpack_require__(6430),isTypedArray=__webpack_require__(5692);function uncurryThis(f){return f.call.bind(f)}var BigIntSupported="undefined"!=typeof BigInt,SymbolSupported="undefined"!=typeof Symbol,ObjectToString=uncurryThis(Object.prototype.toString),numberValue=uncurryThis(Number.prototype.valueOf),stringValue=uncurryThis(String.prototype.valueOf),booleanValue=uncurryThis(Boolean.prototype.valueOf);if(BigIntSupported)var bigIntValue=uncurryThis(BigInt.prototype.valueOf);if(SymbolSupported)var symbolValue=uncurryThis(Symbol.prototype.valueOf);function checkBoxedPrimitive(value,prototypeValueOf){if("object"!=typeof value)return!1;try{return prototypeValueOf(value),!0}catch(e){return!1}}function isMapToString(value){return"[object Map]"===ObjectToString(value)}function isSetToString(value){return"[object Set]"===ObjectToString(value)}function isWeakMapToString(value){return"[object WeakMap]"===ObjectToString(value)}function isWeakSetToString(value){return"[object WeakSet]"===ObjectToString(value)}function isArrayBufferToString(value){return"[object ArrayBuffer]"===ObjectToString(value)}function isArrayBuffer(value){return"undefined"!=typeof ArrayBuffer&&(isArrayBufferToString.working?isArrayBufferToString(value):value instanceof ArrayBuffer)}function isDataViewToString(value){return"[object DataView]"===ObjectToString(value)}function isDataView(value){return"undefined"!=typeof DataView&&(isDataViewToString.working?isDataViewToString(value):value instanceof DataView)}exports.isArgumentsObject=isArgumentsObject,exports.isGeneratorFunction=isGeneratorFunction,exports.isTypedArray=isTypedArray,exports.isPromise=function isPromise(input){return"undefined"!=typeof Promise&&input instanceof Promise||null!==input&&"object"==typeof input&&"function"==typeof input.then&&"function"==typeof input.catch},exports.isArrayBufferView=function isArrayBufferView(value){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(value):isTypedArray(value)||isDataView(value)},exports.isUint8Array=function isUint8Array(value){return"Uint8Array"===whichTypedArray(value)},exports.isUint8ClampedArray=function isUint8ClampedArray(value){return"Uint8ClampedArray"===whichTypedArray(value)},exports.isUint16Array=function isUint16Array(value){return"Uint16Array"===whichTypedArray(value)},exports.isUint32Array=function isUint32Array(value){return"Uint32Array"===whichTypedArray(value)},exports.isInt8Array=function isInt8Array(value){return"Int8Array"===whichTypedArray(value)},exports.isInt16Array=function isInt16Array(value){return"Int16Array"===whichTypedArray(value)},exports.isInt32Array=function isInt32Array(value){return"Int32Array"===whichTypedArray(value)},exports.isFloat32Array=function isFloat32Array(value){return"Float32Array"===whichTypedArray(value)},exports.isFloat64Array=function isFloat64Array(value){return"Float64Array"===whichTypedArray(value)},exports.isBigInt64Array=function isBigInt64Array(value){return"BigInt64Array"===whichTypedArray(value)},exports.isBigUint64Array=function isBigUint64Array(value){return"BigUint64Array"===whichTypedArray(value)},isMapToString.working="undefined"!=typeof Map&&isMapToString(new Map),exports.isMap=function isMap(value){return"undefined"!=typeof Map&&(isMapToString.working?isMapToString(value):value instanceof Map)},isSetToString.working="undefined"!=typeof Set&&isSetToString(new Set),exports.isSet=function isSet(value){return"undefined"!=typeof Set&&(isSetToString.working?isSetToString(value):value instanceof Set)},isWeakMapToString.working="undefined"!=typeof WeakMap&&isWeakMapToString(new WeakMap),exports.isWeakMap=function isWeakMap(value){return"undefined"!=typeof WeakMap&&(isWeakMapToString.working?isWeakMapToString(value):value instanceof WeakMap)},isWeakSetToString.working="undefined"!=typeof WeakSet&&isWeakSetToString(new WeakSet),exports.isWeakSet=function isWeakSet(value){return isWeakSetToString(value)},isArrayBufferToString.working="undefined"!=typeof ArrayBuffer&&isArrayBufferToString(new ArrayBuffer),exports.isArrayBuffer=isArrayBuffer,isDataViewToString.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&isDataViewToString(new DataView(new ArrayBuffer(1),0,1)),exports.isDataView=isDataView;var SharedArrayBufferCopy="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function isSharedArrayBufferToString(value){return"[object SharedArrayBuffer]"===ObjectToString(value)}function isSharedArrayBuffer(value){return void 0!==SharedArrayBufferCopy&&(void 0===isSharedArrayBufferToString.working&&(isSharedArrayBufferToString.working=isSharedArrayBufferToString(new SharedArrayBufferCopy)),isSharedArrayBufferToString.working?isSharedArrayBufferToString(value):value instanceof SharedArrayBufferCopy)}function isNumberObject(value){return checkBoxedPrimitive(value,numberValue)}function isStringObject(value){return checkBoxedPrimitive(value,stringValue)}function isBooleanObject(value){return checkBoxedPrimitive(value,booleanValue)}function isBigIntObject(value){return BigIntSupported&&checkBoxedPrimitive(value,bigIntValue)}function isSymbolObject(value){return SymbolSupported&&checkBoxedPrimitive(value,symbolValue)}exports.isSharedArrayBuffer=isSharedArrayBuffer,exports.isAsyncFunction=function isAsyncFunction(value){return"[object AsyncFunction]"===ObjectToString(value)},exports.isMapIterator=function isMapIterator(value){return"[object Map Iterator]"===ObjectToString(value)},exports.isSetIterator=function isSetIterator(value){return"[object Set Iterator]"===ObjectToString(value)},exports.isGeneratorObject=function isGeneratorObject(value){return"[object Generator]"===ObjectToString(value)},exports.isWebAssemblyCompiledModule=function isWebAssemblyCompiledModule(value){return"[object WebAssembly.Module]"===ObjectToString(value)},exports.isNumberObject=isNumberObject,exports.isStringObject=isStringObject,exports.isBooleanObject=isBooleanObject,exports.isBigIntObject=isBigIntObject,exports.isSymbolObject=isSymbolObject,exports.isBoxedPrimitive=function isBoxedPrimitive(value){return isNumberObject(value)||isStringObject(value)||isBooleanObject(value)||isBigIntObject(value)||isSymbolObject(value)},exports.isAnyArrayBuffer=function isAnyArrayBuffer(value){return"undefined"!=typeof Uint8Array&&(isArrayBuffer(value)||isSharedArrayBuffer(value))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(method){Object.defineProperty(exports,method,{enumerable:!1,value:function(){throw new Error(method+" is not supported in userland")}})}))},9539:(__unused_webpack_module,exports,__webpack_require__)=>{var getOwnPropertyDescriptors=Object.getOwnPropertyDescriptors||function getOwnPropertyDescriptors(obj){for(var keys=Object.keys(obj),descriptors={},i=0;i<keys.length;i++)descriptors[keys[i]]=Object.getOwnPropertyDescriptor(obj,keys[i]);return descriptors},formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i<arguments.length;i++)objects.push(inspect(arguments[i]));return objects.join(" ")}i=1;for(var args=arguments,len=args.length,str=String(f).replace(formatRegExp,(function(x){if("%%"===x)return"%";if(i>=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}})),x=args[i];i<len;x=args[++i])isNull(x)||!isObject(x)?str+=" "+x:str+=" "+inspect(x);return str},exports.deprecate=function(fn,msg){if("undefined"!=typeof process&&!0===process.noDeprecation)return fn;if("undefined"==typeof process)return function(){return exports.deprecate(fn,msg).apply(this,arguments)};var warned=!1;return function deprecated(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)}};var debugs={},debugEnvRegex=/^$/;if(process.env.NODE_DEBUG){var debugEnv=process.env.NODE_DEBUG;debugEnv=debugEnv.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),debugEnvRegex=new RegExp("^"+debugEnv+"$","i")}function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=function arrayToHash(array){var hash={};return array.forEach((function(val,idx){hash[val]=!0})),hash}(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var output,base="",array=!1,braces=["{","}"];(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value))&&(base=" [Function"+(value.name?": "+value.name:"")+"]");return isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0!==keys.length||array&&0!=value.length?recurseTimes<0?isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special"):(ctx.seen.push(value),output=array?function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i<l;++i)hasOwnProperty(value,String(i))?output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output.push("");return keys.forEach((function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))})),output}(ctx,value,recurseTimes,visibleKeys,keys):keys.map((function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})),ctx.seen.pop(),function reduceToSingleString(output,base,braces){if(output.reduce((function(prev,cur){return cur.indexOf("\n")>=0&&0,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n  ")+" "+braces[1];return braces[0]+base+" "+output.join(", ")+" "+braces[1]}(output,base,braces)):braces[0]+base+braces[1]}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if((desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]}).get?str=desc.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1)).indexOf("\n")>-1&&(str=array?str.split("\n").map((function(line){return"  "+line})).join("\n").substr(2):"\n"+str.split("\n").map((function(line){return"   "+line})).join("\n")):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;(name=JSON.stringify(""+key)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}exports.debuglog=function(set){if(set=set.toUpperCase(),!debugs[set])if(debugEnvRegex.test(set)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]},exports.inspect=inspect,inspect.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]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.types=__webpack_require__(5955),exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=function isNullOrUndefined(arg){return null==arg},exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=function isSymbol(arg){return"symbol"==typeof arg},exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.types.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.types.isDate=isDate,exports.isError=isError,exports.types.isNativeError=isError,exports.isFunction=isFunction,exports.isPrimitive=function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg},exports.isBuffer=__webpack_require__(384);var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=__webpack_require__(5717),exports._extend=function(origin,add){if(!add||!isObject(add))return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin};var kCustomPromisifiedSymbol="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function callbackifyOnRejected(reason,cb){if(!reason){var newReason=new Error("Promise was rejected with a falsy value");newReason.reason=reason,reason=newReason}return cb(reason)}exports.promisify=function promisify(original){if("function"!=typeof original)throw new TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&original[kCustomPromisifiedSymbol]){var fn;if("function"!=typeof(fn=original[kCustomPromisifiedSymbol]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(fn,kCustomPromisifiedSymbol,{value:fn,enumerable:!1,writable:!1,configurable:!0}),fn}function fn(){for(var promiseResolve,promiseReject,promise=new Promise((function(resolve,reject){promiseResolve=resolve,promiseReject=reject})),args=[],i=0;i<arguments.length;i++)args.push(arguments[i]);args.push((function(err,value){err?promiseReject(err):promiseResolve(value)}));try{original.apply(this,args)}catch(err){promiseReject(err)}return promise}return Object.setPrototypeOf(fn,Object.getPrototypeOf(original)),kCustomPromisifiedSymbol&&Object.defineProperty(fn,kCustomPromisifiedSymbol,{value:fn,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(fn,getOwnPropertyDescriptors(original))},exports.promisify.custom=kCustomPromisifiedSymbol,exports.callbackify=function callbackify(original){if("function"!=typeof original)throw new TypeError('The "original" argument must be of type Function');function callbackified(){for(var args=[],i=0;i<arguments.length;i++)args.push(arguments[i]);var maybeCb=args.pop();if("function"!=typeof maybeCb)throw new TypeError("The last argument must be of type Function");var self=this,cb=function(){return maybeCb.apply(self,arguments)};original.apply(this,args).then((function(ret){process.nextTick(cb.bind(null,null,ret))}),(function(rej){process.nextTick(callbackifyOnRejected.bind(null,rej,cb))}))}return Object.setPrototypeOf(callbackified,Object.getPrototypeOf(original)),Object.defineProperties(callbackified,getOwnPropertyDescriptors(original)),callbackified}},6430:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var forEach=__webpack_require__(9804),availableTypedArrays=__webpack_require__(3083),callBound=__webpack_require__(1924),$toString=callBound("Object.prototype.toString"),hasToStringTag=__webpack_require__(6410)(),g="undefined"==typeof globalThis?__webpack_require__.g:globalThis,typedArrays=availableTypedArrays(),$slice=callBound("String.prototype.slice"),toStrTags={},gOPD=__webpack_require__(882),getPrototypeOf=Object.getPrototypeOf;hasToStringTag&&gOPD&&getPrototypeOf&&forEach(typedArrays,(function(typedArray){if("function"==typeof g[typedArray]){var arr=new g[typedArray];if(Symbol.toStringTag in arr){var proto=getPrototypeOf(arr),descriptor=gOPD(proto,Symbol.toStringTag);if(!descriptor){var superProto=getPrototypeOf(proto);descriptor=gOPD(superProto,Symbol.toStringTag)}toStrTags[typedArray]=descriptor.get}}}));var isTypedArray=__webpack_require__(5692);module.exports=function whichTypedArray(value){return!!isTypedArray(value)&&(hasToStringTag&&Symbol.toStringTag in value?function tryAllTypedArrays(value){var foundName=!1;return forEach(toStrTags,(function(getter,typedArray){if(!foundName)try{var name=getter.call(value);name===typedArray&&(foundName=name)}catch(e){}})),foundName}(value):$slice($toString(value),8,-1))}},2302:(__unused_webpack_module,exports,__webpack_require__)=>{var FilterCSS=__webpack_require__(9970).FilterCSS,getDefaultCSSWhiteList=__webpack_require__(9970).getDefaultWhiteList,_=__webpack_require__(5938);function getDefaultWhiteList(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var defaultCSSFilter=new FilterCSS;function escapeHtml(html){return html.replace(REGEXP_LT,"&lt;").replace(REGEXP_GT,"&gt;")}var REGEXP_LT=/</g,REGEXP_GT=/>/g,REGEXP_QUOTE=/"/g,REGEXP_QUOTE_2=/&quot;/g,REGEXP_ATTR_VALUE_1=/&#([a-zA-Z0-9]*);?/gim,REGEXP_ATTR_VALUE_COLON=/&colon;?/gim,REGEXP_ATTR_VALUE_NEWLINE=/&newline;?/gim,REGEXP_DEFAULT_ON_TAG_ATTR_4=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,REGEXP_DEFAULT_ON_TAG_ATTR_7=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,REGEXP_DEFAULT_ON_TAG_ATTR_8=/u\s*r\s*l\s*\(.*/gi;function escapeQuote(str){return str.replace(REGEXP_QUOTE,"&quot;")}function unescapeQuote(str){return str.replace(REGEXP_QUOTE_2,'"')}function escapeHtmlEntities(str){return str.replace(REGEXP_ATTR_VALUE_1,(function replaceUnicode(str,code){return"x"===code[0]||"X"===code[0]?String.fromCharCode(parseInt(code.substr(1),16)):String.fromCharCode(parseInt(code,10))}))}function escapeDangerHtml5Entities(str){return str.replace(REGEXP_ATTR_VALUE_COLON,":").replace(REGEXP_ATTR_VALUE_NEWLINE," ")}function clearNonPrintableCharacter(str){for(var str2="",i=0,len=str.length;i<len;i++)str2+=str.charCodeAt(i)<32?" ":str.charAt(i);return _.trim(str2)}function friendlyAttrValue(str){return str=clearNonPrintableCharacter(str=escapeDangerHtml5Entities(str=escapeHtmlEntities(str=unescapeQuote(str))))}function escapeAttrValue(str){return str=escapeHtml(str=escapeQuote(str))}exports.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},exports.getDefaultWhiteList=getDefaultWhiteList,exports.onTag=function onTag(tag,html,options){},exports.onIgnoreTag=function onIgnoreTag(tag,html,options){},exports.onTagAttr=function onTagAttr(tag,name,value){},exports.onIgnoreTagAttr=function onIgnoreTagAttr(tag,name,value){},exports.safeAttrValue=function safeAttrValue(tag,name,value,cssFilter){if(value=friendlyAttrValue(value),"href"===name||"src"===name){if("#"===(value=_.trim(value)))return"#";if("http://"!==value.substr(0,7)&&"https://"!==value.substr(0,8)&&"mailto:"!==value.substr(0,7)&&"tel:"!==value.substr(0,4)&&"data:image/"!==value.substr(0,11)&&"ftp://"!==value.substr(0,6)&&"./"!==value.substr(0,2)&&"../"!==value.substr(0,3)&&"#"!==value[0]&&"/"!==value[0])return""}else if("background"===name){if(REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex=0,REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value))return""}else if("style"===name){if(REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex=0,REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value))return"";if(REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex=0,REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)&&(REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex=0,REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)))return"";!1!==cssFilter&&(value=(cssFilter=cssFilter||defaultCSSFilter).process(value))}return value=escapeAttrValue(value)},exports.escapeHtml=escapeHtml,exports.escapeQuote=escapeQuote,exports.unescapeQuote=unescapeQuote,exports.escapeHtmlEntities=escapeHtmlEntities,exports.escapeDangerHtml5Entities=escapeDangerHtml5Entities,exports.clearNonPrintableCharacter=clearNonPrintableCharacter,exports.friendlyAttrValue=friendlyAttrValue,exports.escapeAttrValue=escapeAttrValue,exports.onIgnoreTagStripAll=function onIgnoreTagStripAll(){return""},exports.StripTagBody=function StripTagBody(tags,next){"function"!=typeof next&&(next=function(){});var isRemoveAllTag=!Array.isArray(tags),removeList=[],posStart=!1;return{onIgnoreTag:function(tag,html,options){if(function isRemoveTag(tag){return!!isRemoveAllTag||-1!==_.indexOf(tags,tag)}(tag)){if(options.isClosing){var ret="[/removed]",end=options.position+ret.length;return removeList.push([!1!==posStart?posStart:options.position,end]),posStart=!1,ret}return posStart||(posStart=options.position),"[removed]"}return next(tag,html,options)},remove:function(html){var rethtml="",lastPos=0;return _.forEach(removeList,(function(pos){rethtml+=html.slice(lastPos,pos[0]),lastPos=pos[1]})),rethtml+=html.slice(lastPos)}}},exports.stripCommentTag=function stripCommentTag(html){for(var retHtml="",lastPos=0;lastPos<html.length;){var i=html.indexOf("\x3c!--",lastPos);if(-1===i){retHtml+=html.slice(lastPos);break}retHtml+=html.slice(lastPos,i);var j=html.indexOf("--\x3e",i);if(-1===j)break;lastPos=j+3}return retHtml},exports.stripBlankChar=function stripBlankChar(html){var chars=html.split("");return(chars=chars.filter((function(char){var c=char.charCodeAt(0);return 127!==c&&(!(c<=31)||(10===c||13===c))}))).join("")},exports.cssFilter=defaultCSSFilter,exports.getDefaultCSSWhiteList=getDefaultCSSWhiteList},8924:(module,exports,__webpack_require__)=>{var DEFAULT=__webpack_require__(2302),parser=__webpack_require__(3268),FilterXSS=__webpack_require__(2973);function filterXSS(html,options){return new FilterXSS(options).process(html)}(exports=module.exports=filterXSS).filterXSS=filterXSS,exports.FilterXSS=FilterXSS,function(){for(var i in DEFAULT)exports[i]=DEFAULT[i];for(var j in parser)exports[j]=parser[j]}(),"undefined"!=typeof window&&(window.filterXSS=module.exports),function isWorkerEnv(){return"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope}()&&(self.filterXSS=module.exports)},3268:(__unused_webpack_module,exports,__webpack_require__)=>{var _=__webpack_require__(5938);function getTagName(html){var tagName,i=_.spaceIndex(html);return tagName=-1===i?html.slice(1,-1):html.slice(1,i+1),"/"===(tagName=_.trim(tagName).toLowerCase()).slice(0,1)&&(tagName=tagName.slice(1)),"/"===tagName.slice(-1)&&(tagName=tagName.slice(0,-1)),tagName}function isClosing(html){return"</"===html.slice(0,2)}var REGEXP_ILLEGAL_ATTR_NAME=/[^a-zA-Z0-9\\_:.-]/gim;function findNextEqual(str,i){for(;i<str.length;i++){var c=str[i];if(" "!==c)return"="===c?i:-1}}function findNextQuotationMark(str,i){for(;i<str.length;i++){var c=str[i];if(" "!==c)return"'"===c||'"'===c?i:-1}}function findBeforeEqual(str,i){for(;i>0;i--){var c=str[i];if(" "!==c)return"="===c?i:-1}}function stripQuoteWrap(text){return function isQuoteWrapString(text){return'"'===text[0]&&'"'===text[text.length-1]||"'"===text[0]&&"'"===text[text.length-1]}(text)?text.substr(1,text.length-2):text}exports.parseTag=function parseTag(html,onTag,escapeHtml){"use strict";var rethtml="",lastPos=0,tagStart=!1,quoteStart=!1,currentPos=0,len=html.length,currentTagName="",currentHtml="";chariterator:for(currentPos=0;currentPos<len;currentPos++){var c=html.charAt(currentPos);if(!1===tagStart){if("<"===c){tagStart=currentPos;continue}}else if(!1===quoteStart){if("<"===c){rethtml+=escapeHtml(html.slice(lastPos,currentPos)),tagStart=currentPos,lastPos=currentPos;continue}if(">"===c){rethtml+=escapeHtml(html.slice(lastPos,tagStart)),currentTagName=getTagName(currentHtml=html.slice(tagStart,currentPos+1)),rethtml+=onTag(tagStart,rethtml.length,currentTagName,currentHtml,isClosing(currentHtml)),lastPos=currentPos+1,tagStart=!1;continue}if('"'===c||"'"===c)for(var i=1,ic=html.charAt(currentPos-i);""===ic.trim()||"="===ic;){if("="===ic){quoteStart=c;continue chariterator}ic=html.charAt(currentPos-++i)}}else if(c===quoteStart){quoteStart=!1;continue}}return lastPos<html.length&&(rethtml+=escapeHtml(html.substr(lastPos))),rethtml},exports.parseAttr=function parseAttr(html,onAttr){"use strict";var lastPos=0,lastMarkPos=0,retAttrs=[],tmpName=!1,len=html.length;function addAttr(name,value){if(!((name=(name=_.trim(name)).replace(REGEXP_ILLEGAL_ATTR_NAME,"").toLowerCase()).length<1)){var ret=onAttr(name,value||"");ret&&retAttrs.push(ret)}}for(var i=0;i<len;i++){var j,c=html.charAt(i);if(!1!==tmpName||"="!==c)if(!1===tmpName||i!==lastMarkPos)if(/\s|\n|\t/.test(c)){if(html=html.replace(/\s|\n|\t/g," "),!1===tmpName){if(-1===(j=findNextEqual(html,i))){addAttr(_.trim(html.slice(lastPos,i))),tmpName=!1,lastPos=i+1;continue}i=j-1;continue}if(-1===(j=findBeforeEqual(html,i-1))){addAttr(tmpName,stripQuoteWrap(_.trim(html.slice(lastPos,i)))),tmpName=!1,lastPos=i+1;continue}}else;else{if(-1===(j=html.indexOf(c,i+1)))break;addAttr(tmpName,_.trim(html.slice(lastMarkPos+1,j))),tmpName=!1,lastPos=(i=j)+1}else tmpName=html.slice(lastPos,i),lastPos=i+1,lastMarkPos='"'===html.charAt(lastPos)||"'"===html.charAt(lastPos)?lastPos:findNextQuotationMark(html,i+1)}return lastPos<html.length&&(!1===tmpName?addAttr(html.slice(lastPos)):addAttr(tmpName,stripQuoteWrap(_.trim(html.slice(lastPos))))),_.trim(retAttrs.join(" "))}},5938:module=>{module.exports={indexOf:function(arr,item){var i,j;if(Array.prototype.indexOf)return arr.indexOf(item);for(i=0,j=arr.length;i<j;i++)if(arr[i]===item)return i;return-1},forEach:function(arr,fn,scope){var i,j;if(Array.prototype.forEach)return arr.forEach(fn,scope);for(i=0,j=arr.length;i<j;i++)fn.call(scope,arr[i],i,arr)},trim:function(str){return String.prototype.trim?str.trim():str.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(str){var match=/\s|\n|\t/.exec(str);return match?match.index:-1}}},2973:(module,__unused_webpack_exports,__webpack_require__)=>{var FilterCSS=__webpack_require__(9970).FilterCSS,DEFAULT=__webpack_require__(2302),parser=__webpack_require__(3268),parseTag=parser.parseTag,parseAttr=parser.parseAttr,_=__webpack_require__(5938);function isNull(obj){return null==obj}function FilterXSS(options){(options=function shallowCopyObject(obj){var ret={};for(var i in obj)ret[i]=obj[i];return ret}(options||{})).stripIgnoreTag&&(options.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),options.onIgnoreTag=DEFAULT.onIgnoreTagStripAll),options.whiteList||options.allowList?options.whiteList=function keysToLowerCase(obj){var ret={};for(var i in obj)Array.isArray(obj[i])?ret[i.toLowerCase()]=obj[i].map((function(item){return item.toLowerCase()})):ret[i.toLowerCase()]=obj[i];return ret}(options.whiteList||options.allowList):options.whiteList=DEFAULT.whiteList,options.onTag=options.onTag||DEFAULT.onTag,options.onTagAttr=options.onTagAttr||DEFAULT.onTagAttr,options.onIgnoreTag=options.onIgnoreTag||DEFAULT.onIgnoreTag,options.onIgnoreTagAttr=options.onIgnoreTagAttr||DEFAULT.onIgnoreTagAttr,options.safeAttrValue=options.safeAttrValue||DEFAULT.safeAttrValue,options.escapeHtml=options.escapeHtml||DEFAULT.escapeHtml,this.options=options,!1===options.css?this.cssFilter=!1:(options.css=options.css||{},this.cssFilter=new FilterCSS(options.css))}FilterXSS.prototype.process=function(html){if(!(html=(html=html||"").toString()))return"";var options=this.options,whiteList=options.whiteList,onTag=options.onTag,onIgnoreTag=options.onIgnoreTag,onTagAttr=options.onTagAttr,onIgnoreTagAttr=options.onIgnoreTagAttr,safeAttrValue=options.safeAttrValue,escapeHtml=options.escapeHtml,cssFilter=this.cssFilter;options.stripBlankChar&&(html=DEFAULT.stripBlankChar(html)),options.allowCommentTag||(html=DEFAULT.stripCommentTag(html));var stripIgnoreTagBody=!1;options.stripIgnoreTagBody&&(stripIgnoreTagBody=DEFAULT.StripTagBody(options.stripIgnoreTagBody,onIgnoreTag),onIgnoreTag=stripIgnoreTagBody.onIgnoreTag);var retHtml=parseTag(html,(function(sourcePosition,position,tag,html,isClosing){var info={sourcePosition,position,isClosing,isWhite:Object.prototype.hasOwnProperty.call(whiteList,tag)},ret=onTag(tag,html,info);if(!isNull(ret))return ret;if(info.isWhite){if(info.isClosing)return"</"+tag+">";var attrs=function getAttrs(html){var i=_.spaceIndex(html);if(-1===i)return{html:"",closing:"/"===html[html.length-2]};var isClosing="/"===(html=_.trim(html.slice(i+1,-1)))[html.length-1];return isClosing&&(html=_.trim(html.slice(0,-1))),{html,closing:isClosing}}(html),whiteAttrList=whiteList[tag],attrsHtml=parseAttr(attrs.html,(function(name,value){var isWhiteAttr=-1!==_.indexOf(whiteAttrList,name),ret=onTagAttr(tag,name,value,isWhiteAttr);return isNull(ret)?isWhiteAttr?(value=safeAttrValue(tag,name,value,cssFilter))?name+'="'+value+'"':name:isNull(ret=onIgnoreTagAttr(tag,name,value,isWhiteAttr))?void 0:ret:ret}));return html="<"+tag,attrsHtml&&(html+=" "+attrsHtml),attrs.closing&&(html+=" /"),html+=">"}return isNull(ret=onIgnoreTag(tag,html,info))?escapeHtml(html):ret}),escapeHtml);return stripIgnoreTagBody&&(retHtml=stripIgnoreTagBody.remove(retHtml)),retHtml},module.exports=FilterXSS},950:()=>{},6601:()=>{},9214:()=>{},1922:()=>{},2363:()=>{},8623:()=>{},7748:()=>{},5568:()=>{},6619:()=>{},7108:()=>{},2361:()=>{},4616:()=>{},3083:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var possibleNames=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g="undefined"==typeof globalThis?__webpack_require__.g:globalThis;module.exports=function availableTypedArrays(){for(var out=[],i=0;i<possibleNames.length;i++)"function"==typeof g[possibleNames[i]]&&(out[out.length]=possibleNames[i]);return out}},882:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var $gOPD=__webpack_require__(210)("%Object.getOwnPropertyDescriptor%",!0);if($gOPD)try{$gOPD([],"length")}catch(e){$gOPD=null}module.exports=$gOPD},6996:module=>{"use strict";module.exports=JSON.parse('["的","一","是","在","不","了","有","和","人","这","中","大","为","上","个","国","我","以","要","他","时","来","用","们","生","到","作","地","于","出","就","分","对","成","会","可","主","发","年","动","同","工","也","能","下","过","子","说","产","种","面","而","方","后","多","定","行","学","法","所","民","得","经","十","三","之","进","着","等","部","度","家","电","力","里","如","水","化","高","自","二","理","起","小","物","现","实","加","量","都","两","体","制","机","当","使","点","从","业","本","去","把","性","好","应","开","它","合","还","因","由","其","些","然","前","外","天","政","四","日","那","社","义","事","平","形","相","全","表","间","样","与","关","各","重","新","线","内","数","正","心","反","你","明","看","原","又","么","利","比","或","但","质","气","第","向","道","命","此","变","条","只","没","结","解","问","意","建","月","公","无","系","军","很","情","者","最","立","代","想","已","通","并","提","直","题","党","程","展","五","果","料","象","员","革","位","入","常","文","总","次","品","式","活","设","及","管","特","件","长","求","老","头","基","资","边","流","路","级","少","图","山","统","接","知","较","将","组","见","计","别","她","手","角","期","根","论","运","农","指","几","九","区","强","放","决","西","被","干","做","必","战","先","回","则","任","取","据","处","队","南","给","色","光","门","即","保","治","北","造","百","规","热","领","七","海","口","东","导","器","压","志","世","金","增","争","济","阶","油","思","术","极","交","受","联","什","认","六","共","权","收","证","改","清","美","再","采","转","更","单","风","切","打","白","教","速","花","带","安","场","身","车","例","真","务","具","万","每","目","至","达","走","积","示","议","声","报","斗","完","类","八","离","华","名","确","才","科","张","信","马","节","话","米","整","空","元","况","今","集","温","传","土","许","步","群","广","石","记","需","段","研","界","拉","林","律","叫","且","究","观","越","织","装","影","算","低","持","音","众","书","布","复","容","儿","须","际","商","非","验","连","断","深","难","近","矿","千","周","委","素","技","备","半","办","青","省","列","习","响","约","支","般","史","感","劳","便","团","往","酸","历","市","克","何","除","消","构","府","称","太","准","精","值","号","率","族","维","划","选","标","写","存","候","毛","亲","快","效","斯","院","查","江","型","眼","王","按","格","养","易","置","派","层","片","始","却","专","状","育","厂","京","识","适","属","圆","包","火","住","调","满","县","局","照","参","红","细","引","听","该","铁","价","严","首","底","液","官","德","随","病","苏","失","尔","死","讲","配","女","黄","推","显","谈","罪","神","艺","呢","席","含","企","望","密","批","营","项","防","举","球","英","氧","势","告","李","台","落","木","帮","轮","破","亚","师","围","注","远","字","材","排","供","河","态","封","另","施","减","树","溶","怎","止","案","言","士","均","武","固","叶","鱼","波","视","仅","费","紧","爱","左","章","早","朝","害","续","轻","服","试","食","充","兵","源","判","护","司","足","某","练","差","致","板","田","降","黑","犯","负","击","范","继","兴","似","余","坚","曲","输","修","故","城","夫","够","送","笔","船","占","右","财","吃","富","春","职","觉","汉","画","功","巴","跟","虽","杂","飞","检","吸","助","升","阳","互","初","创","抗","考","投","坏","策","古","径","换","未","跑","留","钢","曾","端","责","站","简","述","钱","副","尽","帝","射","草","冲","承","独","令","限","阿","宣","环","双","请","超","微","让","控","州","良","轴","找","否","纪","益","依","优","顶","础","载","倒","房","突","坐","粉","敌","略","客","袁","冷","胜","绝","析","块","剂","测","丝","协","诉","念","陈","仍","罗","盐","友","洋","错","苦","夜","刑","移","频","逐","靠","混","母","短","皮","终","聚","汽","村","云","哪","既","距","卫","停","烈","央","察","烧","迅","境","若","印","洲","刻","括","激","孔","搞","甚","室","待","核","校","散","侵","吧","甲","游","久","菜","味","旧","模","湖","货","损","预","阻","毫","普","稳","乙","妈","植","息","扩","银","语","挥","酒","守","拿","序","纸","医","缺","雨","吗","针","刘","啊","急","唱","误","训","愿","审","附","获","茶","鲜","粮","斤","孩","脱","硫","肥","善","龙","演","父","渐","血","欢","械","掌","歌","沙","刚","攻","谓","盾","讨","晚","粒","乱","燃","矛","乎","杀","药","宁","鲁","贵","钟","煤","读","班","伯","香","介","迫","句","丰","培","握","兰","担","弦","蛋","沉","假","穿","执","答","乐","谁","顺","烟","缩","征","脸","喜","松","脚","困","异","免","背","星","福","买","染","井","概","慢","怕","磁","倍","祖","皇","促","静","补","评","翻","肉","践","尼","衣","宽","扬","棉","希","伤","操","垂","秋","宜","氢","套","督","振","架","亮","末","宪","庆","编","牛","触","映","雷","销","诗","座","居","抓","裂","胞","呼","娘","景","威","绿","晶","厚","盟","衡","鸡","孙","延","危","胶","屋","乡","临","陆","顾","掉","呀","灯","岁","措","束","耐","剧","玉","赵","跳","哥","季","课","凯","胡","额","款","绍","卷","齐","伟","蒸","殖","永","宗","苗","川","炉","岩","弱","零","杨","奏","沿","露","杆","探","滑","镇","饭","浓","航","怀","赶","库","夺","伊","灵","税","途","灭","赛","归","召","鼓","播","盘","裁","险","康","唯","录","菌","纯","借","糖","盖","横","符","私","努","堂","域","枪","润","幅","哈","竟","熟","虫","泽","脑","壤","碳","欧","遍","侧","寨","敢","彻","虑","斜","薄","庭","纳","弹","饲","伸","折","麦","湿","暗","荷","瓦","塞","床","筑","恶","户","访","塔","奇","透","梁","刀","旋","迹","卡","氯","遇","份","毒","泥","退","洗","摆","灰","彩","卖","耗","夏","择","忙","铜","献","硬","予","繁","圈","雪","函","亦","抽","篇","阵","阴","丁","尺","追","堆","雄","迎","泛","爸","楼","避","谋","吨","野","猪","旗","累","偏","典","馆","索","秦","脂","潮","爷","豆","忽","托","惊","塑","遗","愈","朱","替","纤","粗","倾","尚","痛","楚","谢","奋","购","磨","君","池","旁","碎","骨","监","捕","弟","暴","割","贯","殊","释","词","亡","壁","顿","宝","午","尘","闻","揭","炮","残","冬","桥","妇","警","综","招","吴","付","浮","遭","徐","您","摇","谷","赞","箱","隔","订","男","吹","园","纷","唐","败","宋","玻","巨","耕","坦","荣","闭","湾","键","凡","驻","锅","救","恩","剥","凝","碱","齿","截","炼","麻","纺","禁","废","盛","版","缓","净","睛","昌","婚","涉","筒","嘴","插","岸","朗","庄","街","藏","姑","贸","腐","奴","啦","惯","乘","伙","恢","匀","纱","扎","辩","耳","彪","臣","亿","璃","抵","脉","秀","萨","俄","网","舞","店","喷","纵","寸","汗","挂","洪","贺","闪","柬","爆","烯","津","稻","墙","软","勇","像","滚","厘","蒙","芳","肯","坡","柱","荡","腿","仪","旅","尾","轧","冰","贡","登","黎","削","钻","勒","逃","障","氨","郭","峰","币","港","伏","轨","亩","毕","擦","莫","刺","浪","秘","援","株","健","售","股","岛","甘","泡","睡","童","铸","汤","阀","休","汇","舍","牧","绕","炸","哲","磷","绩","朋","淡","尖","启","陷","柴","呈","徒","颜","泪","稍","忘","泵","蓝","拖","洞","授","镜","辛","壮","锋","贫","虚","弯","摩","泰","幼","廷","尊","窗","纲","弄","隶","疑","氏","宫","姐","震","瑞","怪","尤","琴","循","描","膜","违","夹","腰","缘","珠","穷","森","枝","竹","沟","催","绳","忆","邦","剩","幸","浆","栏","拥","牙","贮","礼","滤","钠","纹","罢","拍","咱","喊","袖","埃","勤","罚","焦","潜","伍","墨","欲","缝","姓","刊","饱","仿","奖","铝","鬼","丽","跨","默","挖","链","扫","喝","袋","炭","污","幕","诸","弧","励","梅","奶","洁","灾","舟","鉴","苯","讼","抱","毁","懂","寒","智","埔","寄","届","跃","渡","挑","丹","艰","贝","碰","拔","爹","戴","码","梦","芽","熔","赤","渔","哭","敬","颗","奔","铅","仲","虎","稀","妹","乏","珍","申","桌","遵","允","隆","螺","仓","魏","锐","晓","氮","兼","隐","碍","赫","拨","忠","肃","缸","牵","抢","博","巧","壳","兄","杜","讯","诚","碧","祥","柯","页","巡","矩","悲","灌","龄","伦","票","寻","桂","铺","圣","恐","恰","郑","趣","抬","荒","腾","贴","柔","滴","猛","阔","辆","妻","填","撤","储","签","闹","扰","紫","砂","递","戏","吊","陶","伐","喂","疗","瓶","婆","抚","臂","摸","忍","虾","蜡","邻","胸","巩","挤","偶","弃","槽","劲","乳","邓","吉","仁","烂","砖","租","乌","舰","伴","瓜","浅","丙","暂","燥","橡","柳","迷","暖","牌","秧","胆","详","簧","踏","瓷","谱","呆","宾","糊","洛","辉","愤","竞","隙","怒","粘","乃","绪","肩","籍","敏","涂","熙","皆","侦","悬","掘","享","纠","醒","狂","锁","淀","恨","牲","霸","爬","赏","逆","玩","陵","祝","秒","浙","貌","役","彼","悉","鸭","趋","凤","晨","畜","辈","秩","卵","署","梯","炎","滩","棋","驱","筛","峡","冒","啥","寿","译","浸","泉","帽","迟","硅","疆","贷","漏","稿","冠","嫩","胁","芯","牢","叛","蚀","奥","鸣","岭","羊","凭","串","塘","绘","酵","融","盆","锡","庙","筹","冻","辅","摄","袭","筋","拒","僚","旱","钾","鸟","漆","沈","眉","疏","添","棒","穗","硝","韩","逼","扭","侨","凉","挺","碗","栽","炒","杯","患","馏","劝","豪","辽","勃","鸿","旦","吏","拜","狗","埋","辊","掩","饮","搬","骂","辞","勾","扣","估","蒋","绒","雾","丈","朵","姆","拟","宇","辑","陕","雕","偿","蓄","崇","剪","倡","厅","咬","驶","薯","刷","斥","番","赋","奉","佛","浇","漫","曼","扇","钙","桃","扶","仔","返","俗","亏","腔","鞋","棱","覆","框","悄","叔","撞","骗","勘","旺","沸","孤","吐","孟","渠","屈","疾","妙","惜","仰","狠","胀","谐","抛","霉","桑","岗","嘛","衰","盗","渗","脏","赖","涌","甜","曹","阅","肌","哩","厉","烃","纬","毅","昨","伪","症","煮","叹","钉","搭","茎","笼","酷","偷","弓","锥","恒","杰","坑","鼻","翼","纶","叙","狱","逮","罐","络","棚","抑","膨","蔬","寺","骤","穆","冶","枯","册","尸","凸","绅","坯","牺","焰","轰","欣","晋","瘦","御","锭","锦","丧","旬","锻","垄","搜","扑","邀","亭","酯","迈","舒","脆","酶","闲","忧","酚","顽","羽","涨","卸","仗","陪","辟","惩","杭","姚","肚","捉","飘","漂","昆","欺","吾","郎","烷","汁","呵","饰","萧","雅","邮","迁","燕","撒","姻","赴","宴","烦","债","帐","斑","铃","旨","醇","董","饼","雏","姿","拌","傅","腹","妥","揉","贤","拆","歪","葡","胺","丢","浩","徽","昂","垫","挡","览","贪","慰","缴","汪","慌","冯","诺","姜","谊","凶","劣","诬","耀","昏","躺","盈","骑","乔","溪","丛","卢","抹","闷","咨","刮","驾","缆","悟","摘","铒","掷","颇","幻","柄","惠","惨","佳","仇","腊","窝","涤","剑","瞧","堡","泼","葱","罩","霍","捞","胎","苍","滨","俩","捅","湘","砍","霞","邵","萄","疯","淮","遂","熊","粪","烘","宿","档","戈","驳","嫂","裕","徙","箭","捐","肠","撑","晒","辨","殿","莲","摊","搅","酱","屏","疫","哀","蔡","堵","沫","皱","畅","叠","阁","莱","敲","辖","钩","痕","坝","巷","饿","祸","丘","玄","溜","曰","逻","彭","尝","卿","妨","艇","吞","韦","怨","矮","歇"]')},4262:module=>{"use strict";module.exports=JSON.parse('["的","一","是","在","不","了","有","和","人","這","中","大","為","上","個","國","我","以","要","他","時","來","用","們","生","到","作","地","於","出","就","分","對","成","會","可","主","發","年","動","同","工","也","能","下","過","子","說","產","種","面","而","方","後","多","定","行","學","法","所","民","得","經","十","三","之","進","著","等","部","度","家","電","力","裡","如","水","化","高","自","二","理","起","小","物","現","實","加","量","都","兩","體","制","機","當","使","點","從","業","本","去","把","性","好","應","開","它","合","還","因","由","其","些","然","前","外","天","政","四","日","那","社","義","事","平","形","相","全","表","間","樣","與","關","各","重","新","線","內","數","正","心","反","你","明","看","原","又","麼","利","比","或","但","質","氣","第","向","道","命","此","變","條","只","沒","結","解","問","意","建","月","公","無","系","軍","很","情","者","最","立","代","想","已","通","並","提","直","題","黨","程","展","五","果","料","象","員","革","位","入","常","文","總","次","品","式","活","設","及","管","特","件","長","求","老","頭","基","資","邊","流","路","級","少","圖","山","統","接","知","較","將","組","見","計","別","她","手","角","期","根","論","運","農","指","幾","九","區","強","放","決","西","被","幹","做","必","戰","先","回","則","任","取","據","處","隊","南","給","色","光","門","即","保","治","北","造","百","規","熱","領","七","海","口","東","導","器","壓","志","世","金","增","爭","濟","階","油","思","術","極","交","受","聯","什","認","六","共","權","收","證","改","清","美","再","採","轉","更","單","風","切","打","白","教","速","花","帶","安","場","身","車","例","真","務","具","萬","每","目","至","達","走","積","示","議","聲","報","鬥","完","類","八","離","華","名","確","才","科","張","信","馬","節","話","米","整","空","元","況","今","集","溫","傳","土","許","步","群","廣","石","記","需","段","研","界","拉","林","律","叫","且","究","觀","越","織","裝","影","算","低","持","音","眾","書","布","复","容","兒","須","際","商","非","驗","連","斷","深","難","近","礦","千","週","委","素","技","備","半","辦","青","省","列","習","響","約","支","般","史","感","勞","便","團","往","酸","歷","市","克","何","除","消","構","府","稱","太","準","精","值","號","率","族","維","劃","選","標","寫","存","候","毛","親","快","效","斯","院","查","江","型","眼","王","按","格","養","易","置","派","層","片","始","卻","專","狀","育","廠","京","識","適","屬","圓","包","火","住","調","滿","縣","局","照","參","紅","細","引","聽","該","鐵","價","嚴","首","底","液","官","德","隨","病","蘇","失","爾","死","講","配","女","黃","推","顯","談","罪","神","藝","呢","席","含","企","望","密","批","營","項","防","舉","球","英","氧","勢","告","李","台","落","木","幫","輪","破","亞","師","圍","注","遠","字","材","排","供","河","態","封","另","施","減","樹","溶","怎","止","案","言","士","均","武","固","葉","魚","波","視","僅","費","緊","愛","左","章","早","朝","害","續","輕","服","試","食","充","兵","源","判","護","司","足","某","練","差","致","板","田","降","黑","犯","負","擊","范","繼","興","似","餘","堅","曲","輸","修","故","城","夫","夠","送","筆","船","佔","右","財","吃","富","春","職","覺","漢","畫","功","巴","跟","雖","雜","飛","檢","吸","助","昇","陽","互","初","創","抗","考","投","壞","策","古","徑","換","未","跑","留","鋼","曾","端","責","站","簡","述","錢","副","盡","帝","射","草","衝","承","獨","令","限","阿","宣","環","雙","請","超","微","讓","控","州","良","軸","找","否","紀","益","依","優","頂","礎","載","倒","房","突","坐","粉","敵","略","客","袁","冷","勝","絕","析","塊","劑","測","絲","協","訴","念","陳","仍","羅","鹽","友","洋","錯","苦","夜","刑","移","頻","逐","靠","混","母","短","皮","終","聚","汽","村","雲","哪","既","距","衛","停","烈","央","察","燒","迅","境","若","印","洲","刻","括","激","孔","搞","甚","室","待","核","校","散","侵","吧","甲","遊","久","菜","味","舊","模","湖","貨","損","預","阻","毫","普","穩","乙","媽","植","息","擴","銀","語","揮","酒","守","拿","序","紙","醫","缺","雨","嗎","針","劉","啊","急","唱","誤","訓","願","審","附","獲","茶","鮮","糧","斤","孩","脫","硫","肥","善","龍","演","父","漸","血","歡","械","掌","歌","沙","剛","攻","謂","盾","討","晚","粒","亂","燃","矛","乎","殺","藥","寧","魯","貴","鐘","煤","讀","班","伯","香","介","迫","句","豐","培","握","蘭","擔","弦","蛋","沉","假","穿","執","答","樂","誰","順","煙","縮","徵","臉","喜","松","腳","困","異","免","背","星","福","買","染","井","概","慢","怕","磁","倍","祖","皇","促","靜","補","評","翻","肉","踐","尼","衣","寬","揚","棉","希","傷","操","垂","秋","宜","氫","套","督","振","架","亮","末","憲","慶","編","牛","觸","映","雷","銷","詩","座","居","抓","裂","胞","呼","娘","景","威","綠","晶","厚","盟","衡","雞","孫","延","危","膠","屋","鄉","臨","陸","顧","掉","呀","燈","歲","措","束","耐","劇","玉","趙","跳","哥","季","課","凱","胡","額","款","紹","卷","齊","偉","蒸","殖","永","宗","苗","川","爐","岩","弱","零","楊","奏","沿","露","桿","探","滑","鎮","飯","濃","航","懷","趕","庫","奪","伊","靈","稅","途","滅","賽","歸","召","鼓","播","盤","裁","險","康","唯","錄","菌","純","借","糖","蓋","橫","符","私","努","堂","域","槍","潤","幅","哈","竟","熟","蟲","澤","腦","壤","碳","歐","遍","側","寨","敢","徹","慮","斜","薄","庭","納","彈","飼","伸","折","麥","濕","暗","荷","瓦","塞","床","築","惡","戶","訪","塔","奇","透","梁","刀","旋","跡","卡","氯","遇","份","毒","泥","退","洗","擺","灰","彩","賣","耗","夏","擇","忙","銅","獻","硬","予","繁","圈","雪","函","亦","抽","篇","陣","陰","丁","尺","追","堆","雄","迎","泛","爸","樓","避","謀","噸","野","豬","旗","累","偏","典","館","索","秦","脂","潮","爺","豆","忽","托","驚","塑","遺","愈","朱","替","纖","粗","傾","尚","痛","楚","謝","奮","購","磨","君","池","旁","碎","骨","監","捕","弟","暴","割","貫","殊","釋","詞","亡","壁","頓","寶","午","塵","聞","揭","炮","殘","冬","橋","婦","警","綜","招","吳","付","浮","遭","徐","您","搖","谷","贊","箱","隔","訂","男","吹","園","紛","唐","敗","宋","玻","巨","耕","坦","榮","閉","灣","鍵","凡","駐","鍋","救","恩","剝","凝","鹼","齒","截","煉","麻","紡","禁","廢","盛","版","緩","淨","睛","昌","婚","涉","筒","嘴","插","岸","朗","莊","街","藏","姑","貿","腐","奴","啦","慣","乘","夥","恢","勻","紗","扎","辯","耳","彪","臣","億","璃","抵","脈","秀","薩","俄","網","舞","店","噴","縱","寸","汗","掛","洪","賀","閃","柬","爆","烯","津","稻","牆","軟","勇","像","滾","厘","蒙","芳","肯","坡","柱","盪","腿","儀","旅","尾","軋","冰","貢","登","黎","削","鑽","勒","逃","障","氨","郭","峰","幣","港","伏","軌","畝","畢","擦","莫","刺","浪","秘","援","株","健","售","股","島","甘","泡","睡","童","鑄","湯","閥","休","匯","舍","牧","繞","炸","哲","磷","績","朋","淡","尖","啟","陷","柴","呈","徒","顏","淚","稍","忘","泵","藍","拖","洞","授","鏡","辛","壯","鋒","貧","虛","彎","摩","泰","幼","廷","尊","窗","綱","弄","隸","疑","氏","宮","姐","震","瑞","怪","尤","琴","循","描","膜","違","夾","腰","緣","珠","窮","森","枝","竹","溝","催","繩","憶","邦","剩","幸","漿","欄","擁","牙","貯","禮","濾","鈉","紋","罷","拍","咱","喊","袖","埃","勤","罰","焦","潛","伍","墨","欲","縫","姓","刊","飽","仿","獎","鋁","鬼","麗","跨","默","挖","鏈","掃","喝","袋","炭","污","幕","諸","弧","勵","梅","奶","潔","災","舟","鑑","苯","訟","抱","毀","懂","寒","智","埔","寄","屆","躍","渡","挑","丹","艱","貝","碰","拔","爹","戴","碼","夢","芽","熔","赤","漁","哭","敬","顆","奔","鉛","仲","虎","稀","妹","乏","珍","申","桌","遵","允","隆","螺","倉","魏","銳","曉","氮","兼","隱","礙","赫","撥","忠","肅","缸","牽","搶","博","巧","殼","兄","杜","訊","誠","碧","祥","柯","頁","巡","矩","悲","灌","齡","倫","票","尋","桂","鋪","聖","恐","恰","鄭","趣","抬","荒","騰","貼","柔","滴","猛","闊","輛","妻","填","撤","儲","簽","鬧","擾","紫","砂","遞","戲","吊","陶","伐","餵","療","瓶","婆","撫","臂","摸","忍","蝦","蠟","鄰","胸","鞏","擠","偶","棄","槽","勁","乳","鄧","吉","仁","爛","磚","租","烏","艦","伴","瓜","淺","丙","暫","燥","橡","柳","迷","暖","牌","秧","膽","詳","簧","踏","瓷","譜","呆","賓","糊","洛","輝","憤","競","隙","怒","粘","乃","緒","肩","籍","敏","塗","熙","皆","偵","懸","掘","享","糾","醒","狂","鎖","淀","恨","牲","霸","爬","賞","逆","玩","陵","祝","秒","浙","貌","役","彼","悉","鴨","趨","鳳","晨","畜","輩","秩","卵","署","梯","炎","灘","棋","驅","篩","峽","冒","啥","壽","譯","浸","泉","帽","遲","矽","疆","貸","漏","稿","冠","嫩","脅","芯","牢","叛","蝕","奧","鳴","嶺","羊","憑","串","塘","繪","酵","融","盆","錫","廟","籌","凍","輔","攝","襲","筋","拒","僚","旱","鉀","鳥","漆","沈","眉","疏","添","棒","穗","硝","韓","逼","扭","僑","涼","挺","碗","栽","炒","杯","患","餾","勸","豪","遼","勃","鴻","旦","吏","拜","狗","埋","輥","掩","飲","搬","罵","辭","勾","扣","估","蔣","絨","霧","丈","朵","姆","擬","宇","輯","陝","雕","償","蓄","崇","剪","倡","廳","咬","駛","薯","刷","斥","番","賦","奉","佛","澆","漫","曼","扇","鈣","桃","扶","仔","返","俗","虧","腔","鞋","棱","覆","框","悄","叔","撞","騙","勘","旺","沸","孤","吐","孟","渠","屈","疾","妙","惜","仰","狠","脹","諧","拋","黴","桑","崗","嘛","衰","盜","滲","臟","賴","湧","甜","曹","閱","肌","哩","厲","烴","緯","毅","昨","偽","症","煮","嘆","釘","搭","莖","籠","酷","偷","弓","錐","恆","傑","坑","鼻","翼","綸","敘","獄","逮","罐","絡","棚","抑","膨","蔬","寺","驟","穆","冶","枯","冊","屍","凸","紳","坯","犧","焰","轟","欣","晉","瘦","禦","錠","錦","喪","旬","鍛","壟","搜","撲","邀","亭","酯","邁","舒","脆","酶","閒","憂","酚","頑","羽","漲","卸","仗","陪","闢","懲","杭","姚","肚","捉","飄","漂","昆","欺","吾","郎","烷","汁","呵","飾","蕭","雅","郵","遷","燕","撒","姻","赴","宴","煩","債","帳","斑","鈴","旨","醇","董","餅","雛","姿","拌","傅","腹","妥","揉","賢","拆","歪","葡","胺","丟","浩","徽","昂","墊","擋","覽","貪","慰","繳","汪","慌","馮","諾","姜","誼","兇","劣","誣","耀","昏","躺","盈","騎","喬","溪","叢","盧","抹","悶","諮","刮","駕","纜","悟","摘","鉺","擲","頗","幻","柄","惠","慘","佳","仇","臘","窩","滌","劍","瞧","堡","潑","蔥","罩","霍","撈","胎","蒼","濱","倆","捅","湘","砍","霞","邵","萄","瘋","淮","遂","熊","糞","烘","宿","檔","戈","駁","嫂","裕","徙","箭","捐","腸","撐","曬","辨","殿","蓮","攤","攪","醬","屏","疫","哀","蔡","堵","沫","皺","暢","疊","閣","萊","敲","轄","鉤","痕","壩","巷","餓","禍","丘","玄","溜","曰","邏","彭","嘗","卿","妨","艇","吞","韋","怨","矮","歇"]')},32:module=>{"use strict";module.exports=JSON.parse('["abdikace","abeceda","adresa","agrese","akce","aktovka","alej","alkohol","amputace","ananas","andulka","anekdota","anketa","antika","anulovat","archa","arogance","asfalt","asistent","aspirace","astma","astronom","atlas","atletika","atol","autobus","azyl","babka","bachor","bacil","baculka","badatel","bageta","bagr","bahno","bakterie","balada","baletka","balkon","balonek","balvan","balza","bambus","bankomat","barbar","baret","barman","baroko","barva","baterka","batoh","bavlna","bazalka","bazilika","bazuka","bedna","beran","beseda","bestie","beton","bezinka","bezmoc","beztak","bicykl","bidlo","biftek","bikiny","bilance","biograf","biolog","bitva","bizon","blahobyt","blatouch","blecha","bledule","blesk","blikat","blizna","blokovat","bloudit","blud","bobek","bobr","bodlina","bodnout","bohatost","bojkot","bojovat","bokorys","bolest","borec","borovice","bota","boubel","bouchat","bouda","boule","bourat","boxer","bradavka","brambora","branka","bratr","brepta","briketa","brko","brloh","bronz","broskev","brunetka","brusinka","brzda","brzy","bublina","bubnovat","buchta","buditel","budka","budova","bufet","bujarost","bukvice","buldok","bulva","bunda","bunkr","burza","butik","buvol","buzola","bydlet","bylina","bytovka","bzukot","capart","carevna","cedr","cedule","cejch","cejn","cela","celer","celkem","celnice","cenina","cennost","cenovka","centrum","cenzor","cestopis","cetka","chalupa","chapadlo","charita","chata","chechtat","chemie","chichot","chirurg","chlad","chleba","chlubit","chmel","chmura","chobot","chochol","chodba","cholera","chomout","chopit","choroba","chov","chrapot","chrlit","chrt","chrup","chtivost","chudina","chutnat","chvat","chvilka","chvost","chyba","chystat","chytit","cibule","cigareta","cihelna","cihla","cinkot","cirkus","cisterna","citace","citrus","cizinec","cizost","clona","cokoliv","couvat","ctitel","ctnost","cudnost","cuketa","cukr","cupot","cvaknout","cval","cvik","cvrkot","cyklista","daleko","dareba","datel","datum","dcera","debata","dechovka","decibel","deficit","deflace","dekl","dekret","demokrat","deprese","derby","deska","detektiv","dikobraz","diktovat","dioda","diplom","disk","displej","divadlo","divoch","dlaha","dlouho","dluhopis","dnes","dobro","dobytek","docent","dochutit","dodnes","dohled","dohoda","dohra","dojem","dojnice","doklad","dokola","doktor","dokument","dolar","doleva","dolina","doma","dominant","domluvit","domov","donutit","dopad","dopis","doplnit","doposud","doprovod","dopustit","dorazit","dorost","dort","dosah","doslov","dostatek","dosud","dosyta","dotaz","dotek","dotknout","doufat","doutnat","dovozce","dozadu","doznat","dozorce","drahota","drak","dramatik","dravec","draze","drdol","drobnost","drogerie","drozd","drsnost","drtit","drzost","duben","duchovno","dudek","duha","duhovka","dusit","dusno","dutost","dvojice","dvorec","dynamit","ekolog","ekonomie","elektron","elipsa","email","emise","emoce","empatie","epizoda","epocha","epopej","epos","esej","esence","eskorta","eskymo","etiketa","euforie","evoluce","exekuce","exkurze","expedice","exploze","export","extrakt","facka","fajfka","fakulta","fanatik","fantazie","farmacie","favorit","fazole","federace","fejeton","fenka","fialka","figurant","filozof","filtr","finance","finta","fixace","fjord","flanel","flirt","flotila","fond","fosfor","fotbal","fotka","foton","frakce","freska","fronta","fukar","funkce","fyzika","galeje","garant","genetika","geolog","gilotina","glazura","glejt","golem","golfista","gotika","graf","gramofon","granule","grep","gril","grog","groteska","guma","hadice","hadr","hala","halenka","hanba","hanopis","harfa","harpuna","havran","hebkost","hejkal","hejno","hejtman","hektar","helma","hematom","herec","herna","heslo","hezky","historik","hladovka","hlasivky","hlava","hledat","hlen","hlodavec","hloh","hloupost","hltat","hlubina","hluchota","hmat","hmota","hmyz","hnis","hnojivo","hnout","hoblina","hoboj","hoch","hodiny","hodlat","hodnota","hodovat","hojnost","hokej","holinka","holka","holub","homole","honitba","honorace","horal","horda","horizont","horko","horlivec","hormon","hornina","horoskop","horstvo","hospoda","hostina","hotovost","houba","houf","houpat","houska","hovor","hradba","hranice","hravost","hrazda","hrbolek","hrdina","hrdlo","hrdost","hrnek","hrobka","hromada","hrot","hrouda","hrozen","hrstka","hrubost","hryzat","hubenost","hubnout","hudba","hukot","humr","husita","hustota","hvozd","hybnost","hydrant","hygiena","hymna","hysterik","idylka","ihned","ikona","iluze","imunita","infekce","inflace","inkaso","inovace","inspekce","internet","invalida","investor","inzerce","ironie","jablko","jachta","jahoda","jakmile","jakost","jalovec","jantar","jarmark","jaro","jasan","jasno","jatka","javor","jazyk","jedinec","jedle","jednatel","jehlan","jekot","jelen","jelito","jemnost","jenom","jepice","jeseter","jevit","jezdec","jezero","jinak","jindy","jinoch","jiskra","jistota","jitrnice","jizva","jmenovat","jogurt","jurta","kabaret","kabel","kabinet","kachna","kadet","kadidlo","kahan","kajak","kajuta","kakao","kaktus","kalamita","kalhoty","kalibr","kalnost","kamera","kamkoliv","kamna","kanibal","kanoe","kantor","kapalina","kapela","kapitola","kapka","kaple","kapota","kapr","kapusta","kapybara","karamel","karotka","karton","kasa","katalog","katedra","kauce","kauza","kavalec","kazajka","kazeta","kazivost","kdekoliv","kdesi","kedluben","kemp","keramika","kino","klacek","kladivo","klam","klapot","klasika","klaun","klec","klenba","klepat","klesnout","klid","klima","klisna","klobouk","klokan","klopa","kloub","klubovna","klusat","kluzkost","kmen","kmitat","kmotr","kniha","knot","koalice","koberec","kobka","kobliha","kobyla","kocour","kohout","kojenec","kokos","koktejl","kolaps","koleda","kolize","kolo","komando","kometa","komik","komnata","komora","kompas","komunita","konat","koncept","kondice","konec","konfese","kongres","konina","konkurs","kontakt","konzerva","kopanec","kopie","kopnout","koprovka","korbel","korektor","kormidlo","koroptev","korpus","koruna","koryto","korzet","kosatec","kostka","kotel","kotleta","kotoul","koukat","koupelna","kousek","kouzlo","kovboj","koza","kozoroh","krabice","krach","krajina","kralovat","krasopis","kravata","kredit","krejcar","kresba","kreveta","kriket","kritik","krize","krkavec","krmelec","krmivo","krocan","krok","kronika","kropit","kroupa","krovka","krtek","kruhadlo","krupice","krutost","krvinka","krychle","krypta","krystal","kryt","kudlanka","kufr","kujnost","kukla","kulajda","kulich","kulka","kulomet","kultura","kuna","kupodivu","kurt","kurzor","kutil","kvalita","kvasinka","kvestor","kynolog","kyselina","kytara","kytice","kytka","kytovec","kyvadlo","labrador","lachtan","ladnost","laik","lakomec","lamela","lampa","lanovka","lasice","laso","lastura","latinka","lavina","lebka","leckdy","leden","lednice","ledovka","ledvina","legenda","legie","legrace","lehce","lehkost","lehnout","lektvar","lenochod","lentilka","lepenka","lepidlo","letadlo","letec","letmo","letokruh","levhart","levitace","levobok","libra","lichotka","lidojed","lidskost","lihovina","lijavec","lilek","limetka","linie","linka","linoleum","listopad","litina","litovat","lobista","lodivod","logika","logoped","lokalita","loket","lomcovat","lopata","lopuch","lord","losos","lotr","loudal","louh","louka","louskat","lovec","lstivost","lucerna","lucifer","lump","lusk","lustrace","lvice","lyra","lyrika","lysina","madam","madlo","magistr","mahagon","majetek","majitel","majorita","makak","makovice","makrela","malba","malina","malovat","malvice","maminka","mandle","manko","marnost","masakr","maskot","masopust","matice","matrika","maturita","mazanec","mazivo","mazlit","mazurka","mdloba","mechanik","meditace","medovina","melasa","meloun","mentolka","metla","metoda","metr","mezera","migrace","mihnout","mihule","mikina","mikrofon","milenec","milimetr","milost","mimika","mincovna","minibar","minomet","minulost","miska","mistr","mixovat","mladost","mlha","mlhovina","mlok","mlsat","mluvit","mnich","mnohem","mobil","mocnost","modelka","modlitba","mohyla","mokro","molekula","momentka","monarcha","monokl","monstrum","montovat","monzun","mosaz","moskyt","most","motivace","motorka","motyka","moucha","moudrost","mozaika","mozek","mozol","mramor","mravenec","mrkev","mrtvola","mrzet","mrzutost","mstitel","mudrc","muflon","mulat","mumie","munice","muset","mutace","muzeum","muzikant","myslivec","mzda","nabourat","nachytat","nadace","nadbytek","nadhoz","nadobro","nadpis","nahlas","nahnat","nahodile","nahradit","naivita","najednou","najisto","najmout","naklonit","nakonec","nakrmit","nalevo","namazat","namluvit","nanometr","naoko","naopak","naostro","napadat","napevno","naplnit","napnout","naposled","naprosto","narodit","naruby","narychlo","nasadit","nasekat","naslepo","nastat","natolik","navenek","navrch","navzdory","nazvat","nebe","nechat","necky","nedaleko","nedbat","neduh","negace","nehet","nehoda","nejen","nejprve","neklid","nelibost","nemilost","nemoc","neochota","neonka","nepokoj","nerost","nerv","nesmysl","nesoulad","netvor","neuron","nevina","nezvykle","nicota","nijak","nikam","nikdy","nikl","nikterak","nitro","nocleh","nohavice","nominace","nora","norek","nositel","nosnost","nouze","noviny","novota","nozdra","nuda","nudle","nuget","nutit","nutnost","nutrie","nymfa","obal","obarvit","obava","obdiv","obec","obehnat","obejmout","obezita","obhajoba","obilnice","objasnit","objekt","obklopit","oblast","oblek","obliba","obloha","obluda","obnos","obohatit","obojek","obout","obrazec","obrna","obruba","obrys","obsah","obsluha","obstarat","obuv","obvaz","obvinit","obvod","obvykle","obyvatel","obzor","ocas","ocel","ocenit","ochladit","ochota","ochrana","ocitnout","odboj","odbyt","odchod","odcizit","odebrat","odeslat","odevzdat","odezva","odhadce","odhodit","odjet","odjinud","odkaz","odkoupit","odliv","odluka","odmlka","odolnost","odpad","odpis","odplout","odpor","odpustit","odpykat","odrazka","odsoudit","odstup","odsun","odtok","odtud","odvaha","odveta","odvolat","odvracet","odznak","ofina","ofsajd","ohlas","ohnisko","ohrada","ohrozit","ohryzek","okap","okenice","oklika","okno","okouzlit","okovy","okrasa","okres","okrsek","okruh","okupant","okurka","okusit","olejnina","olizovat","omak","omeleta","omezit","omladina","omlouvat","omluva","omyl","onehdy","opakovat","opasek","operace","opice","opilost","opisovat","opora","opozice","opravdu","oproti","orbital","orchestr","orgie","orlice","orloj","ortel","osada","oschnout","osika","osivo","oslava","oslepit","oslnit","oslovit","osnova","osoba","osolit","ospalec","osten","ostraha","ostuda","ostych","osvojit","oteplit","otisk","otop","otrhat","otrlost","otrok","otruby","otvor","ovanout","ovar","oves","ovlivnit","ovoce","oxid","ozdoba","pachatel","pacient","padouch","pahorek","pakt","palanda","palec","palivo","paluba","pamflet","pamlsek","panenka","panika","panna","panovat","panstvo","pantofle","paprika","parketa","parodie","parta","paruka","paryba","paseka","pasivita","pastelka","patent","patrona","pavouk","pazneht","pazourek","pecka","pedagog","pejsek","peklo","peloton","penalta","pendrek","penze","periskop","pero","pestrost","petarda","petice","petrolej","pevnina","pexeso","pianista","piha","pijavice","pikle","piknik","pilina","pilnost","pilulka","pinzeta","pipeta","pisatel","pistole","pitevna","pivnice","pivovar","placenta","plakat","plamen","planeta","plastika","platit","plavidlo","plaz","plech","plemeno","plenta","ples","pletivo","plevel","plivat","plnit","plno","plocha","plodina","plomba","plout","pluk","plyn","pobavit","pobyt","pochod","pocit","poctivec","podat","podcenit","podepsat","podhled","podivit","podklad","podmanit","podnik","podoba","podpora","podraz","podstata","podvod","podzim","poezie","pohanka","pohnutka","pohovor","pohroma","pohyb","pointa","pojistka","pojmout","pokazit","pokles","pokoj","pokrok","pokuta","pokyn","poledne","polibek","polknout","poloha","polynom","pomalu","pominout","pomlka","pomoc","pomsta","pomyslet","ponechat","ponorka","ponurost","popadat","popel","popisek","poplach","poprosit","popsat","popud","poradce","porce","porod","porucha","poryv","posadit","posed","posila","poskok","poslanec","posoudit","pospolu","postava","posudek","posyp","potah","potkan","potlesk","potomek","potrava","potupa","potvora","poukaz","pouto","pouzdro","povaha","povidla","povlak","povoz","povrch","povstat","povyk","povzdech","pozdrav","pozemek","poznatek","pozor","pozvat","pracovat","prahory","praktika","prales","praotec","praporek","prase","pravda","princip","prkno","probudit","procento","prodej","profese","prohra","projekt","prolomit","promile","pronikat","propad","prorok","prosba","proton","proutek","provaz","prskavka","prsten","prudkost","prut","prvek","prvohory","psanec","psovod","pstruh","ptactvo","puberta","puch","pudl","pukavec","puklina","pukrle","pult","pumpa","punc","pupen","pusa","pusinka","pustina","putovat","putyka","pyramida","pysk","pytel","racek","rachot","radiace","radnice","radon","raft","ragby","raketa","rakovina","rameno","rampouch","rande","rarach","rarita","rasovna","rastr","ratolest","razance","razidlo","reagovat","reakce","recept","redaktor","referent","reflex","rejnok","reklama","rekord","rekrut","rektor","reputace","revize","revma","revolver","rezerva","riskovat","riziko","robotika","rodokmen","rohovka","rokle","rokoko","romaneto","ropovod","ropucha","rorejs","rosol","rostlina","rotmistr","rotoped","rotunda","roubenka","roucho","roup","roura","rovina","rovnice","rozbor","rozchod","rozdat","rozeznat","rozhodce","rozinka","rozjezd","rozkaz","rozloha","rozmar","rozpad","rozruch","rozsah","roztok","rozum","rozvod","rubrika","ruchadlo","rukavice","rukopis","ryba","rybolov","rychlost","rydlo","rypadlo","rytina","ryzost","sadista","sahat","sako","samec","samizdat","samota","sanitka","sardinka","sasanka","satelit","sazba","sazenice","sbor","schovat","sebranka","secese","sedadlo","sediment","sedlo","sehnat","sejmout","sekera","sekta","sekunda","sekvoje","semeno","seno","servis","sesadit","seshora","seskok","seslat","sestra","sesuv","sesypat","setba","setina","setkat","setnout","setrvat","sever","seznam","shoda","shrnout","sifon","silnice","sirka","sirotek","sirup","situace","skafandr","skalisko","skanzen","skaut","skeptik","skica","skladba","sklenice","sklo","skluz","skoba","skokan","skoro","skripta","skrz","skupina","skvost","skvrna","slabika","sladidlo","slanina","slast","slavnost","sledovat","slepec","sleva","slezina","slib","slina","sliznice","slon","sloupek","slovo","sluch","sluha","slunce","slupka","slza","smaragd","smetana","smilstvo","smlouva","smog","smrad","smrk","smrtka","smutek","smysl","snad","snaha","snob","sobota","socha","sodovka","sokol","sopka","sotva","souboj","soucit","soudce","souhlas","soulad","soumrak","souprava","soused","soutok","souviset","spalovna","spasitel","spis","splav","spodek","spojenec","spolu","sponzor","spornost","spousta","sprcha","spustit","sranda","sraz","srdce","srna","srnec","srovnat","srpen","srst","srub","stanice","starosta","statika","stavba","stehno","stezka","stodola","stolek","stopa","storno","stoupat","strach","stres","strhnout","strom","struna","studna","stupnice","stvol","styk","subjekt","subtropy","suchar","sudost","sukno","sundat","sunout","surikata","surovina","svah","svalstvo","svetr","svatba","svazek","svisle","svitek","svoboda","svodidlo","svorka","svrab","sykavka","sykot","synek","synovec","sypat","sypkost","syrovost","sysel","sytost","tabletka","tabule","tahoun","tajemno","tajfun","tajga","tajit","tajnost","taktika","tamhle","tampon","tancovat","tanec","tanker","tapeta","tavenina","tazatel","technika","tehdy","tekutina","telefon","temnota","tendence","tenista","tenor","teplota","tepna","teprve","terapie","termoska","textil","ticho","tiskopis","titulek","tkadlec","tkanina","tlapka","tleskat","tlukot","tlupa","tmel","toaleta","topinka","topol","torzo","touha","toulec","tradice","traktor","tramp","trasa","traverza","trefit","trest","trezor","trhavina","trhlina","trochu","trojice","troska","trouba","trpce","trpitel","trpkost","trubec","truchlit","truhlice","trus","trvat","tudy","tuhnout","tuhost","tundra","turista","turnaj","tuzemsko","tvaroh","tvorba","tvrdost","tvrz","tygr","tykev","ubohost","uboze","ubrat","ubrousek","ubrus","ubytovna","ucho","uctivost","udivit","uhradit","ujednat","ujistit","ujmout","ukazatel","uklidnit","uklonit","ukotvit","ukrojit","ulice","ulita","ulovit","umyvadlo","unavit","uniforma","uniknout","upadnout","uplatnit","uplynout","upoutat","upravit","uran","urazit","usednout","usilovat","usmrtit","usnadnit","usnout","usoudit","ustlat","ustrnout","utahovat","utkat","utlumit","utonout","utopenec","utrousit","uvalit","uvolnit","uvozovka","uzdravit","uzel","uzenina","uzlina","uznat","vagon","valcha","valoun","vana","vandal","vanilka","varan","varhany","varovat","vcelku","vchod","vdova","vedro","vegetace","vejce","velbloud","veletrh","velitel","velmoc","velryba","venkov","veranda","verze","veselka","veskrze","vesnice","vespodu","vesta","veterina","veverka","vibrace","vichr","videohra","vidina","vidle","vila","vinice","viset","vitalita","vize","vizitka","vjezd","vklad","vkus","vlajka","vlak","vlasec","vlevo","vlhkost","vliv","vlnovka","vloupat","vnucovat","vnuk","voda","vodivost","vodoznak","vodstvo","vojensky","vojna","vojsko","volant","volba","volit","volno","voskovka","vozidlo","vozovna","vpravo","vrabec","vracet","vrah","vrata","vrba","vrcholek","vrhat","vrstva","vrtule","vsadit","vstoupit","vstup","vtip","vybavit","vybrat","vychovat","vydat","vydra","vyfotit","vyhledat","vyhnout","vyhodit","vyhradit","vyhubit","vyjasnit","vyjet","vyjmout","vyklopit","vykonat","vylekat","vymazat","vymezit","vymizet","vymyslet","vynechat","vynikat","vynutit","vypadat","vyplatit","vypravit","vypustit","vyrazit","vyrovnat","vyrvat","vyslovit","vysoko","vystavit","vysunout","vysypat","vytasit","vytesat","vytratit","vyvinout","vyvolat","vyvrhel","vyzdobit","vyznat","vzadu","vzbudit","vzchopit","vzdor","vzduch","vzdychat","vzestup","vzhledem","vzkaz","vzlykat","vznik","vzorek","vzpoura","vztah","vztek","xylofon","zabrat","zabydlet","zachovat","zadarmo","zadusit","zafoukat","zahltit","zahodit","zahrada","zahynout","zajatec","zajet","zajistit","zaklepat","zakoupit","zalepit","zamezit","zamotat","zamyslet","zanechat","zanikat","zaplatit","zapojit","zapsat","zarazit","zastavit","zasunout","zatajit","zatemnit","zatknout","zaujmout","zavalit","zavelet","zavinit","zavolat","zavrtat","zazvonit","zbavit","zbrusu","zbudovat","zbytek","zdaleka","zdarma","zdatnost","zdivo","zdobit","zdroj","zdvih","zdymadlo","zelenina","zeman","zemina","zeptat","zezadu","zezdola","zhatit","zhltnout","zhluboka","zhotovit","zhruba","zima","zimnice","zjemnit","zklamat","zkoumat","zkratka","zkumavka","zlato","zlehka","zloba","zlom","zlost","zlozvyk","zmapovat","zmar","zmatek","zmije","zmizet","zmocnit","zmodrat","zmrzlina","zmutovat","znak","znalost","znamenat","znovu","zobrazit","zotavit","zoubek","zoufale","zplodit","zpomalit","zprava","zprostit","zprudka","zprvu","zrada","zranit","zrcadlo","zrnitost","zrno","zrovna","zrychlit","zrzavost","zticha","ztratit","zubovina","zubr","zvednout","zvenku","zvesela","zvon","zvrat","zvukovod","zvyk"]')},4573:module=>{"use strict";module.exports=JSON.parse('["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]')},1848:module=>{"use strict";module.exports=JSON.parse('["abaisser","abandon","abdiquer","abeille","abolir","aborder","aboutir","aboyer","abrasif","abreuver","abriter","abroger","abrupt","absence","absolu","absurde","abusif","abyssal","académie","acajou","acarien","accabler","accepter","acclamer","accolade","accroche","accuser","acerbe","achat","acheter","aciduler","acier","acompte","acquérir","acronyme","acteur","actif","actuel","adepte","adéquat","adhésif","adjectif","adjuger","admettre","admirer","adopter","adorer","adoucir","adresse","adroit","adulte","adverbe","aérer","aéronef","affaire","affecter","affiche","affreux","affubler","agacer","agencer","agile","agiter","agrafer","agréable","agrume","aider","aiguille","ailier","aimable","aisance","ajouter","ajuster","alarmer","alchimie","alerte","algèbre","algue","aliéner","aliment","alléger","alliage","allouer","allumer","alourdir","alpaga","altesse","alvéole","amateur","ambigu","ambre","aménager","amertume","amidon","amiral","amorcer","amour","amovible","amphibie","ampleur","amusant","analyse","anaphore","anarchie","anatomie","ancien","anéantir","angle","angoisse","anguleux","animal","annexer","annonce","annuel","anodin","anomalie","anonyme","anormal","antenne","antidote","anxieux","apaiser","apéritif","aplanir","apologie","appareil","appeler","apporter","appuyer","aquarium","aqueduc","arbitre","arbuste","ardeur","ardoise","argent","arlequin","armature","armement","armoire","armure","arpenter","arracher","arriver","arroser","arsenic","artériel","article","aspect","asphalte","aspirer","assaut","asservir","assiette","associer","assurer","asticot","astre","astuce","atelier","atome","atrium","atroce","attaque","attentif","attirer","attraper","aubaine","auberge","audace","audible","augurer","aurore","automne","autruche","avaler","avancer","avarice","avenir","averse","aveugle","aviateur","avide","avion","aviser","avoine","avouer","avril","axial","axiome","badge","bafouer","bagage","baguette","baignade","balancer","balcon","baleine","balisage","bambin","bancaire","bandage","banlieue","bannière","banquier","barbier","baril","baron","barque","barrage","bassin","bastion","bataille","bateau","batterie","baudrier","bavarder","belette","bélier","belote","bénéfice","berceau","berger","berline","bermuda","besace","besogne","bétail","beurre","biberon","bicycle","bidule","bijou","bilan","bilingue","billard","binaire","biologie","biopsie","biotype","biscuit","bison","bistouri","bitume","bizarre","blafard","blague","blanchir","blessant","blinder","blond","bloquer","blouson","bobard","bobine","boire","boiser","bolide","bonbon","bondir","bonheur","bonifier","bonus","bordure","borne","botte","boucle","boueux","bougie","boulon","bouquin","bourse","boussole","boutique","boxeur","branche","brasier","brave","brebis","brèche","breuvage","bricoler","brigade","brillant","brioche","brique","brochure","broder","bronzer","brousse","broyeur","brume","brusque","brutal","bruyant","buffle","buisson","bulletin","bureau","burin","bustier","butiner","butoir","buvable","buvette","cabanon","cabine","cachette","cadeau","cadre","caféine","caillou","caisson","calculer","calepin","calibre","calmer","calomnie","calvaire","camarade","caméra","camion","campagne","canal","caneton","canon","cantine","canular","capable","caporal","caprice","capsule","capter","capuche","carabine","carbone","caresser","caribou","carnage","carotte","carreau","carton","cascade","casier","casque","cassure","causer","caution","cavalier","caverne","caviar","cédille","ceinture","céleste","cellule","cendrier","censurer","central","cercle","cérébral","cerise","cerner","cerveau","cesser","chagrin","chaise","chaleur","chambre","chance","chapitre","charbon","chasseur","chaton","chausson","chavirer","chemise","chenille","chéquier","chercher","cheval","chien","chiffre","chignon","chimère","chiot","chlorure","chocolat","choisir","chose","chouette","chrome","chute","cigare","cigogne","cimenter","cinéma","cintrer","circuler","cirer","cirque","citerne","citoyen","citron","civil","clairon","clameur","claquer","classe","clavier","client","cligner","climat","clivage","cloche","clonage","cloporte","cobalt","cobra","cocasse","cocotier","coder","codifier","coffre","cogner","cohésion","coiffer","coincer","colère","colibri","colline","colmater","colonel","combat","comédie","commande","compact","concert","conduire","confier","congeler","connoter","consonne","contact","convexe","copain","copie","corail","corbeau","cordage","corniche","corpus","correct","cortège","cosmique","costume","coton","coude","coupure","courage","couteau","couvrir","coyote","crabe","crainte","cravate","crayon","créature","créditer","crémeux","creuser","crevette","cribler","crier","cristal","critère","croire","croquer","crotale","crucial","cruel","crypter","cubique","cueillir","cuillère","cuisine","cuivre","culminer","cultiver","cumuler","cupide","curatif","curseur","cyanure","cycle","cylindre","cynique","daigner","damier","danger","danseur","dauphin","débattre","débiter","déborder","débrider","débutant","décaler","décembre","déchirer","décider","déclarer","décorer","décrire","décupler","dédale","déductif","déesse","défensif","défiler","défrayer","dégager","dégivrer","déglutir","dégrafer","déjeuner","délice","déloger","demander","demeurer","démolir","dénicher","dénouer","dentelle","dénuder","départ","dépenser","déphaser","déplacer","déposer","déranger","dérober","désastre","descente","désert","désigner","désobéir","dessiner","destrier","détacher","détester","détourer","détresse","devancer","devenir","deviner","devoir","diable","dialogue","diamant","dicter","différer","digérer","digital","digne","diluer","dimanche","diminuer","dioxyde","directif","diriger","discuter","disposer","dissiper","distance","divertir","diviser","docile","docteur","dogme","doigt","domaine","domicile","dompter","donateur","donjon","donner","dopamine","dortoir","dorure","dosage","doseur","dossier","dotation","douanier","double","douceur","douter","doyen","dragon","draper","dresser","dribbler","droiture","duperie","duplexe","durable","durcir","dynastie","éblouir","écarter","écharpe","échelle","éclairer","éclipse","éclore","écluse","école","économie","écorce","écouter","écraser","écrémer","écrivain","écrou","écume","écureuil","édifier","éduquer","effacer","effectif","effigie","effort","effrayer","effusion","égaliser","égarer","éjecter","élaborer","élargir","électron","élégant","éléphant","élève","éligible","élitisme","éloge","élucider","éluder","emballer","embellir","embryon","émeraude","émission","emmener","émotion","émouvoir","empereur","employer","emporter","emprise","émulsion","encadrer","enchère","enclave","encoche","endiguer","endosser","endroit","enduire","énergie","enfance","enfermer","enfouir","engager","engin","englober","énigme","enjamber","enjeu","enlever","ennemi","ennuyeux","enrichir","enrobage","enseigne","entasser","entendre","entier","entourer","entraver","énumérer","envahir","enviable","envoyer","enzyme","éolien","épaissir","épargne","épatant","épaule","épicerie","épidémie","épier","épilogue","épine","épisode","épitaphe","époque","épreuve","éprouver","épuisant","équerre","équipe","ériger","érosion","erreur","éruption","escalier","espadon","espèce","espiègle","espoir","esprit","esquiver","essayer","essence","essieu","essorer","estime","estomac","estrade","étagère","étaler","étanche","étatique","éteindre","étendoir","éternel","éthanol","éthique","ethnie","étirer","étoffer","étoile","étonnant","étourdir","étrange","étroit","étude","euphorie","évaluer","évasion","éventail","évidence","éviter","évolutif","évoquer","exact","exagérer","exaucer","exceller","excitant","exclusif","excuse","exécuter","exemple","exercer","exhaler","exhorter","exigence","exiler","exister","exotique","expédier","explorer","exposer","exprimer","exquis","extensif","extraire","exulter","fable","fabuleux","facette","facile","facture","faiblir","falaise","fameux","famille","farceur","farfelu","farine","farouche","fasciner","fatal","fatigue","faucon","fautif","faveur","favori","fébrile","féconder","fédérer","félin","femme","fémur","fendoir","féodal","fermer","féroce","ferveur","festival","feuille","feutre","février","fiasco","ficeler","fictif","fidèle","figure","filature","filetage","filière","filleul","filmer","filou","filtrer","financer","finir","fiole","firme","fissure","fixer","flairer","flamme","flasque","flatteur","fléau","flèche","fleur","flexion","flocon","flore","fluctuer","fluide","fluvial","folie","fonderie","fongible","fontaine","forcer","forgeron","formuler","fortune","fossile","foudre","fougère","fouiller","foulure","fourmi","fragile","fraise","franchir","frapper","frayeur","frégate","freiner","frelon","frémir","frénésie","frère","friable","friction","frisson","frivole","froid","fromage","frontal","frotter","fruit","fugitif","fuite","fureur","furieux","furtif","fusion","futur","gagner","galaxie","galerie","gambader","garantir","gardien","garnir","garrigue","gazelle","gazon","géant","gélatine","gélule","gendarme","général","génie","genou","gentil","géologie","géomètre","géranium","germe","gestuel","geyser","gibier","gicler","girafe","givre","glace","glaive","glisser","globe","gloire","glorieux","golfeur","gomme","gonfler","gorge","gorille","goudron","gouffre","goulot","goupille","gourmand","goutte","graduel","graffiti","graine","grand","grappin","gratuit","gravir","grenat","griffure","griller","grimper","grogner","gronder","grotte","groupe","gruger","grutier","gruyère","guépard","guerrier","guide","guimauve","guitare","gustatif","gymnaste","gyrostat","habitude","hachoir","halte","hameau","hangar","hanneton","haricot","harmonie","harpon","hasard","hélium","hématome","herbe","hérisson","hermine","héron","hésiter","heureux","hiberner","hibou","hilarant","histoire","hiver","homard","hommage","homogène","honneur","honorer","honteux","horde","horizon","horloge","hormone","horrible","houleux","housse","hublot","huileux","humain","humble","humide","humour","hurler","hydromel","hygiène","hymne","hypnose","idylle","ignorer","iguane","illicite","illusion","image","imbiber","imiter","immense","immobile","immuable","impact","impérial","implorer","imposer","imprimer","imputer","incarner","incendie","incident","incliner","incolore","indexer","indice","inductif","inédit","ineptie","inexact","infini","infliger","informer","infusion","ingérer","inhaler","inhiber","injecter","injure","innocent","inoculer","inonder","inscrire","insecte","insigne","insolite","inspirer","instinct","insulter","intact","intense","intime","intrigue","intuitif","inutile","invasion","inventer","inviter","invoquer","ironique","irradier","irréel","irriter","isoler","ivoire","ivresse","jaguar","jaillir","jambe","janvier","jardin","jauger","jaune","javelot","jetable","jeton","jeudi","jeunesse","joindre","joncher","jongler","joueur","jouissif","journal","jovial","joyau","joyeux","jubiler","jugement","junior","jupon","juriste","justice","juteux","juvénile","kayak","kimono","kiosque","label","labial","labourer","lacérer","lactose","lagune","laine","laisser","laitier","lambeau","lamelle","lampe","lanceur","langage","lanterne","lapin","largeur","larme","laurier","lavabo","lavoir","lecture","légal","léger","légume","lessive","lettre","levier","lexique","lézard","liasse","libérer","libre","licence","licorne","liège","lièvre","ligature","ligoter","ligue","limer","limite","limonade","limpide","linéaire","lingot","lionceau","liquide","lisière","lister","lithium","litige","littoral","livreur","logique","lointain","loisir","lombric","loterie","louer","lourd","loutre","louve","loyal","lubie","lucide","lucratif","lueur","lugubre","luisant","lumière","lunaire","lundi","luron","lutter","luxueux","machine","magasin","magenta","magique","maigre","maillon","maintien","mairie","maison","majorer","malaxer","maléfice","malheur","malice","mallette","mammouth","mandater","maniable","manquant","manteau","manuel","marathon","marbre","marchand","mardi","maritime","marqueur","marron","marteler","mascotte","massif","matériel","matière","matraque","maudire","maussade","mauve","maximal","méchant","méconnu","médaille","médecin","méditer","méduse","meilleur","mélange","mélodie","membre","mémoire","menacer","mener","menhir","mensonge","mentor","mercredi","mérite","merle","messager","mesure","métal","météore","méthode","métier","meuble","miauler","microbe","miette","mignon","migrer","milieu","million","mimique","mince","minéral","minimal","minorer","minute","miracle","miroiter","missile","mixte","mobile","moderne","moelleux","mondial","moniteur","monnaie","monotone","monstre","montagne","monument","moqueur","morceau","morsure","mortier","moteur","motif","mouche","moufle","moulin","mousson","mouton","mouvant","multiple","munition","muraille","murène","murmure","muscle","muséum","musicien","mutation","muter","mutuel","myriade","myrtille","mystère","mythique","nageur","nappe","narquois","narrer","natation","nation","nature","naufrage","nautique","navire","nébuleux","nectar","néfaste","négation","négliger","négocier","neige","nerveux","nettoyer","neurone","neutron","neveu","niche","nickel","nitrate","niveau","noble","nocif","nocturne","noirceur","noisette","nomade","nombreux","nommer","normatif","notable","notifier","notoire","nourrir","nouveau","novateur","novembre","novice","nuage","nuancer","nuire","nuisible","numéro","nuptial","nuque","nutritif","obéir","objectif","obliger","obscur","observer","obstacle","obtenir","obturer","occasion","occuper","océan","octobre","octroyer","octupler","oculaire","odeur","odorant","offenser","officier","offrir","ogive","oiseau","oisillon","olfactif","olivier","ombrage","omettre","onctueux","onduler","onéreux","onirique","opale","opaque","opérer","opinion","opportun","opprimer","opter","optique","orageux","orange","orbite","ordonner","oreille","organe","orgueil","orifice","ornement","orque","ortie","osciller","osmose","ossature","otarie","ouragan","ourson","outil","outrager","ouvrage","ovation","oxyde","oxygène","ozone","paisible","palace","palmarès","palourde","palper","panache","panda","pangolin","paniquer","panneau","panorama","pantalon","papaye","papier","papoter","papyrus","paradoxe","parcelle","paresse","parfumer","parler","parole","parrain","parsemer","partager","parure","parvenir","passion","pastèque","paternel","patience","patron","pavillon","pavoiser","payer","paysage","peigne","peintre","pelage","pélican","pelle","pelouse","peluche","pendule","pénétrer","pénible","pensif","pénurie","pépite","péplum","perdrix","perforer","période","permuter","perplexe","persil","perte","peser","pétale","petit","pétrir","peuple","pharaon","phobie","phoque","photon","phrase","physique","piano","pictural","pièce","pierre","pieuvre","pilote","pinceau","pipette","piquer","pirogue","piscine","piston","pivoter","pixel","pizza","placard","plafond","plaisir","planer","plaque","plastron","plateau","pleurer","plexus","pliage","plomb","plonger","pluie","plumage","pochette","poésie","poète","pointe","poirier","poisson","poivre","polaire","policier","pollen","polygone","pommade","pompier","ponctuel","pondérer","poney","portique","position","posséder","posture","potager","poteau","potion","pouce","poulain","poumon","pourpre","poussin","pouvoir","prairie","pratique","précieux","prédire","préfixe","prélude","prénom","présence","prétexte","prévoir","primitif","prince","prison","priver","problème","procéder","prodige","profond","progrès","proie","projeter","prologue","promener","propre","prospère","protéger","prouesse","proverbe","prudence","pruneau","psychose","public","puceron","puiser","pulpe","pulsar","punaise","punitif","pupitre","purifier","puzzle","pyramide","quasar","querelle","question","quiétude","quitter","quotient","racine","raconter","radieux","ragondin","raideur","raisin","ralentir","rallonge","ramasser","rapide","rasage","ratisser","ravager","ravin","rayonner","réactif","réagir","réaliser","réanimer","recevoir","réciter","réclamer","récolter","recruter","reculer","recycler","rédiger","redouter","refaire","réflexe","réformer","refrain","refuge","régalien","région","réglage","régulier","réitérer","rejeter","rejouer","relatif","relever","relief","remarque","remède","remise","remonter","remplir","remuer","renard","renfort","renifler","renoncer","rentrer","renvoi","replier","reporter","reprise","reptile","requin","réserve","résineux","résoudre","respect","rester","résultat","rétablir","retenir","réticule","retomber","retracer","réunion","réussir","revanche","revivre","révolte","révulsif","richesse","rideau","rieur","rigide","rigoler","rincer","riposter","risible","risque","rituel","rival","rivière","rocheux","romance","rompre","ronce","rondin","roseau","rosier","rotatif","rotor","rotule","rouge","rouille","rouleau","routine","royaume","ruban","rubis","ruche","ruelle","rugueux","ruiner","ruisseau","ruser","rustique","rythme","sabler","saboter","sabre","sacoche","safari","sagesse","saisir","salade","salive","salon","saluer","samedi","sanction","sanglier","sarcasme","sardine","saturer","saugrenu","saumon","sauter","sauvage","savant","savonner","scalpel","scandale","scélérat","scénario","sceptre","schéma","science","scinder","score","scrutin","sculpter","séance","sécable","sécher","secouer","sécréter","sédatif","séduire","seigneur","séjour","sélectif","semaine","sembler","semence","séminal","sénateur","sensible","sentence","séparer","séquence","serein","sergent","sérieux","serrure","sérum","service","sésame","sévir","sevrage","sextuple","sidéral","siècle","siéger","siffler","sigle","signal","silence","silicium","simple","sincère","sinistre","siphon","sirop","sismique","situer","skier","social","socle","sodium","soigneux","soldat","soleil","solitude","soluble","sombre","sommeil","somnoler","sonde","songeur","sonnette","sonore","sorcier","sortir","sosie","sottise","soucieux","soudure","souffle","soulever","soupape","source","soutirer","souvenir","spacieux","spatial","spécial","sphère","spiral","stable","station","sternum","stimulus","stipuler","strict","studieux","stupeur","styliste","sublime","substrat","subtil","subvenir","succès","sucre","suffixe","suggérer","suiveur","sulfate","superbe","supplier","surface","suricate","surmener","surprise","sursaut","survie","suspect","syllabe","symbole","symétrie","synapse","syntaxe","système","tabac","tablier","tactile","tailler","talent","talisman","talonner","tambour","tamiser","tangible","tapis","taquiner","tarder","tarif","tartine","tasse","tatami","tatouage","taupe","taureau","taxer","témoin","temporel","tenaille","tendre","teneur","tenir","tension","terminer","terne","terrible","tétine","texte","thème","théorie","thérapie","thorax","tibia","tiède","timide","tirelire","tiroir","tissu","titane","titre","tituber","toboggan","tolérant","tomate","tonique","tonneau","toponyme","torche","tordre","tornade","torpille","torrent","torse","tortue","totem","toucher","tournage","tousser","toxine","traction","trafic","tragique","trahir","train","trancher","travail","trèfle","tremper","trésor","treuil","triage","tribunal","tricoter","trilogie","triomphe","tripler","triturer","trivial","trombone","tronc","tropical","troupeau","tuile","tulipe","tumulte","tunnel","turbine","tuteur","tutoyer","tuyau","tympan","typhon","typique","tyran","ubuesque","ultime","ultrason","unanime","unifier","union","unique","unitaire","univers","uranium","urbain","urticant","usage","usine","usuel","usure","utile","utopie","vacarme","vaccin","vagabond","vague","vaillant","vaincre","vaisseau","valable","valise","vallon","valve","vampire","vanille","vapeur","varier","vaseux","vassal","vaste","vecteur","vedette","végétal","véhicule","veinard","véloce","vendredi","vénérer","venger","venimeux","ventouse","verdure","vérin","vernir","verrou","verser","vertu","veston","vétéran","vétuste","vexant","vexer","viaduc","viande","victoire","vidange","vidéo","vignette","vigueur","vilain","village","vinaigre","violon","vipère","virement","virtuose","virus","visage","viseur","vision","visqueux","visuel","vital","vitesse","viticole","vitrine","vivace","vivipare","vocation","voguer","voile","voisin","voiture","volaille","volcan","voltiger","volume","vorace","vortex","voter","vouloir","voyage","voyelle","wagon","xénon","yacht","zèbre","zénith","zeste","zoologie"]')},2841:module=>{"use strict";module.exports=JSON.parse('["abaco","abbaglio","abbinato","abete","abisso","abolire","abrasivo","abrogato","accadere","accenno","accusato","acetone","achille","acido","acqua","acre","acrilico","acrobata","acuto","adagio","addebito","addome","adeguato","aderire","adipe","adottare","adulare","affabile","affetto","affisso","affranto","aforisma","afoso","africano","agave","agente","agevole","aggancio","agire","agitare","agonismo","agricolo","agrumeto","aguzzo","alabarda","alato","albatro","alberato","albo","albume","alce","alcolico","alettone","alfa","algebra","aliante","alibi","alimento","allagato","allegro","allievo","allodola","allusivo","almeno","alogeno","alpaca","alpestre","altalena","alterno","alticcio","altrove","alunno","alveolo","alzare","amalgama","amanita","amarena","ambito","ambrato","ameba","america","ametista","amico","ammasso","ammenda","ammirare","ammonito","amore","ampio","ampliare","amuleto","anacardo","anagrafe","analista","anarchia","anatra","anca","ancella","ancora","andare","andrea","anello","angelo","angolare","angusto","anima","annegare","annidato","anno","annuncio","anonimo","anticipo","anzi","apatico","apertura","apode","apparire","appetito","appoggio","approdo","appunto","aprile","arabica","arachide","aragosta","araldica","arancio","aratura","arazzo","arbitro","archivio","ardito","arenile","argento","argine","arguto","aria","armonia","arnese","arredato","arringa","arrosto","arsenico","arso","artefice","arzillo","asciutto","ascolto","asepsi","asettico","asfalto","asino","asola","aspirato","aspro","assaggio","asse","assoluto","assurdo","asta","astenuto","astice","astratto","atavico","ateismo","atomico","atono","attesa","attivare","attorno","attrito","attuale","ausilio","austria","autista","autonomo","autunno","avanzato","avere","avvenire","avviso","avvolgere","azione","azoto","azzimo","azzurro","babele","baccano","bacino","baco","badessa","badilata","bagnato","baita","balcone","baldo","balena","ballata","balzano","bambino","bandire","baraonda","barbaro","barca","baritono","barlume","barocco","basilico","basso","batosta","battuto","baule","bava","bavosa","becco","beffa","belgio","belva","benda","benevole","benigno","benzina","bere","berlina","beta","bibita","bici","bidone","bifido","biga","bilancia","bimbo","binocolo","biologo","bipede","bipolare","birbante","birra","biscotto","bisesto","bisnonno","bisonte","bisturi","bizzarro","blando","blatta","bollito","bonifico","bordo","bosco","botanico","bottino","bozzolo","braccio","bradipo","brama","branca","bravura","bretella","brevetto","brezza","briglia","brillante","brindare","broccolo","brodo","bronzina","brullo","bruno","bubbone","buca","budino","buffone","buio","bulbo","buono","burlone","burrasca","bussola","busta","cadetto","caduco","calamaro","calcolo","calesse","calibro","calmo","caloria","cambusa","camerata","camicia","cammino","camola","campale","canapa","candela","cane","canino","canotto","cantina","capace","capello","capitolo","capogiro","cappero","capra","capsula","carapace","carcassa","cardo","carisma","carovana","carretto","cartolina","casaccio","cascata","caserma","caso","cassone","castello","casuale","catasta","catena","catrame","cauto","cavillo","cedibile","cedrata","cefalo","celebre","cellulare","cena","cenone","centesimo","ceramica","cercare","certo","cerume","cervello","cesoia","cespo","ceto","chela","chiaro","chicca","chiedere","chimera","china","chirurgo","chitarra","ciao","ciclismo","cifrare","cigno","cilindro","ciottolo","circa","cirrosi","citrico","cittadino","ciuffo","civetta","civile","classico","clinica","cloro","cocco","codardo","codice","coerente","cognome","collare","colmato","colore","colposo","coltivato","colza","coma","cometa","commando","comodo","computer","comune","conciso","condurre","conferma","congelare","coniuge","connesso","conoscere","consumo","continuo","convegno","coperto","copione","coppia","copricapo","corazza","cordata","coricato","cornice","corolla","corpo","corredo","corsia","cortese","cosmico","costante","cottura","covato","cratere","cravatta","creato","credere","cremoso","crescita","creta","criceto","crinale","crisi","critico","croce","cronaca","crostata","cruciale","crusca","cucire","cuculo","cugino","cullato","cupola","curatore","cursore","curvo","cuscino","custode","dado","daino","dalmata","damerino","daniela","dannoso","danzare","datato","davanti","davvero","debutto","decennio","deciso","declino","decollo","decreto","dedicato","definito","deforme","degno","delegare","delfino","delirio","delta","demenza","denotato","dentro","deposito","derapata","derivare","deroga","descritto","deserto","desiderio","desumere","detersivo","devoto","diametro","dicembre","diedro","difeso","diffuso","digerire","digitale","diluvio","dinamico","dinnanzi","dipinto","diploma","dipolo","diradare","dire","dirotto","dirupo","disagio","discreto","disfare","disgelo","disposto","distanza","disumano","dito","divano","divelto","dividere","divorato","doblone","docente","doganale","dogma","dolce","domato","domenica","dominare","dondolo","dono","dormire","dote","dottore","dovuto","dozzina","drago","druido","dubbio","dubitare","ducale","duna","duomo","duplice","duraturo","ebano","eccesso","ecco","eclissi","economia","edera","edicola","edile","editoria","educare","egemonia","egli","egoismo","egregio","elaborato","elargire","elegante","elencato","eletto","elevare","elfico","elica","elmo","elsa","eluso","emanato","emblema","emesso","emiro","emotivo","emozione","empirico","emulo","endemico","enduro","energia","enfasi","enoteca","entrare","enzima","epatite","epilogo","episodio","epocale","eppure","equatore","erario","erba","erboso","erede","eremita","erigere","ermetico","eroe","erosivo","errante","esagono","esame","esanime","esaudire","esca","esempio","esercito","esibito","esigente","esistere","esito","esofago","esortato","esoso","espanso","espresso","essenza","esso","esteso","estimare","estonia","estroso","esultare","etilico","etnico","etrusco","etto","euclideo","europa","evaso","evidenza","evitato","evoluto","evviva","fabbrica","faccenda","fachiro","falco","famiglia","fanale","fanfara","fango","fantasma","fare","farfalla","farinoso","farmaco","fascia","fastoso","fasullo","faticare","fato","favoloso","febbre","fecola","fede","fegato","felpa","feltro","femmina","fendere","fenomeno","fermento","ferro","fertile","fessura","festivo","fetta","feudo","fiaba","fiducia","fifa","figurato","filo","finanza","finestra","finire","fiore","fiscale","fisico","fiume","flacone","flamenco","flebo","flemma","florido","fluente","fluoro","fobico","focaccia","focoso","foderato","foglio","folata","folclore","folgore","fondente","fonetico","fonia","fontana","forbito","forchetta","foresta","formica","fornaio","foro","fortezza","forzare","fosfato","fosso","fracasso","frana","frassino","fratello","freccetta","frenata","fresco","frigo","frollino","fronde","frugale","frutta","fucilata","fucsia","fuggente","fulmine","fulvo","fumante","fumetto","fumoso","fune","funzione","fuoco","furbo","furgone","furore","fuso","futile","gabbiano","gaffe","galateo","gallina","galoppo","gambero","gamma","garanzia","garbo","garofano","garzone","gasdotto","gasolio","gastrico","gatto","gaudio","gazebo","gazzella","geco","gelatina","gelso","gemello","gemmato","gene","genitore","gennaio","genotipo","gergo","ghepardo","ghiaccio","ghisa","giallo","gilda","ginepro","giocare","gioiello","giorno","giove","girato","girone","gittata","giudizio","giurato","giusto","globulo","glutine","gnomo","gobba","golf","gomito","gommone","gonfio","gonna","governo","gracile","grado","grafico","grammo","grande","grattare","gravoso","grazia","greca","gregge","grifone","grigio","grinza","grotta","gruppo","guadagno","guaio","guanto","guardare","gufo","guidare","ibernato","icona","identico","idillio","idolo","idra","idrico","idrogeno","igiene","ignaro","ignorato","ilare","illeso","illogico","illudere","imballo","imbevuto","imbocco","imbuto","immane","immerso","immolato","impacco","impeto","impiego","importo","impronta","inalare","inarcare","inattivo","incanto","incendio","inchino","incisivo","incluso","incontro","incrocio","incubo","indagine","india","indole","inedito","infatti","infilare","inflitto","ingaggio","ingegno","inglese","ingordo","ingrosso","innesco","inodore","inoltrare","inondato","insano","insetto","insieme","insonnia","insulina","intasato","intero","intonaco","intuito","inumidire","invalido","invece","invito","iperbole","ipnotico","ipotesi","ippica","iride","irlanda","ironico","irrigato","irrorare","isolato","isotopo","isterico","istituto","istrice","italia","iterare","labbro","labirinto","lacca","lacerato","lacrima","lacuna","laddove","lago","lampo","lancetta","lanterna","lardoso","larga","laringe","lastra","latenza","latino","lattuga","lavagna","lavoro","legale","leggero","lembo","lentezza","lenza","leone","lepre","lesivo","lessato","lesto","letterale","leva","levigato","libero","lido","lievito","lilla","limatura","limitare","limpido","lineare","lingua","liquido","lira","lirica","lisca","lite","litigio","livrea","locanda","lode","logica","lombare","londra","longevo","loquace","lorenzo","loto","lotteria","luce","lucidato","lumaca","luminoso","lungo","lupo","luppolo","lusinga","lusso","lutto","macabro","macchina","macero","macinato","madama","magico","maglia","magnete","magro","maiolica","malafede","malgrado","malinteso","malsano","malto","malumore","mana","mancia","mandorla","mangiare","manifesto","mannaro","manovra","mansarda","mantide","manubrio","mappa","maratona","marcire","maretta","marmo","marsupio","maschera","massaia","mastino","materasso","matricola","mattone","maturo","mazurca","meandro","meccanico","mecenate","medesimo","meditare","mega","melassa","melis","melodia","meninge","meno","mensola","mercurio","merenda","merlo","meschino","mese","messere","mestolo","metallo","metodo","mettere","miagolare","mica","micelio","michele","microbo","midollo","miele","migliore","milano","milite","mimosa","minerale","mini","minore","mirino","mirtillo","miscela","missiva","misto","misurare","mitezza","mitigare","mitra","mittente","mnemonico","modello","modifica","modulo","mogano","mogio","mole","molosso","monastero","monco","mondina","monetario","monile","monotono","monsone","montato","monviso","mora","mordere","morsicato","mostro","motivato","motosega","motto","movenza","movimento","mozzo","mucca","mucosa","muffa","mughetto","mugnaio","mulatto","mulinello","multiplo","mummia","munto","muovere","murale","musa","muscolo","musica","mutevole","muto","nababbo","nafta","nanometro","narciso","narice","narrato","nascere","nastrare","naturale","nautica","naviglio","nebulosa","necrosi","negativo","negozio","nemmeno","neofita","neretto","nervo","nessuno","nettuno","neutrale","neve","nevrotico","nicchia","ninfa","nitido","nobile","nocivo","nodo","nome","nomina","nordico","normale","norvegese","nostrano","notare","notizia","notturno","novella","nucleo","nulla","numero","nuovo","nutrire","nuvola","nuziale","oasi","obbedire","obbligo","obelisco","oblio","obolo","obsoleto","occasione","occhio","occidente","occorrere","occultare","ocra","oculato","odierno","odorare","offerta","offrire","offuscato","oggetto","oggi","ognuno","olandese","olfatto","oliato","oliva","ologramma","oltre","omaggio","ombelico","ombra","omega","omissione","ondoso","onere","onice","onnivoro","onorevole","onta","operato","opinione","opposto","oracolo","orafo","ordine","orecchino","orefice","orfano","organico","origine","orizzonte","orma","ormeggio","ornativo","orologio","orrendo","orribile","ortensia","ortica","orzata","orzo","osare","oscurare","osmosi","ospedale","ospite","ossa","ossidare","ostacolo","oste","otite","otre","ottagono","ottimo","ottobre","ovale","ovest","ovino","oviparo","ovocito","ovunque","ovviare","ozio","pacchetto","pace","pacifico","padella","padrone","paese","paga","pagina","palazzina","palesare","pallido","palo","palude","pandoro","pannello","paolo","paonazzo","paprica","parabola","parcella","parere","pargolo","pari","parlato","parola","partire","parvenza","parziale","passivo","pasticca","patacca","patologia","pattume","pavone","peccato","pedalare","pedonale","peggio","peloso","penare","pendice","penisola","pennuto","penombra","pensare","pentola","pepe","pepita","perbene","percorso","perdonato","perforare","pergamena","periodo","permesso","perno","perplesso","persuaso","pertugio","pervaso","pesatore","pesista","peso","pestifero","petalo","pettine","petulante","pezzo","piacere","pianta","piattino","piccino","picozza","piega","pietra","piffero","pigiama","pigolio","pigro","pila","pilifero","pillola","pilota","pimpante","pineta","pinna","pinolo","pioggia","piombo","piramide","piretico","pirite","pirolisi","pitone","pizzico","placebo","planare","plasma","platano","plenario","pochezza","poderoso","podismo","poesia","poggiare","polenta","poligono","pollice","polmonite","polpetta","polso","poltrona","polvere","pomice","pomodoro","ponte","popoloso","porfido","poroso","porpora","porre","portata","posa","positivo","possesso","postulato","potassio","potere","pranzo","prassi","pratica","precluso","predica","prefisso","pregiato","prelievo","premere","prenotare","preparato","presenza","pretesto","prevalso","prima","principe","privato","problema","procura","produrre","profumo","progetto","prolunga","promessa","pronome","proposta","proroga","proteso","prova","prudente","prugna","prurito","psiche","pubblico","pudica","pugilato","pugno","pulce","pulito","pulsante","puntare","pupazzo","pupilla","puro","quadro","qualcosa","quasi","querela","quota","raccolto","raddoppio","radicale","radunato","raffica","ragazzo","ragione","ragno","ramarro","ramingo","ramo","randagio","rantolare","rapato","rapina","rappreso","rasatura","raschiato","rasente","rassegna","rastrello","rata","ravveduto","reale","recepire","recinto","recluta","recondito","recupero","reddito","redimere","regalato","registro","regola","regresso","relazione","remare","remoto","renna","replica","reprimere","reputare","resa","residente","responso","restauro","rete","retina","retorica","rettifica","revocato","riassunto","ribadire","ribelle","ribrezzo","ricarica","ricco","ricevere","riciclato","ricordo","ricreduto","ridicolo","ridurre","rifasare","riflesso","riforma","rifugio","rigare","rigettato","righello","rilassato","rilevato","rimanere","rimbalzo","rimedio","rimorchio","rinascita","rincaro","rinforzo","rinnovo","rinomato","rinsavito","rintocco","rinuncia","rinvenire","riparato","ripetuto","ripieno","riportare","ripresa","ripulire","risata","rischio","riserva","risibile","riso","rispetto","ristoro","risultato","risvolto","ritardo","ritegno","ritmico","ritrovo","riunione","riva","riverso","rivincita","rivolto","rizoma","roba","robotico","robusto","roccia","roco","rodaggio","rodere","roditore","rogito","rollio","romantico","rompere","ronzio","rosolare","rospo","rotante","rotondo","rotula","rovescio","rubizzo","rubrica","ruga","rullino","rumine","rumoroso","ruolo","rupe","russare","rustico","sabato","sabbiare","sabotato","sagoma","salasso","saldatura","salgemma","salivare","salmone","salone","saltare","saluto","salvo","sapere","sapido","saporito","saraceno","sarcasmo","sarto","sassoso","satellite","satira","satollo","saturno","savana","savio","saziato","sbadiglio","sbalzo","sbancato","sbarra","sbattere","sbavare","sbendare","sbirciare","sbloccato","sbocciato","sbrinare","sbruffone","sbuffare","scabroso","scadenza","scala","scambiare","scandalo","scapola","scarso","scatenare","scavato","scelto","scenico","scettro","scheda","schiena","sciarpa","scienza","scindere","scippo","sciroppo","scivolo","sclerare","scodella","scolpito","scomparto","sconforto","scoprire","scorta","scossone","scozzese","scriba","scrollare","scrutinio","scuderia","scultore","scuola","scuro","scusare","sdebitare","sdoganare","seccatura","secondo","sedano","seggiola","segnalato","segregato","seguito","selciato","selettivo","sella","selvaggio","semaforo","sembrare","seme","seminato","sempre","senso","sentire","sepolto","sequenza","serata","serbato","sereno","serio","serpente","serraglio","servire","sestina","setola","settimana","sfacelo","sfaldare","sfamato","sfarzoso","sfaticato","sfera","sfida","sfilato","sfinge","sfocato","sfoderare","sfogo","sfoltire","sforzato","sfratto","sfruttato","sfuggito","sfumare","sfuso","sgabello","sgarbato","sgonfiare","sgorbio","sgrassato","sguardo","sibilo","siccome","sierra","sigla","signore","silenzio","sillaba","simbolo","simpatico","simulato","sinfonia","singolo","sinistro","sino","sintesi","sinusoide","sipario","sisma","sistole","situato","slitta","slogatura","sloveno","smarrito","smemorato","smentito","smeraldo","smilzo","smontare","smottato","smussato","snellire","snervato","snodo","sobbalzo","sobrio","soccorso","sociale","sodale","soffitto","sogno","soldato","solenne","solido","sollazzo","solo","solubile","solvente","somatico","somma","sonda","sonetto","sonnifero","sopire","soppeso","sopra","sorgere","sorpasso","sorriso","sorso","sorteggio","sorvolato","sospiro","sosta","sottile","spada","spalla","spargere","spatola","spavento","spazzola","specie","spedire","spegnere","spelatura","speranza","spessore","spettrale","spezzato","spia","spigoloso","spillato","spinoso","spirale","splendido","sportivo","sposo","spranga","sprecare","spronato","spruzzo","spuntino","squillo","sradicare","srotolato","stabile","stacco","staffa","stagnare","stampato","stantio","starnuto","stasera","statuto","stelo","steppa","sterzo","stiletto","stima","stirpe","stivale","stizzoso","stonato","storico","strappo","stregato","stridulo","strozzare","strutto","stuccare","stufo","stupendo","subentro","succoso","sudore","suggerito","sugo","sultano","suonare","superbo","supporto","surgelato","surrogato","sussurro","sutura","svagare","svedese","sveglio","svelare","svenuto","svezia","sviluppo","svista","svizzera","svolta","svuotare","tabacco","tabulato","tacciare","taciturno","tale","talismano","tampone","tannino","tara","tardivo","targato","tariffa","tarpare","tartaruga","tasto","tattico","taverna","tavolata","tazza","teca","tecnico","telefono","temerario","tempo","temuto","tendone","tenero","tensione","tentacolo","teorema","terme","terrazzo","terzetto","tesi","tesserato","testato","tetro","tettoia","tifare","tigella","timbro","tinto","tipico","tipografo","tiraggio","tiro","titanio","titolo","titubante","tizio","tizzone","toccare","tollerare","tolto","tombola","tomo","tonfo","tonsilla","topazio","topologia","toppa","torba","tornare","torrone","tortora","toscano","tossire","tostatura","totano","trabocco","trachea","trafila","tragedia","tralcio","tramonto","transito","trapano","trarre","trasloco","trattato","trave","treccia","tremolio","trespolo","tributo","tricheco","trifoglio","trillo","trincea","trio","tristezza","triturato","trivella","tromba","trono","troppo","trottola","trovare","truccato","tubatura","tuffato","tulipano","tumulto","tunisia","turbare","turchino","tuta","tutela","ubicato","uccello","uccisore","udire","uditivo","uffa","ufficio","uguale","ulisse","ultimato","umano","umile","umorismo","uncinetto","ungere","ungherese","unicorno","unificato","unisono","unitario","unte","uovo","upupa","uragano","urgenza","urlo","usanza","usato","uscito","usignolo","usuraio","utensile","utilizzo","utopia","vacante","vaccinato","vagabondo","vagliato","valanga","valgo","valico","valletta","valoroso","valutare","valvola","vampata","vangare","vanitoso","vano","vantaggio","vanvera","vapore","varano","varcato","variante","vasca","vedetta","vedova","veduto","vegetale","veicolo","velcro","velina","velluto","veloce","venato","vendemmia","vento","verace","verbale","vergogna","verifica","vero","verruca","verticale","vescica","vessillo","vestale","veterano","vetrina","vetusto","viandante","vibrante","vicenda","vichingo","vicinanza","vidimare","vigilia","vigneto","vigore","vile","villano","vimini","vincitore","viola","vipera","virgola","virologo","virulento","viscoso","visione","vispo","vissuto","visura","vita","vitello","vittima","vivanda","vivido","viziare","voce","voga","volatile","volere","volpe","voragine","vulcano","zampogna","zanna","zappato","zattera","zavorra","zefiro","zelante","zelo","zenzero","zerbino","zibetto","zinco","zircone","zitto","zolla","zotico","zucchero","zufolo","zulu","zuppa"]')},4472:module=>{"use strict";module.exports=JSON.parse('["あいこくしん","あいさつ","あいだ","あおぞら","あかちゃん","あきる","あけがた","あける","あこがれる","あさい","あさひ","あしあと","あじわう","あずかる","あずき","あそぶ","あたえる","あたためる","あたりまえ","あたる","あつい","あつかう","あっしゅく","あつまり","あつめる","あてな","あてはまる","あひる","あぶら","あぶる","あふれる","あまい","あまど","あまやかす","あまり","あみもの","あめりか","あやまる","あゆむ","あらいぐま","あらし","あらすじ","あらためる","あらゆる","あらわす","ありがとう","あわせる","あわてる","あんい","あんがい","あんこ","あんぜん","あんてい","あんない","あんまり","いいだす","いおん","いがい","いがく","いきおい","いきなり","いきもの","いきる","いくじ","いくぶん","いけばな","いけん","いこう","いこく","いこつ","いさましい","いさん","いしき","いじゅう","いじょう","いじわる","いずみ","いずれ","いせい","いせえび","いせかい","いせき","いぜん","いそうろう","いそがしい","いだい","いだく","いたずら","いたみ","いたりあ","いちおう","いちじ","いちど","いちば","いちぶ","いちりゅう","いつか","いっしゅん","いっせい","いっそう","いったん","いっち","いってい","いっぽう","いてざ","いてん","いどう","いとこ","いない","いなか","いねむり","いのち","いのる","いはつ","いばる","いはん","いびき","いひん","いふく","いへん","いほう","いみん","いもうと","いもたれ","いもり","いやがる","いやす","いよかん","いよく","いらい","いらすと","いりぐち","いりょう","いれい","いれもの","いれる","いろえんぴつ","いわい","いわう","いわかん","いわば","いわゆる","いんげんまめ","いんさつ","いんしょう","いんよう","うえき","うえる","うおざ","うがい","うかぶ","うかべる","うきわ","うくらいな","うくれれ","うけたまわる","うけつけ","うけとる","うけもつ","うける","うごかす","うごく","うこん","うさぎ","うしなう","うしろがみ","うすい","うすぎ","うすぐらい","うすめる","うせつ","うちあわせ","うちがわ","うちき","うちゅう","うっかり","うつくしい","うったえる","うつる","うどん","うなぎ","うなじ","うなずく","うなる","うねる","うのう","うぶげ","うぶごえ","うまれる","うめる","うもう","うやまう","うよく","うらがえす","うらぐち","うらない","うりあげ","うりきれ","うるさい","うれしい","うれゆき","うれる","うろこ","うわき","うわさ","うんこう","うんちん","うんてん","うんどう","えいえん","えいが","えいきょう","えいご","えいせい","えいぶん","えいよう","えいわ","えおり","えがお","えがく","えきたい","えくせる","えしゃく","えすて","えつらん","えのぐ","えほうまき","えほん","えまき","えもじ","えもの","えらい","えらぶ","えりあ","えんえん","えんかい","えんぎ","えんげき","えんしゅう","えんぜつ","えんそく","えんちょう","えんとつ","おいかける","おいこす","おいしい","おいつく","おうえん","おうさま","おうじ","おうせつ","おうたい","おうふく","おうべい","おうよう","おえる","おおい","おおう","おおどおり","おおや","おおよそ","おかえり","おかず","おがむ","おかわり","おぎなう","おきる","おくさま","おくじょう","おくりがな","おくる","おくれる","おこす","おこなう","おこる","おさえる","おさない","おさめる","おしいれ","おしえる","おじぎ","おじさん","おしゃれ","おそらく","おそわる","おたがい","おたく","おだやか","おちつく","おっと","おつり","おでかけ","おとしもの","おとなしい","おどり","おどろかす","おばさん","おまいり","おめでとう","おもいで","おもう","おもたい","おもちゃ","おやつ","おやゆび","およぼす","おらんだ","おろす","おんがく","おんけい","おんしゃ","おんせん","おんだん","おんちゅう","おんどけい","かあつ","かいが","がいき","がいけん","がいこう","かいさつ","かいしゃ","かいすいよく","かいぜん","かいぞうど","かいつう","かいてん","かいとう","かいふく","がいへき","かいほう","かいよう","がいらい","かいわ","かえる","かおり","かかえる","かがく","かがし","かがみ","かくご","かくとく","かざる","がぞう","かたい","かたち","がちょう","がっきゅう","がっこう","がっさん","がっしょう","かなざわし","かのう","がはく","かぶか","かほう","かほご","かまう","かまぼこ","かめれおん","かゆい","かようび","からい","かるい","かろう","かわく","かわら","がんか","かんけい","かんこう","かんしゃ","かんそう","かんたん","かんち","がんばる","きあい","きあつ","きいろ","ぎいん","きうい","きうん","きえる","きおう","きおく","きおち","きおん","きかい","きかく","きかんしゃ","ききて","きくばり","きくらげ","きけんせい","きこう","きこえる","きこく","きさい","きさく","きさま","きさらぎ","ぎじかがく","ぎしき","ぎじたいけん","ぎじにってい","ぎじゅつしゃ","きすう","きせい","きせき","きせつ","きそう","きぞく","きぞん","きたえる","きちょう","きつえん","ぎっちり","きつつき","きつね","きてい","きどう","きどく","きない","きなが","きなこ","きぬごし","きねん","きのう","きのした","きはく","きびしい","きひん","きふく","きぶん","きぼう","きほん","きまる","きみつ","きむずかしい","きめる","きもだめし","きもち","きもの","きゃく","きやく","ぎゅうにく","きよう","きょうりゅう","きらい","きらく","きりん","きれい","きれつ","きろく","ぎろん","きわめる","ぎんいろ","きんかくじ","きんじょ","きんようび","ぐあい","くいず","くうかん","くうき","くうぐん","くうこう","ぐうせい","くうそう","ぐうたら","くうふく","くうぼ","くかん","くきょう","くげん","ぐこう","くさい","くさき","くさばな","くさる","くしゃみ","くしょう","くすのき","くすりゆび","くせげ","くせん","ぐたいてき","くださる","くたびれる","くちこみ","くちさき","くつした","ぐっすり","くつろぐ","くとうてん","くどく","くなん","くねくね","くのう","くふう","くみあわせ","くみたてる","くめる","くやくしょ","くらす","くらべる","くるま","くれる","くろう","くわしい","ぐんかん","ぐんしょく","ぐんたい","ぐんて","けあな","けいかく","けいけん","けいこ","けいさつ","げいじゅつ","けいたい","げいのうじん","けいれき","けいろ","けおとす","けおりもの","げきか","げきげん","げきだん","げきちん","げきとつ","げきは","げきやく","げこう","げこくじょう","げざい","けさき","げざん","けしき","けしごむ","けしょう","げすと","けたば","けちゃっぷ","けちらす","けつあつ","けつい","けつえき","けっこん","けつじょ","けっせき","けってい","けつまつ","げつようび","げつれい","けつろん","げどく","けとばす","けとる","けなげ","けなす","けなみ","けぬき","げねつ","けねん","けはい","げひん","けぶかい","げぼく","けまり","けみかる","けむし","けむり","けもの","けらい","けろけろ","けわしい","けんい","けんえつ","けんお","けんか","げんき","けんげん","けんこう","けんさく","けんしゅう","けんすう","げんそう","けんちく","けんてい","けんとう","けんない","けんにん","げんぶつ","けんま","けんみん","けんめい","けんらん","けんり","こあくま","こいぬ","こいびと","ごうい","こうえん","こうおん","こうかん","ごうきゅう","ごうけい","こうこう","こうさい","こうじ","こうすい","ごうせい","こうそく","こうたい","こうちゃ","こうつう","こうてい","こうどう","こうない","こうはい","ごうほう","ごうまん","こうもく","こうりつ","こえる","こおり","ごかい","ごがつ","ごかん","こくご","こくさい","こくとう","こくない","こくはく","こぐま","こけい","こける","ここのか","こころ","こさめ","こしつ","こすう","こせい","こせき","こぜん","こそだて","こたい","こたえる","こたつ","こちょう","こっか","こつこつ","こつばん","こつぶ","こてい","こてん","ことがら","ことし","ことば","ことり","こなごな","こねこね","このまま","このみ","このよ","ごはん","こひつじ","こふう","こふん","こぼれる","ごまあぶら","こまかい","ごますり","こまつな","こまる","こむぎこ","こもじ","こもち","こもの","こもん","こやく","こやま","こゆう","こゆび","こよい","こよう","こりる","これくしょん","ころっけ","こわもて","こわれる","こんいん","こんかい","こんき","こんしゅう","こんすい","こんだて","こんとん","こんなん","こんびに","こんぽん","こんまけ","こんや","こんれい","こんわく","ざいえき","さいかい","さいきん","ざいげん","ざいこ","さいしょ","さいせい","ざいたく","ざいちゅう","さいてき","ざいりょう","さうな","さかいし","さがす","さかな","さかみち","さがる","さぎょう","さくし","さくひん","さくら","さこく","さこつ","さずかる","ざせき","さたん","さつえい","ざつおん","ざっか","ざつがく","さっきょく","ざっし","さつじん","ざっそう","さつたば","さつまいも","さてい","さといも","さとう","さとおや","さとし","さとる","さのう","さばく","さびしい","さべつ","さほう","さほど","さます","さみしい","さみだれ","さむけ","さめる","さやえんどう","さゆう","さよう","さよく","さらだ","ざるそば","さわやか","さわる","さんいん","さんか","さんきゃく","さんこう","さんさい","ざんしょ","さんすう","さんせい","さんそ","さんち","さんま","さんみ","さんらん","しあい","しあげ","しあさって","しあわせ","しいく","しいん","しうち","しえい","しおけ","しかい","しかく","じかん","しごと","しすう","じだい","したうけ","したぎ","したて","したみ","しちょう","しちりん","しっかり","しつじ","しつもん","してい","してき","してつ","じてん","じどう","しなぎれ","しなもの","しなん","しねま","しねん","しのぐ","しのぶ","しはい","しばかり","しはつ","しはらい","しはん","しひょう","しふく","じぶん","しへい","しほう","しほん","しまう","しまる","しみん","しむける","じむしょ","しめい","しめる","しもん","しゃいん","しゃうん","しゃおん","じゃがいも","しやくしょ","しゃくほう","しゃけん","しゃこ","しゃざい","しゃしん","しゃせん","しゃそう","しゃたい","しゃちょう","しゃっきん","じゃま","しゃりん","しゃれい","じゆう","じゅうしょ","しゅくはく","じゅしん","しゅっせき","しゅみ","しゅらば","じゅんばん","しょうかい","しょくたく","しょっけん","しょどう","しょもつ","しらせる","しらべる","しんか","しんこう","じんじゃ","しんせいじ","しんちく","しんりん","すあげ","すあし","すあな","ずあん","すいえい","すいか","すいとう","ずいぶん","すいようび","すうがく","すうじつ","すうせん","すおどり","すきま","すくう","すくない","すける","すごい","すこし","ずさん","すずしい","すすむ","すすめる","すっかり","ずっしり","ずっと","すてき","すてる","すねる","すのこ","すはだ","すばらしい","ずひょう","ずぶぬれ","すぶり","すふれ","すべて","すべる","ずほう","すぼん","すまい","すめし","すもう","すやき","すらすら","するめ","すれちがう","すろっと","すわる","すんぜん","すんぽう","せあぶら","せいかつ","せいげん","せいじ","せいよう","せおう","せかいかん","せきにん","せきむ","せきゆ","せきらんうん","せけん","せこう","せすじ","せたい","せたけ","せっかく","せっきゃく","ぜっく","せっけん","せっこつ","せっさたくま","せつぞく","せつだん","せつでん","せっぱん","せつび","せつぶん","せつめい","せつりつ","せなか","せのび","せはば","せびろ","せぼね","せまい","せまる","せめる","せもたれ","せりふ","ぜんあく","せんい","せんえい","せんか","せんきょ","せんく","せんげん","ぜんご","せんさい","せんしゅ","せんすい","せんせい","せんぞ","せんたく","せんちょう","せんてい","せんとう","せんぬき","せんねん","せんぱい","ぜんぶ","ぜんぽう","せんむ","せんめんじょ","せんもん","せんやく","せんゆう","せんよう","ぜんら","ぜんりゃく","せんれい","せんろ","そあく","そいとげる","そいね","そうがんきょう","そうき","そうご","そうしん","そうだん","そうなん","そうび","そうめん","そうり","そえもの","そえん","そがい","そげき","そこう","そこそこ","そざい","そしな","そせい","そせん","そそぐ","そだてる","そつう","そつえん","そっかん","そつぎょう","そっけつ","そっこう","そっせん","そっと","そとがわ","そとづら","そなえる","そなた","そふぼ","そぼく","そぼろ","そまつ","そまる","そむく","そむりえ","そめる","そもそも","そよかぜ","そらまめ","そろう","そんかい","そんけい","そんざい","そんしつ","そんぞく","そんちょう","ぞんび","ぞんぶん","そんみん","たあい","たいいん","たいうん","たいえき","たいおう","だいがく","たいき","たいぐう","たいけん","たいこ","たいざい","だいじょうぶ","だいすき","たいせつ","たいそう","だいたい","たいちょう","たいてい","だいどころ","たいない","たいねつ","たいのう","たいはん","だいひょう","たいふう","たいへん","たいほ","たいまつばな","たいみんぐ","たいむ","たいめん","たいやき","たいよう","たいら","たいりょく","たいる","たいわん","たうえ","たえる","たおす","たおる","たおれる","たかい","たかね","たきび","たくさん","たこく","たこやき","たさい","たしざん","だじゃれ","たすける","たずさわる","たそがれ","たたかう","たたく","ただしい","たたみ","たちばな","だっかい","だっきゃく","だっこ","だっしゅつ","だったい","たてる","たとえる","たなばた","たにん","たぬき","たのしみ","たはつ","たぶん","たべる","たぼう","たまご","たまる","だむる","ためいき","ためす","ためる","たもつ","たやすい","たよる","たらす","たりきほんがん","たりょう","たりる","たると","たれる","たれんと","たろっと","たわむれる","だんあつ","たんい","たんおん","たんか","たんき","たんけん","たんご","たんさん","たんじょうび","だんせい","たんそく","たんたい","だんち","たんてい","たんとう","だんな","たんにん","だんねつ","たんのう","たんぴん","だんぼう","たんまつ","たんめい","だんれつ","だんろ","だんわ","ちあい","ちあん","ちいき","ちいさい","ちえん","ちかい","ちから","ちきゅう","ちきん","ちけいず","ちけん","ちこく","ちさい","ちしき","ちしりょう","ちせい","ちそう","ちたい","ちたん","ちちおや","ちつじょ","ちてき","ちてん","ちぬき","ちぬり","ちのう","ちひょう","ちへいせん","ちほう","ちまた","ちみつ","ちみどろ","ちめいど","ちゃんこなべ","ちゅうい","ちゆりょく","ちょうし","ちょさくけん","ちらし","ちらみ","ちりがみ","ちりょう","ちるど","ちわわ","ちんたい","ちんもく","ついか","ついたち","つうか","つうじょう","つうはん","つうわ","つかう","つかれる","つくね","つくる","つけね","つける","つごう","つたえる","つづく","つつじ","つつむ","つとめる","つながる","つなみ","つねづね","つのる","つぶす","つまらない","つまる","つみき","つめたい","つもり","つもる","つよい","つるぼ","つるみく","つわもの","つわり","てあし","てあて","てあみ","ていおん","ていか","ていき","ていけい","ていこく","ていさつ","ていし","ていせい","ていたい","ていど","ていねい","ていひょう","ていへん","ていぼう","てうち","ておくれ","てきとう","てくび","でこぼこ","てさぎょう","てさげ","てすり","てそう","てちがい","てちょう","てつがく","てつづき","でっぱ","てつぼう","てつや","でぬかえ","てぬき","てぬぐい","てのひら","てはい","てぶくろ","てふだ","てほどき","てほん","てまえ","てまきずし","てみじか","てみやげ","てらす","てれび","てわけ","てわたし","でんあつ","てんいん","てんかい","てんき","てんぐ","てんけん","てんごく","てんさい","てんし","てんすう","でんち","てんてき","てんとう","てんない","てんぷら","てんぼうだい","てんめつ","てんらんかい","でんりょく","でんわ","どあい","といれ","どうかん","とうきゅう","どうぐ","とうし","とうむぎ","とおい","とおか","とおく","とおす","とおる","とかい","とかす","ときおり","ときどき","とくい","とくしゅう","とくてん","とくに","とくべつ","とけい","とける","とこや","とさか","としょかん","とそう","とたん","とちゅう","とっきゅう","とっくん","とつぜん","とつにゅう","とどける","ととのえる","とない","となえる","となり","とのさま","とばす","どぶがわ","とほう","とまる","とめる","ともだち","ともる","どようび","とらえる","とんかつ","どんぶり","ないかく","ないこう","ないしょ","ないす","ないせん","ないそう","なおす","ながい","なくす","なげる","なこうど","なさけ","なたでここ","なっとう","なつやすみ","ななおし","なにごと","なにもの","なにわ","なのか","なふだ","なまいき","なまえ","なまみ","なみだ","なめらか","なめる","なやむ","ならう","ならび","ならぶ","なれる","なわとび","なわばり","にあう","にいがた","にうけ","におい","にかい","にがて","にきび","にくしみ","にくまん","にげる","にさんかたんそ","にしき","にせもの","にちじょう","にちようび","にっか","にっき","にっけい","にっこう","にっさん","にっしょく","にっすう","にっせき","にってい","になう","にほん","にまめ","にもつ","にやり","にゅういん","にりんしゃ","にわとり","にんい","にんか","にんき","にんげん","にんしき","にんずう","にんそう","にんたい","にんち","にんてい","にんにく","にんぷ","にんまり","にんむ","にんめい","にんよう","ぬいくぎ","ぬかす","ぬぐいとる","ぬぐう","ぬくもり","ぬすむ","ぬまえび","ぬめり","ぬらす","ぬんちゃく","ねあげ","ねいき","ねいる","ねいろ","ねぐせ","ねくたい","ねくら","ねこぜ","ねこむ","ねさげ","ねすごす","ねそべる","ねだん","ねつい","ねっしん","ねつぞう","ねったいぎょ","ねぶそく","ねふだ","ねぼう","ねほりはほり","ねまき","ねまわし","ねみみ","ねむい","ねむたい","ねもと","ねらう","ねわざ","ねんいり","ねんおし","ねんかん","ねんきん","ねんぐ","ねんざ","ねんし","ねんちゃく","ねんど","ねんぴ","ねんぶつ","ねんまつ","ねんりょう","ねんれい","のいず","のおづま","のがす","のきなみ","のこぎり","のこす","のこる","のせる","のぞく","のぞむ","のたまう","のちほど","のっく","のばす","のはら","のべる","のぼる","のみもの","のやま","のらいぬ","のらねこ","のりもの","のりゆき","のれん","のんき","ばあい","はあく","ばあさん","ばいか","ばいく","はいけん","はいご","はいしん","はいすい","はいせん","はいそう","はいち","ばいばい","はいれつ","はえる","はおる","はかい","ばかり","はかる","はくしゅ","はけん","はこぶ","はさみ","はさん","はしご","ばしょ","はしる","はせる","ぱそこん","はそん","はたん","はちみつ","はつおん","はっかく","はづき","はっきり","はっくつ","はっけん","はっこう","はっさん","はっしん","はったつ","はっちゅう","はってん","はっぴょう","はっぽう","はなす","はなび","はにかむ","はぶらし","はみがき","はむかう","はめつ","はやい","はやし","はらう","はろうぃん","はわい","はんい","はんえい","はんおん","はんかく","はんきょう","ばんぐみ","はんこ","はんしゃ","はんすう","はんだん","ぱんち","ぱんつ","はんてい","はんとし","はんのう","はんぱ","はんぶん","はんぺん","はんぼうき","はんめい","はんらん","はんろん","ひいき","ひうん","ひえる","ひかく","ひかり","ひかる","ひかん","ひくい","ひけつ","ひこうき","ひこく","ひさい","ひさしぶり","ひさん","びじゅつかん","ひしょ","ひそか","ひそむ","ひたむき","ひだり","ひたる","ひつぎ","ひっこし","ひっし","ひつじゅひん","ひっす","ひつぜん","ぴったり","ぴっちり","ひつよう","ひてい","ひとごみ","ひなまつり","ひなん","ひねる","ひはん","ひびく","ひひょう","ひほう","ひまわり","ひまん","ひみつ","ひめい","ひめじし","ひやけ","ひやす","ひよう","びょうき","ひらがな","ひらく","ひりつ","ひりょう","ひるま","ひるやすみ","ひれい","ひろい","ひろう","ひろき","ひろゆき","ひんかく","ひんけつ","ひんこん","ひんしゅ","ひんそう","ぴんち","ひんぱん","びんぼう","ふあん","ふいうち","ふうけい","ふうせん","ぷうたろう","ふうとう","ふうふ","ふえる","ふおん","ふかい","ふきん","ふくざつ","ふくぶくろ","ふこう","ふさい","ふしぎ","ふじみ","ふすま","ふせい","ふせぐ","ふそく","ぶたにく","ふたん","ふちょう","ふつう","ふつか","ふっかつ","ふっき","ふっこく","ぶどう","ふとる","ふとん","ふのう","ふはい","ふひょう","ふへん","ふまん","ふみん","ふめつ","ふめん","ふよう","ふりこ","ふりる","ふるい","ふんいき","ぶんがく","ぶんぐ","ふんしつ","ぶんせき","ふんそう","ぶんぽう","へいあん","へいおん","へいがい","へいき","へいげん","へいこう","へいさ","へいしゃ","へいせつ","へいそ","へいたく","へいてん","へいねつ","へいわ","へきが","へこむ","べにいろ","べにしょうが","へらす","へんかん","べんきょう","べんごし","へんさい","へんたい","べんり","ほあん","ほいく","ぼうぎょ","ほうこく","ほうそう","ほうほう","ほうもん","ほうりつ","ほえる","ほおん","ほかん","ほきょう","ぼきん","ほくろ","ほけつ","ほけん","ほこう","ほこる","ほしい","ほしつ","ほしゅ","ほしょう","ほせい","ほそい","ほそく","ほたて","ほたる","ぽちぶくろ","ほっきょく","ほっさ","ほったん","ほとんど","ほめる","ほんい","ほんき","ほんけ","ほんしつ","ほんやく","まいにち","まかい","まかせる","まがる","まける","まこと","まさつ","まじめ","ますく","まぜる","まつり","まとめ","まなぶ","まぬけ","まねく","まほう","まもる","まゆげ","まよう","まろやか","まわす","まわり","まわる","まんが","まんきつ","まんぞく","まんなか","みいら","みうち","みえる","みがく","みかた","みかん","みけん","みこん","みじかい","みすい","みすえる","みせる","みっか","みつかる","みつける","みてい","みとめる","みなと","みなみかさい","みねらる","みのう","みのがす","みほん","みもと","みやげ","みらい","みりょく","みわく","みんか","みんぞく","むいか","むえき","むえん","むかい","むかう","むかえ","むかし","むぎちゃ","むける","むげん","むさぼる","むしあつい","むしば","むじゅん","むしろ","むすう","むすこ","むすぶ","むすめ","むせる","むせん","むちゅう","むなしい","むのう","むやみ","むよう","むらさき","むりょう","むろん","めいあん","めいうん","めいえん","めいかく","めいきょく","めいさい","めいし","めいそう","めいぶつ","めいれい","めいわく","めぐまれる","めざす","めした","めずらしい","めだつ","めまい","めやす","めんきょ","めんせき","めんどう","もうしあげる","もうどうけん","もえる","もくし","もくてき","もくようび","もちろん","もどる","もらう","もんく","もんだい","やおや","やける","やさい","やさしい","やすい","やすたろう","やすみ","やせる","やそう","やたい","やちん","やっと","やっぱり","やぶる","やめる","ややこしい","やよい","やわらかい","ゆうき","ゆうびんきょく","ゆうべ","ゆうめい","ゆけつ","ゆしゅつ","ゆせん","ゆそう","ゆたか","ゆちゃく","ゆでる","ゆにゅう","ゆびわ","ゆらい","ゆれる","ようい","ようか","ようきゅう","ようじ","ようす","ようちえん","よかぜ","よかん","よきん","よくせい","よくぼう","よけい","よごれる","よさん","よしゅう","よそう","よそく","よっか","よてい","よどがわく","よねつ","よやく","よゆう","よろこぶ","よろしい","らいう","らくがき","らくご","らくさつ","らくだ","らしんばん","らせん","らぞく","らたい","らっか","られつ","りえき","りかい","りきさく","りきせつ","りくぐん","りくつ","りけん","りこう","りせい","りそう","りそく","りてん","りねん","りゆう","りゅうがく","りよう","りょうり","りょかん","りょくちゃ","りょこう","りりく","りれき","りろん","りんご","るいけい","るいさい","るいじ","るいせき","るすばん","るりがわら","れいかん","れいぎ","れいせい","れいぞうこ","れいとう","れいぼう","れきし","れきだい","れんあい","れんけい","れんこん","れんさい","れんしゅう","れんぞく","れんらく","ろうか","ろうご","ろうじん","ろうそく","ろくが","ろこつ","ろじうら","ろしゅつ","ろせん","ろてん","ろめん","ろれつ","ろんぎ","ろんぱ","ろんぶん","ろんり","わかす","わかめ","わかやま","わかれる","わしつ","わじまし","わすれもの","わらう","われる"]')},8013:module=>{"use strict";module.exports=JSON.parse('["가격","가끔","가난","가능","가득","가르침","가뭄","가방","가상","가슴","가운데","가을","가이드","가입","가장","가정","가족","가죽","각오","각자","간격","간부","간섭","간장","간접","간판","갈등","갈비","갈색","갈증","감각","감기","감소","감수성","감자","감정","갑자기","강남","강당","강도","강력히","강변","강북","강사","강수량","강아지","강원도","강의","강제","강조","같이","개구리","개나리","개방","개별","개선","개성","개인","객관적","거실","거액","거울","거짓","거품","걱정","건강","건물","건설","건조","건축","걸음","검사","검토","게시판","게임","겨울","견해","결과","결국","결론","결석","결승","결심","결정","결혼","경계","경고","경기","경력","경복궁","경비","경상도","경영","경우","경쟁","경제","경주","경찰","경치","경향","경험","계곡","계단","계란","계산","계속","계약","계절","계층","계획","고객","고구려","고궁","고급","고등학생","고무신","고민","고양이","고장","고전","고집","고춧가루","고통","고향","곡식","골목","골짜기","골프","공간","공개","공격","공군","공급","공기","공동","공무원","공부","공사","공식","공업","공연","공원","공장","공짜","공책","공통","공포","공항","공휴일","과목","과일","과장","과정","과학","관객","관계","관광","관념","관람","관련","관리","관습","관심","관점","관찰","광경","광고","광장","광주","괴로움","굉장히","교과서","교문","교복","교실","교양","교육","교장","교직","교통","교환","교훈","구경","구름","구멍","구별","구분","구석","구성","구속","구역","구입","구청","구체적","국가","국기","국내","국립","국물","국민","국수","국어","국왕","국적","국제","국회","군대","군사","군인","궁극적","권리","권위","권투","귀국","귀신","규정","규칙","균형","그날","그냥","그늘","그러나","그룹","그릇","그림","그제서야","그토록","극복","극히","근거","근교","근래","근로","근무","근본","근원","근육","근처","글씨","글자","금강산","금고","금년","금메달","금액","금연","금요일","금지","긍정적","기간","기관","기념","기능","기독교","기둥","기록","기름","기법","기본","기분","기쁨","기숙사","기술","기억","기업","기온","기운","기원","기적","기준","기침","기혼","기획","긴급","긴장","길이","김밥","김치","김포공항","깍두기","깜빡","깨달음","깨소금","껍질","꼭대기","꽃잎","나들이","나란히","나머지","나물","나침반","나흘","낙엽","난방","날개","날씨","날짜","남녀","남대문","남매","남산","남자","남편","남학생","낭비","낱말","내년","내용","내일","냄비","냄새","냇물","냉동","냉면","냉방","냉장고","넥타이","넷째","노동","노란색","노력","노인","녹음","녹차","녹화","논리","논문","논쟁","놀이","농구","농담","농민","농부","농업","농장","농촌","높이","눈동자","눈물","눈썹","뉴욕","느낌","늑대","능동적","능력","다방","다양성","다음","다이어트","다행","단계","단골","단독","단맛","단순","단어","단위","단점","단체","단추","단편","단풍","달걀","달러","달력","달리","닭고기","담당","담배","담요","담임","답변","답장","당근","당분간","당연히","당장","대규모","대낮","대단히","대답","대도시","대략","대량","대륙","대문","대부분","대신","대응","대장","대전","대접","대중","대책","대출","대충","대통령","대학","대한민국","대합실","대형","덩어리","데이트","도대체","도덕","도둑","도망","도서관","도심","도움","도입","도자기","도저히","도전","도중","도착","독감","독립","독서","독일","독창적","동화책","뒷모습","뒷산","딸아이","마누라","마늘","마당","마라톤","마련","마무리","마사지","마약","마요네즈","마을","마음","마이크","마중","마지막","마찬가지","마찰","마흔","막걸리","막내","막상","만남","만두","만세","만약","만일","만점","만족","만화","많이","말기","말씀","말투","맘대로","망원경","매년","매달","매력","매번","매스컴","매일","매장","맥주","먹이","먼저","먼지","멀리","메일","며느리","며칠","면담","멸치","명단","명령","명예","명의","명절","명칭","명함","모금","모니터","모델","모든","모범","모습","모양","모임","모조리","모집","모퉁이","목걸이","목록","목사","목소리","목숨","목적","목표","몰래","몸매","몸무게","몸살","몸속","몸짓","몸통","몹시","무관심","무궁화","무더위","무덤","무릎","무슨","무엇","무역","무용","무조건","무지개","무척","문구","문득","문법","문서","문제","문학","문화","물가","물건","물결","물고기","물론","물리학","물음","물질","물체","미국","미디어","미사일","미술","미역","미용실","미움","미인","미팅","미혼","민간","민족","민주","믿음","밀가루","밀리미터","밑바닥","바가지","바구니","바나나","바늘","바닥","바닷가","바람","바이러스","바탕","박물관","박사","박수","반대","반드시","반말","반발","반성","반응","반장","반죽","반지","반찬","받침","발가락","발걸음","발견","발달","발레","발목","발바닥","발생","발음","발자국","발전","발톱","발표","밤하늘","밥그릇","밥맛","밥상","밥솥","방금","방면","방문","방바닥","방법","방송","방식","방안","방울","방지","방학","방해","방향","배경","배꼽","배달","배드민턴","백두산","백색","백성","백인","백제","백화점","버릇","버섯","버튼","번개","번역","번지","번호","벌금","벌레","벌써","범위","범인","범죄","법률","법원","법적","법칙","베이징","벨트","변경","변동","변명","변신","변호사","변화","별도","별명","별일","병실","병아리","병원","보관","보너스","보라색","보람","보름","보상","보안","보자기","보장","보전","보존","보통","보편적","보험","복도","복사","복숭아","복습","볶음","본격적","본래","본부","본사","본성","본인","본질","볼펜","봉사","봉지","봉투","부근","부끄러움","부담","부동산","부문","부분","부산","부상","부엌","부인","부작용","부장","부정","부족","부지런히","부친","부탁","부품","부회장","북부","북한","분노","분량","분리","분명","분석","분야","분위기","분필","분홍색","불고기","불과","불교","불꽃","불만","불법","불빛","불안","불이익","불행","브랜드","비극","비난","비닐","비둘기","비디오","비로소","비만","비명","비밀","비바람","비빔밥","비상","비용","비율","비중","비타민","비판","빌딩","빗물","빗방울","빗줄기","빛깔","빨간색","빨래","빨리","사건","사계절","사나이","사냥","사람","사랑","사립","사모님","사물","사방","사상","사생활","사설","사슴","사실","사업","사용","사월","사장","사전","사진","사촌","사춘기","사탕","사투리","사흘","산길","산부인과","산업","산책","살림","살인","살짝","삼계탕","삼국","삼십","삼월","삼촌","상관","상금","상대","상류","상반기","상상","상식","상업","상인","상자","상점","상처","상추","상태","상표","상품","상황","새벽","색깔","색연필","생각","생명","생물","생방송","생산","생선","생신","생일","생활","서랍","서른","서명","서민","서비스","서양","서울","서적","서점","서쪽","서클","석사","석유","선거","선물","선배","선생","선수","선원","선장","선전","선택","선풍기","설거지","설날","설렁탕","설명","설문","설사","설악산","설치","설탕","섭씨","성공","성당","성명","성별","성인","성장","성적","성질","성함","세금","세미나","세상","세월","세종대왕","세탁","센터","센티미터","셋째","소규모","소극적","소금","소나기","소년","소득","소망","소문","소설","소속","소아과","소용","소원","소음","소중히","소지품","소질","소풍","소형","속담","속도","속옷","손가락","손길","손녀","손님","손등","손목","손뼉","손실","손질","손톱","손해","솔직히","솜씨","송아지","송이","송편","쇠고기","쇼핑","수건","수년","수단","수돗물","수동적","수면","수명","수박","수상","수석","수술","수시로","수업","수염","수영","수입","수준","수집","수출","수컷","수필","수학","수험생","수화기","숙녀","숙소","숙제","순간","순서","순수","순식간","순위","숟가락","술병","술집","숫자","스님","스물","스스로","스승","스웨터","스위치","스케이트","스튜디오","스트레스","스포츠","슬쩍","슬픔","습관","습기","승객","승리","승부","승용차","승진","시각","시간","시골","시금치","시나리오","시댁","시리즈","시멘트","시민","시부모","시선","시설","시스템","시아버지","시어머니","시월","시인","시일","시작","시장","시절","시점","시중","시즌","시집","시청","시합","시험","식구","식기","식당","식량","식료품","식물","식빵","식사","식생활","식초","식탁","식품","신고","신규","신념","신문","신발","신비","신사","신세","신용","신제품","신청","신체","신화","실감","실내","실력","실례","실망","실수","실습","실시","실장","실정","실질적","실천","실체","실컷","실태","실패","실험","실현","심리","심부름","심사","심장","심정","심판","쌍둥이","씨름","씨앗","아가씨","아나운서","아드님","아들","아쉬움","아스팔트","아시아","아울러","아저씨","아줌마","아직","아침","아파트","아프리카","아픔","아홉","아흔","악기","악몽","악수","안개","안경","안과","안내","안녕","안동","안방","안부","안주","알루미늄","알코올","암시","암컷","압력","앞날","앞문","애인","애정","액수","앨범","야간","야단","야옹","약간","약국","약속","약수","약점","약품","약혼녀","양념","양력","양말","양배추","양주","양파","어둠","어려움","어른","어젯밤","어쨌든","어쩌다가","어쩐지","언니","언덕","언론","언어","얼굴","얼른","얼음","얼핏","엄마","업무","업종","업체","엉덩이","엉망","엉터리","엊그제","에너지","에어컨","엔진","여건","여고생","여관","여군","여권","여대생","여덟","여동생","여든","여론","여름","여섯","여성","여왕","여인","여전히","여직원","여학생","여행","역사","역시","역할","연결","연구","연극","연기","연락","연설","연세","연속","연습","연애","연예인","연인","연장","연주","연출","연필","연합","연휴","열기","열매","열쇠","열심히","열정","열차","열흘","염려","엽서","영국","영남","영상","영양","영역","영웅","영원히","영하","영향","영혼","영화","옆구리","옆방","옆집","예감","예금","예방","예산","예상","예선","예술","예습","예식장","예약","예전","예절","예정","예컨대","옛날","오늘","오락","오랫동안","오렌지","오로지","오른발","오븐","오십","오염","오월","오전","오직","오징어","오페라","오피스텔","오히려","옥상","옥수수","온갖","온라인","온몸","온종일","온통","올가을","올림픽","올해","옷차림","와이셔츠","와인","완성","완전","왕비","왕자","왜냐하면","왠지","외갓집","외국","외로움","외삼촌","외출","외침","외할머니","왼발","왼손","왼쪽","요금","요일","요즘","요청","용기","용서","용어","우산","우선","우승","우연히","우정","우체국","우편","운동","운명","운반","운전","운행","울산","울음","움직임","웃어른","웃음","워낙","원고","원래","원서","원숭이","원인","원장","원피스","월급","월드컵","월세","월요일","웨이터","위반","위법","위성","위원","위험","위협","윗사람","유난히","유럽","유명","유물","유산","유적","유치원","유학","유행","유형","육군","육상","육십","육체","은행","음력","음료","음반","음성","음식","음악","음주","의견","의논","의문","의복","의식","의심","의외로","의욕","의원","의학","이것","이곳","이념","이놈","이달","이대로","이동","이렇게","이력서","이론적","이름","이민","이발소","이별","이불","이빨","이상","이성","이슬","이야기","이용","이웃","이월","이윽고","이익","이전","이중","이튿날","이틀","이혼","인간","인격","인공","인구","인근","인기","인도","인류","인물","인생","인쇄","인연","인원","인재","인종","인천","인체","인터넷","인하","인형","일곱","일기","일단","일대","일등","일반","일본","일부","일상","일생","일손","일요일","일월","일정","일종","일주일","일찍","일체","일치","일행","일회용","임금","임무","입대","입력","입맛","입사","입술","입시","입원","입장","입학","자가용","자격","자극","자동","자랑","자부심","자식","자신","자연","자원","자율","자전거","자정","자존심","자판","작가","작년","작성","작업","작용","작은딸","작품","잔디","잔뜩","잔치","잘못","잠깐","잠수함","잠시","잠옷","잠자리","잡지","장관","장군","장기간","장래","장례","장르","장마","장면","장모","장미","장비","장사","장소","장식","장애인","장인","장점","장차","장학금","재능","재빨리","재산","재생","재작년","재정","재채기","재판","재학","재활용","저것","저고리","저곳","저녁","저런","저렇게","저번","저울","저절로","저축","적극","적당히","적성","적용","적응","전개","전공","전기","전달","전라도","전망","전문","전반","전부","전세","전시","전용","전자","전쟁","전주","전철","전체","전통","전혀","전후","절대","절망","절반","절약","절차","점검","점수","점심","점원","점점","점차","접근","접시","접촉","젓가락","정거장","정도","정류장","정리","정말","정면","정문","정반대","정보","정부","정비","정상","정성","정오","정원","정장","정지","정치","정확히","제공","제과점","제대로","제목","제발","제법","제삿날","제안","제일","제작","제주도","제출","제품","제한","조각","조건","조금","조깅","조명","조미료","조상","조선","조용히","조절","조정","조직","존댓말","존재","졸업","졸음","종교","종로","종류","종소리","종업원","종종","종합","좌석","죄인","주관적","주름","주말","주머니","주먹","주문","주민","주방","주변","주식","주인","주일","주장","주전자","주택","준비","줄거리","줄기","줄무늬","중간","중계방송","중국","중년","중단","중독","중반","중부","중세","중소기업","중순","중앙","중요","중학교","즉석","즉시","즐거움","증가","증거","증권","증상","증세","지각","지갑","지경","지극히","지금","지급","지능","지름길","지리산","지방","지붕","지식","지역","지우개","지원","지적","지점","지진","지출","직선","직업","직원","직장","진급","진동","진로","진료","진리","진짜","진찰","진출","진통","진행","질문","질병","질서","짐작","집단","집안","집중","짜증","찌꺼기","차남","차라리","차량","차림","차별","차선","차츰","착각","찬물","찬성","참가","참기름","참새","참석","참여","참외","참조","찻잔","창가","창고","창구","창문","창밖","창작","창조","채널","채점","책가방","책방","책상","책임","챔피언","처벌","처음","천국","천둥","천장","천재","천천히","철도","철저히","철학","첫날","첫째","청년","청바지","청소","청춘","체계","체력","체온","체육","체중","체험","초등학생","초반","초밥","초상화","초순","초여름","초원","초저녁","초점","초청","초콜릿","촛불","총각","총리","총장","촬영","최근","최상","최선","최신","최악","최종","추석","추억","추진","추천","추측","축구","축소","축제","축하","출근","출발","출산","출신","출연","출입","출장","출판","충격","충고","충돌","충분히","충청도","취업","취직","취향","치약","친구","친척","칠십","칠월","칠판","침대","침묵","침실","칫솔","칭찬","카메라","카운터","칼국수","캐릭터","캠퍼스","캠페인","커튼","컨디션","컬러","컴퓨터","코끼리","코미디","콘서트","콜라","콤플렉스","콩나물","쾌감","쿠데타","크림","큰길","큰딸","큰소리","큰아들","큰어머니","큰일","큰절","클래식","클럽","킬로","타입","타자기","탁구","탁자","탄생","태권도","태양","태풍","택시","탤런트","터널","터미널","테니스","테스트","테이블","텔레비전","토론","토마토","토요일","통계","통과","통로","통신","통역","통일","통장","통제","통증","통합","통화","퇴근","퇴원","퇴직금","튀김","트럭","특급","특별","특성","특수","특징","특히","튼튼히","티셔츠","파란색","파일","파출소","판결","판단","판매","판사","팔십","팔월","팝송","패션","팩스","팩시밀리","팬티","퍼센트","페인트","편견","편의","편지","편히","평가","평균","평생","평소","평양","평일","평화","포스터","포인트","포장","포함","표면","표정","표준","표현","품목","품질","풍경","풍속","풍습","프랑스","프린터","플라스틱","피곤","피망","피아노","필름","필수","필요","필자","필통","핑계","하느님","하늘","하드웨어","하룻밤","하반기","하숙집","하순","하여튼","하지만","하천","하품","하필","학과","학교","학급","학기","학년","학력","학번","학부모","학비","학생","학술","학습","학용품","학원","학위","학자","학점","한계","한글","한꺼번에","한낮","한눈","한동안","한때","한라산","한마디","한문","한번","한복","한식","한여름","한쪽","할머니","할아버지","할인","함께","함부로","합격","합리적","항공","항구","항상","항의","해결","해군","해답","해당","해물","해석","해설","해수욕장","해안","핵심","핸드백","햄버거","햇볕","햇살","행동","행복","행사","행운","행위","향기","향상","향수","허락","허용","헬기","현관","현금","현대","현상","현실","현장","현재","현지","혈액","협력","형부","형사","형수","형식","형제","형태","형편","혜택","호기심","호남","호랑이","호박","호텔","호흡","혹시","홀로","홈페이지","홍보","홍수","홍차","화면","화분","화살","화요일","화장","화학","확보","확인","확장","확정","환갑","환경","환영","환율","환자","활기","활동","활발히","활용","활짝","회견","회관","회복","회색","회원","회장","회전","횟수","횡단보도","효율적","후반","후춧가루","훈련","훨씬","휴식","휴일","흉내","흐름","흑백","흑인","흔적","흔히","흥미","흥분","희곡","희망","희생","흰색","힘껏"]')},1945:module=>{"use strict";module.exports=JSON.parse('["abacate","abaixo","abalar","abater","abduzir","abelha","aberto","abismo","abotoar","abranger","abreviar","abrigar","abrupto","absinto","absoluto","absurdo","abutre","acabado","acalmar","acampar","acanhar","acaso","aceitar","acelerar","acenar","acervo","acessar","acetona","achatar","acidez","acima","acionado","acirrar","aclamar","aclive","acolhida","acomodar","acoplar","acordar","acumular","acusador","adaptar","adega","adentro","adepto","adequar","aderente","adesivo","adeus","adiante","aditivo","adjetivo","adjunto","admirar","adorar","adquirir","adubo","adverso","advogado","aeronave","afastar","aferir","afetivo","afinador","afivelar","aflito","afluente","afrontar","agachar","agarrar","agasalho","agenciar","agilizar","agiota","agitado","agora","agradar","agreste","agrupar","aguardar","agulha","ajoelhar","ajudar","ajustar","alameda","alarme","alastrar","alavanca","albergue","albino","alcatra","aldeia","alecrim","alegria","alertar","alface","alfinete","algum","alheio","aliar","alicate","alienar","alinhar","aliviar","almofada","alocar","alpiste","alterar","altitude","alucinar","alugar","aluno","alusivo","alvo","amaciar","amador","amarelo","amassar","ambas","ambiente","ameixa","amenizar","amido","amistoso","amizade","amolador","amontoar","amoroso","amostra","amparar","ampliar","ampola","anagrama","analisar","anarquia","anatomia","andaime","anel","anexo","angular","animar","anjo","anomalia","anotado","ansioso","anterior","anuidade","anunciar","anzol","apagador","apalpar","apanhado","apego","apelido","apertada","apesar","apetite","apito","aplauso","aplicada","apoio","apontar","aposta","aprendiz","aprovar","aquecer","arame","aranha","arara","arcada","ardente","areia","arejar","arenito","aresta","argiloso","argola","arma","arquivo","arraial","arrebate","arriscar","arroba","arrumar","arsenal","arterial","artigo","arvoredo","asfaltar","asilado","aspirar","assador","assinar","assoalho","assunto","astral","atacado","atadura","atalho","atarefar","atear","atender","aterro","ateu","atingir","atirador","ativo","atoleiro","atracar","atrevido","atriz","atual","atum","auditor","aumentar","aura","aurora","autismo","autoria","autuar","avaliar","avante","avaria","avental","avesso","aviador","avisar","avulso","axila","azarar","azedo","azeite","azulejo","babar","babosa","bacalhau","bacharel","bacia","bagagem","baiano","bailar","baioneta","bairro","baixista","bajular","baleia","baliza","balsa","banal","bandeira","banho","banir","banquete","barato","barbado","baronesa","barraca","barulho","baseado","bastante","batata","batedor","batida","batom","batucar","baunilha","beber","beijo","beirada","beisebol","beldade","beleza","belga","beliscar","bendito","bengala","benzer","berimbau","berlinda","berro","besouro","bexiga","bezerro","bico","bicudo","bienal","bifocal","bifurcar","bigorna","bilhete","bimestre","bimotor","biologia","biombo","biosfera","bipolar","birrento","biscoito","bisneto","bispo","bissexto","bitola","bizarro","blindado","bloco","bloquear","boato","bobagem","bocado","bocejo","bochecha","boicotar","bolada","boletim","bolha","bolo","bombeiro","bonde","boneco","bonita","borbulha","borda","boreal","borracha","bovino","boxeador","branco","brasa","braveza","breu","briga","brilho","brincar","broa","brochura","bronzear","broto","bruxo","bucha","budismo","bufar","bule","buraco","busca","busto","buzina","cabana","cabelo","cabide","cabo","cabrito","cacau","cacetada","cachorro","cacique","cadastro","cadeado","cafezal","caiaque","caipira","caixote","cajado","caju","calafrio","calcular","caldeira","calibrar","calmante","calota","camada","cambista","camisa","camomila","campanha","camuflar","canavial","cancelar","caneta","canguru","canhoto","canivete","canoa","cansado","cantar","canudo","capacho","capela","capinar","capotar","capricho","captador","capuz","caracol","carbono","cardeal","careca","carimbar","carneiro","carpete","carreira","cartaz","carvalho","casaco","casca","casebre","castelo","casulo","catarata","cativar","caule","causador","cautelar","cavalo","caverna","cebola","cedilha","cegonha","celebrar","celular","cenoura","censo","centeio","cercar","cerrado","certeiro","cerveja","cetim","cevada","chacota","chaleira","chamado","chapada","charme","chatice","chave","chefe","chegada","cheiro","cheque","chicote","chifre","chinelo","chocalho","chover","chumbo","chutar","chuva","cicatriz","ciclone","cidade","cidreira","ciente","cigana","cimento","cinto","cinza","ciranda","circuito","cirurgia","citar","clareza","clero","clicar","clone","clube","coado","coagir","cobaia","cobertor","cobrar","cocada","coelho","coentro","coeso","cogumelo","coibir","coifa","coiote","colar","coleira","colher","colidir","colmeia","colono","coluna","comando","combinar","comentar","comitiva","comover","complexo","comum","concha","condor","conectar","confuso","congelar","conhecer","conjugar","consumir","contrato","convite","cooperar","copeiro","copiador","copo","coquetel","coragem","cordial","corneta","coronha","corporal","correio","cortejo","coruja","corvo","cosseno","costela","cotonete","couro","couve","covil","cozinha","cratera","cravo","creche","credor","creme","crer","crespo","criada","criminal","crioulo","crise","criticar","crosta","crua","cruzeiro","cubano","cueca","cuidado","cujo","culatra","culminar","culpar","cultura","cumprir","cunhado","cupido","curativo","curral","cursar","curto","cuspir","custear","cutelo","damasco","datar","debater","debitar","deboche","debulhar","decalque","decimal","declive","decote","decretar","dedal","dedicado","deduzir","defesa","defumar","degelo","degrau","degustar","deitado","deixar","delator","delegado","delinear","delonga","demanda","demitir","demolido","dentista","depenado","depilar","depois","depressa","depurar","deriva","derramar","desafio","desbotar","descanso","desenho","desfiado","desgaste","desigual","deslize","desmamar","desova","despesa","destaque","desviar","detalhar","detentor","detonar","detrito","deusa","dever","devido","devotado","dezena","diagrama","dialeto","didata","difuso","digitar","dilatado","diluente","diminuir","dinastia","dinheiro","diocese","direto","discreta","disfarce","disparo","disquete","dissipar","distante","ditador","diurno","diverso","divisor","divulgar","dizer","dobrador","dolorido","domador","dominado","donativo","donzela","dormente","dorsal","dosagem","dourado","doutor","drenagem","drible","drogaria","duelar","duende","dueto","duplo","duquesa","durante","duvidoso","eclodir","ecoar","ecologia","edificar","edital","educado","efeito","efetivar","ejetar","elaborar","eleger","eleitor","elenco","elevador","eliminar","elogiar","embargo","embolado","embrulho","embutido","emenda","emergir","emissor","empatia","empenho","empinado","empolgar","emprego","empurrar","emulador","encaixe","encenado","enchente","encontro","endeusar","endossar","enfaixar","enfeite","enfim","engajado","engenho","englobar","engomado","engraxar","enguia","enjoar","enlatar","enquanto","enraizar","enrolado","enrugar","ensaio","enseada","ensino","ensopado","entanto","enteado","entidade","entortar","entrada","entulho","envergar","enviado","envolver","enxame","enxerto","enxofre","enxuto","epiderme","equipar","ereto","erguido","errata","erva","ervilha","esbanjar","esbelto","escama","escola","escrita","escuta","esfinge","esfolar","esfregar","esfumado","esgrima","esmalte","espanto","espelho","espiga","esponja","espreita","espumar","esquerda","estaca","esteira","esticar","estofado","estrela","estudo","esvaziar","etanol","etiqueta","euforia","europeu","evacuar","evaporar","evasivo","eventual","evidente","evoluir","exagero","exalar","examinar","exato","exausto","excesso","excitar","exclamar","executar","exemplo","exibir","exigente","exonerar","expandir","expelir","expirar","explanar","exposto","expresso","expulsar","externo","extinto","extrato","fabricar","fabuloso","faceta","facial","fada","fadiga","faixa","falar","falta","familiar","fandango","fanfarra","fantoche","fardado","farelo","farinha","farofa","farpa","fartura","fatia","fator","favorita","faxina","fazenda","fechado","feijoada","feirante","felino","feminino","fenda","feno","fera","feriado","ferrugem","ferver","festejar","fetal","feudal","fiapo","fibrose","ficar","ficheiro","figurado","fileira","filho","filme","filtrar","firmeza","fisgada","fissura","fita","fivela","fixador","fixo","flacidez","flamingo","flanela","flechada","flora","flutuar","fluxo","focal","focinho","fofocar","fogo","foguete","foice","folgado","folheto","forjar","formiga","forno","forte","fosco","fossa","fragata","fralda","frango","frasco","fraterno","freira","frente","fretar","frieza","friso","fritura","fronha","frustrar","fruteira","fugir","fulano","fuligem","fundar","fungo","funil","furador","furioso","futebol","gabarito","gabinete","gado","gaiato","gaiola","gaivota","galega","galho","galinha","galocha","ganhar","garagem","garfo","gargalo","garimpo","garoupa","garrafa","gasoduto","gasto","gata","gatilho","gaveta","gazela","gelado","geleia","gelo","gemada","gemer","gemido","generoso","gengiva","genial","genoma","genro","geologia","gerador","germinar","gesso","gestor","ginasta","gincana","gingado","girafa","girino","glacial","glicose","global","glorioso","goela","goiaba","golfe","golpear","gordura","gorjeta","gorro","gostoso","goteira","governar","gracejo","gradual","grafite","gralha","grampo","granada","gratuito","graveto","graxa","grego","grelhar","greve","grilo","grisalho","gritaria","grosso","grotesco","grudado","grunhido","gruta","guache","guarani","guaxinim","guerrear","guiar","guincho","guisado","gula","guloso","guru","habitar","harmonia","haste","haver","hectare","herdar","heresia","hesitar","hiato","hibernar","hidratar","hiena","hino","hipismo","hipnose","hipoteca","hoje","holofote","homem","honesto","honrado","hormonal","hospedar","humorado","iate","ideia","idoso","ignorado","igreja","iguana","ileso","ilha","iludido","iluminar","ilustrar","imagem","imediato","imenso","imersivo","iminente","imitador","imortal","impacto","impedir","implante","impor","imprensa","impune","imunizar","inalador","inapto","inativo","incenso","inchar","incidir","incluir","incolor","indeciso","indireto","indutor","ineficaz","inerente","infantil","infestar","infinito","inflamar","informal","infrator","ingerir","inibido","inicial","inimigo","injetar","inocente","inodoro","inovador","inox","inquieto","inscrito","inseto","insistir","inspetor","instalar","insulto","intacto","integral","intimar","intocado","intriga","invasor","inverno","invicto","invocar","iogurte","iraniano","ironizar","irreal","irritado","isca","isento","isolado","isqueiro","italiano","janeiro","jangada","janta","jararaca","jardim","jarro","jasmim","jato","javali","jazida","jejum","joaninha","joelhada","jogador","joia","jornal","jorrar","jovem","juba","judeu","judoca","juiz","julgador","julho","jurado","jurista","juro","justa","labareda","laboral","lacre","lactante","ladrilho","lagarta","lagoa","laje","lamber","lamentar","laminar","lampejo","lanche","lapidar","lapso","laranja","lareira","largura","lasanha","lastro","lateral","latido","lavanda","lavoura","lavrador","laxante","lazer","lealdade","lebre","legado","legendar","legista","leigo","leiloar","leitura","lembrete","leme","lenhador","lentilha","leoa","lesma","leste","letivo","letreiro","levar","leveza","levitar","liberal","libido","liderar","ligar","ligeiro","limitar","limoeiro","limpador","linda","linear","linhagem","liquidez","listagem","lisura","litoral","livro","lixa","lixeira","locador","locutor","lojista","lombo","lona","longe","lontra","lorde","lotado","loteria","loucura","lousa","louvar","luar","lucidez","lucro","luneta","lustre","lutador","luva","macaco","macete","machado","macio","madeira","madrinha","magnata","magreza","maior","mais","malandro","malha","malote","maluco","mamilo","mamoeiro","mamute","manada","mancha","mandato","manequim","manhoso","manivela","manobrar","mansa","manter","manusear","mapeado","maquinar","marcador","maresia","marfim","margem","marinho","marmita","maroto","marquise","marreco","martelo","marujo","mascote","masmorra","massagem","mastigar","matagal","materno","matinal","matutar","maxilar","medalha","medida","medusa","megafone","meiga","melancia","melhor","membro","memorial","menino","menos","mensagem","mental","merecer","mergulho","mesada","mesclar","mesmo","mesquita","mestre","metade","meteoro","metragem","mexer","mexicano","micro","migalha","migrar","milagre","milenar","milhar","mimado","minerar","minhoca","ministro","minoria","miolo","mirante","mirtilo","misturar","mocidade","moderno","modular","moeda","moer","moinho","moita","moldura","moleza","molho","molinete","molusco","montanha","moqueca","morango","morcego","mordomo","morena","mosaico","mosquete","mostarda","motel","motim","moto","motriz","muda","muito","mulata","mulher","multar","mundial","munido","muralha","murcho","muscular","museu","musical","nacional","nadador","naja","namoro","narina","narrado","nascer","nativa","natureza","navalha","navegar","navio","neblina","nebuloso","negativa","negociar","negrito","nervoso","neta","neural","nevasca","nevoeiro","ninar","ninho","nitidez","nivelar","nobreza","noite","noiva","nomear","nominal","nordeste","nortear","notar","noticiar","noturno","novelo","novilho","novo","nublado","nudez","numeral","nupcial","nutrir","nuvem","obcecado","obedecer","objetivo","obrigado","obscuro","obstetra","obter","obturar","ocidente","ocioso","ocorrer","oculista","ocupado","ofegante","ofensiva","oferenda","oficina","ofuscado","ogiva","olaria","oleoso","olhar","oliveira","ombro","omelete","omisso","omitir","ondulado","oneroso","ontem","opcional","operador","oponente","oportuno","oposto","orar","orbitar","ordem","ordinal","orfanato","orgasmo","orgulho","oriental","origem","oriundo","orla","ortodoxo","orvalho","oscilar","ossada","osso","ostentar","otimismo","ousadia","outono","outubro","ouvido","ovelha","ovular","oxidar","oxigenar","pacato","paciente","pacote","pactuar","padaria","padrinho","pagar","pagode","painel","pairar","paisagem","palavra","palestra","palheta","palito","palmada","palpitar","pancada","panela","panfleto","panqueca","pantanal","papagaio","papelada","papiro","parafina","parcial","pardal","parede","partida","pasmo","passado","pastel","patamar","patente","patinar","patrono","paulada","pausar","peculiar","pedalar","pedestre","pediatra","pedra","pegada","peitoral","peixe","pele","pelicano","penca","pendurar","peneira","penhasco","pensador","pente","perceber","perfeito","pergunta","perito","permitir","perna","perplexo","persiana","pertence","peruca","pescado","pesquisa","pessoa","petiscar","piada","picado","piedade","pigmento","pilastra","pilhado","pilotar","pimenta","pincel","pinguim","pinha","pinote","pintar","pioneiro","pipoca","piquete","piranha","pires","pirueta","piscar","pistola","pitanga","pivete","planta","plaqueta","platina","plebeu","plumagem","pluvial","pneu","poda","poeira","poetisa","polegada","policiar","poluente","polvilho","pomar","pomba","ponderar","pontaria","populoso","porta","possuir","postal","pote","poupar","pouso","povoar","praia","prancha","prato","praxe","prece","predador","prefeito","premiar","prensar","preparar","presilha","pretexto","prevenir","prezar","primata","princesa","prisma","privado","processo","produto","profeta","proibido","projeto","prometer","propagar","prosa","protetor","provador","publicar","pudim","pular","pulmonar","pulseira","punhal","punir","pupilo","pureza","puxador","quadra","quantia","quarto","quase","quebrar","queda","queijo","quente","querido","quimono","quina","quiosque","rabanada","rabisco","rachar","racionar","radial","raiar","rainha","raio","raiva","rajada","ralado","ramal","ranger","ranhura","rapadura","rapel","rapidez","raposa","raquete","raridade","rasante","rascunho","rasgar","raspador","rasteira","rasurar","ratazana","ratoeira","realeza","reanimar","reaver","rebaixar","rebelde","rebolar","recado","recente","recheio","recibo","recordar","recrutar","recuar","rede","redimir","redonda","reduzida","reenvio","refinar","refletir","refogar","refresco","refugiar","regalia","regime","regra","reinado","reitor","rejeitar","relativo","remador","remendo","remorso","renovado","reparo","repelir","repleto","repolho","represa","repudiar","requerer","resenha","resfriar","resgatar","residir","resolver","respeito","ressaca","restante","resumir","retalho","reter","retirar","retomada","retratar","revelar","revisor","revolta","riacho","rica","rigidez","rigoroso","rimar","ringue","risada","risco","risonho","robalo","rochedo","rodada","rodeio","rodovia","roedor","roleta","romano","roncar","rosado","roseira","rosto","rota","roteiro","rotina","rotular","rouco","roupa","roxo","rubro","rugido","rugoso","ruivo","rumo","rupestre","russo","sabor","saciar","sacola","sacudir","sadio","safira","saga","sagrada","saibro","salada","saleiro","salgado","saliva","salpicar","salsicha","saltar","salvador","sambar","samurai","sanar","sanfona","sangue","sanidade","sapato","sarda","sargento","sarjeta","saturar","saudade","saxofone","sazonal","secar","secular","seda","sedento","sediado","sedoso","sedutor","segmento","segredo","segundo","seiva","seleto","selvagem","semanal","semente","senador","senhor","sensual","sentado","separado","sereia","seringa","serra","servo","setembro","setor","sigilo","silhueta","silicone","simetria","simpatia","simular","sinal","sincero","singular","sinopse","sintonia","sirene","siri","situado","soberano","sobra","socorro","sogro","soja","solda","soletrar","solteiro","sombrio","sonata","sondar","sonegar","sonhador","sono","soprano","soquete","sorrir","sorteio","sossego","sotaque","soterrar","sovado","sozinho","suavizar","subida","submerso","subsolo","subtrair","sucata","sucesso","suco","sudeste","sufixo","sugador","sugerir","sujeito","sulfato","sumir","suor","superior","suplicar","suposto","suprimir","surdina","surfista","surpresa","surreal","surtir","suspiro","sustento","tabela","tablete","tabuada","tacho","tagarela","talher","talo","talvez","tamanho","tamborim","tampa","tangente","tanto","tapar","tapioca","tardio","tarefa","tarja","tarraxa","tatuagem","taurino","taxativo","taxista","teatral","tecer","tecido","teclado","tedioso","teia","teimar","telefone","telhado","tempero","tenente","tensor","tentar","termal","terno","terreno","tese","tesoura","testado","teto","textura","texugo","tiara","tigela","tijolo","timbrar","timidez","tingido","tinteiro","tiragem","titular","toalha","tocha","tolerar","tolice","tomada","tomilho","tonel","tontura","topete","tora","torcido","torneio","torque","torrada","torto","tostar","touca","toupeira","toxina","trabalho","tracejar","tradutor","trafegar","trajeto","trama","trancar","trapo","traseiro","tratador","travar","treino","tremer","trepidar","trevo","triagem","tribo","triciclo","tridente","trilogia","trindade","triplo","triturar","triunfal","trocar","trombeta","trova","trunfo","truque","tubular","tucano","tudo","tulipa","tupi","turbo","turma","turquesa","tutelar","tutorial","uivar","umbigo","unha","unidade","uniforme","urologia","urso","urtiga","urubu","usado","usina","usufruir","vacina","vadiar","vagaroso","vaidoso","vala","valente","validade","valores","vantagem","vaqueiro","varanda","vareta","varrer","vascular","vasilha","vassoura","vazar","vazio","veado","vedar","vegetar","veicular","veleiro","velhice","veludo","vencedor","vendaval","venerar","ventre","verbal","verdade","vereador","vergonha","vermelho","verniz","versar","vertente","vespa","vestido","vetorial","viaduto","viagem","viajar","viatura","vibrador","videira","vidraria","viela","viga","vigente","vigiar","vigorar","vilarejo","vinco","vinheta","vinil","violeta","virada","virtude","visitar","visto","vitral","viveiro","vizinho","voador","voar","vogal","volante","voleibol","voltagem","volumoso","vontade","vulto","vuvuzela","xadrez","xarope","xeque","xeretar","xerife","xingar","zangado","zarpar","zebu","zelador","zombar","zoologia","zumbido"]')},659:module=>{"use strict";module.exports=JSON.parse('["ábaco","abdomen","abeja","abierto","abogado","abono","aborto","abrazo","abrir","abuelo","abuso","acabar","academia","acceso","acción","aceite","acelga","acento","aceptar","ácido","aclarar","acné","acoger","acoso","activo","acto","actriz","actuar","acudir","acuerdo","acusar","adicto","admitir","adoptar","adorno","aduana","adulto","aéreo","afectar","afición","afinar","afirmar","ágil","agitar","agonía","agosto","agotar","agregar","agrio","agua","agudo","águila","aguja","ahogo","ahorro","aire","aislar","ajedrez","ajeno","ajuste","alacrán","alambre","alarma","alba","álbum","alcalde","aldea","alegre","alejar","alerta","aleta","alfiler","alga","algodón","aliado","aliento","alivio","alma","almeja","almíbar","altar","alteza","altivo","alto","altura","alumno","alzar","amable","amante","amapola","amargo","amasar","ámbar","ámbito","ameno","amigo","amistad","amor","amparo","amplio","ancho","anciano","ancla","andar","andén","anemia","ángulo","anillo","ánimo","anís","anotar","antena","antiguo","antojo","anual","anular","anuncio","añadir","añejo","año","apagar","aparato","apetito","apio","aplicar","apodo","aporte","apoyo","aprender","aprobar","apuesta","apuro","arado","araña","arar","árbitro","árbol","arbusto","archivo","arco","arder","ardilla","arduo","área","árido","aries","armonía","arnés","aroma","arpa","arpón","arreglo","arroz","arruga","arte","artista","asa","asado","asalto","ascenso","asegurar","aseo","asesor","asiento","asilo","asistir","asno","asombro","áspero","astilla","astro","astuto","asumir","asunto","atajo","ataque","atar","atento","ateo","ático","atleta","átomo","atraer","atroz","atún","audaz","audio","auge","aula","aumento","ausente","autor","aval","avance","avaro","ave","avellana","avena","avestruz","avión","aviso","ayer","ayuda","ayuno","azafrán","azar","azote","azúcar","azufre","azul","baba","babor","bache","bahía","baile","bajar","balanza","balcón","balde","bambú","banco","banda","baño","barba","barco","barniz","barro","báscula","bastón","basura","batalla","batería","batir","batuta","baúl","bazar","bebé","bebida","bello","besar","beso","bestia","bicho","bien","bingo","blanco","bloque","blusa","boa","bobina","bobo","boca","bocina","boda","bodega","boina","bola","bolero","bolsa","bomba","bondad","bonito","bono","bonsái","borde","borrar","bosque","bote","botín","bóveda","bozal","bravo","brazo","brecha","breve","brillo","brinco","brisa","broca","broma","bronce","brote","bruja","brusco","bruto","buceo","bucle","bueno","buey","bufanda","bufón","búho","buitre","bulto","burbuja","burla","burro","buscar","butaca","buzón","caballo","cabeza","cabina","cabra","cacao","cadáver","cadena","caer","café","caída","caimán","caja","cajón","cal","calamar","calcio","caldo","calidad","calle","calma","calor","calvo","cama","cambio","camello","camino","campo","cáncer","candil","canela","canguro","canica","canto","caña","cañón","caoba","caos","capaz","capitán","capote","captar","capucha","cara","carbón","cárcel","careta","carga","cariño","carne","carpeta","carro","carta","casa","casco","casero","caspa","castor","catorce","catre","caudal","causa","cazo","cebolla","ceder","cedro","celda","célebre","celoso","célula","cemento","ceniza","centro","cerca","cerdo","cereza","cero","cerrar","certeza","césped","cetro","chacal","chaleco","champú","chancla","chapa","charla","chico","chiste","chivo","choque","choza","chuleta","chupar","ciclón","ciego","cielo","cien","cierto","cifra","cigarro","cima","cinco","cine","cinta","ciprés","circo","ciruela","cisne","cita","ciudad","clamor","clan","claro","clase","clave","cliente","clima","clínica","cobre","cocción","cochino","cocina","coco","código","codo","cofre","coger","cohete","cojín","cojo","cola","colcha","colegio","colgar","colina","collar","colmo","columna","combate","comer","comida","cómodo","compra","conde","conejo","conga","conocer","consejo","contar","copa","copia","corazón","corbata","corcho","cordón","corona","correr","coser","cosmos","costa","cráneo","cráter","crear","crecer","creído","crema","cría","crimen","cripta","crisis","cromo","crónica","croqueta","crudo","cruz","cuadro","cuarto","cuatro","cubo","cubrir","cuchara","cuello","cuento","cuerda","cuesta","cueva","cuidar","culebra","culpa","culto","cumbre","cumplir","cuna","cuneta","cuota","cupón","cúpula","curar","curioso","curso","curva","cutis","dama","danza","dar","dardo","dátil","deber","débil","década","decir","dedo","defensa","definir","dejar","delfín","delgado","delito","demora","denso","dental","deporte","derecho","derrota","desayuno","deseo","desfile","desnudo","destino","desvío","detalle","detener","deuda","día","diablo","diadema","diamante","diana","diario","dibujo","dictar","diente","dieta","diez","difícil","digno","dilema","diluir","dinero","directo","dirigir","disco","diseño","disfraz","diva","divino","doble","doce","dolor","domingo","don","donar","dorado","dormir","dorso","dos","dosis","dragón","droga","ducha","duda","duelo","dueño","dulce","dúo","duque","durar","dureza","duro","ébano","ebrio","echar","eco","ecuador","edad","edición","edificio","editor","educar","efecto","eficaz","eje","ejemplo","elefante","elegir","elemento","elevar","elipse","élite","elixir","elogio","eludir","embudo","emitir","emoción","empate","empeño","empleo","empresa","enano","encargo","enchufe","encía","enemigo","enero","enfado","enfermo","engaño","enigma","enlace","enorme","enredo","ensayo","enseñar","entero","entrar","envase","envío","época","equipo","erizo","escala","escena","escolar","escribir","escudo","esencia","esfera","esfuerzo","espada","espejo","espía","esposa","espuma","esquí","estar","este","estilo","estufa","etapa","eterno","ética","etnia","evadir","evaluar","evento","evitar","exacto","examen","exceso","excusa","exento","exigir","exilio","existir","éxito","experto","explicar","exponer","extremo","fábrica","fábula","fachada","fácil","factor","faena","faja","falda","fallo","falso","faltar","fama","familia","famoso","faraón","farmacia","farol","farsa","fase","fatiga","fauna","favor","fax","febrero","fecha","feliz","feo","feria","feroz","fértil","fervor","festín","fiable","fianza","fiar","fibra","ficción","ficha","fideo","fiebre","fiel","fiera","fiesta","figura","fijar","fijo","fila","filete","filial","filtro","fin","finca","fingir","finito","firma","flaco","flauta","flecha","flor","flota","fluir","flujo","flúor","fobia","foca","fogata","fogón","folio","folleto","fondo","forma","forro","fortuna","forzar","fosa","foto","fracaso","frágil","franja","frase","fraude","freír","freno","fresa","frío","frito","fruta","fuego","fuente","fuerza","fuga","fumar","función","funda","furgón","furia","fusil","fútbol","futuro","gacela","gafas","gaita","gajo","gala","galería","gallo","gamba","ganar","gancho","ganga","ganso","garaje","garza","gasolina","gastar","gato","gavilán","gemelo","gemir","gen","género","genio","gente","geranio","gerente","germen","gesto","gigante","gimnasio","girar","giro","glaciar","globo","gloria","gol","golfo","goloso","golpe","goma","gordo","gorila","gorra","gota","goteo","gozar","grada","gráfico","grano","grasa","gratis","grave","grieta","grillo","gripe","gris","grito","grosor","grúa","grueso","grumo","grupo","guante","guapo","guardia","guerra","guía","guiño","guion","guiso","guitarra","gusano","gustar","haber","hábil","hablar","hacer","hacha","hada","hallar","hamaca","harina","haz","hazaña","hebilla","hebra","hecho","helado","helio","hembra","herir","hermano","héroe","hervir","hielo","hierro","hígado","higiene","hijo","himno","historia","hocico","hogar","hoguera","hoja","hombre","hongo","honor","honra","hora","hormiga","horno","hostil","hoyo","hueco","huelga","huerta","hueso","huevo","huida","huir","humano","húmedo","humilde","humo","hundir","huracán","hurto","icono","ideal","idioma","ídolo","iglesia","iglú","igual","ilegal","ilusión","imagen","imán","imitar","impar","imperio","imponer","impulso","incapaz","índice","inerte","infiel","informe","ingenio","inicio","inmenso","inmune","innato","insecto","instante","interés","íntimo","intuir","inútil","invierno","ira","iris","ironía","isla","islote","jabalí","jabón","jamón","jarabe","jardín","jarra","jaula","jazmín","jefe","jeringa","jinete","jornada","joroba","joven","joya","juerga","jueves","juez","jugador","jugo","juguete","juicio","junco","jungla","junio","juntar","júpiter","jurar","justo","juvenil","juzgar","kilo","koala","labio","lacio","lacra","lado","ladrón","lagarto","lágrima","laguna","laico","lamer","lámina","lámpara","lana","lancha","langosta","lanza","lápiz","largo","larva","lástima","lata","látex","latir","laurel","lavar","lazo","leal","lección","leche","lector","leer","legión","legumbre","lejano","lengua","lento","leña","león","leopardo","lesión","letal","letra","leve","leyenda","libertad","libro","licor","líder","lidiar","lienzo","liga","ligero","lima","límite","limón","limpio","lince","lindo","línea","lingote","lino","linterna","líquido","liso","lista","litera","litio","litro","llaga","llama","llanto","llave","llegar","llenar","llevar","llorar","llover","lluvia","lobo","loción","loco","locura","lógica","logro","lombriz","lomo","lonja","lote","lucha","lucir","lugar","lujo","luna","lunes","lupa","lustro","luto","luz","maceta","macho","madera","madre","maduro","maestro","mafia","magia","mago","maíz","maldad","maleta","malla","malo","mamá","mambo","mamut","manco","mando","manejar","manga","maniquí","manjar","mano","manso","manta","mañana","mapa","máquina","mar","marco","marea","marfil","margen","marido","mármol","marrón","martes","marzo","masa","máscara","masivo","matar","materia","matiz","matriz","máximo","mayor","mazorca","mecha","medalla","medio","médula","mejilla","mejor","melena","melón","memoria","menor","mensaje","mente","menú","mercado","merengue","mérito","mes","mesón","meta","meter","método","metro","mezcla","miedo","miel","miembro","miga","mil","milagro","militar","millón","mimo","mina","minero","mínimo","minuto","miope","mirar","misa","miseria","misil","mismo","mitad","mito","mochila","moción","moda","modelo","moho","mojar","molde","moler","molino","momento","momia","monarca","moneda","monja","monto","moño","morada","morder","moreno","morir","morro","morsa","mortal","mosca","mostrar","motivo","mover","móvil","mozo","mucho","mudar","mueble","muela","muerte","muestra","mugre","mujer","mula","muleta","multa","mundo","muñeca","mural","muro","músculo","museo","musgo","música","muslo","nácar","nación","nadar","naipe","naranja","nariz","narrar","nasal","natal","nativo","natural","náusea","naval","nave","navidad","necio","néctar","negar","negocio","negro","neón","nervio","neto","neutro","nevar","nevera","nicho","nido","niebla","nieto","niñez","niño","nítido","nivel","nobleza","noche","nómina","noria","norma","norte","nota","noticia","novato","novela","novio","nube","nuca","núcleo","nudillo","nudo","nuera","nueve","nuez","nulo","número","nutria","oasis","obeso","obispo","objeto","obra","obrero","observar","obtener","obvio","oca","ocaso","océano","ochenta","ocho","ocio","ocre","octavo","octubre","oculto","ocupar","ocurrir","odiar","odio","odisea","oeste","ofensa","oferta","oficio","ofrecer","ogro","oído","oír","ojo","ola","oleada","olfato","olivo","olla","olmo","olor","olvido","ombligo","onda","onza","opaco","opción","ópera","opinar","oponer","optar","óptica","opuesto","oración","orador","oral","órbita","orca","orden","oreja","órgano","orgía","orgullo","oriente","origen","orilla","oro","orquesta","oruga","osadía","oscuro","osezno","oso","ostra","otoño","otro","oveja","óvulo","óxido","oxígeno","oyente","ozono","pacto","padre","paella","página","pago","país","pájaro","palabra","palco","paleta","pálido","palma","paloma","palpar","pan","panal","pánico","pantera","pañuelo","papá","papel","papilla","paquete","parar","parcela","pared","parir","paro","párpado","parque","párrafo","parte","pasar","paseo","pasión","paso","pasta","pata","patio","patria","pausa","pauta","pavo","payaso","peatón","pecado","pecera","pecho","pedal","pedir","pegar","peine","pelar","peldaño","pelea","peligro","pellejo","pelo","peluca","pena","pensar","peñón","peón","peor","pepino","pequeño","pera","percha","perder","pereza","perfil","perico","perla","permiso","perro","persona","pesa","pesca","pésimo","pestaña","pétalo","petróleo","pez","pezuña","picar","pichón","pie","piedra","pierna","pieza","pijama","pilar","piloto","pimienta","pino","pintor","pinza","piña","piojo","pipa","pirata","pisar","piscina","piso","pista","pitón","pizca","placa","plan","plata","playa","plaza","pleito","pleno","plomo","pluma","plural","pobre","poco","poder","podio","poema","poesía","poeta","polen","policía","pollo","polvo","pomada","pomelo","pomo","pompa","poner","porción","portal","posada","poseer","posible","poste","potencia","potro","pozo","prado","precoz","pregunta","premio","prensa","preso","previo","primo","príncipe","prisión","privar","proa","probar","proceso","producto","proeza","profesor","programa","prole","promesa","pronto","propio","próximo","prueba","público","puchero","pudor","pueblo","puerta","puesto","pulga","pulir","pulmón","pulpo","pulso","puma","punto","puñal","puño","pupa","pupila","puré","quedar","queja","quemar","querer","queso","quieto","química","quince","quitar","rábano","rabia","rabo","ración","radical","raíz","rama","rampa","rancho","rango","rapaz","rápido","rapto","rasgo","raspa","rato","rayo","raza","razón","reacción","realidad","rebaño","rebote","recaer","receta","rechazo","recoger","recreo","recto","recurso","red","redondo","reducir","reflejo","reforma","refrán","refugio","regalo","regir","regla","regreso","rehén","reino","reír","reja","relato","relevo","relieve","relleno","reloj","remar","remedio","remo","rencor","rendir","renta","reparto","repetir","reposo","reptil","res","rescate","resina","respeto","resto","resumen","retiro","retorno","retrato","reunir","revés","revista","rey","rezar","rico","riego","rienda","riesgo","rifa","rígido","rigor","rincón","riñón","río","riqueza","risa","ritmo","rito","rizo","roble","roce","rociar","rodar","rodeo","rodilla","roer","rojizo","rojo","romero","romper","ron","ronco","ronda","ropa","ropero","rosa","rosca","rostro","rotar","rubí","rubor","rudo","rueda","rugir","ruido","ruina","ruleta","rulo","rumbo","rumor","ruptura","ruta","rutina","sábado","saber","sabio","sable","sacar","sagaz","sagrado","sala","saldo","salero","salir","salmón","salón","salsa","salto","salud","salvar","samba","sanción","sandía","sanear","sangre","sanidad","sano","santo","sapo","saque","sardina","sartén","sastre","satán","sauna","saxofón","sección","seco","secreto","secta","sed","seguir","seis","sello","selva","semana","semilla","senda","sensor","señal","señor","separar","sepia","sequía","ser","serie","sermón","servir","sesenta","sesión","seta","setenta","severo","sexo","sexto","sidra","siesta","siete","siglo","signo","sílaba","silbar","silencio","silla","símbolo","simio","sirena","sistema","sitio","situar","sobre","socio","sodio","sol","solapa","soldado","soledad","sólido","soltar","solución","sombra","sondeo","sonido","sonoro","sonrisa","sopa","soplar","soporte","sordo","sorpresa","sorteo","sostén","sótano","suave","subir","suceso","sudor","suegra","suelo","sueño","suerte","sufrir","sujeto","sultán","sumar","superar","suplir","suponer","supremo","sur","surco","sureño","surgir","susto","sutil","tabaco","tabique","tabla","tabú","taco","tacto","tajo","talar","talco","talento","talla","talón","tamaño","tambor","tango","tanque","tapa","tapete","tapia","tapón","taquilla","tarde","tarea","tarifa","tarjeta","tarot","tarro","tarta","tatuaje","tauro","taza","tazón","teatro","techo","tecla","técnica","tejado","tejer","tejido","tela","teléfono","tema","temor","templo","tenaz","tender","tener","tenis","tenso","teoría","terapia","terco","término","ternura","terror","tesis","tesoro","testigo","tetera","texto","tez","tibio","tiburón","tiempo","tienda","tierra","tieso","tigre","tijera","tilde","timbre","tímido","timo","tinta","tío","típico","tipo","tira","tirón","titán","títere","título","tiza","toalla","tobillo","tocar","tocino","todo","toga","toldo","tomar","tono","tonto","topar","tope","toque","tórax","torero","tormenta","torneo","toro","torpedo","torre","torso","tortuga","tos","tosco","toser","tóxico","trabajo","tractor","traer","tráfico","trago","traje","tramo","trance","trato","trauma","trazar","trébol","tregua","treinta","tren","trepar","tres","tribu","trigo","tripa","triste","triunfo","trofeo","trompa","tronco","tropa","trote","trozo","truco","trueno","trufa","tubería","tubo","tuerto","tumba","tumor","túnel","túnica","turbina","turismo","turno","tutor","ubicar","úlcera","umbral","unidad","unir","universo","uno","untar","uña","urbano","urbe","urgente","urna","usar","usuario","útil","utopía","uva","vaca","vacío","vacuna","vagar","vago","vaina","vajilla","vale","válido","valle","valor","válvula","vampiro","vara","variar","varón","vaso","vecino","vector","vehículo","veinte","vejez","vela","velero","veloz","vena","vencer","venda","veneno","vengar","venir","venta","venus","ver","verano","verbo","verde","vereda","verja","verso","verter","vía","viaje","vibrar","vicio","víctima","vida","vídeo","vidrio","viejo","viernes","vigor","vil","villa","vinagre","vino","viñedo","violín","viral","virgo","virtud","visor","víspera","vista","vitamina","viudo","vivaz","vivero","vivir","vivo","volcán","volumen","volver","voraz","votar","voto","voz","vuelo","vulgar","yacer","yate","yegua","yema","yerno","yeso","yodo","yoga","yogur","zafiro","zanja","zapato","zarza","zona","zorro","zumo","zurdo"]')},4946:module=>{"use strict";module.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"}}')},5207:module=>{"use strict";module.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:module=>{"use strict";module.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"}')},9799:module=>{"use strict";module.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"}}')},8597:module=>{"use strict";module.exports={i8:"6.5.4"}},2562:module=>{"use strict";module.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"}')}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}return __webpack_require__.amdO={},__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__(5590)})()));

Выполнить команду


Для локальной разработки. Не используйте в интернете!